/* ----------------------------------------------------------------
   Reset & Base
---------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 15px;
    background-color: #f0f4f8;
    color: #333;
}

/* ----------------------------------------------------------------
   Container
---------------------------------------------------------------- */
.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

h1 {
    text-align: center;
    font-size: 26px;
    color: #5983b0;
    margin-bottom: 10px;
}

h2 {
    font-size: 18px;
    color: #456486;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #98bee7;
}

h3 {
    font-size: 16px;
    color: #456486;
    margin: 20px 0 10px 0;
}

/* ----------------------------------------------------------------
   Card
---------------------------------------------------------------- */
.card {
    background-color: rgb(227, 233, 252);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ----------------------------------------------------------------
   Grille
---------------------------------------------------------------- */
.grille-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grille-plein {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .grille-2 {
        grid-template-columns: 1fr;
    }
    .grille-plein {
        grid-column: span 1;
    }
}

/* ----------------------------------------------------------------
   Champs
---------------------------------------------------------------- */
.champ {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.champ label {
    font-size: 13px;
    font-weight: bold;
    color: #555;
}

.champ input,
.champ select {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.2s;
}

.champ input:focus,
.champ select:focus {
    outline: none;
    border-color: #5983b0;
    box-shadow: 0 0 0 2px rgba(89, 131, 176, 0.2);
}

.champ input[readonly] {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

input.montant {
    background-color: #f9cfb5;
    font-weight: bold;
    text-align: right;
}

/* ----------------------------------------------------------------
   Boutons
---------------------------------------------------------------- */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-valider {
    background-color: #b3ffb3;
    color: #333;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 10px;
}

.btn-ajouter {
    background-color: #5983b0;
    color: white;
    margin-top: 15px;
}

.btn-supprimer {
    background-color: #ff7d7d;
    color: white;
    padding: 4px 10px;
    font-size: 12px;
}

/* ----------------------------------------------------------------
   Choix statut (index.html)
---------------------------------------------------------------- */
.choix-statut {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-choix {
    flex: 1;
    background-color: #eeeeee;
    color: #333;
    padding: 12px;
    font-size: 15px;
}

.btn-choix.actif {
    background-color: #5983b0;
    color: white;
}

/* ----------------------------------------------------------------
   Tableau abonnements
---------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

thead tr {
    background-color: #eeeeee;
}

thead th {
    padding: 8px 10px;
    text-align: left;
    font-weight: bold;
    color: #456486;
    border-bottom: 2px solid #98bee7;
}

tbody tr:nth-child(even) {
    background-color: #a5baf1;
}

tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

tfoot tr {
    background-color: #f0f4f8;
    font-weight: bold;
}

tfoot td {
    padding: 8px 10px;
}

.total-label {
    text-align: right;
    color: #456486;
}

.total-montant {
    color: #333;
    font-size: 15px;
}

/* ----------------------------------------------------------------
   Messages
---------------------------------------------------------------- */
.info {
    background-color: #e8f0fb;
    border-left: 4px solid #5983b0;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #456486;
}

.erreur {
    background-color: #ffe0e0;
    border-left: 4px solid #ff7d7d;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
    color: #cc0000;
}

.hidden {
    display: none;
}

/* ----------------------------------------------------------------
   Page confirmation
---------------------------------------------------------------- */
.confirmation {
    text-align: center;
    padding: 50px 25px;
}

.icone-ok {
    font-size: 60px;
    color: #b3ffb3;
    background-color: #5983b0;
    width: 90px;
    height: 90px;
    line-height: 90px;
    border-radius: 50%;
    margin: 0 auto 25px auto;
}

.confirmation h1 {
    color: #5983b0;
    margin-bottom: 15px;
}

.confirmation p {
    color: #666;
    margin-bottom: 10px;
    font-size: 15px;
}

.confirmation .btn-valider {
    display: inline-block;
    width: auto;
    padding: 12px 30px;
    margin-top: 25px;
    text-decoration: none;
}

/* Cours multiples */
.grille-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .grille-3 {
        grid-template-columns: 1fr;
    }
}

.ligne-cours-multiple {
    background-color: #f7f9fc;
    border: 1px solid #d0e0f0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.btn-ajouter-cours {
    background-color: #8eadce;
    color: white;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* Compteur cours */
.compteur {
    font-size: 13px;
    font-weight: normal;
    margin-left: 10px;
    padding: 3px 8px;
    border-radius: 10px;
}

.compteur-ok {
    background-color: #b3ffb3;
    color: #333;
}

.compteur-erreur {
    background-color: #ffe0e0;
    color: #cc0000;
}

/* Checkbox */
.label-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #555;
    padding: 10px;
    background-color: #f0f4f8;
    border-radius: 5px;
    border: 1px solid #ccc;
}

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

/* Frais d'adhésion */
.bloc-frais-adhesion {
    background-color : #f0f4f8;
    border           : 1px solid #98bee7;
    border-radius    : 6px;
    padding          : 15px;
    margin-bottom    : 20px;
}

.ligne-frais {
    background-color : #f0f4f8 !important;
    font-style       : italic;
    color            : #456486;
}

/* ----------------------------------------------------------------
   Tableau responsive mobile
---------------------------------------------------------------- */
@media (max-width: 600px) {

    /* Cacher l'entête du tableau */
    #table_abonnements thead {
        display: none;
    }

    /* Chaque ligne devient un bloc */
    #table_abonnements tbody tr,
    #table_abonnements tfoot tr {
        display        : block;
        margin-bottom  : 15px;
        border         : 1px solid #d0e0f0;
        border-radius  : 6px;
        padding        : 10px;
        background     : white;
    }

    #table_abonnements tbody tr.ligne-frais {
        background : #f0f4f8;
    }

    /* Chaque cellule devient une ligne avec son label */
    #table_abonnements tbody td {
        display       : flex;
        justify-content: space-between;
        padding       : 5px 8px;
        border-bottom : 1px solid #eee;
        font-size     : 13px;
    }

    #table_abonnements tbody td:last-child {
        border-bottom : none;
    }

    /* Afficher le label avant la valeur */
    #table_abonnements tbody td::before {
        content     : attr(data-label);
        font-weight : bold;
        color       : #456486;
        margin-right: 10px;
        min-width   : 90px;
    }

    /* Cellule bouton supprimer */
    #table_abonnements tbody td:last-child::before {
        content : '';
    }

    /* Ligne total */
    #table_abonnements tfoot tr {
        display        : flex;
        justify-content: space-between;
        background     : #f0f4f8;
        font-weight    : bold;
        padding        : 10px 15px;
    }

    #table_abonnements tfoot td {
        border : none;
        padding: 0;
    }
}
/* ----------------------------------------------------------------
   Entête
---------------------------------------------------------------- */
.entete {
    display        : flex;
    flex-direction : column;
    align-items    : center;
    text-align     : center;
    margin-bottom  : 25px;
    gap            : 5px;
}

.entete h1 {
    margin-bottom : 0;
    text-align    : center;
}

.entete h2 {
    margin-bottom : 0;
    text-align    : center;
    border-bottom : none;
    color         : #5983b0;
}

.logo {
    height    : 80px;
    width     : auto;
}
bloc-info
.icone-erreur {
    font-size       : 60px;
    color           : white;
    background-color: #ff7d7d;
    width           : 90px;
    height          : 90px;
    line-height     : 90px;
    border-radius   : 50%;
    margin          : 0 auto 25px auto;
}

/* Choix paiement */
.choix-paiement {
    display        : flex;
    gap            : 15px;
    flex-direction : column;
}

.btn-valider-later {
    background-color: #eeeeee;
    color           : #333;
    width           : 100%;
    padding         : 12px;
    font-size       : 14px;
    margin-top      : 10px;
}

@media (max-width: 600px) {
    .choix-paiement {
        flex-direction: column;
    }
}

/* Icone attente */
.icone-attente {
    font-size       : 60px;
    color           : white;
    background-color: #f9cfb5;
    width           : 90px;
    height          : 90px;
    line-height     : 90px;
    border-radius   : 50%;
    margin          : 0 auto 25px auto;
    color           : #333;
}

/* Bloc info paiement plus tard */
.bloc-info {
    background-color: #f0f4f8;
    border-left     : 4px solid #5983b0;
    border-radius   : 6px;
    padding         : 15px 20px;
    margin          : 20px 0;
    text-align      : left;
}

.bloc-info ul {
    margin     : 10px 0 10px 20px;
    line-height: 1.8;
}

.bloc-info p {
    margin-bottom: 8px;
}

/* ----------------------------------------------------------------
   Page inscriptions en attente
---------------------------------------------------------------- */
.carte-inscription {
    margin-bottom  : 15px;
    border-left    : 5px solid #98bee7;
}

.carte-inscription.statut-paye {
    border-left-color: #b3ffb3;
}

.carte-inscription.statut-plus_tard {
    border-left-color: #f9cfb5;
}

.carte-inscription.statut-en_attente {
    border-left-color: #eeeeee;
}

.insc-entete {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    margin-bottom  : 10px;
    flex-wrap      : wrap;
    gap            : 10px;
}

.insc-identite {
    display       : flex;
    flex-direction: column;
    gap           : 3px;
}

.insc-nom {
    font-size  : 18px;
    font-weight: bold;
    color      : #456486;
}

.insc-date {
    font-size: 12px;
    color    : #888;
}

.insc-coordonnees {
    display    : flex;
    gap        : 20px;
    font-size  : 13px;
    color      : #555;
    margin-bottom: 10px;
    flex-wrap  : wrap;
}

/* Badge statut */
.statut-badge-paye {
    background-color: #b3ffb3;
    color           : #333;
    padding         : 5px 12px;
    border-radius   : 20px;
    font-size       : 13px;
    font-weight     : bold;
}

.statut-badge-plus_tard {
    background-color: #f9cfb5;
    color           : #333;
    padding         : 5px 12px;
    border-radius   : 20px;
    font-size       : 13px;
    font-weight     : bold;
}

.statut-badge-en_attente {
    background-color: #eeeeee;
    color           : #333;
    padding         : 5px 12px;
    border-radius   : 20px;
    font-size       : 13px;
    font-weight     : bold;
}

/* Tableau abonnements dans la carte */
.table-insc {
    width          : 100%;
    border-collapse: collapse;
    font-size      : 13px;
    margin-top     : 10px;
}

.table-insc thead tr {
    background-color: #f0f4f8;
}

.table-insc th {
    padding    : 6px 10px;
    text-align : left;
    color      : #456486;
    font-weight: bold;
    border-bottom: 2px solid #98bee7;
}

.table-insc tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

.table-insc td {
    padding      : 6px 10px;
    border-bottom: 1px solid #eee;
}

.table-insc tfoot td {
    padding    : 6px 10px;
    font-weight: bold;
    background : #f0f4f8;
}

.montant-cell {
    text-align: right;
}

/* Responsive mobile */
@media (max-width: 600px) {
    .insc-entete {
        flex-direction: column;
        align-items   : flex-start;
    }

    .table-insc thead {
        display: none;
    }

    .table-insc tbody tr {
        display      : block;
        margin-bottom: 10px;
        border       : 1px solid #eee;
        border-radius: 5px;
        padding      : 8px;
    }

    .table-insc tbody td {
        display        : flex;
        justify-content: space-between;
        border-bottom  : 1px solid #f0f0f0;
        font-size      : 12px;
    }

    .table-insc tfoot tr {
        display        : flex;
        justify-content: space-between;
        padding        : 8px;
    }
}

/* ----------------------------------------------------------------
   Historique membre
---------------------------------------------------------------- */
.card-historique {
    background-color: #f7f9fc;
    border          : 1px solid #d0e0f0;
    padding         : 15px;
    margin-bottom   : 15px;
}

.historique-titre {
    font-size    : 13px;
    color        : #888;
    margin-bottom: 10px;
    font-weight  : bold;
    letter-spacing: 1px;
}

.historique-sous-titre {
    font-size    : 12px;
    color        : #999;
    margin       : 10px 0 5px 0;
    font-style   : italic;
}

.historique-vide {
    font-size : 12px;
    color     : #aaa;
    font-style: italic;
}

/* Tableau historique */
.table-historique {
    width          : 100%;
    border-collapse: collapse;
    font-size      : 11px;
    color          : #777;
    margin-bottom  : 10px;
}

.table-historique th {
    padding         : 4px 8px;
    background-color: #eef2f7;
    color           : #999;
    font-weight     : bold;
    border-bottom   : 1px solid #d0e0f0;
    text-align      : left;
}

.table-historique td {
    padding      : 4px 8px;
    border-bottom: 1px solid #eee;
    color        : #888;
}

.table-historique tfoot td {
    font-weight     : bold;
    background-color: #eef2f7;
    color           : #666;
    padding         : 4px 8px;
}

/* Inscriptions en attente */
.historique-insc-ligne {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    padding        : 4px 0;
    font-size      : 11px;
    color          : #888;
    border-bottom  : 1px solid #eee;
}

/* Badges */
.badge-paye {
    background-color: #b3ffb3;
    color           : #333;
    padding         : 2px 8px;
    border-radius   : 10px;
    font-size       : 10px;
}

.badge-attente {
    background-color: #f9cfb5;
    color           : #333;
    padding         : 2px 8px;
    border-radius   : 10px;
    font-size       : 10px;
}

/* Solde */
.historique-solde {
    font-size    : 12px;
    margin-top   : 10px;
    padding      : 6px 10px;
    border-radius: 5px;
    text-align   : right;
}

.solde-rouge {
    background-color: #ffe0e0;
    color           : #cc0000;
}

.solde-vert {
    background-color: #e0ffe0;
    color           : #006600;
}

/* Responsive */
@media (max-width: 600px) {
    .table-historique thead {
        display: none;
    }
    .table-historique tbody tr {
        display      : block;
        margin-bottom: 8px;
        border       : 1px solid #eee;
        border-radius: 4px;
        padding      : 6px;
    }
    .table-historique tbody td {
        display        : flex;
        justify-content: space-between;
        font-size      : 11px;
        padding        : 3px 5px;
    }
}

/* Message promo */
#bloc_promo {
    background-color: #fff3cd;
    border-left     : 4px solid #f9a825;
    color           : #856404;
    font-size       : 14px;
    margin-bottom   : 15px;
}