/* ============================================================
   DÉFI — STYLE SOBRE ET ISOLÉ
   (Aucune dépendance aux styles CAPVO)
============================================================ */

/* Conteneur principal */
.concours-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 10px;
    font-family: Arial, sans-serif;
}

/* Titres */
.concours-container h1 {
    font-size: 1.8em;
    color: #2e7d32;
    text-align: center;
    margin-bottom: 20px;
}

.concours-container h3 {
    font-size: 1.2em;
    color: #2e7d32;
    margin-bottom: 8px;
}
div .retour {
    padding: 5px;
    background-color: green;
    text-align: center;
    max-width: 200px;
    margin-bottom: 20px;
    border-radius: 15px;
}
.retour a {
    font-size: 0.8em;
    color: white;
}
.retour:hover {
background-color: #1b5e20;
color: white;
}
div .historique {
    padding: 10px;
    background:white;
    text-align: center;
    margin: auto;
    margin-top: 10px;
}
div .historique h3 {
margin:0;
}
.historique:hover {
background-color:  #f5f5f5;
}
/* Blocs génériques */
.concours-bloc {
    background: #f5f5f5;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    text-align: initial !important;
}

/* Statut */
.concours-statut {
    border-left: 6px solid #2e7d32;
    padding-left: 12px;
}

/* Dates */
.concours-dates p {
    margin: 5px 0;
}

/* Actions */
.concours-actions {
    margin-top: 20px;
}

.concours-actions a {
    display: inline-block;
    padding: 10px 15px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    border: 1px solid #1b5e20;
    margin-right: 10px;
}

.concours-actions a:hover {
    background: #1b5e20;
}

/* Boutons défi */
.concours-btn,
.concours-btn-action {
    padding: 10px 15px;
    background: #2e7d32;
    color: white;
    border: 1px solid #1b5e20;
    cursor: pointer;
    display: inline-block !important;
    text-align: center !important;
    font-size: 1em;
}

.concours-btn:hover,
.concours-btn-action:hover {
    background: #1b5e20;
}

/* Neutralisation CAPVO */
.concours-container button,
.concours-container .concours-btn {
    position: static !important;
    right: auto !important;
    margin: 0 auto !important;
    float: none !important;
    width: auto !important;
    min-width: 120px;
}

/* Formulaires */
.concours-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #bbb;
    margin-bottom: 12px;
    font-size: 1em;
}

.concours-bloc form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    align-items: center !important;
    text-align: center !important;
}

/* Tableaux */
.concours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.concours-table th,
.concours-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

/* Nouvelle couleur d’en‑tête */
.concours-table th {
    background: #2e7d32;
    color: white;
    font-weight: bold;
}

/* Statuts */
.statut-termine {
    color: #2e7d32;
    font-weight: bold;
}

.statut-encours {
    color: #d17b00;
    font-weight: bold;
}

.statut-inconnu {
    color: #777;
    font-style: italic;
}

/* Messages */
.concours-message {
    padding: 10px;
    border: 1px solid #bbb;
    background: #eee;
    margin-bottom: 15px;
}

/* Résultats */
.concours-resultats {
    background: #f5f5f5;
    padding: 15px;
    border: 1px solid #ddd;
}

/* ============================================================
   BARRE DE CONNEXION — STYLE CAPVO (fidèle)
============================================================ */

.auth-bar-capvo {
    background: #ffffff;
    border: 1px solid #cccccc;
    padding: 8px 12px;
    margin: 10px auto 20px auto;
    max-width: 900px;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-bar-capvo .auth-info {
    font-size: 0.95em;
    color: #333333;
}

.auth-bar-capvo .auth-actions a {
    display: inline-block;
    padding: 6px 12px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    margin-left: 8px;
    font-size: 0.9em;
}

.auth-bar-capvo .auth-actions a:hover {
    background: #1b5e20;
}

/* ============================================================
   GALERIE — VIGNETTES + LIGHTBOX
============================================================ */

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.galerie-card {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.galerie-card:hover {
    transform: scale(1.03);
}

.galerie-card img {
    max-width: 100%;
    border-radius: 4px;
}

.galerie-meta {
    margin-top: 8px;
    font-size: 14px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.85);
    text-align: center;
    padding-top: 40px;
}

.lightbox:target {
    display: block;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 6px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 28px;
    text-decoration: none;
}

.lightbox-caption {
    color: #eee;
    margin-top: 10px;
    font-size: 16px;
}

.galerie-scroll {
    /*max-height: 70vh;*/
    overflow-y: auto;
    padding-right: 5px;
}

/* Fade-in */
.galerie-card img {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.galerie-card img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Lightbox animation */
.lightbox img {
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.lightbox:target img {
    transform: scale(1);
    opacity: 1;
}
.choix {
 margin-top:10px; 
 text-align:center;

}



.choix{
  font-size: 0.8em;
}
.vote-disabled {
    opacity: 0.35;
    filter: grayscale(100%);
    pointer-events: none;
    position: relative;
}

.vote-disabled::after {
    content: "Votre photo";
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #c62828;
    background: rgba(255,255,255,0.8);
    padding: 3px 0;
    border-radius: 3px;
}

/* ============================================================
   CLASSEMENT COMPLET — TABLEAU AVEC SÉPARATIONS VISIBLES
============================================================ */

.table-capvo {
    width: 100%;
    border-collapse: collapse;
}

.table-capvo th {
    background: #2e7d32;
    color: white;
    padding: 10px;
    border: 1px solid #ddd;
}

.table-capvo td {
    padding: 10px 8px;
    border: none;
}

.table-capvo tbody tr {
    border-bottom: 2px solid #d0d0d0;
}

.table-capvo tbody tr:last-child {
    border-bottom: none;
}

.btn-small {
    padding: 6px 12px;
    background-color: #0077cc;
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
}

.btn-small:hover {
    background-color: #005fa3;
}

.concours-btn:hover {
    color: white !important;
}

/* ============================================================
   OPTIMISATION MOBILE — LISIBILITÉ + CONFORT
============================================================ */
@media (max-width: 600px) {

    body {
        font-size: 17px;
        line-height: 1.55;
    }

    .concours-container {
        padding: 12px;
        margin: 15px auto;
    }

    .concours-container h1 {
        font-size: 1.9em;
        margin-bottom: 18px;
    }

    .concours-container h3 {
        font-size: 1.35em;
    }

    .concours-bloc {
        padding: 18px;
        font-size: 1.05em;
    }

    .concours-actions a,
    .concours-actions span,
    .concours-btn,
    .concours-btn-action {
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px 0 !important;
        padding: 14px 0 !important;
        font-size: 1.15em !important;
        text-align: center !important;
    }

    .concours-input {
        font-size: 1.1em;
        padding: 10px;
    }

    .auth-bar-capvo {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        font-size: 1em;
    }

    .auth-bar-capvo .auth-actions a {
        padding: 10px 14px;
        font-size: 1em;
        margin-left: 0;
        margin-bottom: 8px;
    }

    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }

    .galerie-meta {
        font-size: 15px;
    }
}

/* Ajustement global pour éviter le zoom manuel sur Android */
@media (max-width: 600px) {
    body {
        transform: scale(0.75);
        transform-origin: top left;
        width: 133.33%;
    }
}

/* ============================================================
   CORRECTION — HAMBURGER VISIBLE + AU PREMIER PLAN
============================================================ */

/* Bouton hamburger : position d’origine + visibilité */
.menu__btn {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    z-index: 10001 !important;
}

/* Barres visibles */
.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
    background-color: #333 !important;
}

/* Panneau du menu */
.menu__box {
    position: fixed !important;
    z-index: 10000 !important;
}