/* ===========================================================================
   Docmaster — pages publiques.

   Cette feuille complete `app.css` (le systeme de design) avec les pieces
   propres au site vitrine : la scene d'accueil, le mur de documents, la
   grille de services, la frise d'etapes, les offres, la bande de conclusion.

   Principe directeur : ne rien illustrer avec des images de banque. La seule
   iconographie du site, ce sont les documents que la plateforme fabrique,
   rendus en direct dans des cadres. Le produit se demontre lui-meme.

   Aucune couleur en dur : tout vient des jetons de `app.css`.
   =========================================================================== */

/* ------------------------------------------------------------ 1. la scene */

/* Le heros est une scene sombre : l'oeil se pose sur les documents clairs
   posés dessus, exactement comme sur un plan de travail d'imprimeur. */
.stage {
  position: relative;
  isolation: isolate;
  background: var(--brand-950);
  color: #e7eef7;
  overflow: clip;
  /* Le heros occupait un ecran entier avant le premier argument : 168 px de
     rembourrage au-dessus du badge, un titre de 68 px sur trois lignes. On
     descend l'ensemble — la scene reste une scene, elle cesse d'etre un mur. */
  padding-block: clamp(var(--s12), 5vw, var(--s20)) 0;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(var(--s8), 4vw, var(--s12)));
}

/* Nappe de couleur : deux halos qui se croisent, un bleu et un dore.
   Rien ne bouge : c'est une lumiere, pas une animation. */
.stage::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 130%;
  background:
    radial-gradient(52% 44% at 18% 8%,  color-mix(in srgb, var(--brand-500) 46%, transparent), transparent 68%),
    radial-gradient(46% 40% at 86% 24%, color-mix(in srgb, var(--accent-600) 34%, transparent), transparent 66%),
    radial-gradient(60% 50% at 50% 108%, color-mix(in srgb, var(--brand-700) 60%, transparent), transparent 70%);
  filter: blur(6px);
  z-index: -2;
}
/* Grain : casse le degrade, evite l'effet "aplat numerique". */
.stage::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain);
  opacity: .06; pointer-events: none; z-index: -1;
}

.stage h1, .stage h2, .stage h3, .stage h4 { color: #fff; }
.stage .lead { color: #b8c8dc; }
.stage .eyebrow {
  color: var(--accent-400);
  background: color-mix(in srgb, var(--accent-500) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-400) 30%, transparent);
}
.stage .eyebrow svg { color: var(--accent-400); }

/* Le bord bas de la scene : une courbe tres douce vers la couleur du papier,
   pour que la transition ne soit pas une ligne franche. */
/* Le degrade de sortie faisait 200 px a lui seul, marge comprise : autant de
   vide entre le dernier argument du heros et la premiere section. */
.stage-fade {
  height: clamp(40px, 4vw, 72px);
  background: linear-gradient(180deg, transparent, var(--paper));
  margin-top: clamp(var(--s6), 3vw, var(--s10));
}

/* ---------------------------------------------------------------------------
   Fond anime partage (partials/fond-anime.ejs) : la signature de l'accueil,
   posee sur TOUTES les pages. Il se glisse en arriere-plan d'une section — sur
   une scene sombre (.stage) ou un bandeau clair (.section-fond) — et se fond
   d'une image a l'autre. z-index negatif : le contenu (non positionne) passe
   naturellement au-dessus, aucune retouche par page n'est necessaire.
   --------------------------------------------------------------------------- */
.fond-anime { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.fond-anime img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease;
}
.fond-anime img.on { opacity: 1; }
.fond-anime-voile { position: absolute; inset: 0; }
.fond-anime--sombre img.on { opacity: .5; }
.fond-anime--sombre .fond-anime-voile {
  background: linear-gradient(180deg, rgba(5, 13, 26, .72), rgba(5, 13, 26, .9));
}
.fond-anime--clair img.on { opacity: .14; }
.fond-anime--clair .fond-anime-voile {
  background: linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .88));
}
@media (prefers-reduced-motion: reduce) { .fond-anime img { transition: none; } }

/* Une section claire qui accueille le fond anime devient un contexte
   d'empilement, comme la scene : le fond derriere, le contenu devant. */
.section-fond { position: relative; isolation: isolate; overflow: clip; }

/* Pages sans heros dedie (contact, connexion, formulaires...) : le fond anime
   se pose derriere tout le contenu principal, discret, pour que ces pages
   appartiennent visiblement au meme site. */
main.has-fond { position: relative; isolation: isolate; }

/* ---------------------------------------------------------------------------
   Page de partage public d'un document (pages/share.ejs) : barre de marque,
   document encadre, telechargement, pied. Sobre et autonome.
   --------------------------------------------------------------------------- */
.share-body { background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
.share-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s4) clamp(var(--s4), 4vw, var(--s10));
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.share-main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: clamp(var(--s6), 4vw, var(--s12)) var(--s4); }
.share-head { text-align: center; margin-bottom: var(--s8); }
.share-head h1 { margin: var(--s2) 0; font-size: var(--fs-2xl); }
.share-doc {
  position: relative; width: 100%; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-4); overflow: hidden;
}
.share-doc iframe { display: block; border: 0; transform-origin: top left; }
.share-dl { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); justify-content: center; margin-top: var(--s8); }
.share-dl-lib { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 650; color: var(--ink-2); }
.share-dl .btn { flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; }
.share-foot { border-top: 1px solid var(--line); padding: var(--s6); text-align: center; color: var(--muted); font-size: var(--fs-sm); background: var(--surface); }
.share-foot a { color: var(--link); }
.share-qr { text-align: center; margin-top: var(--s8); }
.share-qr-code { width: 132px; margin: 0 auto var(--s2); padding: var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.share-qr-code svg { width: 100%; height: auto; display: block; }
.share-lock { max-width: 400px; margin: clamp(var(--s8), 8vw, var(--s20)) auto; text-align: center; }
.share-lock-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: var(--r-full); background: var(--brand-100); color: var(--brand-600); margin-bottom: var(--s4);
}
.share-lock h1 { font-size: var(--fs-xl); margin: 0 0 var(--s2); }

/* --- vitrine publique : grille de documents partages -------------------- */
.galerie-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: clamp(var(--s4), 2vw, var(--s6)); }
.galerie-carte {
  display: block; color: inherit; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.galerie-carte:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--brand-200); }
.galerie-vue {
  position: relative; display: block; overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}
.galerie-vue iframe { position: absolute; left: 0; top: 0; transform-origin: top left; border: 0; pointer-events: none; }
.galerie-meta { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--line-2); }
.galerie-meta b { font-size: var(--fs-sm); }
.galerie-meta span { font-size: var(--fs-xs); color: var(--muted); }

.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(var(--s10), 5vw, var(--s20));
  align-items: center;
}

.stage h1 {
  font-size: var(--fs-4xl);
  letter-spacing: -.035em;
  margin: var(--s5) 0 var(--s5);
}
/* Le mot cle du titre passe en italique dore : une seule emphase, forte. */
.stage h1 .gold {
  font-style: italic;
  color: var(--accent-400);
  background: linear-gradient(100deg, var(--accent-200), var(--accent-400) 46%, var(--accent-500));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stage-actions { display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s8); }
.stage-actions .btn-ghost {
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, .24);
  --btn-bg: rgba(255, 255, 255, .05);
}
.stage-actions .btn-ghost:hover { --btn-bg: rgba(255, 255, 255, .12); --btn-bd: rgba(255, 255, 255, .4); }

/* Preuves sous les boutons : trois faits, pas trois adjectifs. */
.stage-proof {
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s8);
  margin-top: var(--s10);
  padding-top: var(--s6);
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.stage-proof > div { min-width: 96px; }
.stage-proof b {
  display: block;
  font-family: var(--font-head); font-size: var(--fs-2xl); font-weight: 700;
  color: #fff; letter-spacing: -.03em; line-height: 1;
}
.stage-proof span {
  display: block; margin-top: var(--s2);
  font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase;
  color: #8ea3bc;
}

/* --------------------------------------------- 2. le mur de documents ----
   Trois colonnes de documents reels qui defilent lentement en sens alterne.
   C'est la demonstration : en trois secondes on a vu dix mises en page.
   L'animation est purement decorative — elle est coupee si l'utilisateur
   demande la reduction des animations, et le mur reste lisible a l'arret. */
.wall {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  height: clamp(430px, 56vh, 620px);
  overflow: hidden;
  perspective: 1400px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
}
.wall-col { display: flex; flex-direction: column; gap: var(--s4); will-change: transform; }
.wall-col.up   { animation: wall-up   64s linear infinite; }
.wall-col.down { animation: wall-down 74s linear infinite; }
.wall-col.slow { animation-duration: 92s; }
.wall:hover .wall-col { animation-play-state: paused; }

@keyframes wall-up   { from { transform: translateY(0); }    to { transform: translateY(-50%); } }
@keyframes wall-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }

/* Chaque feuille : cadre blanc, ombre portee, tres leger basculement 3D. */
.sheet {
  position: relative;
  flex: 0 0 auto;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .28), 0 18px 44px rgba(0, 0, 0, .42);
  transform: rotateY(6deg);
  transform-style: preserve-3d;
}
.wall-col:nth-child(2) .sheet { transform: none; }
.wall-col:nth-child(3) .sheet { transform: rotateY(-6deg); }
.sheet iframe {
  position: absolute; top: 0; left: 0;
  transform-origin: top left;
  pointer-events: none;
}
/* Reflet diagonal : donne l'impression d'un papier couche. */
.sheet::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(114deg, rgba(255, 255, 255, .34) 0 22%, transparent 46%);
  mix-blend-mode: overlay;
}

@media (prefers-reduced-motion: reduce) {
  .wall-col.up, .wall-col.down { animation: none; }
}

/* --------------------------------------------------- 3. bandeau defilant -
   Les noms de modeles passent en continu : on lit "il y en a beaucoup" avant
   meme d'avoir compte. C'est ce qui donne le sentiment de profondeur. */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--surface);
  padding: var(--s4) 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: var(--s8);
  width: max-content;
  animation: slide 46s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: var(--s3);
  font-family: var(--font-head);
  font-size: var(--fs-lg); font-weight: 650; letter-spacing: -.015em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-500); flex: 0 0 auto;
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* -------------------------------------------------------- 4. grille bento
   Les sept types de documents, en tailles inegales : le CV et le portfolio
   sont les portes d'entree, ils occupent plus de place. La hierarchie est
   dans la grille, pas dans un badge "populaire". */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s5);
}
.bento > * { grid-column: span 2; }
.bento > .wide  { grid-column: span 3; }
.bento > .third { grid-column: span 2; }

.tile-doc {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 240px;
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: inherit;
  overflow: clip;
  box-shadow: var(--sh-1);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.tile-doc:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-4);
  border-color: color-mix(in srgb, var(--accent-500) 40%, transparent);
  color: inherit;
}
.tile-doc .ico-box {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand-700), var(--brand-950));
  color: var(--accent-400);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .14);
  margin-bottom: var(--s5);
}
.tile-doc h3 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
.tile-doc p  { font-size: var(--fs-sm); color: var(--muted); max-width: 40ch; }
.tile-doc .go {
  margin-top: auto; padding-top: var(--s5);
  font-size: var(--fs-sm); font-weight: 700; color: var(--link);
  display: inline-flex; align-items: center; gap: var(--s2);
  transition: gap var(--t-fast), color var(--t-fast);
}
.tile-doc:hover .go { gap: var(--s4); color: var(--accent-700); }
/* Le compte de modeles est dans le flux, pas en absolu : sur les grandes
   tuiles il passerait sinon sous l'apercu glisse dans le coin. */
.tile-doc .count {
  order: -1;
  align-self: flex-start;
  margin-bottom: var(--s4);
  padding: 3px var(--s3);
  border-radius: var(--r-full);
  background: var(--surface-3);
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  letter-spacing: .04em;
}

/* Apercu de document glisse dans le coin de la grande tuile : le contenu de
   la carte parle du type, la feuille montre le resultat. */
.tile-doc .peek {
  position: absolute; right: calc(var(--s6) * -1); bottom: calc(var(--s8) * -1);
  width: 44%; aspect-ratio: 210 / 297;
  border-radius: 4px 4px 0 0;
  overflow: hidden; background: #fff;
  box-shadow: var(--sh-4);
  transform: rotate(4deg) translateY(12px);
  transition: transform var(--t) var(--e-out);
  pointer-events: none;
}
.tile-doc:hover .peek { transform: rotate(2deg) translateY(0); }
.tile-doc .peek iframe { position: absolute; top: 0; left: 0; transform-origin: top left; }
.tile-doc.wide p { max-width: 30ch; }

/* --------------------------------------------------------- 5. frise ----- */
.rail { position: relative; display: grid; gap: var(--s8); }
.rail::before {
  content: ""; position: absolute; left: 21px; top: 12px; bottom: 12px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-500), var(--brand-500) 55%, transparent);
}
.rail-step {
  position: relative;
  display: grid; grid-template-columns: 44px 1fr;
  gap: var(--s5); align-items: start;
}
.rail-step .n {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: var(--fs-md); font-weight: 700;
  background: var(--surface);
  color: var(--link);
  border: 2px solid var(--line);
  box-shadow: var(--sh-1);
  z-index: 1;
}
.rail-step:first-child .n { border-color: var(--accent-500); color: var(--accent-700); }
.rail-step h4 { margin-bottom: var(--s2); }
.rail-step p  { color: var(--muted); font-size: var(--fs-sm); max-width: 56ch; }

/* ------------------------------------------------- 6. bloc de comparaison
   Une demonstration concrete de l'assistant : avant / apres, cote a cote. */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s5); align-items: center; }
.compare .arrow {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-900); color: var(--accent-400);
  box-shadow: var(--sh-2);
  font-size: 18px;
}
.compare-box {
  padding: var(--s5);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  min-height: 116px;
}
.compare-box.after {
  background: var(--accent-100);
  border-color: color-mix(in srgb, var(--accent-500) 40%, transparent);
  box-shadow: var(--sh-2);
}
.compare-box .cap {
  display: block; margin-bottom: var(--s3);
  font-size: var(--fs-xs); font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.compare-box.after .cap { color: var(--accent-700); }
.compare-box ul { margin: 0; padding-left: 1.15em; }
.compare-box li { margin-bottom: 4px; }

/* --------------------------------------------------------- 7. offres ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: var(--s6); align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  padding: var(--s8) var(--s6) var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-1);
  position: relative;
  transition: transform var(--t), box-shadow var(--t);
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.plan h3 { font-size: var(--fs-lg); }
.plan .price {
  font-family: var(--font-head);
  /* Un montant en FCFA peut atteindre six chiffres : on plafonne la taille
     pour qu'il tienne sur une ligne dans une colonne de 258 px. */
  font-size: clamp(26px, 2.4vw + 12px, 36px);
  font-weight: 700; letter-spacing: -.035em;
  line-height: 1.05; margin: var(--s4) 0 var(--s2);
  overflow-wrap: anywhere;
}
/* La periode passe sous le montant : accolee, elle provoquait un retour a la
   ligne au milieu de "/ mois". */
.plan .price small {
  display: block; margin-top: var(--s2);
  font-family: var(--font); font-size: var(--fs-sm); font-weight: 600;
  color: var(--muted); letter-spacing: 0;
}
.plan ul { list-style: none; margin: var(--s6) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.plan li { display: flex; gap: var(--s3); font-size: var(--fs-sm); align-items: flex-start; }
.plan li::before {
  content: ""; flex: 0 0 auto; margin-top: 6px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--ok-500); border-bottom: 2px solid var(--ok-500);
  transform: rotate(-45deg);
}
/* L'offre mise en avant sort du rang : plus haute, encadree d'or. */
.plan.highlight {
  border-color: var(--accent-500);
  box-shadow: var(--sh-4), 0 0 0 1px var(--accent-500);
  background:
    radial-gradient(120% 60% at 50% 0%, var(--accent-100), transparent 62%),
    var(--surface);
}
/* Le libelle vient de la base (colonne `plans.badge`), injecte en variable par
   la vue : « Plus populaire au Mali » porte plus qu'un « Le plus choisi »
   generique. Le repli couvre une offre mise en avant sans badge renseigne. */
.plan.highlight::before {
  content: var(--plan-badge, "Le plus choisi");
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  padding: 5px var(--s4);
  border-radius: var(--r-full);
  background: linear-gradient(180deg, var(--accent-400), var(--accent-600));
  color: #241703;
  font-size: var(--fs-xs); font-weight: 750; letter-spacing: .05em;
  box-shadow: var(--sh-gold);
  white-space: nowrap;
}

/* --------------------------------------------- 8. bande de citation ----- */
.quote-band {
  background: var(--brand-950);
  color: #cfdcea;
  position: relative; overflow: hidden;
  padding-block: clamp(var(--s16), 8vw, var(--s24));
}
.quote-band::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .05; }
.quote-band > * { position: relative; }
.quote-band blockquote {
  margin: 0; max-width: 40ch;
  font-family: var(--font-head);
  font-size: var(--fs-2xl); font-weight: 500; font-style: italic;
  line-height: 1.35; letter-spacing: -.018em;
  color: #fff;
}
.quote-band cite { display: block; margin-top: var(--s6); font-style: normal; font-size: var(--fs-sm); color: #8ea3bc; }
.quote-band cite b { display: block; color: var(--accent-400); font-weight: 700; }

/* ------------------------------------------------------ 9. appel final -- */
.cta-slab {
  position: relative;
  overflow: clip;
  border-radius: var(--r-2xl);
  padding: clamp(var(--s12), 7vw, var(--s24)) var(--s8);
  text-align: center;
  background: var(--brand-950);
  color: #fff;
  box-shadow: var(--sh-5);
}
.cta-slab::before {
  content: ""; position: absolute; inset: -40% -10%;
  background:
    radial-gradient(40% 50% at 22% 20%, color-mix(in srgb, var(--brand-500) 52%, transparent), transparent 70%),
    radial-gradient(38% 46% at 80% 76%, color-mix(in srgb, var(--accent-600) 40%, transparent), transparent 70%);
  filter: blur(4px);
}
.cta-slab::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .07; z-index: 1; }
/* Le diaporama en arriere-plan de l'appel : memes photos que le bandeau, tres
   assombries pour que le texte reste net. */
.cta-fond { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; }
.cta-fond img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease;
}
.cta-fond img.on { opacity: .22; }
@media (prefers-reduced-motion: reduce) { .cta-fond img { transition: none; } }
.cta-slab > *:not(.cta-fond) { position: relative; z-index: 2; }
.cta-slab h2 { color: #fff; font-size: var(--fs-3xl); }
.cta-slab p  { color: #b8c8dc; max-width: 54ch; margin: var(--s5) auto var(--s10); font-size: var(--fs-lg); }
.cta-slab .row { justify-content: center; flex-wrap: wrap; }
.cta-slab .btn-ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .26); --btn-bg: rgba(255, 255, 255, .06); }
.cta-slab .btn-ghost:hover { --btn-bg: rgba(255, 255, 255, .14); }

/* ------------------------------------------- 10. catalogue de modeles ---

   La page est un instrument, pas une brochure : on y vient pour choisir. Elle
   s'ouvrait sur une scene sombre de 365 px — un ecran entier de titre avant la
   premiere vignette. L'en-tete tient maintenant sur une bande, titre a gauche
   et recherche a droite, et le catalogue commence tout de suite. */
.cat-head {
  padding: var(--s8) 0 var(--s5);
  background: linear-gradient(180deg, var(--brand-50), transparent);
}
.cat-head-in {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s5) var(--s8); flex-wrap: wrap;
}
.cat-head-txt { min-width: 0; }
.cat-head h1 { margin: 0; font-size: var(--fs-2xl); }
.cat-head p {
  margin: var(--s2) 0 0; max-width: 58ch;
  color: var(--muted); font-size: var(--fs-sm); line-height: 1.5;
}

/* Recherche libre : le seul champ de la page. Elle interroge les descriptions,
   qui disent a qui chaque modele s'adresse — c'est par la que passe le choix,
   plus surement que par une grille de vingt-six vignettes a comparer a l'oeil. */
.cat-search { position: relative; display: flex; align-items: center; gap: var(--s2); flex: 0 1 400px; }
.cat-search-ico {
  position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%);
  display: flex; color: var(--muted); pointer-events: none;
}
.cat-search input[type="search"] {
  /* `min-width: 0` laisserait le champ s'effondrer a zero des que la ligne
     manque de place : le bouton, lui, ne se comprime pas. On lui garde de
     quoi rester un champ. */
  flex: 1; min-width: 9rem;
  padding: 9px var(--s4) 9px calc(var(--s4) + 22px);
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cat-search input[type="search"]::placeholder { color: var(--muted-2); }
.cat-search input[type="search"]:focus-visible {
  outline: none; border-color: var(--brand-500); box-shadow: var(--ring);
}

/* Ligne de decompte : elle porte aussi l'etat de la recherche, donc le moyen
   d'en sortir. Un filtre sans porte de sortie visible est un piege. */
/* Les pastilles gardent leurs 38 px : c'est le plancher confortable au doigt,
   et l'essentiel du trafic est sur telephone. On resserre les marges autour,
   pas les cibles. */
.cat-count { margin: 0 0 var(--s4); font-size: var(--fs-sm); color: var(--muted); }
.cat-clear { margin-left: var(--s2); font-size: var(--fs-xs); text-decoration: underline; }

/* Barre de filtres collante : sur 56 modeles, on ne veut pas remonter en
   haut de page pour changer de type. */
.filters {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3) 0;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s5);
}
/* Avec le metier et l'offre, la barre compte quatre rangs : collee en haut
   d'un ecran bas ou d'un telephone, elle cacherait la grille qu'elle filtre. */
@media (max-height: 860px), (max-width: 760px) {
  .filters { position: static; }
}

/* ---------------------------------------------- 11. pages editoriales --- */
.prose { max-width: 72ch; font-size: var(--fs-lg); line-height: 1.75; color: var(--ink-2); }
.prose h2 { margin: var(--s12) 0 var(--s4); }
.prose h3 { margin: var(--s8) 0 var(--s3); }
.prose p  { margin-bottom: var(--s5); }
.prose ul, .prose ol { margin: 0 0 var(--s5); padding-left: 1.3em; }
.prose li { margin-bottom: var(--s2); }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: var(--s8) 0; padding: var(--s5) var(--s6);
  border-left: 3px solid var(--accent-500);
  background: var(--surface-2); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
}

/* Carte d'authentification : centree, sur fond de scene, pour que l'ecran de
   connexion ne soit pas un formulaire nu au milieu du blanc. */
.auth-stage {
  min-height: calc(100vh - var(--header-h));
  display: grid; place-items: center;
  padding: var(--s12) 0;
  /* Contexte d'empilement pour accueillir le fond anime (scene sombre) : la
     carte de connexion flotte au-dessus des images qui se fondent. */
  position: relative; isolation: isolate; overflow: clip;
  background: var(--brand-950);
}
.auth-card {
  width: 100%; max-width: 452px;
  padding: var(--s10) var(--s8);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-4);
}
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--s2); }
.auth-card .sub { color: var(--muted); margin-bottom: var(--s8); font-size: var(--fs-sm); }

/* ------------------------------------------------------- 12. responsive - */

@media (max-width: 1100px) {
  .stage-grid { grid-template-columns: 1fr; gap: var(--s12); }
  .wall { height: 400px; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento > .wide { grid-column: span 4; }
}

@media (max-width: 820px) {
  /* Sept types de documents sur un ecran de telephone faisaient quatre
     rangees de pastilles, et repoussaient le premier modele a 707 px — un
     ecran entier de filtres. Elles defilent lateralement : une rangee par
     famille, et le catalogue commence tout de suite. */
  .cat-head { padding: var(--s6) 0 var(--s4); }
  .cat-head h1 { font-size: var(--fs-xl); }
  .cat-search { flex: 1 1 100%; }

  .stage { padding-top: calc(var(--header-h) + var(--s12)); }
  .wall { grid-template-columns: repeat(2, 1fr); height: 340px; }
  .wall-col:nth-child(3) { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > *, .bento > .wide, .bento > .third { grid-column: span 2; }
  .tile-doc { min-height: 190px; }
  .tile-doc .peek { display: none; }
  .compare { grid-template-columns: 1fr; }
  .compare .arrow { transform: rotate(90deg); margin: 0 auto; }
  .filters { top: var(--header-h); }
}

@media (max-width: 560px) {
  .wall { grid-template-columns: 1fr; height: 300px; }
  .wall-col:nth-child(2) { display: none; }
  .stage-proof { gap: var(--s5) var(--s6); }
  .stage-proof b { font-size: var(--fs-xl); }
  .auth-card { padding: var(--s8) var(--s5); }
}

/* ------------------------- 13. en-tete pose sur une scene sombre ---------
   Quand la page ouvre sur `.stage`, la barre devient transparente et son
   contenu passe en clair. Elle reprend son apparence normale des que
   `app.js` pose `is-stuck` (defilement au-dela du heros). */
.site-header.on-stage {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header.on-stage .logo,
.site-header.on-stage .nav > a:not(.btn) { color: #dbe6f2; }
.site-header.on-stage .nav > a:not(.btn):hover,
.site-header.on-stage .nav > a.on { color: #fff; }
.site-header.on-stage .burger {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}
.site-header.on-stage .btn-ghost { --btn-fg: #dbe6f2; --btn-bd: rgba(255, 255, 255, .24); --btn-bg: transparent; }
/* Le bouton discret le reste : pas de bordure, seulement la couleur claire. */
.site-header.on-stage .btn-quiet { --btn-fg: #dbe6f2; --btn-bd: transparent; --btn-bg: transparent; }
.site-header.on-stage .btn-ghost:hover,
.site-header.on-stage .btn-quiet:hover { --btn-bg: rgba(255, 255, 255, .12); --btn-fg: #fff; }

/* Des que la barre colle, elle redevient la barre standard : on annule
   simplement les surcharges ci-dessus. */
.site-header.on-stage.is-stuck {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--sh-1);
}
.site-header.on-stage.is-stuck .logo { color: var(--ink); }
.site-header.on-stage.is-stuck .nav > a:not(.btn) { color: var(--ink-2); }
.site-header.on-stage.is-stuck .nav > a.on { color: var(--link); }
.site-header.on-stage.is-stuck .burger { background: var(--surface); border-color: var(--line); color: var(--ink); }
.site-header.on-stage.is-stuck .btn-ghost,
.site-header.on-stage.is-stuck .btn-quiet { --btn-fg: var(--ink); --btn-bd: var(--line); }

/* Sur mobile le panneau de navigation reste clair : lisible sur la scene. */
@media (max-width: 820px) {
  .site-header.on-stage .nav > a:not(.btn) { color: var(--ink-2); }
  .site-header.on-stage .nav > a.on { color: var(--link); }
  .site-header.on-stage .btn-quiet { --btn-fg: var(--ink); }
}

/* --- page « A propos » ---------------------------------------------------- */

/* Deux colonnes sur grand ecran, le visuel passant sous le texte des que la
   place manque : un apercu de document ecrase n'apprend plus rien. */
.about-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s12); align-items: center; }
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; gap: var(--s10); }
  .about-visuel { max-width: 420px; margin-inline: auto; }
}

/* Le document est legerement incline : il se lit comme une illustration, pas
   comme un cadre de plus dans la page. */
.about-visuel .tpl-thumb {
  /* Un A4 entier depasserait de la scene et passerait derriere l'en-tete : on
     borne la hauteur et on laisse le document sortir du cadre par le bas,
     comme une feuille posee dont on ne voit que le haut. */
  height: clamp(300px, 46vh, 460px);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-4);
  border: 1px solid rgba(255, 255, 255, .10);
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
  transition: transform var(--t);
}
.about-visuel .tpl-thumb:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
@media (prefers-reduced-motion: reduce) {
  .about-visuel .tpl-thumb, .about-visuel .tpl-thumb:hover { transform: none; }
}

.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s5); }
.stat-tile {
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s8) var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-1);
  text-align: center;
}
.stat-tile strong {
  font-family: var(--font-head);
  font-size: clamp(28px, 2.2vw + 14px, 40px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1;
  color: var(--brand-700);
}
.stat-tile span { font-size: var(--fs-sm); color: var(--muted); }

/* --- page « Nos services » ------------------------------------------------
   Chaque type est presente par un vrai document, pas par une icone. La grille
   accueille des formats tres differents — un A4 debout, une carte de visite
   couchee, un logo carre — d'ou des cartes de hauteur libre. */
.svc-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s6);
  /* Les cartes d'une meme rangee s'alignent : les libelles d'action n'ont pas
     tous la meme longueur (« Creer un cv » contre « Creer une lettre de
     motivation »), et des pieds decales donnent une grille bancale. */
  align-items: stretch;
}
.svc {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow: clip;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--sh-4); border-color: var(--brand-200); }

/* L'apercu est borne en hauteur : une affiche A3 entiere ecraserait le texte
   sous elle, et on ne juge pas une affiche a ses trois derniers centimetres. */
.svc-apercu {
  display: block; position: relative;
  max-height: 260px;
  border-bottom: 1px solid var(--line-2);
}
.svc-corps { padding: var(--s6); display: flex; flex-direction: column; flex: 1; }
/* Le bloc d'action se colle au bas : les cartes d'une rangee finissent alignees. */
.svc-corps > .row:last-child { margin-top: auto; padding-top: var(--s6); }

/* ---------------------------------------------------------------------------
   Catalogue : bandeau a fond defilant, entrees par type, styles.

   Samuel, 18 septembre 2026 : « ces slides d'images en arriere plan lui
   donnent un cote plus professionnel ». Les cinq fonds montrent les contextes
   de travail auxquels les modeles s'adressent — bureau, numerique, chantier,
   champ, ville — et defilent en fondu, sans JavaScript. Les trois documents
   poses par-dessus sont de vrais rendus du moteur (voir .hero-images.mjs).
   --------------------------------------------------------------------------- */
.cat-hero { position: relative; overflow: hidden; background: #0a1424; color: #fff; }
.cat-hero-fonds { position: absolute; inset: 0; }
.cat-hero-fonds span {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; animation: catFond 30s linear infinite;
}
@keyframes catFond {
  0%   { opacity: 0; transform: scale(1.06); }
  4%   { opacity: 1; }
  18%  { opacity: 1; }
  24%  { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .cat-hero-fonds span { animation: none; }
  .cat-hero-fonds span:first-child { opacity: 1; }
}
.cat-hero-voile {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8, 17, 33, .93) 0%, rgba(8, 17, 33, .72) 42%, rgba(8, 17, 33, .28) 100%),
    linear-gradient(180deg, rgba(8, 17, 33, .32), rgba(8, 17, 33, .58));
}
.cat-hero-in {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--s10); align-items: center; padding: var(--s12) 0 var(--s12);
}
.cat-hero-sur {
  margin: 0 0 var(--s3); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent-300, #f3c969);
}
.cat-hero h1 {
  margin: 0; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; color: #fff;
}
.cat-hero h1 span { color: var(--accent-300, #f3c969); display: block; }
.cat-hero-lead {
  margin: var(--s4) 0 var(--s6); max-width: 54ch;
  color: rgba(255, 255, 255, .82); font-size: var(--fs-md); line-height: 1.6;
}
.cat-hero-lead strong { color: #fff; }

.cat-hero-search {
  position: relative; display: flex; align-items: center; gap: var(--s2);
  background: rgba(255, 255, 255, .97); border-radius: var(--r-full);
  padding: 6px 6px 6px var(--s10); max-width: 620px;
  box-shadow: 0 18px 40px rgba(2, 8, 20, .35);
}
.cat-hero-search .ico {
  position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%);
  display: flex; color: var(--muted); pointer-events: none;
}
.cat-hero-search input[type="search"] {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  font-size: var(--fs-sm); color: var(--ink); padding: var(--s3) 0;
}
.cat-hero-search input[type="search"]:focus { outline: none; }
.cat-hero-search .btn { flex: 0 0 auto; border-radius: var(--r-full); }

.cat-hero-exemples {
  margin: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2);
  align-items: center; font-size: var(--fs-xs); color: rgba(255, 255, 255, .7);
}
.cat-hero-exemples a {
  padding: 4px var(--s3); border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, .28); color: #fff; text-decoration: none;
}
.cat-hero-exemples a:hover { background: rgba(255, 255, 255, .14); }

/* Les documents poses sur le fond : un porte-folio, un CV, une carte. */
.cat-hero-docs { position: relative; height: 340px; }
.cat-hero-docs img {
  position: absolute; width: auto; border-radius: 6px;
  box-shadow: 0 24px 60px rgba(2, 8, 20, .55);
}
.cat-hero-docs img:nth-child(1) { height: 300px; left: 2%;  top: 4%;   transform: rotate(-6deg); }
.cat-hero-docs img:nth-child(2) { height: 268px; right: 4%; top: 0;    transform: rotate(5deg); }
.cat-hero-docs img:nth-child(3) { height: 118px; left: 26%; bottom: 2%; transform: rotate(-3deg); }

@media (max-width: 900px) {
  .cat-hero-in { grid-template-columns: 1fr; padding: var(--s10) 0; }
  .cat-hero-docs { display: none; }
}

/* ------------------------------------------------------- entrees par type */
.type-cartes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--s3); margin: calc(var(--s6) * -1) 0 var(--s6); position: relative; z-index: 2;
}
.type-carte {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4); border-radius: var(--r-lg);
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s;
}
.type-carte:hover { transform: translateY(-2px); border-color: var(--brand-500); }
.type-carte.on { border-color: var(--brand-600); box-shadow: 0 10px 24px rgba(15, 23, 42, .14); }
.type-carte .ico {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-700);
}
.type-carte.on .ico { background: var(--brand-600); color: #fff; }
.type-carte .txt { display: flex; flex-direction: column; min-width: 0; }
.type-carte strong { font-size: var(--fs-sm); line-height: 1.2; }
.type-carte small { color: var(--muted); font-size: var(--fs-xs); }

/* --------------------------------------------------------- sections du bas */
.cat-section { margin-bottom: var(--s12); }
.cat-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s5);
}
.cat-section-head h2 { margin: 0; font-size: var(--fs-xl); }
.cat-section-head p { margin: var(--s1) 0 0; }

.cat-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s4); }
.cat-style {
  display: block; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--paper);
  text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.cat-style:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, .12); }
.cat-style .vue {
  display: block; position: relative; overflow: hidden; height: 150px; background: var(--surface-2);
}
.cat-style .vue iframe { position: absolute; left: 0; top: 0; transform-origin: 0 0; border: 0; pointer-events: none; }
.cat-style .txt { display: block; padding: var(--s3) var(--s4); }
.cat-style strong { display: block; font-size: var(--fs-sm); }
.cat-style small { color: var(--muted); font-size: var(--fs-xs); }

/* ------------------------------------------ bande d'accroche et atouts
   Page d'entree seulement. Deux blocs cote a cote : la promesse a gauche
   sur fond sombre, les quatre atouts a droite en petites cartes. C'est ce
   qui remplace la longue grille que le client ne veut plus derouler. */
.cat-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--s5);
  margin-bottom: var(--s12);
}
.cat-promo {
  position: relative; overflow: clip;
  padding: var(--s10) var(--s8);
  border-radius: var(--r-2xl);
  background: var(--brand-950);
  color: #fff;
  box-shadow: var(--sh-5);
}
.cat-promo::before {
  content: ""; position: absolute; inset: -40% -20%;
  background:
    radial-gradient(42% 52% at 18% 18%, color-mix(in srgb, var(--brand-500) 50%, transparent), transparent 70%),
    radial-gradient(40% 48% at 86% 82%, color-mix(in srgb, var(--accent-600) 38%, transparent), transparent 70%);
  filter: blur(4px);
}
.cat-promo::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); opacity: .07;
}
.cat-promo > * { position: relative; z-index: 1; }
/* Teintes fixes : le bloc reste sombre en mode clair comme en mode sombre,
   les variables de texte suivraient le theme et disparaitraient. */
.cat-promo .sur {
  margin: 0 0 var(--s3); font-size: var(--fs-xs); letter-spacing: .14em;
  text-transform: uppercase; color: #e9c877;
}
.cat-promo h2 { margin: 0; color: #fff; font-size: var(--fs-2xl); }
.cat-promo p { margin: var(--s4) 0 var(--s7); color: #b8c8dc; max-width: 44ch; }

.cat-atouts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4); margin: 0; padding: 0; list-style: none;
}
.cat-atouts li {
  display: flex; flex-direction: column; gap: var(--s1);
  padding: var(--s5); border-radius: var(--r-lg);
  background: var(--paper); border: 1px solid var(--line);
}
.cat-atouts .ico {
  display: grid; place-items: center; width: 38px; height: 38px;
  margin-bottom: var(--s2); border-radius: var(--r-md);
  background: var(--brand-50); color: var(--brand-700);
}
.cat-atouts strong { font-size: var(--fs-sm); }
.cat-atouts small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }

@media (max-width: 900px) {
  .cat-duo { grid-template-columns: 1fr; }
  .cat-promo { padding: var(--s8) var(--s6); }
}
@media (max-width: 520px) {
  .cat-atouts { grid-template-columns: 1fr; }
}

/* Les vedettes de la page d'entree : un modele par type, sur une seule
   rangee. En colonnes automatiques, le sixieme tombait seul a la ligne. */
.catalog.vedette { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1180px) { .catalog.vedette { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .catalog.vedette { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px)  { .catalog.vedette { grid-template-columns: 1fr; } }

/* A six par rangee, la carte n'a plus que deux cents pixels : le titre, la
   pastille d'offre, celle de style et les formats s'y chevauchaient. On garde
   ce qui distingue — l'offre et le type — et l'on laisse tomber le reste, que
   la grille du type montre de toute facon. */
.catalog.vedette .tpl-badges .badge:not(.badge-offre) { display: none; }
.catalog.vedette .tpl-tags .tag.fmt { display: none; }
.catalog.vedette .tpl-body h4 { font-size: var(--fs-sm); }

/* ============================================================== 1 bis. accueil
   D'apres la maquette de Samuel (18 septembre 2026) : bandeau sombre sur photo
   de bureau, titre en deux couleurs, deux boutons, quatre documents en
   eventail, barre de chiffres a cheval sur le bas, puis les categories en
   tuiles a icones colorees, les trois etapes et le pave sombre.

   Le bandeau reprend la mecanique de `.stage` : marge negative sous l'en-tete
   transparent, rembourrage equivalent en haut. */
.acc-hero {
  position: relative; isolation: isolate; overflow: clip;
  background: var(--brand-950); color: #e7eef7;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(var(--s8), 4vw, var(--s12)));
  padding-bottom: clamp(var(--s10), 5vw, var(--s16));
}
.acc-hero-fond { position: absolute; inset: 0; z-index: -2; }
/* Diaporama : toutes les photos empilees, une seule visible. app.js ajoute
   `.on` a tour de role ; la transition fait le fondu. Sans JS, la premiere
   (marquee `.on` au rendu) reste affichee. */
.acc-hero-fond img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease; will-change: opacity;
}
.acc-hero-fond img.on { opacity: .55; }
@media (prefers-reduced-motion: reduce) {
  .acc-hero-fond img { transition: none; }
}
/* Trois voiles : l'un porte la lisibilite du texte a gauche, l'autre eclaire
   le coin des documents, le dernier ramene le bas a la couleur de la page. */
.acc-hero-voile {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, var(--brand-950) 0 34%, color-mix(in srgb, var(--brand-950) 74%, transparent) 62%, color-mix(in srgb, var(--brand-950) 24%, transparent)),
    radial-gradient(56% 46% at 16% 6%, color-mix(in srgb, var(--brand-500) 42%, transparent), transparent 70%),
    linear-gradient(0deg, var(--brand-950) 0, transparent 46%);
}

.acc-hero-in {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: clamp(var(--s8), 4vw, var(--s16)); align-items: center;
  padding-bottom: clamp(var(--s10), 5vw, var(--s16));
}

.acc-pastille {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 7px 15px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; color: #dbe7f7;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
}
.acc-pastille svg { color: var(--accent-400); }

.acc-hero h1 {
  margin: var(--s6) 0 var(--s5); color: #fff;
  font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; letter-spacing: -.035em;
}
/* Le mot mis en avant : bleu sur fond clair, or sur fond sombre — un accent,
   jamais deux. */
.or { color: var(--brand-600); }
.acc-hero h1 .or, .acc-pourquoi .or {
  background: linear-gradient(100deg, var(--accent-200), var(--accent-400) 46%, var(--accent-500));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent-400);
}
.acc-hero-lead { max-width: 58ch; color: #b8c8dc; font-size: var(--fs-lg); line-height: 1.62; }
.acc-hero-actions { display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s8); }
.acc-hero-actions .btn { gap: var(--s2); }
.btn-verre { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .26); --btn-bg: rgba(255, 255, 255, .06); }
.btn-verre:hover { --btn-bg: rgba(255, 255, 255, .14); --btn-bd: rgba(255, 255, 255, .42); }
.btn-verre .rond {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); margin-right: 2px;
}

/* --- la pile de documents qui defile -------------------------------------
   Les cartes sont empilees au centre. La carte de devant (`.is-front`) est
   droite et nette ; les deux suivantes s'effacent derriere, decalees. Les
   autres attendent hors champ. app.js fait tourner la classe `.is-front`. */
.acc-hero-vis { position: relative; height: clamp(320px, 34vw, 460px); perspective: 1400px; }
.acc-carte {
  position: absolute; left: 50%; top: 50%; display: block; overflow: hidden;
  background: #fff; border-radius: 10px;
  box-shadow: 0 30px 64px rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .1);
  height: 88%; aspect-ratio: 210 / 297;
  transform: translate(-50%, -50%) translateX(120%) scale(.8) rotate(6deg);
  opacity: 0; z-index: 0; pointer-events: none;
  transition: transform .8s var(--e-out), opacity .8s var(--e-out);
  will-change: transform, opacity;
}
.acc-carte.forme-carte { aspect-ratio: 91 / 61; height: auto; width: 66%; }
.acc-carte.forme-a5 { aspect-ratio: 111 / 154; }
.acc-carte.forme-carre { aspect-ratio: 1 / 1; height: 74%; }
.acc-carte iframe { position: absolute; left: 0; top: 0; transform-origin: 0 0; border: 0; pointer-events: none; }
/* Devant : droite, nette, cliquable en apparence. */
.acc-carte.is-front {
  transform: translate(-50%, -50%) translateX(-4%) scale(1) rotate(-2deg);
  opacity: 1; z-index: 3;
}
/* Les deux d'appui, derriere a droite. */
.acc-carte.is-next {
  transform: translate(-50%, -50%) translateX(16%) scale(.9) rotate(4deg);
  opacity: .5; z-index: 2;
}
.acc-carte.is-next2 {
  transform: translate(-50%, -50%) translateX(30%) scale(.82) rotate(8deg);
  opacity: .25; z-index: 1;
}
/* Celle qui sort part vers la gauche. */
.acc-carte.is-out {
  transform: translate(-50%, -50%) translateX(-40%) scale(.86) rotate(-8deg);
  opacity: 0; z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  .acc-carte { transition: none; }
}

/* --- les rails de documents ----------------------------------------------
   Une bande par type. Elle defile toute seule, doucement, et s'arrete des
   qu'on la survole ou qu'on la touche. Les fleches n'apparaissent qu'au
   survol du rail. Rien sous les vignettes : le nom et l'action ne paraissent
   qu'au survol de la vignette elle-meme. */
.acc-rails { padding-bottom: clamp(var(--s10), 5vw, var(--s14)); }
.acc-rails .section-head { margin-bottom: var(--s8); }

.rail-sec { margin-top: clamp(var(--s8), 4vw, var(--s12)); }
.rail-sec:first-of-type { margin-top: 0; }
.rail-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s4);
  /* Meme retrait que la premiere vignette de la piste, pour que le titre soit
     aligne au-dessus d'elle tout en laissant le rail filer bord a bord. */
  padding-inline: clamp(var(--s4), 4vw, var(--s16));
}
.rail-titre { display: flex; align-items: center; gap: var(--s3); }
.rail-titre h2 { font-size: var(--fs-xl); margin: 0; letter-spacing: -.02em; }
.rail-ico {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand-600); flex: 0 0 auto;
}
.rail-n {
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 999px;
}
.rail-tout {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  font-size: var(--fs-sm); font-weight: 600; color: var(--brand-600);
}
.rail-tout .fleche { transition: transform .2s var(--e-out); }
.rail-tout:hover .fleche { transform: translateX(3px); }

.rail { position: relative; }
/* La piste : defilement horizontal, arrete net sur chaque vignette au doigt.
   La barre de defilement est masquee — les fleches et le glissement suffisent. */
.rail-track {
  display: flex; gap: var(--s4); overflow-x: auto; overflow-y: hidden;
  /* Ni `scroll-behavior: smooth` ni `scroll-snap` ici : tous deux annulent le
     defilement automatique image par image (le snap ramene chaque petit pas au
     point d'accroche). Les fleches animent leur saut elles-memes (scrollBy
     behavior smooth). */
  /* Marge negative pour que le soulevement au survol et l'ombre ne soient pas
     rognes, sans que la piste ne prenne plus de hauteur dans la page. */
  padding: 16px clamp(var(--s4), 4vw, var(--s16)) 30px; margin: -12px 0 -22px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.rail-track::-webkit-scrollbar { display: none; }

.rail-item {
  position: relative; flex: 0 0 auto;
  height: clamp(200px, 24vw, 268px); aspect-ratio: 210 / 297;
  border-radius: var(--r-lg); overflow: hidden; background: #fff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .06), 0 12px 26px rgba(15, 23, 42, .10);
  border: 1px solid var(--line);
  transition: transform .28s var(--e-out), box-shadow .28s var(--e-out);
}
.rail-item.card { aspect-ratio: 91 / 61; height: clamp(120px, 15vw, 168px); }
.rail-item.square { aspect-ratio: 1 / 1; }
.rail-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, .10), 0 22px 44px rgba(15, 23, 42, .22);
  z-index: 2;
}
.rail-vue { position: absolute; inset: 0; display: block; overflow: hidden; }
.rail-vue iframe { position: absolute; left: 0; top: 0; transform-origin: 0 0; border: 0; pointer-events: none; }

/* --- modele du jour : carte deux colonnes, texte + apercu vivant ---------- */
.acc-jour-carte {
  display: grid;
  grid-template-columns: 1fr minmax(0, 400px);
  gap: clamp(var(--s6), 4vw, var(--s12));
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
  padding: clamp(var(--s6), 4vw, var(--s10));
}
.acc-jour-txt h2 { margin: var(--s3) 0 var(--s1); font-size: var(--fs-2xl); }
.acc-jour-type { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--s4); }
.acc-jour-lead { color: var(--ink-2); max-width: 48ch; margin-bottom: var(--s6); }
.acc-jour-actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
.acc-jour-vue {
  position: relative; display: block; overflow: hidden; width: 100%;
  border-radius: var(--r-lg); box-shadow: var(--sh-3); justify-self: end;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  transition: transform var(--t), box-shadow var(--t);
}
.acc-jour-vue:hover { transform: translateY(-4px); box-shadow: var(--sh-4); }
.acc-jour-vue iframe { position: absolute; left: 0; top: 0; transform-origin: 0 0; border: 0; pointer-events: none; }
@media (max-width: 860px) {
  .acc-jour-carte { grid-template-columns: 1fr; }
  .acc-jour-vue { max-width: 340px; justify-self: start; }
}
/* Tant que l'iframe n'est pas montee, un fond doux plutot qu'un trou blanc. */
.rail-item::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
}

/* La surcouche : invisible au repos, elle glisse du bas au survol ou au focus.
   C'est la seule chose qui decrit la carte — pas de texte en permanence. */
.rail-over {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
  padding: 22px var(--s3) var(--s3);
  background: linear-gradient(0deg, rgba(8, 16, 30, .82), rgba(8, 16, 30, .34) 60%, transparent);
  color: #fff; opacity: 0; transform: translateY(30%);
  transition: opacity .26s var(--e-out), transform .26s var(--e-out);
}
.rail-item:hover .rail-over,
.rail-item:focus-visible .rail-over { opacity: 1; transform: translateY(0); }
.rail-nom { font-size: var(--fs-sm); font-weight: 700; line-height: 1.15; margin-right: auto; }
.rail-offre {
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; color: #1a1205; background: var(--accent-400);
}
.rail-cta {
  display: inline-flex; align-items: center; gap: 5px; width: 100%;
  font-size: var(--fs-xs); font-weight: 600; color: #dbe7f7;
}

/* Les fleches : cachees, elles paraissent quand on survole le rail. */
.rail-arw {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 4; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .96); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(15, 23, 42, .22);
  cursor: pointer; opacity: 0; transition: opacity .22s var(--e-out), background .18s, transform .18s;
}
.rail-arw.prev { left: 8px; }
.rail-arw.next { right: 8px; }
.rail-arw:hover { background: var(--brand-600); color: #fff; }
.rail:hover .rail-arw, .rail:focus-within .rail-arw { opacity: 1; }
.rail-arw[hidden] { display: none; }
/* Au doigt, pas de survol : les fleches restent discretement visibles. */
@media (hover: none) {
  .rail-arw { opacity: .9; }
  .rail-over { opacity: 1; transform: none;
    background: linear-gradient(0deg, rgba(8, 16, 30, .7), transparent 74%); padding-top: 30px; }
}

/* --- la barre de chiffres ------------------------------------------------- */
.acc-chiffres {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--s6) var(--s7); border-radius: var(--r-xl);
  background: rgba(8, 16, 30, .74); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
}
.acc-chiffres > div { display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s5); }
.acc-chiffres > div + div { border-left: 1px solid rgba(255, 255, 255, .13); }
.acc-chiffres .ico {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 13px; background: rgba(255, 255, 255, .08); color: var(--accent-400);
}
.acc-chiffres b { display: block; color: #fff; font-size: var(--fs-xl); line-height: 1.15; }
.acc-chiffres small { display: block; color: #93a7c0; font-size: var(--fs-xs); line-height: 1.4; }

/* --- les categories ------------------------------------------------------- */
.acc-tuiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s5); }
.acc-tuile {
  display: flex; flex-direction: column; gap: var(--s3); padding: var(--s6);
  border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.acc-tuile:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(15, 23, 42, .12); border-color: var(--ton); }
.acc-tuile .ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--ton); color: #fff; margin-bottom: var(--s2);
}
.acc-tuile h3 { margin: 0; font-size: var(--fs-md); }
.acc-tuile p { flex: 1; margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
.acc-tuile .pied { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.acc-tuile .n { font-size: var(--fs-xs); color: var(--muted); }
.acc-tuile .fleche { color: var(--ton); font-size: var(--fs-md); }
.ton-bleu   { --ton: #2563eb; }
.ton-violet { --ton: #7c4dd4; }
.ton-vert   { --ton: #0f9d58; }
.ton-orange { --ton: #e07b1e; }
.ton-cyan   { --ton: #0aa5b8; }

/* --- les etapes et le pave sombre ----------------------------------------- */
.acc-duo { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); gap: var(--s6); }
.acc-etapes {
  position: relative; overflow: clip;
  padding: clamp(var(--s7), 3vw, var(--s10)); border-radius: var(--r-xl);
  background: var(--paper); border: 1px solid var(--line);
}
/* Une aurore douce qui derive en continu derriere les etapes : le fond bouge
   tout seul, sans photo qui gênerait la lecture. */
.acc-etapes::before {
  content: ""; position: absolute; inset: -40%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(30% 34% at 20% 30%, color-mix(in srgb, var(--brand-500) 20%, transparent), transparent 70%),
    radial-gradient(26% 30% at 82% 22%, color-mix(in srgb, var(--accent-500) 18%, transparent), transparent 70%),
    radial-gradient(34% 38% at 60% 88%, color-mix(in srgb, var(--brand-400) 16%, transparent), transparent 72%);
  animation: aurore 18s ease-in-out infinite alternate;
}
.acc-etapes > * { position: relative; z-index: 1; }
@keyframes aurore {
  0%   { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1.05); }
  50%  { transform: translate3d(3%, 3%, 0) rotate(6deg) scale(1.12); }
  100% { transform: translate3d(5%, -3%, 0) rotate(-4deg) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .acc-etapes::before { animation: none; } }
.acc-etapes h2 { margin: var(--s4) 0 var(--s8); font-size: var(--fs-2xl); }
.acc-etapes ol {
  list-style: none; margin: 0 0 var(--s8); padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6);
}
.acc-etapes li { position: relative; display: flex; flex-direction: column; gap: var(--s2); }
.acc-etapes li .n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-600); color: #fff; font-size: var(--fs-sm); font-weight: 700;
}
.acc-etapes li .ico { color: var(--brand-600); }
.acc-etapes li strong { font-size: var(--fs-sm); }
.acc-etapes li small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
/* La fleche entre deux etapes, comme sur la maquette. */
.acc-etapes li + li::before {
  content: "→"; position: absolute; left: calc(var(--s6) * -1 - 2px); top: 3px;
  color: var(--muted); opacity: .55;
}

.acc-pourquoi {
  position: relative; overflow: clip; box-shadow: var(--sh-5);
  padding: clamp(var(--s7), 3vw, var(--s10)) clamp(var(--s7), 3vw, var(--s10)) clamp(var(--s8), 3.4vw, var(--s12));
  border-radius: var(--r-xl); background: var(--brand-950); color: #c9d8ea;
}
.acc-pourquoi::before {
  content: ""; position: absolute; inset: -30% -20%;
  background:
    radial-gradient(44% 48% at 20% 16%, color-mix(in srgb, var(--brand-500) 52%, transparent), transparent 70%),
    radial-gradient(40% 44% at 86% 80%, color-mix(in srgb, var(--accent-600) 36%, transparent), transparent 70%);
  filter: blur(4px);
}
/* Diaporama en arriere-plan du panneau sombre : memes photos que le bandeau,
   tres assombries, elles se fondent l'une dans l'autre. */
.acc-pourquoi-fond { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; }
.acc-pourquoi-fond img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease;
}
.acc-pourquoi-fond img.on { opacity: .2; }
@media (prefers-reduced-motion: reduce) { .acc-pourquoi-fond img { transition: none; } }
.acc-pourquoi > *:not(.acc-pourquoi-fond) { position: relative; z-index: 1; }
.acc-pourquoi .acc-pastille { background: rgba(255, 255, 255, .1); }
.acc-pourquoi h2 { margin: var(--s5) 0 var(--s4); color: #fff; font-size: var(--fs-2xl); }
.acc-pourquoi p { font-size: var(--fs-sm); line-height: 1.6; }
.acc-pourquoi ul { list-style: none; margin: var(--s6) 0 var(--s7); padding: 0; display: grid; gap: var(--s3); }
.acc-pourquoi li { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--fs-sm); line-height: 1.5; }
.acc-pourquoi li .dot-ok { margin-top: 5px; flex: 0 0 auto; }
/* Trois documents deja produits, poses dans l'angle : la preuve derriere la
   promesse. Ils disparaissent des que la carte n'a plus la place. */
.acc-pourquoi-vis {
  position: absolute; right: -8%; bottom: -22%; width: 34%; z-index: 0;
  display: flex; gap: 8px; transform: rotate(-7deg); opacity: .4;
}
/* Le texte garde sa colonne : les documents ne passent jamais dessous. */
.acc-pourquoi p, .acc-pourquoi ul { padding-right: 16%; }
.acc-pourquoi-vis img { width: 33%; border-radius: 6px; box-shadow: 0 18px 36px rgba(0, 0, 0, .55); }

/* --- la bande de bas de page ---------------------------------------------- */
.acc-bande {
  padding: var(--s10) 0; background: var(--surface-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.acc-bande-titre { margin: 0 0 var(--s5); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.acc-bande-liste { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s4) var(--s8); }
.acc-bande-liste span { font-weight: 650; letter-spacing: .01em; color: var(--ink); opacity: .72; }

@media (max-width: 1100px) {
  .acc-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .acc-duo { grid-template-columns: 1fr; }
  .acc-pourquoi-vis { display: none; }
}
@media (max-width: 900px) {
  .acc-hero-in { grid-template-columns: 1fr; }
  .acc-hero-vis { height: clamp(260px, 62vw, 380px); }
  .acc-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) 0; }
  .acc-chiffres > div:nth-child(odd) { border-left: 0; }
  .acc-etapes ol { grid-template-columns: 1fr; }
  .acc-etapes li + li::before { display: none; }
}
@media (max-width: 620px) {
  .acc-tuiles { grid-template-columns: 1fr; }
  .acc-chiffres { grid-template-columns: 1fr; }
  .acc-chiffres > div { border-left: 0 !important; }
}
