/* ============================================================
   ESPACE FAMILLE — tableau des enfants, dossier en 4 étapes,
   inscriptions, documents, foyer. Couleur de rubrique : vert.
   ============================================================ */

/* En-tête : lien « Espace famille » mis en avant */

/* Navigation de l'espace (onglets) */
.fs-nav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(251, 250, 247, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line); }
.fs-nav-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fs-nav ul { list-style: none; margin: 0; padding: 10px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.fs-nav ul::-webkit-scrollbar { display: none; }
.fs-nav a { display: block; white-space: nowrap; text-decoration: none; font-weight: 700; font-size: 15px; color: var(--c-ink); padding: 7px 16px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: #fff; }
.fs-nav a:hover { border-color: var(--c-green); }
.fs-nav a.is-current { background: var(--c-green-ink); border-color: var(--c-green-ink); color: #fff; }
.fs-who { display: flex; align-items: center; gap: 10px; font-size: 14px; flex: 0 0 auto; }
.fs-who .login-avatar { width: 34px; height: 34px; font-size: 13px; }
/* En-tête compact de l'espace : titre à gauche, action principale de l'onglet à droite */
[data-route="family-space"] .page-head.fs-head { --page-head-h: 0px; text-align: left; padding: clamp(22px, 3.5vw, 34px) 0 clamp(18px, 3vw, 26px); }
.fs-head-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.fs-head-text { min-width: 0; flex: 1 1 420px; }
.fs-head .eyebrow { margin-bottom: 6px; }
.fs-head h1 { margin: 0 0 4px; font-size: clamp(30px, 4.5vw, 44px); }
.fs-head p.lead { margin: 0; font-size: 16.5px; max-width: 70ch; }
.fs-head-action:empty { display: none; }
/* Compteurs des onglets (pièces à envoyer, sommes à régler) */
.fs-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 7px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--c-magenta); color: #fff; vertical-align: 1px; }
.fs-nav a.is-current .fs-count { background: #fff; color: var(--c-magenta-ink); }
/* À faire */
.fs-todo { margin-bottom: clamp(24px, 4vw, 36px); border-left: 5px solid var(--c-magenta); }
.fs-todo h2 { font-size: 21px; margin: 0 0 8px; }
.fs-todo ul { list-style: none; margin: 0; padding: 0; }
.fs-todo li + li { border-top: 1px solid var(--c-line); }
.fs-todo a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; text-decoration: none; color: var(--c-ink); font-weight: 700; }
.fs-todo a:hover .fs-todo-go { transform: translateX(3px); }
.fs-todo-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--c-magenta-soft); color: var(--c-magenta-ink); }
.fs-todo-icon svg { width: 17px; height: 17px; }
.fs-todo li.is-warn .fs-todo-icon { background: var(--c-orange-soft); color: var(--c-orange-ink); }
.fs-todo li.is-pay .fs-todo-icon { background: var(--c-yellow-soft); color: var(--c-yellow-ink); }
.fs-todo a > span:nth-child(2) { flex: 1; }
.fs-todo-go { font-size: 22px; color: var(--c-mute); transition: transform .15s; }
.fs-todo-ok { display: flex; align-items: center; gap: 10px; margin: 0 0 clamp(20px, 3vw, 28px); padding: 12px 16px; border-radius: var(--r-md); background: var(--c-green-soft); color: var(--c-green-ink); }
.fs-todo-ok svg { width: 18px; height: 18px; flex: 0 0 auto; }
.fs-todo-ok span { color: var(--c-ink); }
@media (max-width: 760px) {
  .fs-nav-in { flex-direction: column-reverse; align-items: stretch; gap: 0; }
  /* Onglets sur deux lignes : tous visibles, plus de défilement de côté ; barre non collante (place à l’écran) */
  .fs-nav { position: static; }
  .fs-nav ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 6px; }
  .fs-nav a { text-align: center; padding: 7px 6px; font-size: 14px; }
  .fs-count { margin-left: 4px; }
  .fs-head-action { width: 100%; }
  .fs-head-action .btn { width: 100%; }
  .fs-who { padding: 8px 0 0; justify-content: space-between; }
  .fs-who b { flex: 1; }
}

/* Connexion */
.fs-perks { padding-left: 1.1em; }
.fs-perks li { margin-bottom: 10px; }
.fs-login-card h2 { margin-bottom: 12px; }

/* Mes enfants */
.fs-children { align-items: stretch; }
.fs-child { display: flex; flex-direction: column; gap: 12px; border-top: 5px solid var(--c-green); }
.fs-child-head { display: flex; align-items: center; gap: 14px; }
.fs-child-head > div { flex: 1; }
.fs-child-head h3 { margin: 0; }
.fs-child-head p { margin: 0; }
.fs-child-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 22px; background: var(--c-green-soft); color: var(--c-green-ink); flex: 0 0 auto; }
.fs-child-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; flex-wrap: wrap; }
.fs-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fs-tile { --t: var(--c-blue-ink); --tb: var(--c-blue-soft); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--tb); color: var(--c-ink); text-decoration: none; border: 1.5px solid transparent; transition: border-color .15s, transform .15s; min-width: 0; }
.fs-tile:hover { border-color: var(--t); transform: translateY(-2px); }
.fs-tile:focus-visible { outline: 3px solid var(--t); outline-offset: 2px; }
.fs-tile.is-todo { --t: var(--c-magenta-ink); --tb: var(--c-magenta-soft); }
.fs-tile.is-ok { --t: var(--c-green-ink); --tb: var(--c-green-soft); }
.fs-tile.is-quiet { --t: var(--c-mute); --tb: #F1F3F6; }
.fs-tile-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: #fff; color: var(--t); }
.fs-tile-icon svg { width: 20px; height: 20px; }
.fs-tile-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fs-tile-text b { font-family: var(--f-display); font-size: 17px; color: var(--t); }
.fs-tile-text span { font-size: 13.5px; color: var(--c-mute); }
.fs-shared { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14.5px; color: var(--c-mute); }
.fs-shared-avatars { display: flex; }
.fs-shared-avatars span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--c-yellow-soft); color: var(--c-ink); border: 2px solid #fff; }
.fs-shared-avatars span + span { margin-left: -8px; }
@media (max-width: 480px) { .fs-tiles { grid-template-columns: 1fr; } }
.fs-child .form-actions { margin-top: auto; }
.fs-comment, .fs-admission { margin: 0; font-size: 15px; }
.fs-mini-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--c-mute); }
.fs-mini-steps li { border-top: 4px solid var(--c-line); padding-top: 5px; line-height: 1.25; }
.fs-mini-steps li.is-done { border-color: var(--c-green); color: var(--c-green-ink); }

/* Dossier : étapes */
.fs-record-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.fs-record-top + .notice, .fs-record-top ~ .notice { margin-bottom: 14px; }
.fs-steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.fs-steps a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); font-weight: 700; font-size: 15px; padding: 10px 12px; border-radius: var(--r-md); border: 1.5px solid var(--c-line); background: #fff; height: 100%; }
.fs-step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: #F1F3F6; color: var(--c-mute); font-family: var(--f-display); font-weight: 800; }
.fs-steps li.is-done .fs-step-n { background: var(--c-green-ink); color: #fff; }
.fs-steps li.is-current a { border-color: var(--c-green); background: var(--c-green-soft); }
.fs-steps li.is-current .fs-step-n { background: var(--c-black); color: #fff; }
@media (max-width: 720px) {
  .fs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-steps a { font-size: 14px; padding: 8px 10px; }
}
.fs-plain { border: 0; padding: 0; margin: 0; background: none; min-width: 0; }
.fs-plain[disabled] input, .fs-plain[disabled] select, .fs-plain[disabled] textarea { background-color: #F6F7F9; }
.fs-step-foot { position: sticky; bottom: 0; background: rgba(251, 250, 247, .96); padding: 14px 0; border-top: 1px solid var(--c-line); margin-top: 8px; z-index: 5; }
.fs-step-foot .hint { flex: 1 1 220px; }
.fs-guardians { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.fs-guardians li { background: #F8F9FA; border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; }
.fs-pickup { display: flex; gap: 12px; align-items: flex-end; padding: 12px; border: 1px dashed var(--c-line); border-radius: var(--r-sm); margin-bottom: 10px; }
.fs-pickup-fields { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) {
  .fs-pickup { flex-direction: column; align-items: stretch; }
  .fs-pickup-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Dossier : récapitulatif et validation */
.fs-recap { display: grid; gap: 14px; margin-bottom: 20px; }
.fs-recap-blk { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 16px 18px; }
.fs-recap-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.fs-recap-head h3 { margin: 0; flex: 1; font-size: 19px; }
.fs-recap dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.fs-recap dt { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--c-mute); font-weight: 800; }
.fs-recap dd { margin: 0; }
@media (max-width: 640px) { .fs-recap dl { grid-template-columns: minmax(0, 1fr); } }
.fs-sign { background: #fff; border: 2px solid var(--c-green); border-radius: var(--r-md); padding: 18px 20px; }
.fs-sign h3 { margin: 0; }
.fs-dhist { margin-top: 18px; }
.fs-dhist summary { cursor: pointer; font-weight: 700; }

/* Inscriptions et documents */
.fs-rule { margin-bottom: 8px; }
.fs-regs + .fs-regs { margin-top: 18px; }
.fs-regs-head { align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.fs-new-hint { margin: 0; }
/* Fenêtre « Nouvelle demande » : large pour les grilles des vacances. */
.modal-panel--wizard.fs-request-panel { width: min(920px, 100%); }
.fs-request-hint { margin-right: auto; font-size: 14px; }
@media (max-width: 640px) { .fs-request-hint { flex: 1 0 100%; } }
.fs-regs h3 { font-size: 19px; margin-bottom: 8px; }
/* Mêmes colonnes d'un enfant à l'autre : largeurs fixes, pas d'ajustement au contenu. */
.fs-regs .table { table-layout: fixed; }
.fs-col-day { width: 34%; }
.fs-col-formula { width: 22%; }
.fs-col-status { width: 16%; }
.fs-col-action { width: 28%; }
.fs-sub { display: block; color: var(--c-mute); font-size: 13.5px; font-weight: 600; }
.fs-past { margin-top: 18px; }
.fs-past summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }
.fs-reg-form .radio-row .choice, .fs-upload .radio-row .choice, .fs-invite .radio-row .choice { flex: 0 1 auto; min-width: 140px; }
.fs-reg-form .choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }

/* Documents : une liste de pièces par enfant, dépôt en fenêtre */
.fs-docs-summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-md); background: var(--c-magenta-soft); margin-bottom: 22px; --t: var(--c-magenta-ink); }
.fs-docs-summary.is-done { background: var(--c-green-soft); --t: var(--c-green-ink); }
.fs-docs-summary p { margin: 0; }
.fs-docs-summary b { color: var(--t); }
.fs-docs-grid { align-items: start; }
.fs-docs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.fs-docs-head h3 { margin: 0; }
.fs-doc-list { list-style: none; margin: 0; padding: 0; }
.fs-doc { --t: var(--c-blue-ink); --tb: var(--c-blue-soft); display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--c-line); flex-wrap: wrap; }
.fs-doc-list.card .fs-doc { padding-left: 4px; padding-right: 4px; }
.fs-doc-list .fs-doc:first-child { border-top: 0; }
.fs-doc.is-missing { --t: var(--c-magenta-ink); --tb: var(--c-magenta-soft); }
.fs-doc.is-rejected { --t: var(--c-orange-ink); --tb: var(--c-orange-soft); }
.fs-doc.is-approved { --t: var(--c-green-ink); --tb: var(--c-green-soft); }
.fs-doc-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--tb, #fff); color: var(--t); }
.fs-docs-summary .fs-doc-icon { background: #fff; }
.fs-doc-icon svg { width: 20px; height: 20px; }
.fs-doc-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.fs-doc-status { font-size: 14px; font-weight: 700; color: var(--t); }
.fs-doc-file { overflow-wrap: anywhere; }
.fs-doc-comment { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--c-orange-soft); font-size: 14px; }
.fs-doc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.fs-docs-others { margin-top: clamp(28px, 4vw, 40px); }
.fs-docs-others .section-head { align-items: center; margin-bottom: 12px; }
@media (max-width: 560px) { .fs-doc-actions { margin-left: 52px; } }
/* Fenêtre de dépôt */
.fs-upload-panel { width: min(600px, 100%); }
.fs-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 18px; border: 2px dashed var(--c-line); border-radius: var(--r-md); background: #FBFCFD; cursor: pointer; transition: border-color .15s, background .15s; font-weight: 400; }
.fs-drop:hover, .fs-drop.is-over, .fs-drop:has(+ input:focus-visible) { border-color: var(--c-green); background: var(--c-green-soft); }
.fs-drop.has-file { border-style: solid; border-color: var(--c-green); }
.fs-drop-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--c-green-soft); color: var(--c-green-ink); }
.fs-drop-icon svg { width: 24px; height: 24px; }
.fs-drop-text u { color: var(--c-green-ink); font-weight: 700; }
.fs-drop .hint { font-size: 13.5px; font-weight: 400; }
.fs-drop-size { color: var(--c-mute); }
.field.has-error .fs-drop { border-color: var(--c-magenta); }
.field input[readonly] { background: #F6F7F9; color: var(--c-mute); }

/* Page Inscriptions : dossier en ligne */
.fs-callout { margin: 0 0 20px; }
.fs-mini-steps li { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .fs-mini-steps { font-size: 11.5px; } }

/* Téléphone : réservations et documents en cartes plutôt qu'en tableau */
@media (max-width: 640px) {
  .fs-regs .table thead { display: none; }
  .fs-regs .table, .fs-regs tbody { display: block; }
  .fs-regs tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-top: 1px solid var(--c-line); }
  .fs-regs tr:first-child { border-top: 0; }
  .fs-regs td { border: 0; padding: 0; }
  .fs-regs td:first-child { flex: 1 0 100%; }
  .fs-regs td:nth-child(2) { flex: 1 1 auto; }
  .fs-regs td:last-child:empty { display: none; }
}

/* Première visite guidée : bandeau « Bienvenue » en quatre étapes */
.fs-welcome { background: var(--c-yellow-soft); border-radius: var(--r-lg); padding: 18px 20px; margin: 0 0 20px; }
.fs-welcome h2 { font-size: 24px; margin: 0 0 10px; }
.fs-guide { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fs-guide li { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid transparent; border-radius: var(--r-md); padding: 9px 12px; font-weight: 700; font-size: 15px; }
.fs-guide-dot { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c-bg); font-family: var(--f-display); font-weight: 800; }
.fs-guide li.is-done .fs-guide-dot { background: var(--c-green); color: #fff; }
.fs-guide li.is-current { border-color: var(--c-green); }
.fs-guide li.is-current .fs-guide-dot { background: var(--c-green-soft); color: var(--c-green-ink); }
@media (max-width: 640px) { .fs-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fs-guide li { font-size: 14px; } }
.fs-first-child { max-width: 760px; }
.fs-first-child h2 { margin-top: 0; }
.fs-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 0 0 24px; }
@media (max-width: 640px) { .fs-next .btn { flex: 1 1 100%; } }
.fs-sent { text-align: center; margin: 0 0 28px; outline: none; }
.fs-sent h2 { margin: 0 0 6px; }
.fs-sent ul { text-align: left; max-width: 440px; margin: 12px auto; }
.fs-sent .fs-sent-badge { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--c-green); color: #fff; font-size: 34px; font-weight: 800; }

/* Mon foyer */
.fs-foyer-top { align-items: stretch; margin-bottom: clamp(28px, 4vw, 40px); }
.fs-info { display: flex; flex-direction: column; gap: 14px; border-top: 5px solid var(--c-green); }
.fs-info--qf { border-top-color: var(--c-blue); }
.fs-info-head { display: flex; align-items: center; gap: 14px; }
.fs-info-head > div { flex: 1; min-width: 0; }
.fs-info-head h2 { font-size: 22px; margin: 0; }
.fs-info-head .fs-sub { overflow-wrap: anywhere; }
.fs-info .hint { margin: auto 0 0; }
.fs-person-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-family: var(--f-display); font-weight: 800; font-size: 18px; background: var(--c-green-soft); color: var(--c-green-ink); }
.fs-qf-avatar { background: var(--c-blue-soft); color: var(--c-blue-ink); }
.fs-qf-avatar svg { width: 22px; height: 22px; }
.fs-dl { margin: 0; display: grid; gap: 8px; }
.fs-dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; }
.fs-dl dt { color: var(--c-mute); font-size: 14.5px; }
.fs-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fs-tranche { margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--r-md); background: var(--c-blue-soft); }
.fs-tranche b { font-family: var(--f-display); font-size: 24px; color: var(--c-blue-ink); line-height: 1.1; }
.fs-tranche span { font-size: 14px; color: var(--c-mute); }
.fs-tranche.is-empty { background: #F1F3F6; }
.fs-tranche.is-empty b { font-size: 18px; color: var(--c-ink); }
.fs-inline { display: inline; }
.fs-people-block .section-head { align-items: flex-start; }
.fs-people-block .block-intro { margin-bottom: 0; }
.fs-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.fs-person { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.fs-person.is-invite { border-style: dashed; background: #FFFDF5; }
.fs-person.is-invite .fs-person-avatar { background: var(--c-yellow-soft); color: var(--c-yellow-ink); }
.fs-person-text { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fs-person-kids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.fs-kid { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); background: var(--c-green-soft); color: var(--c-green-ink); }
.fs-kid.is-view { background: #F1F3F6; color: var(--c-mute); }
.fs-person-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fs-timeline { list-style: none; margin: 0 0 14px; padding: 0; max-width: 760px; }
.fs-tl-day { font-family: var(--f-display); font-weight: 800; font-size: 15px; color: var(--c-mute); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px; }
.fs-tl-day:first-child { margin-top: 0; }
.fs-tl-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.fs-tl-item + .fs-tl-item { border-top: 1px dashed var(--c-line); }
.fs-tl-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: #fff; border: 1px solid var(--c-line); color: var(--c-green-ink); }
.fs-tl-icon svg { width: 16px; height: 16px; }
.fs-tl-item .fs-sub { margin-top: 2px; }
@media (max-width: 560px) {
  .fs-dl > div { grid-template-columns: 1fr; gap: 0; }
  .fs-info-head { flex-wrap: wrap; }
  .fs-info-head > div { flex-basis: calc(100% - 62px); }
  .fs-info-head .btn { margin-left: 62px; }
  .fs-person-side { flex-direction: row; align-items: center; margin-left: 62px; }
}
