/* Page cotisation — cartes centrées, palette alignée sur la sidebar (#266eb4) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bleu: #266eb4;
    --bleu-fonce: #1f5a85;
    --vert: #1e8e5a;
    --vert-pale: #e3f5ec;
    --orange: #b45309;
    --orange-pale: #fef3e2;
    --encre: #1f2937;
    --gris: #6b7280;
    --bord: #e5e7eb;
    --fond: #f3f5f8;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--fond);
    color: var(--encre);
}

.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ---- Retour ---- */
.retour {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--bleu-fonce);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.retour:hover {
    text-decoration: underline;
}

.retour:focus-visible {
    outline: 3px solid var(--bleu);
    outline-offset: 2px;
}

/* ---- Messages flash ---- */
.messages-flash {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    background: #eef2f7;
    color: var(--encre);
    border: 1px solid var(--bord);
}

.flash.error {
    background: #fdeaea;
    color: #8a1c1c;
    border-color: #f3c2c2;
}

.flash.success {
    background: var(--vert-pale);
    color: var(--vert);
    border-color: #bfe6d2;
}

.flash.warning {
    background: var(--orange-pale);
    color: var(--orange);
    border-color: #f5d9ae;
}

/* ---- En-tête + progression ---- */
.entete h1 {
    font-size: 1.9rem;
    font-weight: 700;
}

.entete .sous-titre {
    color: var(--gris);
    margin-top: 6px;
    font-size: 1rem;
}

.progression {
    margin-top: 22px;
    background: #fff;
    border: 1px solid var(--bord);
    border-radius: 12px;
    padding: 18px 22px;
}

.progression .libelle {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
}

.progression .libelle small {
    color: var(--gris);
    font-weight: 400;
}

.barre {
    margin-top: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--bord);
    overflow: hidden;
}

.barre > div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bleu), var(--vert));
    transition: width 0.4s ease;
}

/* ---- Étapes ---- */
.etapes {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.etape {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--bord);
    border-radius: 12px;
    padding: 18px 22px;
}

.etape .pastille {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    background: #eef2f7;
    color: var(--bleu-fonce);
    border: 2px solid var(--bord);
}

.etape.faite .pastille {
    background: var(--vert-pale);
    border-color: var(--vert);
    color: var(--vert);
}

.etape .contenu {
    flex: 1;
    min-width: 0;
}

.etape h2 {
    font-size: 1.05rem;
    font-weight: 600;
}

.etape .detail {
    color: var(--gris);
    font-size: 0.9rem;
    margin-top: 3px;
}

/* ---- Badges et boutons ---- */
.badge-statut {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-statut.fait {
    background: var(--vert-pale);
    color: var(--vert);
}

.badge-statut.a-faire {
    background: var(--orange-pale);
    color: var(--orange);
}

.bouton {
    flex-shrink: 0;
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--bleu);
    border-radius: 8px;
    background: var(--bleu);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.bouton:hover {
    background: var(--bleu-fonce);
    color: #fff;
}

.bouton:disabled {
    background: var(--gris);
    border-color: var(--gris);
    cursor: not-allowed;
}

.bouton:focus-visible,
.formule:focus-within {
    outline: 3px solid var(--bleu);
    outline-offset: 2px;
}

/* ---- Paiement ---- */
.paiement {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--bord);
    border-radius: 12px;
    padding: 24px;
}

.paiement h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.paiement .intro {
    color: var(--gris);
    font-size: 0.95rem;
    margin-top: 6px;
}

.formules {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formule {
    display: block;
    border: 2px solid var(--bord);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.formule:hover {
    border-color: var(--bleu);
}

.formule:has(input:checked) {
    border-color: var(--bleu);
    background: #f0f6fc;
}

.formule .ligne {
    display: flex;
    align-items: center;
    gap: 12px;
}

.formule input {
    accent-color: var(--bleu);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.formule .nom {
    font-weight: 600;
    flex: 1;
}

.formule .montant {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bleu-fonce);
}

.formule .mention-sg {
    margin-top: 4px;
    margin-left: 30px;
    font-size: 0.85rem;
    color: var(--gris);
}

.paiement .bouton {
    margin-top: 18px;
    width: 100%;
    padding: 13px;
    font-size: 1rem;
}

.infos {
    margin-top: 18px;
    border-top: 1px solid var(--bord);
    padding-top: 14px;
}

.infos p {
    color: var(--gris);
    font-size: 0.88rem;
    margin: 4px 0;
}

/* ---- Pastille email confirmé ---- */
.pastille-email {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    border: none;
    padding: 0;
}

button.pastille-email {
    cursor: pointer;
}

button.pastille-email:focus-visible {
    outline: 3px solid var(--bleu);
    outline-offset: 2px;
}

.pastille-email.ok {
    background: var(--vert);
}

.pastille-email.ko {
    background: #b3261e;
}

/* ---- Onglets ---- */
.onglets {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.onglets a {
    padding: 9px 20px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--bord);
    color: var(--bleu-fonce);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.onglets a:hover {
    border-color: var(--bleu);
}

.onglets a.actif {
    background: var(--bleu);
    color: #fff;
    border-color: var(--bleu);
}

.onglets a:focus-visible {
    outline: 3px solid var(--bleu);
    outline-offset: 2px;
}

/* ---- Cases à cocher ---- */
.case-cocher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.case-cocher input,
.formulaire .case-cocher input {
    width: 18px;
    height: 18px;
    accent-color: var(--bleu);
    margin: 0;
    padding: 0;
    border: none;
    flex-shrink: 0;
}

.case-cocher label,
.formulaire .case-cocher label {
    margin: 0;
    font-weight: 500;
    font-size: 0.95rem;
}

/* ---- Bouton danger ---- */
.bouton-danger {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: #fff;
    color: #b3261e;
    border: 1px solid #e5b6b3;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.bouton-danger:hover {
    background: #fdeaea;
}

.bouton-danger:disabled {
    color: var(--gris);
    border-color: var(--bord);
    cursor: not-allowed;
}

.boutons-ligne {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.boutons-ligne .bouton,
.boutons-ligne .bouton-danger,
.carte .boutons-ligne .bouton,
.formulaire .boutons-ligne .bouton {
    margin-top: 0;
}

/* Ligne charte : libellé + pastille à gauche, boutons à droite */
.ligne-charte {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* ---- Dashboard ---- */
.grille-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 26px;
}

.carte {
    background: #fff;
    border: 1px solid var(--bord);
    border-radius: 12px;
    padding: 22px;
}

.carte h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.carte .note {
    color: var(--gris);
    font-size: 0.88rem;
    margin-top: 6px;
}

.carte .barre {
    margin-top: 14px;
}

.carte .bouton {
    margin-top: 16px;
}

.profil-lignes {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profil-lignes p {
    font-size: 0.95rem;
}

.profil-lignes .etiquette {
    display: inline-block;
    min-width: 110px;
    color: var(--gris);
}

.hidden,
.formulaire.hidden {
    display: none;
}

.formulaire {
    margin-top: 18px;
    border-top: 1px solid var(--bord);
    padding-top: 6px;
    display: flex;
    flex-direction: column;
}

.formulaire label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 14px;
}

.formulaire input,
.formulaire select,
.formulaire textarea {
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--bord);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    width: 100%;
}

.formulaire textarea {
    min-height: 90px;
    resize: vertical;
}

.formulaire input:focus,
.formulaire select:focus,
.formulaire textarea:focus {
    outline: 3px solid var(--bleu);
    outline-offset: 1px;
}

.formulaire .grille-champs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.formulaire .grille-champs > div {
    display: flex;
    flex-direction: column;
}

@media (max-width: 640px) {
    .formulaire .grille-champs {
        grid-template-columns: 1fr;
    }
}

.formulaire h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--bord);
}

.formulaire .note {
    margin-top: 12px;
}

.carte ul {
    margin: 10px 0 10px 22px;
}

.carte li,
.carte > p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 8px;
}

/* ---- Mobile ---- */
@media (max-width: 800px) {
    .grille-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .etape {
        flex-wrap: wrap;
    }

    .etape .contenu {
        flex: 1 1 60%;
    }

    .etape .badge-statut,
    .etape .bouton {
        margin-left: 60px;
    }
}

/* Astérisque des champs obligatoires */
.requis::after {
    content: " *";
    color: #c0392b;
    font-weight: 700;
}

/* ---- Réservations : sections, cartes, listes, statuts ---- */
.titre-section {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bleu-fonce);
    margin-top: 30px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bord);
}

.titre-carte {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.grille-cartes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.liste-cartes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.carte .description {
    color: var(--gris);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.carte-liste {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.carte-liste .info {
    flex: 1;
    min-width: 200px;
}

.carte-liste .sous {
    color: var(--bleu-fonce);
    font-weight: 500;
    font-size: 0.92rem;
    margin-top: 2px;
}

.carte-liste .dates {
    color: var(--gris);
    font-size: 0.88rem;
    margin-top: 4px;
}

.vide {
    text-align: center;
    color: var(--gris);
    background: #fff;
    border: 1px dashed var(--bord);
    border-radius: 12px;
    padding: 32px 20px;
    margin-top: 16px;
    font-size: 0.95rem;
}

/* Pastilles de statut réservation */
.statut {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.statut-SOUMIS {
    background: var(--orange-pale);
    color: var(--orange);
}

.statut-EN_ATTENTE_SIGNATURE {
    background: #e6f0f7;
    color: var(--bleu-fonce);
}

.statut-VALIDE {
    background: var(--vert-pale);
    color: var(--vert);
}

.statut-REFUSE {
    background: #fdeaea;
    color: #8a1c1c;
}

/* Grille libellé / valeur (détail réservation) */
.infos-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.champ-detail {
    margin-top: 16px;
}

.etiquette-champ {
    display: block;
    font-size: 0.78rem;
    color: var(--gris);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.valeur {
    font-size: 0.98rem;
    margin-top: 3px;
}

/* Galeries d'images */
.images-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.images-grille img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bord);
}

.miniature {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bord);
}

/* Groupe de radios en ligne */
.radios {
    display: flex;
    gap: 18px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.radios label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}

.radios input {
    accent-color: var(--bleu);
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

/* Erreurs de champ (errorlist Django) */
.errorlist {
    list-style: none;
    color: #b3261e;
    font-size: 0.85rem;
    margin-top: 5px;
    padding: 0;
}

/* Sélecteur de langue pour les pages sans navbar (visiteur non connecté) */
.lang-flags {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.lang-flags img {
    height: 24px;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
