/* Police : Futura si installée (Mac/iOS), sinon Jost (libre, OFL, dessinée d'après Futura),
   hébergée sur le site (aucun appel à un service tiers) */
@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/jost-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/jost-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Jost';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/jost-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Jost';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/jost-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Une seule police partout, y compris boutons et champs (qui n'en héritent pas par défaut) */
button,
input,
select,
textarea {
    font-family: inherit;
}

/* Aucun texte en gras, y compris titres, <strong>, libellés et en-têtes de tableau */
h1, h2, h3, h4, h5, h6,
strong, b, th, legend, optgroup {
    font-weight: normal;
}

body {
    font-family: 'Futura', 'Futura PT', 'Jost', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Page plus large pour le tableau des édifices ACR */
.container-wide {
    max-width: 1200px;
}

/* Liste des édifices ACR (liste-acr.html) */
.acr-intro {
    text-align: center;
    margin-bottom: 25px;
}

.acr-retour {
    margin-bottom: 20px;
}

.acr-filtres {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    margin-bottom: 15px;
}

.acr-compteur {
    grid-column: 1 / -1;
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.95em;
}

.acr-tableau {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.acr-tableau table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.acr-tableau th,
.acr-tableau td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

.acr-tableau th {
    position: sticky;
    top: 0;
    background: #2c3e50;
    color: #fff;
    white-space: nowrap;
}

.acr-tableau tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.acr-tableau tbody tr:hover {
    background: #eef4fa;
}

.acr-tableau a {
    color: #2980b9;
}

.acr-source {
    margin-top: 20px;
    font-size: 0.85em;
    color: #7f8c8d;
    text-align: center;
}

.acr-source a {
    color: #7f8c8d;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

/* Page d'accueil */
.intro-text {
    text-align: center;
    margin-bottom: 30px;
}

/* Titres : tous à la taille de « le concours-photos… » */
h1, h2, h3, legend,
.intro-line,
.concours-title {
    font-size: 1.8em;
    line-height: 1.3;
}

/* Texte : tout aligné sur « Immortalise… » */
.intro-description,
.intro-ideas,
.intro-prizes,
.acr-intro,
.subtitle,
.reglement-content p,
.success-message p,
.error-message p {
    font-size: 1.05em;
    color: #555;
    line-height: 1.7;
    font-style: normal;
}

.intro-line {
    color: #555;
    margin-bottom: 20px;
}

/* Retour à la ligne visible uniquement sur petit écran (voir @media plus bas) */
.br-mobile {
    display: none;
}

.concours-title {
    color: #2c3e50;
    margin-bottom: 25px;
}

.title-highlight {
    color: #e74c3c;
    font-weight: normal;
}

.intro-logo {
    margin-bottom: 25px;
}

.intro-logo img {
    display: block;
    margin: 0 auto;
}

.logo-bicentenaire {
    width: 192px;
    max-width: 100%;
    height: auto;
}

.intro-description,
.intro-ideas {
    margin-bottom: 20px;
}

.cta-section {
    text-align: center;
    margin: 30px 0;
}

.btn-participate {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: normal;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-participate:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.logo-acr {
    max-width: 200px;
    max-height: 100px;
    object-fit: contain;
}

.logo-maca {
    max-width: 300px;
    max-height: 200px;
    object-fit: contain;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

h2 {
    color: #34495e;
    margin-bottom: 10px;
    font-weight: normal;
}

.subtitle {
    margin-bottom: 5px;
}

.dates {
    font-size: 1em;
    color: #e74c3c;
    font-weight: normal;
}

/* Form */
fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

legend {
    font-weight: normal;
    color: #2c3e50;
    padding: 0 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    color: #555;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #7f8c8d;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: #2980b9;
    background-color: #ebf5fb;
}

.drop-zone.dragover {
    border-color: #27ae60;
    border-style: solid;
    background-color: #d5f5e3;
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.drop-zone-icon {
    width: 48px;
    height: 48px;
    color: #3498db;
}

.drop-zone-text {
    font-size: 1.1em;
    color: #555;
    margin: 0;
}

.drop-zone-or {
    font-size: 0.9em;
    color: #7f8c8d;
    margin: 0;
}

.btn-browse {
    background-color: #3498db;
    color: white;
    padding: 10px 25px;
    font-size: 0.95em;
}

.btn-browse:hover {
    background-color: #2980b9;
}

/* Preview */
.drop-zone-preview {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.drop-zone-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-info {
    text-align: center;
}

.preview-info p {
    margin: 0;
    font-size: 0.9em;
    color: #555;
}

.preview-info #preview-name {
    font-weight: normal;
    color: #2c3e50;
}

.preview-info #preview-size {
    color: #7f8c8d;
    font-size: 0.85em;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.btn-remove:hover {
    background-color: #c0392b;
}

.btn-remove svg {
    width: 18px;
    height: 18px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Turnstile */
.turnstile-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-next,
.btn-submit {
    background-color: #27ae60;
    color: white;
}

.btn-next:hover,
.btn-submit:hover {
    background-color: #219a52;
}

.btn-prev {
    background-color: #95a5a6;
    color: white;
}

.btn-prev:hover {
    background-color: #7f8c8d;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-vote {
    background-color: #27ae60;
    color: white;
    padding: 8px 20px;
    font-size: 0.9em;
}

.btn-vote:hover {
    background-color: #219a52;
}

.btn-vote:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-toggle,
.btn-delete {
    padding: 6px 15px;
    font-size: 0.85em;
}

.btn-toggle {
    background-color: #f39c12;
    color: white;
}

.btn-toggle:hover {
    background-color: #d68910;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* Messages */
.success-message,
.error-message {
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-message h3,
.error-message h3 {
    margin-bottom: 10px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.jury-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.9em;
}

.jury-link:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Utility */
.hidden {
    display: none !important;
}

/* ====== JURY ====== */
.login-section {
    max-width: 400px;
    margin: 0 auto;
}

.jury-header,
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.photos-container {
    display: grid;
    gap: 20px;
}

.photo-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.photo-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.photo-info {
    padding: 15px;
}

/* Titre d'une photo dans la galerie jury : contenu de carte, pas un titre de page */
.photo-info h3 {
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 1.05em;
}

.photo-id {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.commentaire {
    font-style: italic;
    color: #555;
    font-size: 0.95em;
}

.vote-section {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vote-section label {
    margin-bottom: 0;
    font-weight: normal;
}

.note-select {
    width: auto;
    padding: 8px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.no-photos,
.no-users {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

/* ====== ADMIN ====== */
.add-user-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.add-user-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.users-list-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-role {
    color: #7f8c8d;
    font-size: 0.9em;
}

.user-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: normal;
}

.user-status.actif {
    background-color: #d4edda;
    color: #155724;
}

.user-status.inactif {
    background-color: #f8d7da;
    color: #721c24;
}

.user-actions {
    display: flex;
    gap: 8px;
}

/* Règlement */
.reglement-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    line-height: 1.8;
    color: #444;
}

.reglement-content p {
    margin-bottom: 20px;
}

.link-pdf {
    color: #3498db;
    text-decoration: underline;
}

.link-pdf:hover {
    color: #2980b9;
}

/* QR Codes Section */
.qr-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.qr-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.qr-codes {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-item img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-item p {
    font-size: 0.9em;
    color: #555;
    font-weight: normal;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .br-mobile {
        display: inline;
    }

    .acr-filtres {
        grid-template-columns: 1fr;
        row-gap: 15px;
    }

    .container {
        padding: 20px;
    }

    .logos {
        gap: 15px;
    }

    .logo-acr {
        max-width: 150px;
    }

    .logo-maca {
        max-width: 240px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .jury-header,
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .user-row {
        flex-direction: column;
        align-items: stretch;
    }

    .user-actions {
        justify-content: stretch;
    }

    .user-actions .btn {
        flex: 1;
    }
}
