/* ============================================================
   ANIMA — page d'un séjour et espaces de premier niveau (J-N, spec 2026-09-24 « Le journal » § 3)
   Port du prototype validé ~/anima-proto/journal/v2/ (v2.css : page séjour, priorités, rubriques, vue connectée) dans
   la coque de la plateforme (js/coque.js pageSejour / pageEspace, js/plateau/rendu.js).
   · Alternance couleur / blanc (principe de Michaël) : la BANDE du moment actif (onglet plein + filet de 5 px sous les
     onglets) est le seul bloc en couleur ; tout le reste est calcaire. La couleur reste rare et signifiante : le
     numéro de priorité à l'encre du moment, « critique » en brique ; rien d'autre n'est teinté.
   · Moments : encres vives (--preparer · --vivre · --cloturer, bande --<m>-bande). Domaines : teintes SOURDES en
     filet + icône seulement (--<d>-filet), jamais en lavis.
   · Chiffres en Inter : la famille 'Instrument Serif' prend ses chiffres dans Inter (css/polices.css).
   Tokens de css/tokens.css seuls (tests/charte.test.mjs) ; aucun emoji.
   ============================================================ */

/* ---------- Palettes : moments et filets de domaine ---------- */
.mom-preparer { --m: var(--preparer); --m-bande: var(--preparer-bande); --m-fond: var(--preparer-fond); }
.mom-vivre { --m: var(--vivre); --m-bande: var(--vivre-bande); --m-fond: var(--vivre-fond); }
.mom-cloturer { --m: var(--cloturer); --m-bande: var(--cloturer-bande); --m-fond: var(--cloturer-fond); }
.d-equipe { --d: var(--equipe-filet); }
.d-enfants { --d: var(--enfants-filet); }
.d-sante { --d: var(--sante-filet); }
.d-pedagogie { --d: var(--pedagogie-filet); }
.d-logistique { --d: var(--logistique-filet); }
.d-argent { --d: var(--argent-filet); }
.d-profil { --d: var(--texte-3); }

/* ---------- Typographie partagée (prototype v2) ---------- */
.sj .surtitre, .esp .surtitre, .ac-v2 .surtitre { font-family: var(--sans); font-weight: 600; font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--texte-2); margin: 0 0 .45rem; }
.col-titre { display: flex; align-items: center; gap: .5rem; font-family: var(--sans); font-weight: 600; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); padding-bottom: .55rem; margin: 0; border-bottom: 1px solid var(--texte); }
.col-titre .ico { width: 15px; height: 15px; color: var(--texte-3); }
.lien-discret { color: var(--texte-2); font-size: .86rem; text-decoration: underline; text-decoration-color: var(--ligne-2); text-underline-offset: 4px; }
.lien-discret:hover { color: var(--texte); text-decoration-color: currentColor; }
.c-page a.lien-discret { text-decoration: underline; }
.lien-bouton { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0; border: 0; background: none; color: var(--texte-2); font: inherit; font-size: .82rem; text-decoration: underline; text-decoration-color: var(--ligne-2); text-underline-offset: 4px; cursor: pointer; }
.lien-bouton:hover { color: var(--texte); text-decoration-color: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sj .sep, .esp .sep, .ac-v2 .sep { color: var(--texte-3); }

/* ============================================================
   Page d'un séjour
   ============================================================ */
.sj.c-page { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
/* La tête d'un séjour (langage de surface, .tete de css/coque.css) : vignette à gauche du titre, prochaine étape à droite,
   puis les chiffres clés en filets et les onglets des moments. */
.sj .ariane { align-items: center; }
.sj .ariane-l { display: inline-flex; align-items: center; min-height: 44px; color: var(--texte-2); }
.sj-tete .tete-ligne { align-items: start; }
.sj-vignette { width: 8.5rem; margin: 0; aspect-ratio: 4 / 3; border-radius: 2px; background: var(--m-bande, var(--s3)); display: grid; place-items: center; overflow: hidden; }
.sj-vignette.est-initiale span { font-family: var(--serif); font-size: 3.6rem; line-height: 1; color: var(--m-sur, var(--sur-portail)); }
.sj[data-simulation] .sj-vignette { outline: 1.5px dashed var(--ligne-2); outline-offset: -1.5px; }
/* La une choisie (J-U) : photo Unsplash hotlinkée, crédit visible sous la vignette (liens profil + Unsplash). */
.sj-vignette-bloc { width: 8.5rem; min-width: 0; align-self: start; }
.sj-vignette.est-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sj-credit { margin: .25rem 0 0; font-size: .64rem; line-height: 1.3; color: var(--texte-2); overflow-wrap: anywhere; }
.sj-credit a { color: var(--texte-2); text-decoration: underline; text-decoration-color: var(--ligne-2); text-underline-offset: 2px; }
.sj-surtitre { flex-wrap: wrap; gap: 0 .2rem; }
.sj-surtitre::before { display: none; }
.sj-surtitre .lien-discret { font-size: inherit; letter-spacing: inherit; text-transform: none; font-weight: 500; }
.sj-chapo .lien-discret { font-size: inherit; }
.sj-faits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 1.3rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--texte); border-bottom: 1px solid var(--ligne); }
.sj-faits li { display: grid; gap: .05rem; align-content: start; padding: .55rem .9rem .6rem; border-left: 1px solid var(--ligne); min-width: 0; }
.sj-faits li:first-child { padding-left: 0; border-left: 0; }
.sj-faits span { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); font-weight: 600; }
.sj-faits b { font-weight: 500; font-size: .98rem; line-height: 1.3; overflow-wrap: anywhere; }
.sj-faits small { font-size: .76rem; color: var(--texte-2); line-height: 1.3; }
.sj-faits li.est-alerte small { color: var(--alerte); }
.sj-faits li.est-ok small { color: var(--ok); }
.sj-tete { padding-bottom: 0; }

/* Onglets des moments : des encres vives ; l'actif est une bande pleine (le bloc en couleur de la page) */
.sj-onglets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-top: .8rem; }
/* Filet d'un onglet inactif à la couleur de BANDE (prototype v2, les deux thèmes) : repère décoratif ; c'est le nom du
   moment, à l'encre --m (≥ 4,5:1, tests/palette.test.mjs), qui identifie l'onglet. */
.sj-onglet { display: grid; align-content: center; min-width: 0; min-height: 56px; padding: .45rem .9rem .5rem; border-top: 5px solid var(--m-bande); color: var(--texte-2); transition: background var(--dur), color var(--dur); }
.sj-onglet:hover { background: var(--survol-fond); color: var(--texte); }
.sj-onglet-nom { font-family: var(--serif); font-size: 1.45rem; line-height: 1.05; color: var(--m); }
.sj-onglet-sous { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sj-onglet.est-actif { background: var(--m-bande); border-top-color: var(--m-bande); color: var(--m-sur, var(--sur-portail)); }
.sj-onglet.est-actif .sj-onglet-nom { color: var(--m-sur, var(--sur-portail)); }
.sj-onglet:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.sj-onglet.est-actif:focus-visible { outline-color: var(--m-sur, var(--sur-portail)); }

/* Volet du moment : le calcaire, relié à l'onglet actif par un filet de 5 px de sa couleur ; « À traiter » à droite,
   le grand mot du moment à gauche. */
.volet.sj-panneau:not(.est-profond) { border-top: 5px solid var(--m-bande); }
.sj-panneau .volet-phrase { border-left-color: var(--m-bande); }
.sj-col { min-width: 0; }
.sj .rubrique-tete.sj-col-tete { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; margin: 0; border-bottom: 1px solid var(--texte); flex-wrap: nowrap; }
.sj-col-tete .col-titre { border-bottom: 0; padding-block: .55rem; min-width: 0; }
.sj-actualiser { flex: none; }
.sj-attente { margin: 0; padding: .8rem 0; color: var(--texte-2); font-size: .9rem; border-bottom: 1px solid var(--ligne); }
.sj-attente b { color: var(--texte); font-weight: 500; }
.sj-rien { display: flex; align-items: baseline; gap: .55rem; margin: 0; padding: .8rem 0; color: var(--texte-2); font-size: .92rem; border-bottom: 1px solid var(--ligne); }
.sj-rien .ico { flex: none; width: 16px; height: 16px; color: var(--ok); align-self: center; }
.sj-rien b { color: var(--texte); font-weight: 600; }
.sj-rien.est-a-venir .ico { color: var(--texte-3); }
.sj[data-pas-ouvert] .rub-ligne { font-weight: 500; }
.sj .at-simulation { margin: .6rem 0 0; font-size: .86rem; }

/* Priorités */
.prio-liste { margin: 0; padding: 0; list-style: none; }
.prio { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--ligne); }
.prio-num { font-family: var(--sans); font-weight: 300; font-size: 1.7rem; line-height: 1; color: var(--m); }
.prio-corps { min-width: 0; }
.prio-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .3rem; margin: 0; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-2); font-weight: 500; }
.prio-dom { display: inline-flex; align-items: center; gap: .3rem; color: var(--texte); font-weight: 600; }
.prio-dom .ico { width: 14px; height: 14px; color: var(--d); }
.prio .gravite { font-size: inherit; letter-spacing: inherit; font-weight: 600; color: var(--texte-2); }
.prio .gravite::before { display: none; }
.prio .gravite-critique { color: var(--critique); }
.prio .gravite-info { color: var(--texte-3); font-weight: 500; }
.prio-titre { margin: .15rem 0 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.prio-lien { color: var(--texte); }
.prio-lien::after { content: ''; position: absolute; inset: 0; }   /* toute la ligne est la cible (tactile) */
.prio:hover .prio-lien { text-decoration: underline; text-underline-offset: 3px; }
.prio-lien:focus-visible { outline: none; }
.prio:has(.prio-lien:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.prio-texte { margin: .1rem 0 0; color: var(--texte-2); font-size: .88rem; text-wrap: pretty; overflow-wrap: anywhere; }

/* Prochaine étape du parcours (js/parcours/prochaine-action.js), dans la tête : l'action principale de l'écran */
.sj .tete-actions.pa { width: 24rem; align-items: stretch; margin: 0; gap: .35rem; }
.sj .tete-actions.pa:empty { display: none; }
.sj .pa-tete .kicker { font-size: .64rem; margin: 0; }
.sj .pa-carte { grid-template-columns: minmax(0, 1fr); gap: .6rem; background: transparent; border: 0; border-left: 3px solid var(--m-bande); border-radius: 0; padding: .3rem 0 .3rem .9rem; }
.sj .pa-carte.est-retard { border-left-color: var(--critique); }
.sj .pa-texte h3 { font-size: 1.3rem; }
.sj .pa-texte p { font-size: .88rem; }
.sj .pa-actions { justify-content: flex-start; }
@media (max-width: 860px) { .sj .tete-actions.pa { width: auto; } }

/* Rubriques : des entrées à filets, deux colonnes ; le filet et l'icône portent la teinte (sourde) du domaine */
.rub-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ligne); }
.rub { position: relative; display: grid; gap: .25rem; align-content: start; min-width: 0; padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--ligne); }
.rub-nom { display: flex; align-items: center; gap: .5rem; min-width: 0; font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; color: var(--texte); }
.rub-nom .ico { width: 18px; height: 18px; flex: none; color: var(--d); }
.rub-lien::after { content: ''; position: absolute; inset: 0; }   /* la rubrique entière ouvre le domaine */
.rub:hover .rub-lien > span:not(.rub-etat) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.rub-lien:focus-visible { outline: none; }
.rub:has(.rub-lien:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rub-etat { margin-left: auto; font-family: var(--sans); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); white-space: nowrap; }
.rub-etat-critique { color: var(--critique); }
.rub-etat-pret { color: var(--ok); }
.rub-corps { display: grid; gap: .15rem; min-width: 0; }
.rub-ligne { font-weight: 600; font-size: .94rem; line-height: 1.3; overflow-wrap: anywhere; }
.rub-texte { color: var(--texte-2); font-size: .86rem; text-wrap: pretty; overflow-wrap: anywhere; }
.rub-suites { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.rub-suite { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; font-size: .84rem; font-weight: 500; color: var(--texte); }
.rub-suite:hover span { text-decoration: underline; text-underline-offset: 3px; }
.rub-suite .ico { width: 13px; height: 13px; flex: none; }
.rub-raccourci { color: var(--texte-2); }
.rub.est-vide { --d: var(--ligne-2); }
.rub.est-vide .rub-nom { color: var(--texte-3); }
.rub.est-indisponible { opacity: .8; }
.sj-volet-rub .sj-col-tete { display: none; }   /* le grand mot « Rubriques » porte le titre */
.volet.est-profond .rub-nom .ico { color: var(--texte); }
.volet.est-profond .prio-dom .ico { color: var(--texte); }

/* Ce que le moment a en propre (Vivre : le fil de la journée ; Clôturer : les quatre chantiers), sous le panneau */
.sj .c-planning:empty { display: none; }

/* ============================================================
   Espaces de premier niveau : Outils, Réseau (langage de surface : css/coque.css, js/coque.js pageEspace)
   ============================================================ */
.esp-note { margin-top: 1.2rem; }

/* ============================================================
   Téléphone et tablette (mêmes paliers que le prototype v2 : 860 · 400)
   ============================================================ */
@media (max-width: 860px) {
  .sj-vignette, .sj-vignette-bloc { width: 5.2rem; }
  .sj-vignette.est-initiale span { font-size: 2.3rem; }
  .sj-faits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sj-faits li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .sj-faits li:nth-child(n+3) { border-top: 1px solid var(--ligne); }
  .sj-faits li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sj-onglet { padding: .4rem .5rem .45rem; min-height: 52px; }
  .sj-onglet-nom { font-size: 1.2rem; }
  .sj-onglet-sous { font-size: .66rem; line-height: 1.25; white-space: normal; }
  .rub-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .sj-onglet-sous { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sj-onglet { transition: none; }
}

/* ============================================================
   Vue d'ensemble du séjour (#/projet/<id>, render.js renderHub) dans le langage de surface : toute la largeur, des
   sections à filets côte à côte (plus de colonne étroite de cartes) ; « Modifier le séjour » passe dans la tête.
   ============================================================ */
/* Les vues historiques (.view.wrap) prennent toute la largeur de la page : dans [data-app] (flex en colonne), la marge
   automatique d'un .wrap le réduisait à la largeur de son contenu (vue d'ensemble à 628 px sur un écran de 1280). */
[data-app] > .view.wrap, [data-app] > footer.wrap { align-self: stretch; width: 100%; box-sizing: border-box; }
[data-app] > .view.wrap { padding-inline: var(--sp-5); }
[data-app]:has([data-tete-page] [data-action-sejour]) .hub-edit-bar { display: none; }
.hub-sections, .hub-accordions { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2rem; align-items: start; }
.hub-sections { padding-top: .6rem; }
.hub-accordions { margin-top: 0; }
.hub-sec, .hub-acc, .hub-plan-embed { background: transparent; border: 0; border-top: 1px solid var(--texte); border-radius: 0; padding: .8rem 0 1.3rem; margin-top: 0; }
.hub-sec-head { border-bottom: 0; padding-bottom: 0; }
.hub-sec-lbl { font-family: var(--sans); font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); }
.hub-sec-val { font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
