/* Charte graphique SAN-Forma (cf. Charte-graphique-SAN-FORMA.zip fourni) —
   langage visuel (cartes, badges, grille mensuelle, nav) aligné sur
   l'application soeur Sillage pour rester cohérent entre apps SAN-Forma. */
:root {
    --sf-vert: #3B6750;
    --sf-vert-fonce: #2c4d3c;
    --sf-bleu-aqua: #87B1AE;
    --sf-rouge: #E42A17;
    --sf-marron: #4F3C1D;
    --sf-beige: #AEA783;
    --sf-creme: #FBF9F5;
    --sf-blanc: #FFFFFF;
    --sf-ombre: 0 1px 4px rgba(79, 60, 29, .1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: #374151;
    background: #f2f4f0;
    line-height: 1.55;
}

.titrage {
    font-family: 'Filson Pro', 'Segoe UI', Arial, sans-serif;
}

a {
    color: var(--sf-vert);
}

/* ── Navigation ── */
.bandeau-nav {
    background: linear-gradient(135deg, var(--sf-vert), var(--sf-vert-fonce));
    color: var(--sf-blanc);
    padding: 0 24px;
    height: 54px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.bandeau-nav .inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bandeau-nav .deconnexion {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 7px;
    background: rgba(255, 255, 255, .08);
    transition: background .15s, color .15s;
}

.bandeau-nav .deconnexion:hover {
    background: rgba(255, 60, 60, .25);
    color: var(--sf-blanc);
}

.bandeau-nav .logo {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.bandeau-onglets {
    background: var(--sf-blanc);
    border-bottom: 1px solid #e4ddc9;
}

.bandeau-onglets .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 0 24px;
}

.bandeau-onglets a {
    display: inline-block;
    padding: 12px 16px;
    color: var(--sf-marron);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.bandeau-onglets a.actif,
.bandeau-onglets a:hover {
    color: var(--sf-vert);
    border-bottom-color: var(--sf-vert);
}

main.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

h1 {
    font-size: 1.4rem;
    color: var(--sf-marron);
    margin: 0 0 1.25rem;
}

h2 {
    font-size: 1.05rem;
    color: var(--sf-marron);
    margin: 1.75rem 0 .85rem;
}

h2:first-child {
    margin-top: 0;
}

h3 {
    color: var(--sf-marron);
}

/* ── Cartes ── */
.card, .bloc {
    background: var(--sf-blanc);
    border-radius: 12px;
    box-shadow: var(--sf-ombre);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.carte-ics:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.card-title {
    font-size: .7rem;
    font-weight: 700;
    color: var(--sf-beige);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .85rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid #f0f0ee;
}

/* ── Stat tiles ── */
.chiffres {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.chiffre {
    background: var(--sf-blanc);
    border-radius: 10px;
    padding: .75rem 1.25rem;
    box-shadow: var(--sf-ombre);
    text-align: center;
    min-width: 140px;
}

.chiffre .val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sf-vert);
    line-height: 1;
}

.chiffre .lbl {
    font-size: .72rem;
    color: #6b7a6e;
    margin-top: .3rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── Tableaux (utilisés côté back-office pour les listes admin) ── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 24px;
    background: var(--sf-blanc);
    box-shadow: var(--sf-ombre);
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #ece6d6;
}

th {
    background: var(--sf-vert);
    color: var(--sf-blanc);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: #f6f3ea;
}

/* ── Badges / tags (statut, type de séance...) ── */
.tag, .badge {
    display: inline-block;
    background: var(--sf-beige);
    color: var(--sf-blanc);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 9px;
    border-radius: 99px;
}

.tag.tag-aquagym { background: #d0f0e2; color: #1a7a4a; }
.tag.tag-aquacardio { background: #fce8e5; color: #b02010; }
.tag.tag-aquabike { background: #e0f0ff; color: #1d6fa0; }
.tag.tag-aquapalming { background: #f1e8d5; color: var(--sf-marron); }

.badge-active, .badge-ok { background: #d0f0e2; color: #1a7a4a; }
.badge-complete { background: #fef3c7; color: #92400e; }
.badge-annulee { background: #e8e5d5; color: #7a786a; }
.badge-passee { background: #ececec; color: #6b7a6e; }

/* Avancement d'un Livrable SuiviProjet (App\Enum\Etat côté SuiviProjet) et
   statut d'un Jalon (App\Enum\StatutJalon) — mêmes teintes que
   Etat::couleur()/StatutJalon côté SuiviProjet, déclinées en pastel pour
   rester dans le langage graphique des badges de cette application. */
.badge-a-faire { background: #ececec; color: #6b6b6b; }
.badge-en-construction { background: #fdf1cf; color: #92720f; }
.badge-controle { background: #dbe6f8; color: #2954a3; }
.badge-validation-client { background: #ece3f5; color: #6b4894; }
.badge-correction { background: #fbe3d0; color: #a34e10; }
.badge-valide { background: #d0f0e2; color: #1a7a4a; }
.badge-a-venir { background: #ececec; color: #6b7a6e; }
.badge-atteint { background: #d0f0e2; color: #1a7a4a; }
.badge-manque { background: #fbe0dc; color: #b3261e; }

/* ── Boutons & formulaires ── */
button, .bouton {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--sf-vert);
    color: var(--sf-blanc);
    border: none;
    border-radius: 7px;
    padding: .5rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s;
}

button:hover, .bouton:hover {
    background: var(--sf-vert-fonce);
}

.btn-outline {
    background: var(--sf-blanc);
    color: var(--sf-marron);
    border: 1.5px solid #dde5e0;
}

.btn-outline:hover {
    border-color: var(--sf-vert);
    color: var(--sf-vert);
    background: var(--sf-blanc);
}

form:not(.form-inline) label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin: 10px 0 4px;
    color: var(--sf-marron);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    padding: 8px 10px;
    border: 1.5px solid #dde5e0;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background: var(--sf-blanc);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--sf-vert);
}

textarea {
    width: 100%;
    min-height: 90px;
}

/* ── Onglets Calendrier / Liste (CSS pur, radios cachées) ── */
.onglets-vue input[type="radio"] {
    display: none;
}

.onglets-vue-entetes {
    display: inline-flex;
    border: 1.5px solid #dde5e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9f6;
    margin-bottom: 1.1rem;
}

.onglets-vue-entetes label {
    padding: .35rem .9rem;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    color: #6b7a6e;
    transition: background .12s, color .12s;
}

.onglets-vue-entetes label + label {
    border-left: 1.5px solid #dde5e0;
}

.onglets-vue-contenu-calendrier,
.onglets-vue-contenu-liste {
    display: none;
}

#vue-calendrier:checked ~ .onglets-vue-entetes label[for="vue-calendrier"],
#vue-liste:checked ~ .onglets-vue-entetes label[for="vue-liste"] {
    background: var(--sf-vert);
    color: var(--sf-blanc);
}

#vue-calendrier:checked ~ .onglets-vue-contenu-calendrier {
    display: block;
}

#vue-liste:checked ~ .onglets-vue-contenu-liste {
    display: block;
}

/* ── Navigation mois ── */
.mois-nav-bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.1rem;
}

.mois-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: .3rem .7rem;
    border: 1.5px solid #dde5e0;
    border-radius: 6px;
    background: #f8f9f6;
    color: var(--sf-marron);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .12s, background .12s;
}

.mois-nav-btn:hover {
    border-color: var(--sf-vert);
    background: #eef4f1;
}

.mois-titre {
    font-size: .95rem;
    font-weight: 700;
    color: var(--sf-marron);
}

/* ── Calendrier mensuel en grille (CSS grid, pas de <table>) ── */
.calendrier-grille {
    background: var(--sf-blanc);
    border-radius: 12px;
    box-shadow: var(--sf-ombre);
    padding: .75rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .35rem;
}

.calendrier-grille .col-entete {
    text-align: center;
    font-size: .65rem;
    font-weight: 700;
    color: #9aaa9a;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: .2rem 0 .5rem;
}

.calendrier-jour {
    min-height: 76px;
    border-radius: 8px;
    padding: .3rem .35rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.calendrier-jour.hors-mois {
    opacity: .35;
}

.jour-numero {
    font-size: .7rem;
    font-weight: 700;
    color: #6b7a6e;
    text-align: right;
    line-height: 1;
    margin-bottom: .1rem;
}

.seance-mini {
    display: block;
    border-radius: 5px;
    padding: .18rem .4rem;
    font-size: .68rem;
    border-left: 2.5px solid var(--sf-bleu-aqua);
    line-height: 1.35;
}

.seance-mini a {
    color: #374151;
    text-decoration: none;
    display: block;
}

.seance-mini form {
    display: inline;
}

.seance-mini input[type="number"] {
    width: 34px;
    padding: 2px 4px;
    font-size: .68rem;
}

.places-mini {
    font-size: .64rem;
    color: #6b7a6e;
    margin-right: .3rem;
}

/* États des séances (passée / réservée / disponible / complète / annulée) */
.etat-disponible { background: #eef6f5; border-left-color: var(--sf-bleu-aqua); }
.etat-reservee { background: #d9ede1; border-left-color: var(--sf-vert); }
.etat-complete { background: #fef3c7; border-left-color: #d97706; }
.etat-passee { background: #ececec; border-left-color: #9aaa9a; opacity: .75; }
.etat-annulee { background: #f5e3d8; border-left-color: var(--sf-rouge); text-decoration: line-through; opacity: .8; }

tr.etat-disponible, tr.etat-reservee, tr.etat-complete, tr.etat-passee, tr.etat-annulee {
    border-left: 4px solid;
}
tr.etat-disponible { border-left-color: var(--sf-bleu-aqua); }
tr.etat-reservee { border-left-color: var(--sf-vert); }
tr.etat-complete { border-left-color: #d97706; }
tr.etat-passee { border-left-color: #9aaa9a; opacity: .75; }
tr.etat-annulee { border-left-color: var(--sf-rouge); opacity: .8; }

.statut-ok { color: var(--sf-vert); font-weight: 600; }
.statut-ko { color: var(--sf-rouge); font-weight: 600; }

.aujourdhui {
    margin-left: auto;
}

/* ── Liste des séances en cartes (espace client) ── */
.seance-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.seance-item {
    background: var(--sf-blanc);
    border-radius: 10px;
    box-shadow: var(--sf-ombre);
    display: flex;
    align-items: center;
    padding: .85rem 1.1rem;
    gap: 1.1rem;
    border-left: 4px solid var(--sf-bleu-aqua);
    transition: box-shadow .15s;
}

.seance-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.seance-item .seance-date {
    min-width: 56px;
    text-align: center;
    flex-shrink: 0;
}

.seance-item .seance-date .jour {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sf-marron);
    line-height: 1;
}

.seance-item .seance-date .mois {
    font-size: .68rem;
    text-transform: uppercase;
    color: #6b7a6e;
}

.seance-item .seance-corps {
    flex: 1;
    min-width: 0;
}

.seance-item .seance-titre {
    font-weight: 600;
    color: #1a202c;
    text-decoration: none;
}

.seance-item .seance-meta {
    font-size: .8rem;
    color: #6b7a6e;
    margin-top: .2rem;
}

.seance-item .seance-droite {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

/* ── Boutons croix / coche : symbole coloré seul, sans fond ni bordure
   (annulation rapide et ouverture du dialogue d'inscription) ── */
.btn-croix, .btn-coche {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.btn-croix {
    color: var(--sf-rouge);
}

.btn-coche {
    color: var(--sf-vert);
}

.btn-croix:hover, .btn-coche:hover {
    opacity: .7;
}

/* ── Dialogue de confirmation d'inscription (élément <dialog> natif) ── */
.dialogue-inscription {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
    padding: 1.25rem 1.5rem;
    max-width: 340px;
    width: 92%;
}

.dialogue-inscription::backdrop {
    background: rgba(0, 0, 0, .45);
}

.dialogue-inscription h3 {
    margin: 0 0 .35rem;
    font-size: 1rem;
}

.dialogue-inscription input[type="number"] {
    width: 100%;
}

.rappel-annulation {
    background: #fff8e6;
    border: 1px solid #f0dca0;
    border-radius: 8px;
    padding: .5rem .7rem;
    font-size: .78rem;
    color: #7a6500;
    margin: .75rem 0 0;
}

/* ── Info-bulle lieu (details/summary, sans JS) ── */
.lieu-info {
    display: inline-block;
    position: relative;
}

.lieu-info summary {
    cursor: pointer;
    list-style: none;
    color: #374151;
    text-decoration: underline dotted;
    font-size: inherit;
}

.lieu-info summary::-webkit-details-marker {
    display: none;
}

.lieu-info-popover {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    background: var(--sf-blanc);
    border: 1px solid #e4ddc9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 200px;
    font-size: 13px;
    white-space: normal;
}

/* ── Fiche (séance, client) ── */
.fiche-header {
    background: var(--sf-blanc);
    border-radius: 12px;
    box-shadow: var(--sf-ombre);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.fiche-back {
    font-size: .78rem;
    color: var(--sf-beige);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: .5rem;
}

.fiche-back:hover {
    color: var(--sf-vert);
}

.fiche-titre {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: .5rem;
}

.fiche-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}

.fiche-chip {
    background: #f1f3f0;
    border-radius: 20px;
    padding: .2rem .7rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--sf-marron);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .6rem;
}

.meta-item {
    background: #f8f9f6;
    border-radius: 8px;
    padding: .55rem .75rem;
}

.meta-item .cle {
    font-size: .62rem;
    color: var(--sf-beige);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.meta-item .valeur {
    font-size: .9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: .1rem;
}

/* ── Messages flash ── */
.flash {
    border-radius: 8px;
    padding: .65rem .9rem;
    margin-bottom: 1.1rem;
    font-size: .85rem;
    font-weight: 600;
}

.flash-success { background: #d9ede1; color: #1a6b3f; }
.flash-danger { background: #f5e3d8; color: #a3200f; }

/* ── Barre de progression (onglet Projet) ── */
.barre-progression {
    display: inline-block;
    height: 8px;
    border-radius: 99px;
    background: #e4e7e2;
    overflow: hidden;
    vertical-align: middle;
}

.barre-remplie {
    display: block;
    height: 100%;
    background: var(--sf-vert);
    border-radius: 99px;
}

.synchro-info {
    font-size: .72rem;
    color: #94a3b8;
    margin: .6rem 0 0;
}

/* ── Arbre d'avancement (onglet Projet, <details> imbriqués) ── */
.arbre-noeud {
    border-left: 2px solid #e4e7e2;
    padding-left: .9rem;
    margin: .5rem 0;
}

.arbre-noeud summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .88rem;
    padding: .2rem 0;
}

.arbre-noeud summary::-webkit-details-marker { display: none; }

.arbre-noeud summary::before {
    content: '▸';
    color: #94a3b8;
    font-size: .7rem;
    transition: transform .1s;
}

.arbre-noeud[open] > summary::before { transform: rotate(90deg); }

.arbre-nom { font-weight: 600; color: #1a1a1a; flex: 1; min-width: 0; }
.arbre-pct { font-size: .75rem; color: #6b7a6e; }
.arbre-enfants { margin-left: .3rem; }
.arbre-vide { color: #94a3b8; font-style: italic; }

.arbre-validation {
    margin: .5rem 0 .75rem 1.5rem;
    padding: .65rem .8rem;
    background: #f8f9f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.arbre-validation .form-inline { display: inline; }

.arbre-aide-groupee {
    flex-basis: 100%;
    font-size: .75rem;
    color: #6b7a6e;
    margin: 0 0 .3rem;
}

.arbre-en-attente {
    margin: .3rem 0 .75rem 1.5rem;
    font-size: .78rem;
    font-style: italic;
    color: #6b7a6e;
}

/* ── Rétroplanning (onglet Projet) ── */
.retro-phases { margin-bottom: 1.25rem; }

.retro-phase-ligne {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.retro-phase-nom {
    width: 160px;
    flex-shrink: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--sf-marron);
    text-align: right;
}

.retro-piste {
    position: relative;
    flex: 1;
    height: 10px;
    background: #eef1ee;
    border-radius: 99px;
}

.retro-barre {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--sf-vert);
    border-radius: 99px;
    min-width: 4px;
}

.retro-jalons {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 1px solid #f0f0ee;
}

.retro-jalon {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
}

.retro-jalon-puce {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.retro-statut-a-venir { background: #9aaa9a; }
.retro-statut-atteint { background: var(--sf-vert); }
.retro-statut-manque { background: var(--sf-rouge); }

.retro-jalon-nom { font-weight: 600; color: #1a1a1a; flex: 1; }
.retro-jalon-date { font-size: .75rem; color: #6b7a6e; }

/* ── État vide ── */
.etat-vide {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}

.etat-vide .icone {
    font-size: 2.5rem;
    display: block;
    margin-bottom: .75rem;
}

/* ── Page de connexion ── */
.page-connexion {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carte-connexion {
    background: var(--sf-blanc);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(79, 60, 29, .12);
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.logo-connexion {
    height: 48px;
    width: auto;
    margin-bottom: 1.1rem;
}

.carte-connexion h1.titrage {
    margin: 0 0 .35rem;
    text-align: center;
}

.sous-titre-connexion {
    margin: 0 0 1.5rem;
    font-size: .85rem;
    color: #6b7a6e;
}

.carte-connexion form {
    text-align: left;
}

.carte-connexion .flash {
    text-align: left;
    margin-bottom: 1rem;
}

.btn-connexion {
    width: 100%;
    justify-content: center;
    margin-top: 1.25rem;
    padding: .7rem 1rem;
    font-size: .9rem;
}
