/* ═══════════════════════════════════════════════════════════════
   bw-hub.css : le hub en oignon. Pages générées par build-hub.mjs :
   apprendre.html (couche 1), apprendre/<thème>.html (2), learn-help/
   <enjeu>.html (3), et le bloc de la couche 4 dans chaque pièce reliée.
   Concept : Direction et Stratégie/CONCEPT-HUB-OIGNON.md.
   Codes : BASE-DESIGN-PREMIUM.md. Couleurs par les constantes du socle
   (--bw-*, rebranchées sur la palette par bw-premium.css), échelle
   8 · 16 · 24 · 40 · 64 · 96, au moins 96 entre deux sections, 1 px de
   contour, un seul rayon, aucune ombre, aucun déplacement au survol.
   ═══════════════════════════════════════════════════════════════ */

/* Le cadre (.container, gouttière) vient de la base du gabarit, comme sur toutes
   les pages ; l'espace entre deux sections (96 en haut, 96 en bas), de la base
   premium. Rien de tout ça n'est redéclaré ici. */

/* ── Tête de couche : fil d'Ariane, surtitre, titre, chapeau, date ── */
.hb-fil ol{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 24px;padding:0;list-style:none;font-size:.875rem;line-height:1.5;color:var(--bw-gris)}
.hb-fil li{display:flex;align-items:center;gap:8px}
.hb-fil li+li::before{content:"›";color:var(--bw-trait-2)}
.hb-fil a{color:var(--bw-gris);text-decoration:underline;text-decoration-color:var(--bw-trait-2);text-underline-offset:3px}
.hb-fil a:hover{color:var(--bw-encre);text-decoration-color:currentColor}
.hb-fil [aria-current]{color:var(--bw-encre);font-weight:500}
/* Dans le bandeau sombre d'un article (couche 4), le fil prend le trait :
   la teinte claire de la palette, lisible sur l'encre, comme le surtitre. */
.hero .hb-fil ol,.hero .hb-fil a,.hero .hb-fil li+li::before{color:var(--bw-trait)}
.hero .hb-fil a{text-decoration-color:currentColor}
.hero .hb-fil a:hover{color:var(--bw-blanc)}
.hb-sur{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin:0 0 16px;font-size:.8rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-or)}
.hb-tete h1{display:flex;flex-wrap:wrap;align-items:center;gap:24px;margin:0;font-size:clamp(2.7rem,6.2vw,5rem);line-height:1.05;letter-spacing:-.01em;color:var(--bw-encre)}
.hb-lede{max-width:68ch;margin:24px 0 0;font-size:1.25rem;line-height:1.5;color:var(--bw-gris)}
.hb-meta{display:flex;flex-wrap:wrap;gap:8px 24px;margin:24px 0 0;font-size:.875rem;color:var(--bw-gris)}
/* Couche 3 : « Sur cette page », à droite du titre sur grand écran, dessous ailleurs.
   Chaque section y dit ce qu'elle contient : la profondeur se voit avant le clic. */
.hb-sommaire{margin-top:40px;padding:24px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);background:var(--bw-blanc)}
.hb-sommaire-k{margin:0 0 8px;font-size:.75rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-or)}
.hb-sommaire ol{margin:0;padding:0;list-style:none}
.hb-sommaire li{max-width:none;border-top:1px solid var(--bw-trait)}
.hb-sommaire li:first-child{border-top:0}
.hb-sommaire a{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:16px;align-items:baseline;padding:16px 0;color:var(--bw-encre);text-decoration:none;font-weight:500}
.hb-sommaire a:hover span:nth-child(2){text-decoration:underline;text-underline-offset:3px}
.hb-sommaire-d{font-size:.875rem;font-weight:400;color:var(--bw-gris);white-space:nowrap}
@media(min-width:1100px){
  .hb-tete-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,440px);column-gap:96px;align-items:end}
  .hb-tete-in .hb-sommaire{margin-top:0}
}
/* Les cibles du sommaire ne passent pas sous l'en-tête collant */
.hb-sec{scroll-margin-top:96px}

/* ── Sections : toujours dans le même ordre, numérotées ── */
.hb-sec h2{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 16px;margin:0 0 24px;font-size:2rem;line-height:1.25;color:var(--bw-encre)}
.hb-n{font-family:'Inter',system-ui,sans-serif;font-size:.875rem;font-weight:500;letter-spacing:.2em;color:var(--bw-or)}
.hb-duree{font-family:'Inter',system-ui,sans-serif;font-size:.8rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-gris)}
.hb-txt{max-width:68ch;margin:0;font-size:1.0625rem;line-height:1.6;color:var(--bw-encre)}
/* L'encart « à venir » prend la ligne, comme les cartes qu'il remplace ; son texte
   garde sa mesure (la règle des 68 caractères du socle, sur ses paragraphes). */
.hb-sec .bw-soon{max-width:none}
.hb-discrete h2{font-size:1.25rem}

/* ── Boutons : deux styles, pas trois ── */
.hb-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:16px 40px;border:1px solid var(--bw-encre);border-radius:var(--bw-r-sm);background:transparent;color:var(--bw-encre);font-family:'Inter',system-ui,sans-serif;font-size:.8rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;text-decoration:none;cursor:pointer;transition:background-color .25s,color .25s,border-color .25s}
.hb-btn:hover{background:var(--bw-encre);color:var(--bw-blanc)}
.hb-btn-plein{background:var(--bw-encre);color:var(--bw-blanc)}
.hb-btn-plein:hover{background:transparent;color:var(--bw-encre)}

/* ── Cartes : cliquables au contour de composant, « bientôt » en pointillé ── */
/* auto-fit et non auto-fill : trois cartes prennent la ligne entière au lieu de
   laisser trois colonnes vides à droite (Tristan, 1er oct. : « des sections qui
   prennent la moitié de l'écran »). Chaque case est un conteneur : une carte
   devenue large passe à l'horizontale (voir plus bas). */
.hb-grille{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px;margin:0;padding:0;list-style:none}
.hb-grille>li{max-width:none;container-type:inline-size}
.hb-carte{display:flex;flex-direction:column;gap:16px;height:100%;padding:24px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);background:var(--bw-blanc);color:var(--bw-encre);text-decoration:none;transition:border-color .2s}
a.hb-carte:hover{border-color:var(--bw-encre)}
.hb-carte-t{font-family:'Bricolage Grotesque',system-ui,sans-serif;font-size:1.25rem;font-weight:700;line-height:1.25}
.hb-carte-p{font-size:1rem;line-height:1.6;color:var(--bw-gris)}
.hb-carte-pied{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:auto;font-size:.875rem;color:var(--bw-gris)}
.hb-fleche{margin-left:auto;font-size:1rem;color:var(--bw-encre)}
/* Couche 2 : les cartes prolongent le titre, dans la même section */
.hb-enjeux{margin-top:64px}
.hb-carte.hb-bientot{border-style:dashed;background:transparent}
.hb-carte.hb-bientot .hb-carte-t{color:var(--bw-gris)}
.hb-badge{margin-left:auto;padding:4px 8px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);font-size:.7rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-gris)}
/* Une carte large (un ou deux enjeux, un ou deux articles) se lit à l'horizontale :
   l'icône, puis le titre et sa phrase, puis les repères ; l'image à gauche du texte. */
@container (min-width:640px){
  .hb-carte.hb-enjeu{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:24px;row-gap:8px;align-items:center}
  .hb-enjeu .hb-ico{grid-column:1;grid-row:1 / span 2}
  .hb-enjeu .hb-carte-t{grid-column:2;grid-row:1}
  .hb-enjeu .hb-carte-p{grid-column:2;grid-row:2}
  .hb-enjeu .hb-carte-pied{grid-column:3;grid-row:1 / span 2;margin-top:0}
  .hb-carte.hb-art{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
  .hb-art img{height:100%;aspect-ratio:auto;min-height:210px}
}

/* L'icône d'un enjeu, dans un carré : la même que sur sa fiche */
.hb-ico{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border:1px solid var(--bw-trait);border-radius:var(--bw-r-sm);background:var(--bw-creme);color:var(--bw-encre)}
.hb-ico svg{width:22px;height:22px}
.hb-ico-grand{width:64px;height:64px}
.hb-ico-grand svg{width:32px;height:32px}

/* ── Couche 1 : la recherche, la porte de curiosité, la carte des thèmes ── */
.hb-cherche{display:flex;gap:8px;max-width:640px;margin:40px 0 0}
.hb-cherche input{flex:1;min-width:0;min-height:44px;padding:0 16px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);background:var(--bw-blanc);color:var(--bw-encre);font:inherit;font-size:1rem}
.hb-cherche input::placeholder{color:var(--bw-gris);opacity:1}
@media(max-width:560px){.hb-cherche{flex-direction:column}}
/* Résultats : seulement le contenu du hub */
.hb-res{max-width:640px}
.hb-res-l{display:grid;gap:8px;margin:16px 0 0;padding:0;list-style:none}
.hb-res-l a{display:flex;align-items:baseline;gap:16px;padding:16px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);background:var(--bw-blanc);color:var(--bw-encre);text-decoration:none;line-height:1.4;transition:border-color .2s}
.hb-res-l a:hover{border-color:var(--bw-encre)}
.hb-res-l .hb-format{flex:none;min-width:64px}
.hb-res-vide{margin:16px 0 0;color:var(--bw-gris)}

/* La porte : la bande sombre ponctuelle de la base. Sur l'encre, texte blanc,
   petits textes au trait ; le doré n'y passe pas sous la taille d'un grand titre. */
.hb-porte{background:var(--bw-encre);color:var(--bw-blanc)}
.hb-porte-k{margin:0;font-size:.8rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-trait)}
.hb-porte-fait{max-width:24ch;margin:24px 0 0;font-family:'Playfair Display',Georgia,serif;font-size:clamp(1.9rem,3.6vw,2.8rem);font-weight:600;line-height:1.15;letter-spacing:-.01em;color:var(--bw-blanc)}
.hb-porte-src{margin:16px 0 0;font-size:.875rem;color:var(--bw-trait)}
.hb-porte-src a{color:var(--bw-trait);text-decoration:underline;text-underline-offset:3px}
.hb-porte-src a:hover{color:var(--bw-blanc)}
.hb-porte-q{max-width:40ch;margin:40px 0 24px;font-family:'Bricolage Grotesque',system-ui,sans-serif;font-size:1.5rem;font-weight:700;line-height:1.25;color:var(--bw-blanc)}
.hb-porte .hb-btn{border-color:var(--bw-blanc);color:var(--bw-blanc)}
.hb-porte .hb-btn:hover{background:var(--bw-blanc);color:var(--bw-encre)}
/* Grand écran : le fait à gauche, la question et le bouton à sa droite, sur sa ligne
   de base. Les placements portent la spécificité de « .container > * ». */
@media(min-width:900px){
  .hb-porte .container{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);column-gap:96px;align-items:end}
  .hb-porte .container>*{grid-column:1}
  .hb-porte .container>.hb-porte-q{grid-column:2;grid-row:2;margin:0 0 24px}
  .hb-porte .container>.hb-btn{grid-column:2;grid-row:3;justify-self:start}
}

.hb-monde{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:64px}
@media(max-width:900px){.hb-monde{grid-template-columns:1fr}}
/* Cible du fil d'Ariane (#humain, #environnement) : sans ce dégagement, l'en-tête
   collant recouvrait le titre de l'univers à l'arrivée. */
.hb-univers{scroll-margin-top:96px}
.hb-univers h2{margin-bottom:8px}
.hb-univers-p{max-width:68ch;margin:0 0 24px;color:var(--bw-gris);line-height:1.6}
.hb-themes{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
@media(max-width:560px){.hb-themes{grid-template-columns:1fr}}

/* ── Couche 3 : l'idée reçue, les gestes, la passerelle ── */
.hb-idee{max-width:68ch;margin:40px 0 0;border:1px solid var(--bw-trait);border-radius:var(--bw-r-sm);background:var(--bw-blanc)}
.hb-idee p{margin:0;padding:24px;line-height:1.6}
.hb-idee p+p{border-top:1px solid var(--bw-trait);color:var(--bw-gris)}
.hb-idee-k{display:block;margin-bottom:8px;font-size:.75rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-or)}
.hb-idee-q{font-family:'Bricolage Grotesque',system-ui,sans-serif;font-size:1.25rem;font-weight:700;color:var(--bw-encre)}
/* « Comprendre » : le texte et l'idée reçue côte à côte sur grand écran */
@media(min-width:1100px){
  .hb-duo{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:64px;align-items:start}
  .hb-duo .hb-idee{max-width:none;margin:0}
}

.hb-art{padding:0;overflow:hidden}
.hb-art img{display:block;width:100%;height:auto;aspect-ratio:40/21;object-fit:cover;background:var(--bw-creme)}
.hb-art-tx{display:flex;flex-direction:column;gap:16px;flex:1;padding:24px}

/* Les gestes côte à côte : chacun garde une ligne courte, la section prend la largeur */
.hb-gestes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px 40px;margin:0;padding:0;list-style:none;counter-reset:g}
.hb-gestes li{display:grid;grid-template-columns:40px minmax(0,1fr);gap:16px;align-items:start;max-width:none;line-height:1.6;counter-increment:g}
.hb-gestes li::before{content:counter(g);display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);font-family:'Bricolage Grotesque',system-ui,sans-serif;font-weight:700;color:var(--bw-encre)}
.hb-gestes li span{padding-top:8px}

/* Aide immédiate (fiches Humain) : l'encart international des articles */
.hb-pont{padding:24px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);background:var(--bw-blanc);color:var(--bw-encre);line-height:1.6}
.hb-pont-k{margin:0 0 16px;font-family:'Bricolage Grotesque',system-ui,sans-serif;font-size:1.25rem;font-weight:700;line-height:1.25}
/* Grand écran : le titre de l'encart à gauche, son texte (à sa mesure) à droite */
@media(min-width:900px){
  .hb-pont{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:64px;padding:40px}
  .hb-pont-k{margin:0}
}
.hb-pont a{color:var(--bw-encre);font-weight:500;text-decoration:underline;text-underline-offset:3px}

/* ── Couche 4 : la pièce renvoie à son enjeu, puis à deux pièces d'un autre format ── */
.hb-piece{margin:64px 0;padding:40px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);background:var(--bw-blanc)}
.hb-piece-k{margin:0;font-size:.8rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-or)}
/* une pièce peut relever de plusieurs enjeux : ils s'alignent, puis passent à la ligne */
.hb-piece-enjeux{display:flex;flex-wrap:wrap;gap:16px 40px;margin:16px 0 0}
.hb-piece-enjeu{display:inline-flex;align-items:center;gap:16px;font-family:'Bricolage Grotesque',system-ui,sans-serif;font-size:1.5rem;font-weight:700;color:var(--bw-encre);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.hb-piece-suite{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;margin:40px 0 0;padding:0;list-style:none}
.hb-piece-suite a{display:flex;flex-direction:column;gap:8px;height:100%;padding:24px;border:1px solid var(--bw-trait-2);border-radius:var(--bw-r-sm);color:var(--bw-encre);text-decoration:none;line-height:1.6;transition:border-color .2s}
.hb-piece-suite a:hover{border-color:var(--bw-encre)}
.hb-format{font-size:.75rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--bw-gris)}
@media(max-width:560px){.hb-piece{padding:24px}}
/* Sur une fiche techno, le bloc ouvre la dernière section (Sources) : la section
   donne déjà l'espace du haut. */
.te-blk .hb-piece{margin-top:0}

html.bw-motion-off :is(.hb-btn,.hb-carte,.hb-piece-suite a,.hb-res-l a){transition:none}
@media(prefers-reduced-motion:reduce){:is(.hb-btn,.hb-carte,.hb-piece-suite a,.hb-res-l a){transition:none}}
