/* ============================================================
   La Carte IA du Sport — feuille de style
   Direction « Surimpression » : la page comme une sortie
   d'atelier riso — papier, encres, calage, tampons.
   Palette héritée de la charte dodonut (identité conservée).
   ============================================================ */

:root {
  /* Papier & encres */
  --creme: #F4ECDF;
  --creme-2: #EDE1CB;
  --encre: #1C1710;
  --encre-doux: #4A4038;
  --tangerine: #FF5A1F;
  --tangerine-fonce: #E8440C;
  --tangerine-texte: #BC3A06; /* tangerine lisible en petit corps (≥ 4.5:1 sur crème) */

  /* Candy = encres d'atelier */
  --periwinkle: #7B75E8;
  --lime: #B8E62C;
  --lime-texte: #55700C;
  --jaune: #FFC02E;
  --corail: #FF7A6B;
  --rose: #FF93C6;

  /* Sémantique par service (couleur = métier) */
  --c-direction: var(--tangerine);
  --c-commercial: var(--corail);
  --c-marcom: var(--rose);
  --c-billetterie: var(--jaune);
  --c-evenementiel: var(--lime);
  --c-sportif: var(--periwinkle);
  --c-juridique: var(--tangerine);
  --c-finance: var(--jaune);
  --c-rh: var(--rose);
  --c-formation: var(--lime);

  /* Type */
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --corps: "Hanken Grotesk", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Structure */
  --rayon: 18px;
  --rayon-s: 10px;
  --pilule: 999px;
  --max: 1180px;
  --bord: 1.5px solid rgba(28, 23, 16, 0.16);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);

  /* Repères d'imprimeur (SVG inline) */
  --repere: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none' stroke='%231C1710' stroke-opacity='0.38' stroke-width='1.2'%3E%3Ccircle cx='14' cy='14' r='7'/%3E%3Cpath d='M14 0v28M0 14h28'/%3E%3C/svg%3E");
  --repere-clair: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none' stroke='%23F4ECDF' stroke-opacity='0.35' stroke-width='1.2'%3E%3Ccircle cx='14' cy='14' r='7'/%3E%3Cpath d='M14 0v28M0 14h28'/%3E%3C/svg%3E");

  /* Barre d'encres (nuancier imprimeur, 10 métiers) */
  --barre-encres: linear-gradient(90deg,
    var(--tangerine) 0 10%, var(--corail) 0 20%, var(--rose) 0 30%,
    var(--jaune) 0 40%, var(--lime) 0 50%, var(--periwinkle) 0 60%,
    var(--tangerine) 0 70%, var(--jaune) 0 80%, var(--rose) 0 90%, var(--lime) 0 100%);
}

* { box-sizing: border-box; }

/* L'attribut hidden doit toujours l'emporter, même sur un display de classe. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--corps);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* clip (et non hidden) : ne crée pas de conteneur de défilement,
     le header sticky reste collé au viewport ; hidden = repli anciens navigateurs */
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.02; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Trame d'impression (halftone plein écran) ---- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  mix-blend-mode: multiply; opacity: 0.5;
  background-image: radial-gradient(rgba(28, 23, 16, 0.1) 0.7px, transparent 0.8px);
  background-size: 5px 5px;
}

/* ---- Surlignages ---- */
.hl { position: relative; white-space: nowrap; }
/* tangerine-fonce : ≥ 3:1 sur crème pour le grand texte (le tangerine pur est à 2,7:1) */
.hl-tangerine { color: var(--tangerine-fonce); }
.hl-lime { color: var(--encre); background: var(--lime); padding: 0 0.12em; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hl-mot { color: var(--tangerine-fonce); }

/* ---- Étiquettes techniques (télémétrie d'atelier) ---- */
.tech {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--encre-doux);
}

/* ============================================================
   Header — avec nuancier d'encres en lisière
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(16px, 4vw, 40px);
  background:
    var(--barre-encres) bottom / 100% 3px no-repeat,
    rgba(244, 236, 223, 0.88);
  backdrop-filter: blur(10px);
}
.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  text-decoration: none; letter-spacing: -0.03em;
}
.wordmark-x { color: var(--tangerine); font-weight: 700; }
.header-feuille {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  background: var(--encre); color: var(--creme);
  padding: 9px 16px; border-radius: var(--pilule);
  box-shadow: 2.5px 2.5px 0 var(--tangerine);
  transition: translate 0.15s var(--ease-out-quint), box-shadow 0.15s var(--ease-out-quint);
}
.header-feuille:hover { translate: -1px -1px; box-shadow: 4px 4px 0 var(--tangerine); }
.pastille {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: var(--pilule);
  background: var(--jaune); color: var(--encre);
  font-family: var(--display); font-weight: 700; font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.pastille.pop { animation: pastille-pop 0.35s var(--ease-out-quint); }
@keyframes pastille-pop {
  0% { scale: 1; } 45% { scale: 1.35; rotate: -6deg; } 100% { scale: 1; rotate: 0deg; }
}

/* ============================================================
   Héro — le calage des encres
   ============================================================ */
.hero {
  position: relative; max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 40px) clamp(28px, 5vw, 56px);
  text-align: center;
  background-image: var(--repere), var(--repere);
  background-repeat: no-repeat;
  background-position: top 34px left 7%, bottom 46px right 6%;
}
/* Nappes d'encres diluées (ex-blobs) */
.hero-blobs { position: absolute; inset: -60px 0 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(78px); opacity: 0.28; mix-blend-mode: multiply;
}
.blob-a { width: 380px; height: 340px; background: var(--periwinkle); top: -8%; left: -180px; animation: flotte 17s ease-in-out infinite; }
.blob-b { width: 330px; height: 310px; background: var(--rose); top: 34%; right: -170px; animation: flotte 21s ease-in-out infinite reverse; }
.blob-c { width: 260px; height: 240px; background: var(--lime); bottom: -80px; left: 12%; animation: flotte 14s ease-in-out infinite; }
@keyframes flotte {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -26px) scale(1.06); }
}

.hero > * { position: relative; z-index: 1; }

/* Tampon d'atelier (ex-eyebrow) */
.eyebrow {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--tangerine-texte);
  padding: 8px 16px; border: 2px solid currentColor; border-radius: 8px;
  box-shadow: inset 0 0 0 2.5px var(--creme), inset 0 0 0 4px currentColor;
  rotate: -1.6deg;
  margin-bottom: 30px;
}

/* Pile de calage : titre encre + 2 couches décalées en surimpression */
.hero-pile { display: grid; margin-bottom: 24px; }
.hero-pile > * { grid-area: 1 / 1; }
.hero-titre {
  font-family: var(--display);
  font-size: clamp(2.9rem, 9vw, 6rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.02;
  text-wrap: balance;
  position: relative; z-index: 2; margin: 0;
}
/* Dérive pilotée par deux variables (souris), consommées avec des
   multiplicateurs opposés par plaque — technique du template de référence. */
.hero-pile { --spx: 0px; --spy: 0px; }
.hero-couche {
  z-index: 1; pointer-events: none; user-select: none;
  mix-blend-mode: multiply; opacity: 0.6;
}
.hero-couche.couche-a { transform: translate(calc(var(--spx) * -1), calc(var(--spy) * -0.55)); }
.hero-couche.couche-b { transform: translate(var(--spx), calc(var(--spy) * 0.45)); }
.hero-couche, .hero-couche * { color: var(--tangerine) !important; }
.hero-couche.couche-b, .hero-couche.couche-b * { color: var(--periwinkle) !important; }
/* fond du surlignage retiré mais padding conservé : mêmes métriques que l'original */
.hero-couche .hl-lime { background: none; }
.hero-couche.couche-a { animation: cale-a 1.35s var(--ease-out-expo) 0.15s both; }
.hero-couche.couche-b { animation: cale-b 1.35s var(--ease-out-expo) 0.15s both; }
@keyframes cale-a { from { translate: -24px 14px; } to { translate: 2px -1.5px; } }
@keyframes cale-b { from { translate: 20px -11px; } to { translate: -2px 1.5px; } }

.hero-sub {
  max-width: 640px; margin: 0 auto 34px; font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  color: var(--encre-doux); text-wrap: pretty;
}
.hero-sub strong { color: var(--encre); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Télémétrie de calage, sous le CTA */
.calage {
  display: flex; gap: 8px 22px; justify-content: center; flex-wrap: wrap;
  margin-top: 30px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--encre-doux);
  font-variant-numeric: tabular-nums;
}
.calage strong { font-weight: 700; color: inherit; }
.calage [data-calage-statut] { color: var(--tangerine-texte); }
.calage [data-calage-statut].registre { color: var(--lime-texte); }

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: var(--pilule);
  text-decoration: none; border: 2px solid var(--encre);
  transition: translate 0.15s var(--ease-out-quint), box-shadow 0.15s var(--ease-out-quint), background 0.15s ease, color 0.15s ease;
}
.btn:active { translate: 1px 1px; }
.btn-plein { background: var(--encre); color: var(--creme); box-shadow: 4px 4px 0 var(--tangerine); }
.btn-plein:hover { translate: -2px -2px; box-shadow: 7px 7px 0 var(--tangerine); }
.btn-contour { background: transparent; color: var(--encre); }
.btn-contour:hover { background: var(--encre); color: var(--creme); }
.btn-tangerine { background: var(--tangerine); color: var(--encre); border-color: var(--encre); box-shadow: 4px 4px 0 var(--periwinkle); }
.btn-tangerine:hover { translate: -2px -2px; box-shadow: 7px 7px 0 var(--periwinkle); }
.btn-contour-clair { background: transparent; color: var(--creme); border-color: var(--creme); }
.btn-contour-clair:hover { background: var(--creme); color: var(--encre); }
.btn-lien {
  background: none; border: none; color: var(--encre-doux);
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 4px;
}
.btn-lien:hover { color: var(--tangerine-texte); }

/* ============================================================
   Marquee — bande d'épreuve, frange chromatique
   ============================================================ */
.marquee {
  overflow: hidden; background: var(--encre); color: var(--creme);
  padding: 14px 0; margin: 22px -10px 0;
  rotate: -0.8deg;
  border-block: 2px solid var(--encre);
}
.marquee-piste {
  display: inline-flex; gap: 0; white-space: nowrap;
  will-change: transform; animation: defile 42s linear infinite;
}
.marquee:hover .marquee-piste { animation-play-state: paused; }
.marquee-item {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  padding: 0 26px; display: inline-flex; align-items: center; gap: 26px;
  text-shadow: 1px 0 0 rgba(255, 90, 31, 0.5), -1px 0 0 rgba(123, 117, 232, 0.5);
}
.marquee-item::after { content: "◉"; color: var(--tangerine); font-size: 0.7rem; text-shadow: none; }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   Mode d'emploi — tickets d'atelier
   ============================================================ */
.mode-emploi { max-width: var(--max); margin: 0 auto; padding: clamp(46px, 7vw, 80px) clamp(16px, 4vw, 40px); }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: ticket; }
.etape {
  background: var(--creme); border: 2px solid var(--encre); border-radius: var(--rayon);
  padding: 26px 24px 24px 30px; position: relative;
  /* perforation de ticket sur le bord gauche */
  -webkit-mask: radial-gradient(circle 5px at 0 12px, transparent 4.6px, #000 5.2px) 0 0 / 100% 26px repeat-y;
  mask: radial-gradient(circle 5px at 0 12px, transparent 4.6px, #000 5.2px) 0 0 / 100% 26px repeat-y;
}
.etape-num {
  display: block; width: auto; height: auto; background: none;
  font-family: var(--display); font-weight: 800; font-size: 2.7rem; line-height: 1;
  color: var(--encre); margin-bottom: 14px;
  text-shadow: 2px 1.5px 0 var(--tangerine);
}
.etape:nth-child(2) .etape-num { text-shadow: 2px 1.5px 0 var(--periwinkle); }
.etape:nth-child(3) .etape-num { text-shadow: 2px 1.5px 0 var(--lime); }
.etape h3 { font-size: 1.4rem; margin-bottom: 8px; }
.etape p { color: var(--encre-doux); font-size: 0.98rem; }
.etape-lien {
  color: var(--encre); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px;
}
.etape-lien:hover { color: var(--tangerine-texte); }

/* ============================================================
   Explorer — l'atelier de tri
   ============================================================ */
.explorer {
  max-width: var(--max); margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) clamp(48px, 8vw, 90px);
  background-image: var(--repere);
  background-repeat: no-repeat;
  background-position: top 4px right 3%;
}

/* Nuancier d'encres : une couleur = un métier */
.barre-encres { display: flex; gap: 3px; height: 16px; margin-bottom: 10px; }
.barre-encres span {
  flex: 1; background: var(--enc, var(--encre)); border-radius: 2px;
  transform-origin: bottom;
  scale: 1 0.25;
  transition: scale 0.6s var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.barre-encres.en-registre span { scale: 1 1; }
.barre-encres-note { margin-bottom: 26px; }

#explorer-titre { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 24px; }

/* Titres qui se calent au scroll (surimpression qui converge) */
.titre-cale {
  text-shadow: -7px 4px 0 rgba(255, 90, 31, 0.28), 7px -4px 0 rgba(123, 117, 232, 0.26);
  transition: text-shadow 0.9s var(--ease-out-expo);
}
.titre-cale.en-registre {
  text-shadow: 1.5px 1.5px 0 rgba(255, 90, 31, 0.26), -1.5px -1.5px 0 rgba(123, 117, 232, 0.22);
}

.entrees { display: inline-flex; background: var(--creme-2); border: 2px solid var(--encre); border-radius: var(--pilule); padding: 4px; margin-bottom: 22px; }
.entree {
  border: none; background: transparent; color: var(--encre-doux);
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  padding: 10px 22px; border-radius: var(--pilule);
  transition: background 0.2s var(--ease-out-quint), color 0.2s var(--ease-out-quint);
}
.entree[aria-pressed="true"] { background: var(--encre); color: var(--creme); box-shadow: 2px 2px 0 var(--tangerine); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-axe { margin-bottom: 24px; }
.chip {
  border: var(--bord); background: var(--creme); color: var(--encre);
  font-family: var(--corps); font-weight: 600; font-size: 0.9rem;
  padding: 8px 15px; border-radius: var(--pilule);
  transition: border-color 0.13s ease, translate 0.13s ease, box-shadow 0.13s ease, background 0.13s ease, color 0.13s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: var(--encre); translate: 0 -1px; }
.chip[aria-pressed="true"] {
  background: var(--encre); color: var(--creme); border-color: var(--encre);
  box-shadow: 2.5px 2.5px 0 var(--tangerine);
}
.chip .pastille-nb { font-size: 0.78rem; opacity: 0.65; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .pastille-nb { opacity: 0.85; }
.chip .point { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.filtres-fins {
  display: flex; flex-wrap: wrap; gap: 22px 34px; align-items: flex-start;
  padding: 20px 22px; background: var(--creme-2); border: 2px solid var(--encre); border-radius: var(--rayon);
  margin-bottom: 26px;
}
.filtre-groupe { display: flex; flex-direction: column; gap: 10px; }
.filtre-label {
  font-family: var(--mono); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--encre-doux);
}
.chip-s {
  border: var(--bord); background: var(--creme); color: var(--encre);
  font-weight: 600; font-size: 0.85rem; padding: 6px 13px; border-radius: var(--pilule);
  transition: border-color 0.13s ease, background 0.13s ease, color 0.13s ease, box-shadow 0.13s ease;
}
.chip-s:hover { border-color: var(--encre); }
.chip-s[aria-pressed="true"] { background: var(--tangerine); color: #fff; border-color: var(--encre); box-shadow: 2px 2px 0 var(--periwinkle); }

.barre-resultats { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.nb-resultats { font-weight: 600; color: var(--encre-doux); }
.nb-resultats strong { color: var(--encre); font-family: var(--display); }

/* ---- Grille de fiches imprimées ---- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.carte {
  --accent: var(--tangerine);
  position: relative; text-align: left;
  background: var(--creme); border: 2px solid rgba(28, 23, 16, 0.55); border-radius: var(--rayon-s);
  padding: 30px 20px 20px; display: flex; flex-direction: column; gap: 12px;
  rotate: var(--pente, 0deg);
  transition: translate 0.22s var(--ease-out-quint), box-shadow 0.22s var(--ease-out-quint), border-color 0.15s ease, rotate 0.25s var(--ease-out-quint);
  overflow: hidden;
  animation: fiche-pose 0.5s var(--ease-out-quint) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes fiche-pose {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
/* micro-inclinaisons : la pile de fiches n'est jamais parfaitement droite */
.carte:nth-child(3n) { --pente: 0.4deg; }
.carte:nth-child(3n + 1) { --pente: -0.35deg; }
.carte::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 22px;
  /* repli sans color-mix (la bande pleine reste), puis version trame */
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 8px no-repeat;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 8px no-repeat,
    radial-gradient(circle, color-mix(in oklab, var(--accent) 55%, transparent) 1.4px, transparent 1.6px) 0 8px / 8px 7px repeat-x,
    radial-gradient(circle, color-mix(in oklab, var(--accent) 30%, transparent) 1.2px, transparent 1.4px) 4px 15px / 8px 7px repeat-x;
}
.carte:hover { rotate: 0deg; translate: -3px -3px; box-shadow: 6px 6px 0 var(--accent); border-color: var(--encre); }
.carte:hover .carte-titre { text-shadow: 1px 1px 0 color-mix(in oklab, var(--accent) 40%, transparent); }
.carte.est-choisi { border-color: var(--encre); box-shadow: 0 0 0 2px var(--encre); box-shadow: 0 0 0 2px var(--encre), 5px 5px 0 color-mix(in oklab, var(--accent) 75%, transparent); }
.carte.est-choisi::after {
  content: "à tester"; position: absolute; right: 12px; bottom: 12px;
  font-family: var(--mono); font-weight: 700; font-size: 0.62rem;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--tangerine-texte); border: 1.5px solid currentColor; border-radius: 6px;
  padding: 3px 7px; rotate: -5deg;
  animation: tamponne-stamp 0.3s var(--ease-out-quint) both;
}
@keyframes tamponne-stamp {
  from { opacity: 0; scale: 1.6; }
  to { opacity: 1; scale: 1; }
}

.carte-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.carte-service {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-weight: 700; font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--encre-doux);
}
.carte-service .point { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }

.carte-ajout {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--encre); background: var(--creme); color: var(--encre);
  font-size: 1.35rem; line-height: 1; display: grid; place-items: center;
  transition: background 0.14s ease, color 0.14s ease, scale 0.14s var(--ease-out-quint), box-shadow 0.14s ease;
  font-family: var(--display);
}
.carte-ajout:hover { background: var(--tangerine); color: #fff; scale: 1.1; box-shadow: 2px 2px 0 var(--encre); }
.carte-ajout:active { scale: 0.94; }
.carte.est-choisi .carte-ajout { background: var(--encre); color: var(--creme); }

.carte-titre {
  font-family: var(--display); font-weight: 700; font-size: 1.18rem;
  line-height: 1.12; letter-spacing: -0.02em;
  transition: text-shadow 0.2s ease;
}
.carte-douleur { font-size: 0.92rem; color: var(--encre-doux); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.carte-pied { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tag {
  font-size: 0.74rem; font-weight: 600; padding: 4px 10px; border-radius: var(--pilule);
  border: 1.5px solid rgba(28, 23, 16, 0.25); color: var(--encre-doux);
}
.tag-faisabilite { color: var(--encre); }
.tag-facile { background: rgba(184, 230, 44, 0.4); border-color: transparent; }
.tag-moyen { background: rgba(255, 192, 46, 0.4); border-color: transparent; }
.tag-complexe { background: rgba(255, 122, 107, 0.4); border-color: transparent; }

.carte-lien-detail {
  position: absolute; inset: 0; z-index: 1; background: none; border: none; padding: 0;
  font-size: 0; color: transparent;
}
.carte-tete, .carte-titre, .carte-douleur, .carte-pied { position: relative; z-index: 2; pointer-events: none; }
.carte-ajout { position: relative; z-index: 3; pointer-events: auto; }

/* ---- État vide ---- */
.etat-vide {
  text-align: center; padding: 60px 24px; border: 2px dashed rgba(28, 23, 16, 0.35);
  border-radius: var(--rayon); background: var(--creme-2);
}
.etat-vide-titre { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin-bottom: 8px; }
.etat-vide p { color: var(--encre-doux); margin-bottom: 18px; }

/* ---- Proposer son cas d'usage ---- */
.proposer {
  margin-top: 34px; padding: 26px 24px; text-align: center;
  border: 2px dashed rgba(28, 23, 16, 0.35); border-radius: var(--rayon);
  background: var(--creme-2);
}
.proposer-titre { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-bottom: 4px; }
.proposer-texte { color: var(--encre-doux); margin-bottom: 16px; }
.proposer-boutons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Pédagogie — la photocopie fatiguée vs le process calé
   ============================================================ */
.pedagogie { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) clamp(48px, 8vw, 90px); }
#pedagogie-titre { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin-bottom: 22px; }
.pedagogie-volets { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.volet {
  border: 2px solid rgba(28, 23, 16, 0.4); border-radius: var(--rayon); padding: 24px 22px;
  background: var(--creme);
}
.volet-prompter { background: var(--creme-2); rotate: -0.5deg; }
.volet-prompter .volet-titre, .volet-prompter .volet-liste li { opacity: 0.82; }
.volet-codifier { border-color: var(--encre); box-shadow: 6px 6px 0 var(--tangerine); rotate: 0.4deg; }
.volet-titre {
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-bottom: 12px;
}
.volet-codifier .volet-titre { color: var(--tangerine-texte); }
.volet-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.volet-liste li {
  color: var(--encre-doux); font-size: 0.95rem; padding-left: 22px; position: relative;
}
.volet-liste li::before {
  content: "→"; position: absolute; left: 0; font-weight: 700; color: rgba(28, 23, 16, 0.4);
}
.volet-codifier .volet-liste li::before { content: "✓"; color: var(--tangerine-texte); }
.pedagogie-note {
  margin-top: 18px; font-weight: 600; font-size: 1rem; color: var(--encre);
  max-width: 640px; text-wrap: pretty;
}

/* ============================================================
   Feuille de route — le bon à tirer
   ============================================================ */
.feuille { padding: 0 clamp(16px, 4vw, 40px) clamp(50px, 8vw, 90px); scroll-margin-top: 80px; }
.feuille-panneau {
  max-width: var(--max); margin: 0 auto; background: var(--encre); color: var(--creme);
  border-radius: clamp(20px, 3vw, 32px); padding: clamp(30px, 5vw, 56px);
  position: relative; overflow: hidden;
  background-image: var(--repere-clair), var(--repere-clair);
  background-repeat: no-repeat;
  background-position: top 26px right 30px, bottom 26px left 30px;
}
.feuille-panneau::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 5px;
  background: var(--barre-encres);
}
.feuille-panneau::after {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.4), transparent 68%);
  top: -130px; right: -90px; pointer-events: none;
}
.feuille-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; position: relative; z-index: 1; }
#feuille-titre {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  text-shadow: -6px 4px 0 rgba(255, 90, 31, 0.32), 6px -4px 0 rgba(123, 117, 232, 0.28);
  transition: text-shadow 0.9s var(--ease-out-expo);
}
#feuille-titre.en-registre { text-shadow: 1.5px 1.5px 0 rgba(255, 90, 31, 0.35), -1.5px -1.5px 0 rgba(123, 117, 232, 0.28); }
.feuille-compte { font-family: var(--mono); font-weight: 700; color: var(--jaune); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
/* sur panneau sombre, le tangerine clair contraste mieux que le foncé */
.feuille .hl-mot { color: var(--tangerine); }
.feuille-sous { color: rgba(244, 236, 223, 0.75); font-size: 1rem; margin: -6px 0 24px; max-width: 620px; position: relative; z-index: 1; }
.feuille-vide { color: rgba(244, 236, 223, 0.65); font-size: 1.05rem; padding: 18px 0 8px; position: relative; z-index: 1; }
.feuille-liste { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.fr-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  background: rgba(244, 236, 223, 0.07); border: 1.5px solid rgba(244, 236, 223, 0.18);
  border-radius: var(--rayon-s);
  animation: fiche-pose 0.4s var(--ease-out-quint) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.fr-item-point { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.fr-item-texte { flex: 1; min-width: 0; }
.fr-item-titre { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2; }
.fr-item-meta { font-size: 0.8rem; color: rgba(244, 236, 223, 0.6); }
.fr-item-retirer {
  flex: none; background: none; border: 1.5px solid rgba(244, 236, 223, 0.35); color: var(--creme);
  width: 30px; height: 30px; border-radius: 50%; font-size: 1.1rem; line-height: 1;
  display: grid; place-items: center; transition: background 0.14s ease, border-color 0.14s ease, scale 0.14s ease;
}
.fr-item-retirer:hover { background: var(--tangerine); border-color: var(--tangerine); scale: 1.08; }

.feuille-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; position: relative; z-index: 1; }
.feuille-actions .btn { max-width: 100%; }
.feuille-note { font-size: 0.88rem; color: rgba(244, 236, 223, 0.65); max-width: 520px; }
.feuille-contact {
  margin-top: 30px; padding-top: 26px; border-top: 1.5px solid rgba(244, 236, 223, 0.18);
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  position: relative; z-index: 1;
}
.feuille-contact > p:first-child { font-family: var(--display); font-weight: 600; font-size: 1.15rem; max-width: 560px; }
.feuille-contact-boutons { display: flex; gap: 12px; flex-wrap: wrap; }
.feuille-contact-conseil { font-size: 0.88rem; color: rgba(244, 236, 223, 0.65); max-width: 520px; }

/* ============================================================
   Footer — le colophon
   ============================================================ */
.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 60px; text-align: center;
}
.footer-signature { font-family: var(--display); font-weight: 800; font-size: 1.5rem; margin-bottom: 12px; }
.footer-note { max-width: 620px; margin: 0 auto; font-size: 0.9rem; color: var(--encre-doux); }

/* ============================================================
   FAB (mobile)
   ============================================================ */
.fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: none; align-items: center; gap: 10px;
  background: var(--tangerine); color: #fff; border: 2px solid var(--encre);
  padding: 13px 20px; border-radius: var(--pilule); box-shadow: 4px 4px 0 var(--periwinkle);
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
}
.fab .pastille-fab { background: var(--encre); color: var(--creme); }

/* ============================================================
   Fiche détail (modale)
   ============================================================ */
.voile {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center;
  background: rgba(28, 23, 16, 0.55); backdrop-filter: blur(4px);
  padding: clamp(12px, 4vw, 40px); animation: apparait 0.2s ease;
}
@keyframes apparait { from { opacity: 0; } to { opacity: 1; } }
.fiche {
  --accent: var(--tangerine);
  position: relative; width: min(680px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--creme); border: 2px solid var(--encre); border-radius: var(--rayon);
  box-shadow: 10px 10px 0 var(--accent);
  box-shadow: 10px 10px 0 color-mix(in oklab, var(--accent) 80%, var(--encre));
  animation: monte 0.35s var(--ease-out-expo);
}
@keyframes monte { from { transform: translateY(28px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.fiche-fermer {
  position: sticky; top: 14px; float: right; margin: 14px 14px 0 0;
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--encre);
  background: var(--creme); font-size: 1.5rem; line-height: 1; z-index: 5;
  display: grid; place-items: center; transition: background 0.14s ease, color 0.14s ease, rotate 0.2s var(--ease-out-quint);
}
.fiche-fermer:hover { background: var(--tangerine); color: #fff; rotate: 90deg; }
.fiche-contenu { padding: clamp(24px, 5vw, 40px); padding-top: 20px; }
.fiche-bandeau {
  height: 20px; position: absolute; top: 0; left: 0; right: 0;
  border-radius: var(--rayon) var(--rayon) 0 0;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 8px no-repeat;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 8px no-repeat,
    radial-gradient(circle, color-mix(in oklab, var(--accent) 55%, transparent) 1.4px, transparent 1.6px) 0 8px / 8px 7px repeat-x,
    radial-gradient(circle, color-mix(in oklab, var(--accent) 28%, transparent) 1.2px, transparent 1.4px) 4px 15px / 8px 7px repeat-x;
}
.fiche-service {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--encre-doux); margin-bottom: 14px;
}
.fiche-service .point { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.fiche-titre { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 18px; letter-spacing: -0.03em; }
.fiche-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

.fiche-bloc { margin-bottom: 22px; }
.fiche-bloc-titre {
  font-family: var(--mono); font-weight: 700; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--tangerine-texte); margin-bottom: 7px;
}
.fiche-douleur { font-size: 1.05rem; }
.fiche-gain {
  font-size: 1.05rem; background: rgba(184, 230, 44, 0.32); border: 1.5px solid rgba(28, 23, 16, 0.3);
  padding: 12px 16px; border-radius: var(--rayon-s);
}
.fiche-lien-calcul {
  display: inline-block; margin-top: 10px; font-size: 0.88rem; font-weight: 600;
  color: var(--encre-doux); text-decoration: underline; text-underline-offset: 3px;
}
.fiche-lien-calcul:hover { color: var(--tangerine-texte); }
.fiche-prompt-note { font-size: 0.88rem; color: var(--encre-doux); margin-bottom: 10px; }
.fiche-niveau { font-size: 0.9rem; color: var(--encre-doux); margin-bottom: 0; }
.fiche-niveau-badge {
  display: inline-block; font-weight: 700; font-size: 0.8rem; color: var(--encre);
  background: var(--creme-2); border: var(--bord); border-radius: var(--pilule);
  padding: 3px 11px;
}
.fiche-process {
  margin: 0; padding-left: 0; list-style: none; counter-reset: etape-process;
  display: flex; flex-direction: column; gap: 10px;
}
.fiche-process li {
  counter-increment: etape-process; position: relative; padding: 10px 14px 10px 46px;
  background: var(--creme-2); border: var(--bord); border-radius: var(--rayon-s);
  font-size: 0.95rem;
}
.fiche-process li::before {
  content: counter(etape-process); position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--encre); color: var(--creme);
  font-family: var(--display); font-weight: 700; font-size: 0.78rem;
}
.fiche-prompt-boite { position: relative; }
.fiche-prompt {
  background: var(--encre); color: var(--creme); border-radius: var(--rayon-s);
  padding: 18px; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap;
  font-family: var(--mono);
}
.fiche-copier-prompt {
  position: absolute; top: 12px; right: 12px;
  background: var(--creme); color: var(--encre); border: 1.5px solid var(--creme);
  font-weight: 600; font-size: 0.78rem; padding: 6px 12px; border-radius: var(--pilule);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.fiche-copier-prompt:hover { background: var(--tangerine); color: var(--encre); border-color: var(--tangerine); }
.fiche-conseil { font-size: 0.95rem; color: var(--encre-doux); font-style: italic; display: flex; gap: 10px; }
.fiche-conseil::before { content: "→"; color: var(--tangerine-texte); font-style: normal; font-weight: 700; }
.fiche-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 22px; border-top: var(--bord); }
.fiche-skill-note { font-size: 0.88rem; color: var(--encre-doux); margin-top: 14px; }

/* ============================================================
   Toast — le coup de tampon
   ============================================================ */
.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 600;
  background: var(--encre); color: var(--creme);
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--creme); box-shadow: 4px 4px 0 var(--tangerine);
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) rotate(-1.2deg);
  transition: opacity 0.2s ease;
}
.toast.visible {
  opacity: 1;
  animation: tamponne 0.4s var(--ease-out-quint);
}
@keyframes tamponne {
  0% { transform: translateX(-50%) rotate(-4deg) scale(1.25); }
  55% { transform: translateX(-50%) rotate(-0.6deg) scale(0.98); }
  100% { transform: translateX(-50%) rotate(-1.2deg) scale(1); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .etapes { grid-template-columns: 1fr; }
  .pedagogie-volets { grid-template-columns: 1fr; }
  .header-feuille { display: none; }
  .fab { display: inline-flex; }
  .feuille { scroll-margin-top: 20px; }
  .blob { filter: blur(48px); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .grille { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .filtres-fins { flex-direction: column; gap: 18px; }
  .fiche-cta { flex-direction: column; }
  .fiche-cta .btn { width: 100%; }
  .calage { gap: 6px 14px; font-size: 0.64rem; }
  .barre-encres { height: 12px; }
}

/* ============================================================
   Accessibilité — focus & reduced motion
   ============================================================ */
:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 2px; border-radius: 4px; }
/* outline intérieur : l'overflow:hidden de la carte rognerait un outline externe */
.carte:focus-within { border-color: var(--encre); outline: 3px solid var(--tangerine); outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .marquee-piste { animation: none; transform: none; }
  .blob { animation: none; }
  .hero-couche { transform: none !important; }
  /* les titres restent calés d'emblée, sans converger */
  .titre-cale, #feuille-titre { text-shadow: 1.5px 1.5px 0 rgba(255, 90, 31, 0.26), -1.5px -1.5px 0 rgba(123, 117, 232, 0.22); }
  .barre-encres span { scale: 1 1; }
}

/* ============================================================
   Scène presse — les plaques se calent en scrollant
   Par défaut (sans JS, reduced motion) : affiche statique, calée.
   La classe .presse-active (posée par app.js) ajoute la piste
   de scroll et laisse le JS piloter les plaques.
   ============================================================ */
.presse { position: relative; }
.presse.presse-active { height: 230vh; }
.presse-scene {
  position: sticky; top: 0; height: 100vh; min-height: 480px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; overflow: hidden; text-align: center;
  padding: 0 clamp(16px, 4vw, 40px);
  background-image: var(--repere), var(--repere);
  background-repeat: no-repeat;
  background-position: top 34px left 6%, bottom 34px right 6%;
}
.presse-hud { display: flex; gap: 8px 22px; flex-wrap: wrap; justify-content: center; font-variant-numeric: tabular-nums; }
.presse-hud [data-presse-statut] { color: var(--tangerine-texte); }
.presse-hud [data-presse-statut].registre { color: var(--lime-texte); }
.presse-pile { display: grid; }
.presse-pile > span {
  grid-area: 1 / 1;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 10vw, 7rem);
  letter-spacing: -0.03em; line-height: 1; white-space: nowrap;
  will-change: transform;
}
.presse-plaque { pointer-events: none; user-select: none; mix-blend-mode: multiply; }
.plaque-c { color: var(--periwinkle); transform: translate(-2px, 1.5px); }
.plaque-m { color: var(--tangerine); transform: translate(2px, -1.5px); }
.plaque-y { color: var(--jaune); transform: translate(1px, 2px); }
.plaque-k { color: var(--encre); mix-blend-mode: normal; user-select: text; pointer-events: auto; }
.presse-legende { color: var(--encre-doux); font-size: 1.02rem; max-width: 520px; }
.presse-legende strong { color: var(--encre); font-family: var(--display); }

/* ============================================================
   Curseur croix de repérage (desktop uniquement)
   ============================================================ */
@media (pointer: fine) {
  body.curseur-actif, body.curseur-actif * { cursor: none !important; }
  .curseur {
    position: fixed; top: 0; left: 0; z-index: 10000; pointer-events: none;
    width: 30px; height: 30px; margin: -15px 0 0 -15px;
    color: var(--encre); opacity: 0;
    transition: width 0.2s var(--ease-out-quint), height 0.2s var(--ease-out-quint),
                margin 0.2s var(--ease-out-quint), color 0.2s ease, opacity 0.2s ease;
  }
  .curseur svg { width: 100%; height: 100%; display: block; }
  .curseur.visible { opacity: 0.85; }
  .curseur.sur-lien {
    width: 46px; height: 46px; margin: -23px 0 0 -23px;
    color: var(--tangerine); opacity: 1;
  }
}
