/* Senbazuru — site.css : généré par outils/generer.py (jetons et composants de la charte, mise en page). */
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-vietnamese-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-vietnamese-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-vietnamese-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-ext-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-ext-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root, [data-theme="papier"] {
  --nuit: #1f1d36;
  --lavande: #5b5872;
  --blanc: #ffffff;
  --peche: #fff1e8;
  --filet: #f3d9c8;
  --corail-fonce: #c2410c;
  --corail: #e4572e;
  --brume: #c9c6dc;
  --papier-jaune: #ffc145;
  --papier-abricot: #ff9f5a;
  --papier-rose: #ff8fb1;
  --papier-lilas: #b79cff;
  --papier-bleu: #3a86ff;
  --papier-menthe: #3bb273;
  --lien: var(--corail-fonce);
  --sur-corail: var(--blanc);
  --focus: var(--nuit);
  --focus-sur-nuit: var(--papier-jaune);
  --ombre-bouton: 0 4px 0 #1f1d36;
  --ombre-bouton-appui: 0 1px 0 #1f1d36;
}
:root {
  --espace-1: 4px;
  --espace-2: 8px;
  --espace-3: 12px;
  --espace-4: 16px;
  --espace-5: 24px;
  --espace-6: 32px;
  --espace-7: 48px;
  --espace-8: 64px;
  --rayon-gommette: 3px;
  --rayon-photo: 16px;
  --rayon-carte: 18px;
  --rayon-bloc: 28px;
  --rayon-pilule: 999px;
  --largeur-site: 1200px;
  --largeur-texte: 680px;
  --cible-min: 48px;
  --trait: 2px;
  --trait-focus: 3px;
  --decalage-papier: 8px;
  --decalage-survol: 12px;
  --font-titre: "Fredoka", "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-texte: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.titre-page { font-family: var(--font-titre); font-size: 56px; line-height: 1.05; font-weight: 600; letter-spacing: -0.01em; }
.titre-section { font-family: var(--font-titre); font-size: 36px; line-height: 1.15; font-weight: 600; }
.titre-bloc { font-family: var(--font-titre); font-size: 28px; line-height: 1.2; font-weight: 600; }
.titre-carte { font-family: var(--font-titre); font-size: 21px; line-height: 1.2; font-weight: 600; }
.surtitre { font-family: var(--font-titre); font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: 0.02em; }
.bouton { font-family: var(--font-titre); font-size: 19px; line-height: 1; font-weight: 600; }
.chapo { font-family: var(--font-texte); font-size: 21px; line-height: 1.5; font-weight: 400; }
.corps { font-family: var(--font-texte); font-size: 18px; line-height: 1.6; font-weight: 400; }
.menu { font-family: var(--font-texte); font-size: 17px; line-height: 1.2; font-weight: 700; }
.etiquette { font-family: var(--font-texte); font-size: 15px; line-height: 1.2; font-weight: 700; }
.legende { font-family: var(--font-texte); font-size: 15px; line-height: 1.45; font-weight: 400; }
.mention { font-family: var(--font-texte); font-size: 14px; line-height: 1.4; font-weight: 400; }
/* Senbazuru — composants. Chargé après tokens.css ; toutes les valeurs viennent des jetons. */

/* Base */
.sb { margin: 0; font-family: var(--font-texte); font-size: 18px; line-height: 1.6; color: var(--nuit); background: var(--blanc); }
.sb a { color: var(--lien); text-underline-offset: 3px; }
.sb :focus-visible { outline: var(--trait-focus) solid var(--focus); outline-offset: 3px; }
.sb .sb-sombre :focus-visible { outline-color: var(--focus-sur-nuit); }
.sb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sb-scene { padding: var(--espace-5); }
.sb-pli { margin: 0; border: 0; border-top: var(--trait) dashed var(--filet); }

/* Logo : la grue seule et le nom */
.sb-logo { display: inline-flex; align-items: center; gap: var(--espace-3); color: var(--nuit); text-decoration: none; }
.sb .sb-logo { color: var(--nuit); }
.sb-logo svg { flex: none; width: 57px; height: 50px; }
.sb-logo-nom { font-family: var(--font-titre); font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.sb-grue .c { fill: var(--corail); }
.sb-grue .f { fill: var(--corail-fonce); }

/* Boutons */
.sb-bouton { display: inline-flex; align-items: center; justify-content: center; gap: var(--espace-2); min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--rayon-pilule); background: var(--corail-fonce); color: var(--sur-corail); font-family: var(--font-titre); font-weight: 600; font-size: 19px; line-height: 1; text-decoration: none; box-shadow: var(--ombre-bouton); cursor: pointer; transition: transform .12s, box-shadow .12s, background-color .12s; }
.sb .sb-bouton { color: var(--sur-corail); }
.sb-bouton:hover { background: var(--nuit); }
.sb-bouton:active { transform: translateY(3px); box-shadow: var(--ombre-bouton-appui); }
.sb .sb-bouton-secondaire { background: var(--blanc); color: var(--nuit); box-shadow: inset 0 0 0 var(--trait) var(--nuit), var(--ombre-bouton); }
.sb .sb-bouton-secondaire:hover { background: var(--peche); }
.sb .sb-bouton-secondaire:active { box-shadow: inset 0 0 0 var(--trait) var(--nuit), var(--ombre-bouton-appui); }
.sb-bouton-icone { display: inline-grid; place-items: center; width: var(--cible-min); height: var(--cible-min); padding: 0; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--nuit); cursor: pointer; }
.sb-bouton-icone:hover { background: var(--peche); }

/* Bascule de langue */
.sb-langue { display: inline-flex; padding: 2px; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); }
.sb .sb-langue a { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; border-radius: var(--rayon-pilule); color: var(--nuit); text-decoration: none; font-weight: 700; font-size: 15px; }
.sb .sb-langue a[aria-current="true"] { background: var(--nuit); color: var(--blanc); }

/* En-tête et menu */
.sb-entete-int { max-width: var(--largeur-site); margin: 0 auto; padding: 18px var(--espace-6); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; box-sizing: border-box; }
.sb-nav { display: flex; flex-wrap: wrap; gap: var(--espace-2); margin-left: auto; }
.sb .sb-nav a { display: inline-flex; align-items: center; min-height: var(--cible-min); padding: 0 18px; border-radius: var(--rayon-pilule); background: var(--peche); color: var(--nuit); text-decoration: none; font-weight: 700; font-size: 17px; line-height: 1.2; }
.sb .sb-nav a:hover { background: var(--filet); }
.sb .sb-nav a.sb-saison { background: var(--papier-bleu); }
.sb .sb-nav a[aria-current="page"] { background: var(--nuit); color: var(--blanc); }
.sb-outils { display: flex; align-items: center; gap: var(--espace-2); }
.sb-menu-bouton { display: inline-flex; align-items: center; gap: var(--espace-2); min-height: var(--cible-min); margin-left: auto; padding: 0 16px; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--nuit); font-family: var(--font-titre); font-weight: 600; font-size: 17px; cursor: pointer; }
.sb-menu-bouton[aria-expanded="true"] { background: var(--nuit); color: var(--blanc); }
.sb-menu-panneau { display: flex; flex-direction: column; gap: 10px; padding: var(--espace-4); border-top: var(--trait) dashed var(--filet); }
.sb .sb-menu-panneau > a { display: flex; align-items: center; min-height: 56px; padding: 0 22px; border-radius: var(--rayon-pilule); background: var(--peche); color: var(--nuit); text-decoration: none; font-family: var(--font-titre); font-weight: 600; font-size: 20px; }
.sb .sb-menu-panneau > a.sb-saison { background: var(--papier-bleu); }
.sb .sb-menu-panneau > a[aria-current="page"] { background: var(--nuit); color: var(--blanc); }
.sb-menu-bas { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-3); padding-top: var(--espace-2); }

/* Recherche et filtres */
.sb-recherche { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 560px; height: 56px; padding: 0 6px 0 20px; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); background: var(--blanc); box-sizing: border-box; }
.sb-recherche:focus-within { outline: var(--trait-focus) solid var(--focus); outline-offset: 3px; }
.sb-recherche input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 18px; color: var(--nuit); }
.sb-recherche input::placeholder { color: var(--lavande); opacity: 1; }
.sb-filtres { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; border: 0; }
.sb-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); margin: 0; padding: 0; border: 0; }
.sb-groupe legend { float: left; width: 110px; padding: 0; font-family: var(--font-titre); font-weight: 600; font-size: 17px; }
.sb-filtre { display: inline-flex; align-items: center; gap: var(--espace-2); min-height: var(--cible-min); padding: 0 16px; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--nuit); font-family: var(--font-texte); font-weight: 700; font-size: 16px; cursor: pointer; }
.sb-filtre:hover { background: var(--peche); }
.sb-filtre[aria-pressed="true"] { background: var(--nuit); color: var(--blanc); }
.sb-filtre[aria-pressed="true"] .sb-losange { background: var(--blanc); }
.sb-pastille { flex: none; width: 14px; height: 14px; box-sizing: border-box; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-gommette); background: var(--papier); }
.sb-filtre[aria-pressed="true"] .sb-pastille { border-color: var(--blanc); }
.sb-resultat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-4); font-weight: 700; }

/* Badges de difficulté */
.sb-badge { display: inline-flex; align-items: center; gap: var(--espace-2); min-height: 30px; padding: 0 12px; box-sizing: border-box; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--nuit); font-family: var(--font-texte); font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.sb-losanges { display: inline-flex; gap: var(--espace-1); }
.sb-losange { display: inline-block; width: 9px; height: 9px; background: var(--nuit); border-radius: var(--rayon-gommette); transform: rotate(45deg); }

/* Cartes de tutoriel : une feuille posée sur un papier de couleur */
.sb-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px 26px; margin: 0; padding: 0 var(--decalage-survol) var(--decalage-survol) 0; list-style: none; }
.sb-carte { --papier: var(--papier-jaune); position: relative; display: flex; flex-direction: column; background: var(--blanc); border: var(--trait) solid var(--nuit); border-radius: var(--rayon-carte); box-shadow: var(--decalage-papier) var(--decalage-papier) 0 var(--papier); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.sb-carte:hover, .sb-carte:focus-within { transform: translate(-2px, -2px); box-shadow: var(--decalage-survol) var(--decalage-survol) 0 var(--papier); }
.sb-carte:has(a:focus-visible) { outline: var(--trait-focus) solid var(--focus); outline-offset: 3px; }
.sb-carte img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.sb-carte-corps { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
.sb-carte-titre { margin: 0; font-family: var(--font-titre); font-weight: 600; font-size: 21px; line-height: 1.2; }
.sb .sb-carte-titre a { color: var(--nuit); text-decoration: none; }
.sb .sb-carte-titre a:focus-visible { outline: 0; }
.sb-carte-titre a::after { content: ""; position: absolute; inset: 0; }
.sb-carte-infos { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--lavande); font-weight: 700; font-size: 15px; line-height: 1.2; }

/* Tuiles de thème */
.sb-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--espace-4); }
.sb .sb-tuile { display: flex; flex-direction: column; gap: 2px; min-height: 104px; padding: 20px; box-sizing: border-box; border: var(--trait) solid transparent; border-radius: var(--rayon-carte); background: var(--papier); color: var(--nuit); text-decoration: none; }
.sb .sb-tuile:hover { border-color: var(--nuit); }
.sb-tuile-nom { font-family: var(--font-titre); font-weight: 600; font-size: 23px; line-height: 1.15; }
.sb-tuile-nombre { font-weight: 700; font-size: 15px; }

/* Lecteur vidéo léger : la photo du modèle, puis youtube-nocookie au clic */
.sb-lecteur { --papier: var(--papier-rose); position: relative; aspect-ratio: 16 / 9; max-width: 100%; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-carte); overflow: hidden; background: var(--nuit); box-shadow: var(--decalage-papier) var(--decalage-papier) 0 var(--papier); }
.sb-lecteur-bouton { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
/* Anneau de focus à l'extérieur du cadre, sur la page : tracé sur la photo, il disparaissait sur les photos sombres */
.sb .sb-lecteur-bouton:focus-visible { outline: 0; }
.sb-lecteur:has(.sb-lecteur-bouton:focus-visible) { outline: var(--trait-focus) solid var(--focus); outline-offset: 3px; }
.sb-lecteur-bouton img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sb-lecteur-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 84px; height: 84px; box-sizing: border-box; border: 3px solid var(--nuit); border-radius: 50%; background: var(--corail-fonce); box-shadow: var(--ombre-bouton); transform: translate(-50%, -50%); transition: transform .12s; }
.sb-lecteur-bouton:hover .sb-lecteur-play { transform: translate(-50%, -50%) scale(1.08); }
.sb-lecteur-duree { position: absolute; right: 12px; bottom: 12px; padding: 4px 12px; border-radius: var(--rayon-pilule); background: var(--nuit); color: var(--blanc); font-weight: 700; font-size: 15px; line-height: 1.3; }
.sb-lecteur iframe, .sb-lecteur-charge { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sb-lecteur-note { margin: 14px 0 0; color: var(--lavande); font-size: 15px; line-height: 1.45; }

/* Fiche du modèle : « Ce qu'il vous faut » */
.sb-fiche { display: flex; flex-direction: column; gap: var(--espace-4); max-width: 520px; padding: 28px; box-sizing: border-box; border-radius: var(--rayon-bloc); background: var(--peche); }
.sb-surtitre { margin: 0; font-family: var(--font-titre); font-weight: 600; font-size: 16px; line-height: 1.3; letter-spacing: 0.02em; color: var(--corail-fonce); }
.sb-fiche h2 { margin: 0; font-family: var(--font-titre); font-weight: 600; font-size: 28px; line-height: 1.2; }
.sb-fiche dl { display: grid; grid-template-columns: max-content 1fr; gap: 12px 20px; align-items: center; margin: 0; }
.sb-fiche dt { font-family: var(--font-titre); font-weight: 600; font-size: 16px; color: var(--lavande); }
.sb-fiche dd { margin: 0; min-width: 0; font-weight: 700; font-size: 17px; line-height: 1.4; }
.sb-etiquettes { display: flex; flex-wrap: wrap; gap: var(--espace-2); }
.sb .sb-etiquette { display: inline-flex; align-items: center; gap: var(--espace-2); min-height: 40px; padding: 0 14px; box-sizing: border-box; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--nuit); text-decoration: none; font-weight: 700; font-size: 15px; }
.sb .sb-etiquette:hover { background: var(--filet); }

/* Bandeau de saison */
.sb-saison { --papier: var(--papier-bleu); display: flex; flex-wrap: wrap; align-items: center; gap: 30px; padding: 36px; border-radius: var(--rayon-bloc); background: var(--papier); color: var(--nuit); }
.sb-saison-texte { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--espace-3); }
.sb-saison .sb-surtitre { color: var(--nuit); }
.sb-saison h2 { margin: 0; font-family: var(--font-titre); font-weight: 600; font-size: 40px; line-height: 1.1; text-wrap: balance; }
.sb-saison p { margin: 0; font-weight: 700; }
.sb-saison-photos { flex: 1 1 340px; display: flex; gap: var(--espace-4); }
.sb-photo-posee { width: 50%; min-width: 0; height: auto; aspect-ratio: 1; object-fit: cover; border: 4px solid var(--blanc); border-radius: var(--rayon-photo); transform: rotate(-3deg); }
.sb-photo-posee + .sb-photo-posee { transform: rotate(3deg); }

/* Pied de page */
.sb-pied { background: var(--nuit); color: var(--blanc); }
.sb-pied-int { max-width: var(--largeur-site); margin: 0 auto; padding: 40px var(--espace-6); display: flex; flex-direction: column; gap: var(--espace-5); box-sizing: border-box; }
.sb-pied-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.sb .sb-pied .sb-logo { color: var(--blanc); }
.sb-pied-liens { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-left: auto; }
.sb .sb-pied a { color: var(--blanc); font-weight: 700; }
.sb .sb-pied :focus-visible { outline-color: var(--focus-sur-nuit); }
.sb .sb-pied .sb-langue { border-color: var(--blanc); }
.sb .sb-pied .sb-langue a { color: var(--blanc); }
.sb .sb-pied .sb-langue a[aria-current="true"] { background: var(--blanc); color: var(--nuit); }
.sb-pied-bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--espace-4); padding-top: var(--espace-5); border-top: var(--trait) dashed var(--lavande); }
.sb-pied-mention { margin: 0; color: var(--brume); font-size: 14px; line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
  .sb-bouton, .sb-carte, .sb-lecteur-play { transition: none; }
  .sb-carte:hover, .sb-carte:focus-within { transform: none; }
  .sb-lecteur-bouton:hover .sb-lecteur-play { transform: translate(-50%, -50%); }
}
/* Senbazuru — mise en page des pages. S'ajoute aux jetons (tokens.css) et aux composants
   (bundle.css) de la charte ; toutes les couleurs et mesures viennent des jetons. */

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--espace-5); }
[hidden] { display: none !important; }
body.sb { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
.titre-page { margin: 0; font-size: clamp(34px, 5.5vw, 56px); }
.titre-section { margin: 0; font-size: clamp(26px, 3.6vw, 36px); }

.sb-conteneur { max-width: var(--largeur-site); margin: 0 auto; padding-inline: max(var(--espace-4), env(safe-area-inset-left, 0px)) max(var(--espace-4), env(safe-area-inset-right, 0px)); box-sizing: border-box; }
@media (min-width: 700px) { .sb-conteneur { padding-inline: var(--espace-6); } }
.sb-section { padding-block: var(--espace-7) 0; display: flex; flex-direction: column; gap: var(--espace-5); }
.sb-section:last-child { padding-bottom: var(--espace-8); }
.sb-section-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--espace-3); }
.sb-section-tete p { margin: 0; color: var(--lavande); }

/* Lien d'évitement */
.sb-evitement { position: absolute; left: var(--espace-4); top: -100px; z-index: 20; padding: 12px 20px; border-radius: var(--rayon-pilule); background: var(--nuit); color: var(--blanc) !important; font-weight: 700; text-decoration: none; }
.sb-evitement:focus { top: var(--espace-3); }

/* En-tête : menu complet sur ordinateur, bouton Menu sur téléphone */
.sb-entete { background: var(--blanc); }
.sb-entete-int { padding-inline: var(--espace-4); }
@media (min-width: 700px) { .sb-entete-int { padding-inline: var(--espace-6); } }
.sb-outils { margin-left: auto; }
.sb-nav + .sb-outils { margin-left: 0; }
.sb-menu-bouton .sb-trait-fermer, .sb-menu-bouton[aria-expanded="true"] .sb-trait-menu { display: none; }
.sb-menu-bouton[aria-expanded="true"] .sb-trait-fermer { display: inline; }
@media (max-width: 979px) {
  .sb-nav, .sb-langue-entete { display: none; }
  .sb-entete-int { flex-wrap: nowrap; gap: 12px; padding-block: 14px; }
  .sb-entete .sb-logo { gap: 10px; min-width: 0; }
  .sb-logo svg { width: 41px; height: 36px; }
  .sb-logo-nom { font-size: 22px; }
  .sb-menu-bouton { padding: 0 14px; }
}
@media (min-width: 980px) {
  .sb-menu-bouton, .sb-menu-panneau { display: none !important; }
}

/* Fil d'Ariane */
.sb-fil { padding-top: var(--espace-5); }
.sb-fil ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--lavande); }
.sb-fil li + li::before { content: "›"; margin-right: 8px; color: var(--lavande); }
.sb-fil a { color: var(--lavande); }

/* Texte courant */
.sb-prose { max-width: var(--largeur-texte); }
.sb-prose p, .sb-prose ul { margin: 0 0 1em; }
.sb-prose h2 { margin: 1.4em 0 .5em; font-family: var(--font-titre); font-weight: 600; font-size: 28px; line-height: 1.2; }
.sb-prose > :last-child { margin-bottom: 0; }
/* Figures des pages fixes (photos libres, avec leur crédit) */
.sb-figure { margin: 1.6em 0; }
.sb-figure img { display: block; width: 100%; height: auto; border-radius: var(--rayon-photo); }
.sb-figure figcaption { margin-top: var(--espace-2); color: var(--lavande); font-size: 15px; line-height: 1.4; }
.sb-figure-credit { display: block; font-size: 13px; }
.sb-figure-credit a { color: inherit; }
.sb-chapo { margin: 0; max-width: var(--largeur-texte); font-size: 21px; line-height: 1.5; color: var(--lavande); }

/* Accueil */
.sb-hero { background: var(--peche); }
.sb-hero-int { display: grid; gap: var(--espace-6); align-items: center; padding-block: var(--espace-7) var(--espace-8); }
@media (min-width: 900px) { .sb-hero-int { grid-template-columns: 1fr 1fr; } }
.sb-hero-texte { display: flex; flex-direction: column; gap: var(--espace-4); }
.sb-hero form { display: flex; flex-direction: column; gap: var(--espace-2); }
.sb-hero label { font-family: var(--font-titre); font-weight: 600; font-size: 19px; }
.sb-hero-champ { display: flex; flex-wrap: wrap; gap: 10px; }
.sb-hero-champ .sb-recherche { flex: 1 1 260px; }
.sb-hero-photos { position: relative; aspect-ratio: 5 / 4; max-width: 560px; width: 100%; justify-self: center; }
.sb-hero-photos .sb-papier { position: absolute; border-radius: 22px; }
.sb-hero-photos img { position: absolute; width: 58%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 4px solid var(--blanc); border-radius: var(--rayon-carte); }
.sb-hero-photos .sb-papier-1 { left: 4%; top: 2%; width: 64%; height: 66%; background: var(--papier-jaune); transform: rotate(-6deg); }
.sb-hero-photos .sb-papier-2 { right: 0; bottom: 0; width: 56%; height: 58%; background: var(--papier-menthe); transform: rotate(7deg); }
.sb-hero-photos img:first-of-type { left: 8%; top: 6%; transform: rotate(-3deg); }
.sb-hero-photos img:last-of-type { right: 3%; bottom: 5%; transform: rotate(4deg); }
.sb-debuter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-5); padding: 28px 32px; border: var(--trait) dashed var(--nuit); border-radius: 22px; }
.sb-debuter div { flex: 1 1 360px; display: flex; flex-direction: column; gap: 6px; }
.sb-debuter h2 { margin: 0; font-family: var(--font-titre); font-weight: 600; font-size: 28px; line-height: 1.2; }
.sb-debuter p { margin: 0; color: var(--lavande); }

/* Liste des tutoriels et filtres */
.sb-tete-page { display: flex; flex-direction: column; gap: var(--espace-3); padding-top: var(--espace-5); }
.sb-filtres-zone { display: flex; flex-direction: column; gap: var(--espace-4); }
.sb-groupe legend { margin-bottom: 4px; }
@media (max-width: 699px) { .sb-groupe legend { float: none; width: 100%; } }
.sb-carte[hidden] { display: none; }
.sb-aucun { margin: 0; font-weight: 700; }
.sb-cartes { padding-left: 0; }

/* Fiche d'un tutoriel */
.sb-fiche-tete { display: flex; flex-direction: column; gap: var(--espace-3); padding-top: var(--espace-4); }
.sb-fiche-tete .sb-surtitre { margin: 0; }
.sb-fiche-grille { display: grid; gap: var(--espace-6); padding-top: var(--espace-5); }
@media (min-width: 980px) { .sb-fiche-grille { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.sb-fiche-principal { min-width: 0; display: flex; flex-direction: column; gap: var(--espace-6); }
.sb-fiche-principal .sb-lecteur { margin-right: var(--decalage-papier); }
.sb-fiche-photo { margin: 0; }
.sb-fiche-photo img { display: block; width: 100%; height: auto; border: var(--trait) solid var(--nuit); border-radius: var(--rayon-carte); }
.sb-videos { display: grid; gap: var(--espace-6); }
@media (min-width: 700px) { .sb-videos { grid-template-columns: 1fr 1fr; } }
.sb-videos h3 { margin: 0 0 var(--espace-3); font-family: var(--font-titre); font-weight: 600; font-size: 21px; line-height: 1.2; }
.sb-sous-titre { margin: 0; font-family: var(--font-titre); font-weight: 600; font-size: 28px; line-height: 1.2; }
.sb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--espace-4); margin: 0; padding: 0; list-style: none; }
.sb-photos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-photo); }
.sb-fiche { max-width: none; }
@media (min-width: 980px) { .sb-fiche-cote { position: sticky; top: var(--espace-5); } }

/* Thèmes et occasions */
.sb-tuile-description { margin-top: 6px; font-size: 15px; line-height: 1.4; }

/* Galerie */
.sb-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--espace-3); margin: 0; padding: 0; list-style: none; }
.sb-galerie a { position: relative; display: block; border-radius: var(--rayon-photo); overflow: hidden; color: var(--blanc); text-decoration: none; }
/* Légende sur la photo : fond nuit dégradé, assez opaque sous le texte pour le contraste */
.sb-galerie-legende { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 26px 10px 10px; background: linear-gradient(to top, rgb(31 29 54 / .92), rgb(31 29 54 / .82) calc(100% - 26px), rgb(31 29 54 / 0)); }
.sb-galerie-titre { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-titre); font-weight: 600; font-size: 15px; line-height: 1.2; }
.sb-galerie-niveau { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-texte); font-weight: 700; font-size: 13px; line-height: 1.2; }
.sb-galerie-niveau .sb-losange { width: 7px; height: 7px; background: var(--blanc); }
.sb-galerie img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.sb-galerie a:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .sb-galerie img { transition: none; } .sb-galerie a:hover img { transform: none; } }

/* Lecteur : variante sans photo (miniature absente) */
.sb-lecteur-bouton:not(:has(img)) { background: var(--nuit); }

/* La durée est posée sur la photo, hors du bouton (son texte ne doit pas entrer dans le nom du bouton) */
.sb-lecteur-duree { pointer-events: none; }

/* Champ de recherche : la pilule porte déjà l'anneau (:focus-within), pas de second anneau dans le champ */
.sb .sb-recherche input:focus-visible { outline: 0; }

/* Filtre actif : une coche en plus de l'inversion de couleur (indice de forme, utile à tous) */
.sb-filtre[aria-pressed="true"]::before { content: "✓"; font-weight: 700; }

/* Contraste forcé (Windows) : les états portés par la couleur de fond et les petits repères colorés
   disparaîtraient ; on les redessine avec les couleurs système. */
@media (forced-colors: active) {
  .sb-filtre[aria-pressed="true"], .sb .sb-nav a[aria-current="page"], .sb .sb-langue a[aria-current],
  .sb .sb-menu-panneau > a[aria-current="page"], .sb-menu-bouton[aria-expanded="true"] {
    background: Highlight; color: HighlightText; forced-color-adjust: none;
  }
  .sb-losange, .sb-filtre[aria-pressed="true"] .sb-losange { background: CanvasText; forced-color-adjust: none; }
  .sb-filtre[aria-pressed="true"] .sb-losange { background: HighlightText; }
  .sb-pastille { forced-color-adjust: none; background: CanvasText; border-color: CanvasText; }
  .sb-lecteur:has(.sb-lecteur-bouton:focus-visible), .sb-carte:has(a:focus-visible) { outline-color: Highlight; }
}

/* Introduction rédigée des thèmes et occasions (contenu/intros/) */
.sb-intro { max-width: var(--largeur-texte); }
.sb-voir-aussi { display: flex; flex-wrap: wrap; gap: var(--espace-2) var(--espace-4); margin: 0; padding: 0; list-style: none; font-weight: 700; }
