/* Couleurs et polices de l'appli Marenso (app/style.css du dépôt ecrin) */
@font-face { font-family: "Bodoni Moda"; src: url("polices/bodoni-moda-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("polices/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root { --courbe: cubic-bezier(0.22, 1, 0.36, 1);
  --fond: #14171c;
  --carte: #1c2027;
  --filet: rgba(255, 255, 255, 0.08);
  --texte: #f2ede4;
  --texte-2: #9a948c;
  --nacre: #ece5de;
  --lueur: #ffd9a0;
  --serif: "Bodoni Moda", Didot, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --large: min(1120px, 100% - 2rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* sinon .bouton (inline-block) reste visible */
html { scroll-behavior: smooth; scroll-padding-top: 6rem; } /* l'en-tête collant (82 px) ne cache jamais l'élément qui a le focus */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--lueur); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--lueur); outline-offset: 3px; }

.evitement { position: absolute; left: 1rem; top: -3rem; background: var(--nacre); color: var(--fond); padding: 0.5rem 1rem; z-index: 10; }
.evitement:focus { top: 1rem; }

/* En-tête : sans bandeau ; le menu est une pilule de verre dépoli */
.entete { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.85rem max(1rem, (100% - 1120px) / 2); background: linear-gradient(rgba(20, 23, 28, 0.85), rgba(20, 23, 28, 0)); }
.marque { font: 500 1.15rem/1 var(--serif); letter-spacing: 0.32em; color: var(--texte); text-decoration: none; }
.menu { position: relative; display: flex; gap: 0.15rem; padding: 0.3rem; border-radius: 999px;
  background: rgba(236, 229, 222, 0.07); border: 1px solid rgba(236, 229, 222, 0.16);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.menu a { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; color: var(--texte-2); text-decoration: none;
  font-size: 0.9rem; white-space: nowrap; transition: color 0.3s; }
@media (hover: hover) { .menu a:hover { color: var(--texte); } }
.menu a[aria-current] { color: var(--fond); font-weight: 500; }
/* Pastille claire de la section en cours : glisse d'un lien à l'autre (site.mjs la place sous le lien actif) */
.menu-repere { position: absolute; z-index: 0; top: 0.3rem; bottom: 0.3rem; left: 0; width: 0; border-radius: 999px; opacity: 0;
  background: var(--nacre); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); transition: transform 0.45s var(--courbe), width 0.45s var(--courbe), opacity 0.3s; }
@media (max-width: 760px) {
  html { scroll-padding-top: 7rem; }
  .entete { flex-direction: column; gap: 0.6rem; padding-top: 0.7rem; }
  .menu { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) { .menu-repere { transition: none; } }

/* Écran d'accueil : attend l'image du haut, puis la 3D jusqu'à 3 s (site.mjs) ; sans script, il s'efface seul à 4 s */
.accueil { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 1.4rem;
  background: radial-gradient(ellipse 60% 45% at 50% 45%, rgba(255, 217, 160, 0.07), transparent 70%), var(--fond);
  transition: opacity 0.7s var(--courbe), visibility 0.7s; animation: accueil-secours 0.7s 4s forwards; }
.accueil.attend { animation: none; }
@media (scripting: none) { .accueil { display: none; } } /* sans script, rien à attendre */
.accueil.parti { opacity: 0; visibility: hidden; }
@keyframes accueil-secours { to { opacity: 0; visibility: hidden; } }
.accueil-marque { margin: 0; font: 500 clamp(1.6rem, 4vw, 2.4rem)/1 var(--serif); letter-spacing: 0.42em; padding-left: 0.42em; color: var(--texte);
  animation: accueil-souffle 2.4s ease-in-out infinite; }
@keyframes accueil-souffle { 50% { opacity: 0.55; } }
.accueil-barre { width: min(220px, 60vw); height: 1px; background: rgba(236, 229, 222, 0.14); overflow: hidden; }
.accueil-barre span { display: block; height: 100%; background: var(--lueur); transform-origin: left; transform: scaleX(0.04); transition: transform 0.35s var(--courbe); }
.accueil-texte { margin: 0; color: var(--texte-2); font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .accueil, .accueil-barre span { transition: none; } .accueil-marque { animation: none; } }

/* Titres */
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 1rem; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.surtitre { margin: 0 0 0.75rem; color: var(--lueur); font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; }
.chapeau { color: var(--texte-2); font-size: 1.15rem; max-width: 32ch; }
.petit { color: var(--texte-2); font-size: 0.9rem; }

/* Boutons */
.bouton { display: inline-block; margin-top: 0.5rem; padding: 0.85rem 1.6rem; border: 1px solid var(--nacre); border-radius: 999px;
  background: var(--nacre); color: var(--fond); font: 500 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer; }
.bouton:hover { background: transparent; color: var(--nacre); }
.bouton:disabled { opacity: 0.6; cursor: progress; }
.bouton-discret { background: rgba(20, 23, 28, 0.7); color: var(--nacre); }
@media (hover: hover) { .bouton-discret:hover { background: var(--nacre); color: var(--fond); } }

/* Fond : lueurs chaudes très douces, sans aucun bord (le canvas 3D est transparent par-dessus) */
@property --teinte { syntax: '<color>'; inherits: true; initial-value: rgba(255, 217, 160, 0.09); }
html { --teinte: rgba(255, 217, 160, 0.09); transition: --teinte 1.2s var(--courbe); } /* valeur aussi sans @property et sur les pages sans site.mjs */
html[data-finition="noir"] { --teinte: rgba(205, 214, 228, 0.07); }
html[data-finition="marron"] { --teinte: rgba(196, 128, 86, 0.10); }
html[data-finition="croco"] { --teinte: rgba(255, 217, 160, 0.09); }
@media (prefers-reduced-motion: reduce) { html { transition: none; } }
body { background:
  radial-gradient(ellipse 70% 50% at 75% 8%, color-mix(in srgb, var(--teinte) 78%, transparent), transparent 70%),
  radial-gradient(ellipse 60% 40% at 20% 45%, color-mix(in srgb, var(--teinte) 50%, transparent), transparent 70%),
  radial-gradient(ellipse 70% 45% at 70% 78%, color-mix(in srgb, var(--teinte) 67%, transparent), transparent 70%),
  var(--fond); }

/* Scène 3D : fixée plein écran, sous les textes, ne prend aucun clic (le défilement reste libre) */
.scene3d { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.scene3d canvas { display: block; width: 100%; height: 100%; }
main > section, .pied { position: relative; z-index: 2; }
main { overflow-x: hidden; overflow-x: clip; } /* l'écrin peut déborder de sa colonne, jamais de la page (clip garde l'en-tête collant) */

/* Histoire : une section par écran, texte d'un côté, place de l'écrin de l'autre */
.histoire { width: var(--large); margin: 0 auto; min-height: 100svh; display: grid; align-items: center; gap: 1rem; padding: 4rem 0; }
.histoire-texte p { max-width: 46ch; }
.place-ecrin { margin: 0; }
/* Images fixes à fond transparent (rendus du modèle 3D) : aucun rectangle visible */
.affiche { width: 100%; }
/* Avec la 3D, l'écrin 3D prend la place de l'image (la place reste réservée pour la mesure) */
.avec-3d .affiche { opacity: 0; pointer-events: none; } /* invisibles mais lues : le lecteur d'écran décrit l'écrin même quand la 3D le montre */
@media (min-width: 900px) {
  .histoire { grid-template-columns: 5fr 6fr; gap: 2rem; }
  .histoire.a-droite, .recapitulatif { grid-template-columns: 6fr 5fr; }
  .histoire.a-droite .histoire-texte { order: 2; }
  .place-ecrin { width: 116%; margin-inline: -8%; } /* l'écrin déborde un peu de sa colonne : plus de présence */
}
@media (max-width: 899px) {
  .histoire { min-height: auto; padding: 3rem 0; }
  .histoire:first-child { min-height: calc(100svh - 4rem); padding-top: 1.5rem; }
  .place-ecrin { order: -1; width: min(100%, 34rem); margin: 0 auto; }
}

.defiler { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); margin: 0; color: var(--texte-2); font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; }
.defiler::after { content: ""; display: block; width: 1px; height: 2rem; margin: 0.6rem auto 0; background: linear-gradient(var(--lueur), transparent); }
.defiler { transition: opacity 0.4s; }
.a-defile .defiler { opacity: 0; }
@media (max-width: 899px) { .defiler { display: none; } }
.etat-3d:empty { display: none; }

/* Apparition des textes au défilement (site.mjs ajoute .cache seulement aux textes encore sous l'écran) */
.revele { transition: opacity 0.4s var(--courbe), transform 0.4s var(--courbe); }
.revele.cache { opacity: 0; transform: translateY(0.75rem); }
.revele.cache:has(:focus-visible) { opacity: 1; transform: none; } /* un texte atteint au clavier ne reste jamais invisible */

/* Finitions */
.finitions { display: flex; gap: 0.6rem; margin: 3.4rem 0 1rem; } /* la marge du haut laisse la place à l'écrin qui dépasse des cartes */
.finition { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; max-width: 8rem; padding: 2.4rem 0.6rem 0.7rem; border: 1px solid var(--filet); border-radius: 1.25rem;
  background: rgba(242, 237, 228, 0.03); color: var(--texte); font: 500 0.95rem/1 var(--sans); cursor: pointer; transition: border-color 0.2s; }
.finition-nom { display: inline-flex; align-items: center; gap: 0.5rem; }
@media (max-width: 23.75rem) { .finition-nom { flex-direction: column; gap: 0.35rem; } } /* 3 cartes sur une ligne jusqu'à 320 px : pastille au-dessus du nom */
.finition-image { width: 100%; max-width: 7rem; height: auto; margin-top: -4.5rem; margin-bottom: 0.6rem; pointer-events: none; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45)); transition: transform 0.5s var(--courbe); }
@media (hover: hover) { .finition:hover { border-color: var(--texte-2); } .finition:hover .finition-image { transform: translateY(-6px) rotate(-4deg) scale(1.06); } }
.finition:focus-visible .finition-image { transform: translateY(-6px) rotate(-4deg) scale(1.06); }
.finition[aria-pressed="true"] { border-color: var(--lueur); }
@media (prefers-reduced-motion: reduce) { .finition-image, .finition:hover .finition-image, .finition:focus-visible .finition-image { transform: none; transition: none; } }
@media (forced-colors: active) { .finition { border-color: ButtonText; } .finition[aria-pressed="true"] { border-color: Highlight; border-width: 2px; } }
.pastille { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); }
.pastille-noir { background: #1c1c1c; }
.pastille-marron { background: #4d2d24; }
.pastille-croco { background: repeating-linear-gradient(45deg, #070707 0 3px, #1b1b1b 3px 4px), #0d0d0d; }

/* Récapitulatif : la fin du parcours, comme une fiche de commande (sans prix ni vente) */
.carte { padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--filet); border-radius: 1.25rem; background: rgba(28, 32, 39, 0.82); backdrop-filter: blur(10px); }
.recap { margin: 1.25rem 0 0; }
.recap div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--filet); }
.recap dt { color: var(--texte-2); }
.recap dd { margin: 0; text-align: right; }
.statut { color: var(--lueur); margin-bottom: 0.25rem; }

/* Blocs */
.bloc { width: var(--large); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7rem) 0; border-top: 1px solid var(--filet); display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .bloc { grid-template-columns: 1fr 1fr; } }
.bloc-texte p { max-width: 52ch; }
.bloc-centre { display: block; text-align: center; }
.bloc-centre p { max-width: 60ch; margin-left: auto; margin-right: auto; }
.points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.7rem; }
.points li { padding-left: 1.4rem; position: relative; color: var(--texte-2); }
.points li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.5rem; height: 1px; background: var(--lueur); }
.points strong { color: var(--texte); font-weight: 500; }
.encart { margin-top: 1.75rem; padding: 1rem 1.25rem; border-left: 2px solid var(--lueur); background: var(--carte); color: var(--texte); }

/* Pourquoi Marenso : atouts en cartes */
.atouts { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); text-align: left; }
.atouts li { padding: 1.4rem 1.5rem; border: 1px solid var(--filet); border-radius: 1.25rem; background: var(--carte); }
.atouts h2, .atouts h3 { margin: 0 0 0.5rem; font: 500 1.05rem/1.35 var(--sans); color: var(--texte); }
.atouts p { margin: 0; max-width: none; color: var(--texte-2); }
.atouts-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); }

/* Ouverture : les atouts en un coup d'œil (on lit des mots, pas des phrases) */
.puces { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.3rem; overflow: hidden; overflow: clip; } /* clip : rogne le « · » d'un atout passé à la ligne */
.puces li { position: relative; color: var(--texte); font-size: 0.95rem; } /* texte simple séparé par « · » plutôt que des pastilles (audit unslop, lot C) */
.puces li + li::before { content: "·" / ""; position: absolute; right: 100%; margin-right: 0.5rem; color: var(--lueur); } /* dans l'écart ; sans « / "" » (vieux navigateurs), l'écart reste */
@media (max-width: 35rem) { .puces { flex-direction: column; } .puces li::before, .puces li + li::before { content: "·" / ""; position: static; margin: 0 0.5rem 0 0; color: var(--lueur); } } /* téléphone : une ligne par atout, un « · » devant chacune */

/* Ce que Marenso ajoute : une icône, trois mots, une ligne */
.ajouts { list-style: none; margin: 2.75rem auto 0; padding: 0; max-width: 960px; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.ajouts li { display: grid; justify-items: center; align-content: start; gap: 0.35rem; padding: 1.4rem 1rem; border: 1px solid var(--filet); border-radius: 1.25rem; background: rgba(242, 237, 228, 0.02); } /* contour discret : on voit que ce sont des cartes avant le survol */
.ajouts .icone { width: 2.6rem; height: 2.6rem; padding: 0.6rem; margin-bottom: 0.4rem; border-radius: 50%; background: rgba(255, 217, 160, 0.08); fill: none; stroke: var(--lueur); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
.ajouts h3 { margin: 0; font: 500 1.05rem/1.3 var(--sans); color: var(--texte); }
.ajouts p { margin: 0; color: var(--texte-2); font-size: 0.95rem; max-width: 26ch; }

/* Pages sans défilement suivi (Notre histoire) : la page en cours garde sa pastille */
.menu-simple a[aria-current] { background: var(--nacre); }
.pied-liens { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.page-histoire .bloc:first-child { border-top: 0; }
.page-histoire h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); }

/* Questions fréquentes : <details> natif, aucun script */
.faq { max-width: 46rem; margin: 2rem auto 0; text-align: left; }
.faq details { border-top: 1px solid var(--filet); }
.faq details:last-child { border-bottom: 1px solid var(--filet); }
.faq summary { position: relative; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 2rem 1.1rem 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
/* Le + devient – dans un fondu flou (les deux signes sont superposés, l'un s'efface pendant que l'autre apparaît) */
.faq summary::before, .faq summary::after { position: absolute; right: 0.25rem; top: 50%; color: var(--lueur); font-size: 1.3rem; line-height: 1;
  transition: opacity 0.35s, filter 0.35s, transform 0.45s var(--courbe); }
.faq summary::after { content: "+"; content: "+" / ""; transform: translateY(-50%); }
.faq summary::before { content: "–"; content: "–" / ""; transform: translateY(-50%) rotate(-90deg) scale(0.6); opacity: 0; filter: blur(6px); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(90deg) scale(0.6); opacity: 0; filter: blur(6px); }
.faq details[open] summary::before { transform: translateY(-50%); opacity: 1; filter: none; }
/* Mettre en avant ce qui compte : la question ouverte reste claire, les autres s'assombrissent */
.faq:has(details[open]) details:not([open]) summary { color: var(--texte-2); }
.faq details p { margin: 0 0 1.2rem; max-width: none; color: var(--texte-2); }

/* Bientôt */
.bientot { padding-bottom: clamp(4rem, 10vw, 8rem); }

/* Pied de page */
.pied { width: var(--large); margin: 0 auto; padding: 2rem 0 3rem; border-top: 1px solid var(--filet); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--texte-2); font-size: 0.9rem; }
.pied p { margin: 0; }
.pied a { color: var(--texte-2); }

/* Mentions légales */
.legal { width: min(760px, 100% - 2rem); margin: 0 auto; padding: 3rem 0 4rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.legal p, .legal li { color: var(--texte-2); }
.legal strong { color: var(--texte); font-weight: 500; }
.a-completer { color: var(--lueur); }

/* ———— Interactions (loi de Fitts, de Hick, seuil de Doherty) ———— */

/* Boutons qu'on sent : ombre au survol, léger enfoncement au clic.
   Cibles d'au moins 44 px (loi de Fitts). */
.bouton, .finition, .copier { min-height: 2.75rem; transition: transform 0.5s var(--courbe), box-shadow 0.3s, background-color 0.2s, color 0.2s, border-color 0.2s; }
.bouton { padding: 1rem 1.9rem; }
@media (hover: hover) {
  .bouton:hover, .finition:hover, .copier:hover { box-shadow: 0 12px 30px -14px rgba(255, 217, 160, 0.5); }
}
.bouton:active, .finition:active, .copier:active { transform: scale(0.98); transition-duration: 0.08s; box-shadow: none; }
.bouton:focus-visible, .finition:focus-visible, .copier:focus-visible, .menu a:focus-visible, .faq summary:focus-visible { outline: 2px solid var(--lueur); outline-offset: 3px; }

/* Marque de réussite : la coche se dessine quand la finition est vraiment à l'écran */
.pastille { display: grid; place-items: center; }
.coche, .icone-swap svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.coche { width: 1rem; height: 1rem; color: #fff; opacity: 0; filter: blur(4px); transform: scale(0.5); transition: opacity 0.3s, filter 0.3s, transform 0.5s var(--courbe); }
.finition[data-etat="ok"] .coche { opacity: 1; filter: none; transform: none; }
/* Doherty : si l'affichage prend plus d'un instant, la pastille respire pour dire « ça vient » */
.finition[data-etat="charge"] .pastille { animation: respire 0.9s ease-in-out infinite; }
@keyframes respire { 50% { box-shadow: 0 0 0 5px rgba(255, 217, 160, 0.25); } }
.confirme { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* lue par les lecteurs d'écran seulement : la carte choisie montre déjà le choix */

/* Copier l'adresse : l'icône de copie cède la place à une coche, en fondu flou */
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.copier { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0 0.95rem; border: 1px solid var(--filet); border-radius: 999px;
  background: rgba(28, 32, 39, 0.7); color: var(--texte); font: 500 0.85rem/1 var(--sans); cursor: pointer; }
.icone-swap { position: relative; width: 1.05rem; height: 1.05rem; }
.icone-swap svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.35s, filter 0.35s, transform 0.45s var(--courbe); }
.icone-swap .i-b { opacity: 0; filter: blur(5px); transform: scale(0.5); color: var(--lueur); }
.copier.fait .i-a { opacity: 0; filter: blur(5px); transform: scale(0.5); }
.copier.fait .i-b { opacity: 1; filter: none; transform: none; }
.copier.fait { border-color: var(--lueur); }

/* Mettre en scène : la section en cours est pleine lumière, les autres textes s'assombrissent */
.histoire-texte { transition: opacity 0.7s var(--courbe), filter 0.7s var(--courbe), transform 0.9s var(--courbe); }
.histoire[data-actif="non"] .histoire-texte:not(.cache) { opacity: 0.85; filter: saturate(0.5); } /* 0,85 : texte secondaire à 4,66:1, contraste AA tenu */
.histoire[data-actif="non"] .histoire-texte:has(:focus-visible) { opacity: 1; filter: none; } /* au clavier, ce qui a le focus reste en pleine lumière */
/* Les cartes : celle qu'on regarde ressort, les autres s'effacent un peu */
.atouts li { transition: opacity 0.35s, border-color 0.35s, transform 0.5s var(--courbe); }
@media (hover: hover) {
  .atouts:has(li:hover) li:not(:hover) { opacity: 0.85; }
  .atouts li:hover { border-color: rgba(255, 217, 160, 0.35); }
}
/* Un halo chaud suit l'écrin 3D et le bord de l'écran s'assombrit : l'œil va à l'écrin */
.avec-3d .scene3d { background:
  radial-gradient(circle at var(--px, 70%) var(--py, 45%), var(--teinte), transparent 30%),
  radial-gradient(ellipse 85% 85% at var(--px, 70%) var(--py, 45%), transparent 55%, rgba(6, 7, 10, 0.55)); }

/* Révéler avec un masque : l'image monte derrière un cache, la 3D s'ouvre en cercle depuis l'écrin */
.masquable { transition: clip-path 1.1s var(--courbe), transform 1.4s var(--courbe), filter 0.9s var(--courbe); }
.masquable.masque { clip-path: inset(0 0 100% 0); transform: translateY(2rem) scale(1.04); filter: blur(6px); }
.scene3d { clip-path: circle(0 at var(--sx, 70%) var(--sy, 45%)); transition: clip-path 1.2s var(--courbe); }
.avec-3d .scene3d { clip-path: circle(150% at var(--sx, 70%) var(--sy, 45%)); }
/* 3D arrivée après l'accueil : fondu croisé avec l'image fixe (pose proche, pas identique : d'où l'attente du défilement en haut de page), sans cercle */
.tardive .scene3d { clip-path: none; opacity: 0; transition: opacity 1.2s var(--courbe); }
.tardive.avec-3d .scene3d { opacity: 1; }
.tardive .affiche { transition: opacity 1.2s var(--courbe); }

/* Le texte passe au-dessus de la 3D fixe (.scene3d, z-index 1) */
main { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .bouton, .finition, .copier, .coche, .icone-swap svg, .atouts li, .histoire-texte, .masquable, .scene3d, .pastille,
  .faq summary::before, .faq summary::after { transition: none !important; animation: none !important; }
  .masquable.masque { clip-path: none; transform: none; filter: none; }
  .scene3d { clip-path: none; }
  .tardive .affiche { transition: none; }
}

/* Repère sur l'écrin 3D (haut de page, ordinateur) : « Réglable au téléphone » relié par un trait à la caisse */
.reperes { position: fixed; inset: 0; z-index: 2; pointer-events: none; transition: opacity 0.2s linear; }
.reperes-traits { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.reperes-traits line { stroke: var(--lueur); stroke-width: 1; opacity: 0.7; }
.repere-point, .repere-etiquette { position: absolute; left: 0; top: 0; }
.repere-point { width: 0.6rem; height: 0.6rem; margin: -0.3rem 0 0 -0.3rem; border-radius: 50%; background: var(--lueur); box-shadow: 0 0 0 0.35rem rgba(255, 217, 160, 0.18); }
.repere-etiquette { translate: -50% -50%; display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; padding: 0.5rem 0.95rem; border: 1px solid rgba(255, 217, 160, 0.35); border-radius: 999px; background: rgba(20, 23, 28, 0.88); color: var(--texte); font-size: 0.9rem; }
.repere-icone { width: 1.05rem; height: 1.05rem; fill: none; stroke: var(--lueur); stroke-width: 1.6; stroke-linecap: round; }
@media (max-width: 899px) { .reperes { display: none; } }
@media (min-width: 900px) {
  /* l'étiquette remplace sa puce à l'écran ; la puce reste lue par les lecteurs d'écran */
  .avec-reperes .puce-repere { opacity: 0; } /* garde sa place : le titre ne saute pas (arbitre N6) */
}
@media (prefers-reduced-motion: reduce) { .reperes { transition: none; } }

/* Contraste forcé (Windows) : les fonds disparaissent, la section en cours garde un contour */
@media (forced-colors: active) {
  .menu a[aria-current] { outline: 2px solid Highlight; outline-offset: -2px; text-decoration: underline; }
  .menu-repere { display: none; }
}

/* Téléphone : l'en-tête se cache quand on descend, revient quand on remonte (Chrome et Edge ; ailleurs il reste, repli voulu) */
html { container-type: scroll-state; }
.entete { transition: transform 0.3s var(--courbe), background-color 0.3s var(--courbe), border-color 0.3s var(--courbe); border-bottom: 1px solid transparent; }
/* Page défilée (toutes largeurs) : l'en-tête prend un fond, le texte ne passe plus sous le logo */
@container scroll-state(scrollable: top) { .entete { background: rgba(20, 23, 28, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: rgba(242, 237, 228, 0.08); } }
@media (max-width: 760px) {
  @container scroll-state((scrolled: bottom) and (scrollable: top)) { .entete { transform: translateY(-100%); } }
  .entete:has(:focus-visible) { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .entete { transition: none; } }
/* Contraste forcé : placé après la règle de défilement, sinon elle l'écrase */
@media (forced-colors: active) { .entete { background: Canvas; backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* ———— Effets de lumière (CSS seul ; coupés en mouvement réduit et en contraste forcé) ———— */

/* Rayons : faisceaux chauds en biais derrière l'écrin, seulement dans « La lumière » (site.mjs pose .rayons-actifs sur le body) */
.rayons { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 1.4s ease, visibility 1.4s; }
.rayons::before { content: ""; position: absolute; inset: -10%; transform-origin: 28% 0; filter: blur(10px); animation: rayons-respire 11s ease-in-out infinite alternate paused;
  background: conic-gradient(from 150deg at 28% -5%, transparent 0deg, rgba(255, 217, 160, 0.1) 6deg, transparent 13deg, transparent 21deg, rgba(255, 217, 160, 0.07) 25deg, transparent 33deg,
    transparent 40deg, rgba(255, 217, 160, 0.09) 44deg, transparent 52deg, transparent 60deg, rgba(255, 217, 160, 0.06) 64deg, transparent 72deg, transparent 360deg);
  -webkit-mask-image: linear-gradient(#000, transparent 85%); mask-image: linear-gradient(#000, transparent 85%); }
.rayons-actifs .rayons { opacity: 1; visibility: visible; }
.rayons-actifs .rayons::before { animation-play-state: running; }
@keyframes rayons-respire { from { opacity: 0.6; transform: rotate(-1.5deg); } to { opacity: 1; transform: rotate(1.5deg); } }
@media (max-width: 899px) { .rayons { display: none; } } /* téléphone : invisible à cette taille, coûteux pour le GPU (arbitre P1) */

/* Reflet sur le titre : une copie décorative (contenu généré, vide pour les lecteurs d'écran) qu'un éclat traverse une fois */
.titre-reflet { display: block; position: relative; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .titre-reflet::after { content: attr(data-t) / ""; position: absolute; inset: 0; pointer-events: none; color: transparent; opacity: 0;
    background: linear-gradient(105deg, transparent 40%, #ffc978 50%, transparent 60%) 100% 0 / 250% 100% no-repeat;
    -webkit-background-clip: text; background-clip: text; }
  .titre-reflet.passe::after { animation: titre-reflet 1.6s ease-in-out 1; }
}
@keyframes titre-reflet { 0% { opacity: 1; background-position: 100% 0; } 100% { opacity: 1; background-position: -10% 0; } }

/* Lueur qui suit la souris sur les cartes « Ce que Marenso ajoute » (souris seulement ; --x et --y posés par site.mjs) */
@media (hover: hover) and (pointer: fine) {
  .ajouts li { position: relative; isolation: isolate; }
  .ajouts li::before, .ajouts li::after { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 1.25rem; pointer-events: none; opacity: 0; transition: opacity 0.35s; }
  .ajouts li::before { background: radial-gradient(circle 6.5rem at var(--x, 50%) var(--y, 50%), rgba(255, 217, 160, 0.06), transparent 100%); }
  .ajouts li::after { border: 1px solid var(--lueur); -webkit-mask-image: radial-gradient(circle 7rem at var(--x, 50%) var(--y, 50%), #000, transparent);
    mask-image: radial-gradient(circle 7rem at var(--x, 50%) var(--y, 50%), #000, transparent); }
  .ajouts li:hover::before, .ajouts li:hover::after { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .rayons, .titre-reflet::after, .ajouts li::before, .ajouts li::after { display: none; }
}
@media (forced-colors: active) {
  .rayons, .titre-reflet::after, .ajouts li::before, .ajouts li::after { display: none; }
}

/* ———— L'application : téléphone dessiné en CSS, écran qui suit l'étape (site.mjs) ———— */
.appli { align-items: start; padding: clamp(3rem, 8vw, 6rem) 0; gap: 2rem; }
.appli-intro { max-width: 46rem; }
.appli-colonne { display: grid; justify-items: center; align-content: start; }
.appli-fixe { display: grid; justify-items: center; align-content: start; gap: 1rem; }
.appli-mention { margin: 0; text-align: center; max-width: 22rem; }

/* Cadre métal fin (dégradé), corps noir, écran : tailles en pourcentage de la largeur, le téléphone garde ses proportions à toute taille */
.telephone { position: relative; width: min(14rem, 30svh); padding: 1.1%; border-radius: 15% / 7.2%;
  background: linear-gradient(145deg, #8d9096, #3b3e44 28%, #a9acb1 50%, #3b3e44 72%, #7d8085);
  box-shadow: 0 2.5rem 4.5rem -1.5rem rgba(0, 0, 0, 0.8), 0 0 5rem -1rem rgba(255, 217, 160, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.tel-corps { padding: 3%; border-radius: 14% / 6.8%; background: #050607; }
.tel-ecran { position: relative; aspect-ratio: 780 / 1800; overflow: hidden; border-radius: 11.5% / 5.3%; background: #14171c; }
/* Reflet léger en biais sur l'écran */
.tel-ecran::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 22%, transparent 38%); }
/* Îlot de la caméra */
.tel-ilot { position: absolute; z-index: 1; top: 1.2%; left: 50%; width: 25%; aspect-ratio: 3.4; translate: -50% 0; border-radius: 999px;
  background: radial-gradient(circle at 82% 50%, #1b2430 0 14%, #0a0d12 16% 24%, transparent 26%), #000; }
/* Boutons latéraux : action et volumes à gauche, marche à droite */
.tel-bouton { position: absolute; width: 1.3%; border-radius: 2px; background: linear-gradient(90deg, #6b6e74, #2f3237); }
.tel-b-action, .tel-b-vol1, .tel-b-vol2 { left: -1%; }
.tel-b-marche { right: -1%; background: linear-gradient(270deg, #6b6e74, #2f3237); }
.tel-b-action { top: 14%; height: 3.5%; }
.tel-b-vol1 { top: 20.5%; height: 6.5%; }
.tel-b-vol2 { top: 28.5%; height: 6.5%; }
.tel-b-marche { top: 24%; height: 10%; }
/* Écrans : fondu de l'un à l'autre ; ceux qui ne sont pas montrés sont masqués aux lecteurs d'écran */
.tel-img { position: absolute; inset: auto 0 0; width: 100%; height: auto; opacity: 0; visibility: hidden; transition: opacity 0.55s var(--courbe), visibility 0.55s; }
.tel-img.actif { opacity: 1; visibility: visible; }

/* Étapes : le titre est un bouton (aria-pressed), le numéro s'allume sur l'étape en cours */
.appli-etapes { list-style: none; margin: 0; padding: 0; display: grid; }
.etape { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-content: center; padding: 0.35rem 0; opacity: 0.85; transition: opacity 0.4s; }
.etape.actif { opacity: 1; }
.etape-num { grid-row: 1 / 3; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--lueur); border-radius: 50%; color: var(--lueur); font: 500 1rem/1 var(--serif); transition: background-color 0.4s, color 0.4s; }
.etape.actif .etape-num { background: var(--lueur); color: var(--fond); }
.etape h3 { margin: 0; font: 500 1.25rem/1.3 var(--serif); }
.etape button { min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--texte-2); font: inherit; text-align: left; cursor: pointer; transition: color 0.3s; }
.etape.actif button { color: var(--texte); }
@media (hover: hover) { .etape button:hover { color: var(--texte); } }
.etape p { grid-column: 2; margin: 0; max-width: 34ch; color: var(--texte-2); }
.etape.actif p { color: var(--texte); }

@media (max-width: 899px) {
  .appli-etapes { gap: 0.25rem; }
  .etape:not(.actif) p { display: none; } /* téléphone : seule la phrase de l'étape en cours, sous son titre */
  .etape { align-content: start; }
  /* téléphone : les trois titres passent au-dessus du téléphone, qui reste visible quand on en touche un */
  .appli-intro { order: -2; }
  .appli-etapes { order: -1; margin-bottom: 0; }
  .appli { row-gap: 1rem; }
  .telephone { width: min(14rem, 24svh); scroll-margin-bottom: 0.5rem; }
  .etape:not(.actif) .etape-num { grid-row: 1; }
}
@media (min-width: 900px) {
  /* Ordinateur : le téléphone reste en place (collant) pendant que les étapes défilent à côté */
  .appli { grid-template-columns: 5fr 6fr; column-gap: 3rem; row-gap: 3rem; }
  .appli-intro { grid-column: 1 / -1; }
  .appli-colonne { align-self: stretch; }
  .appli-fixe { position: sticky; top: 6.5rem; }
  .telephone { width: min(19rem, 33svh); }
  .etape { min-height: 52svh; }
  .appli-etapes { padding-bottom: 40svh; } /* le téléphone reste en place jusqu'à la dernière étape */
}
@media (prefers-reduced-motion: reduce) { .tel-img, .etape, .etape-num, .etape button { transition: none; } }
@media (forced-colors: active) {
  .telephone, .tel-corps { border: 2px solid CanvasText; }
  .tel-bouton, .tel-ecran::after { display: none; }
  .etape-num { border-color: CanvasText; }
  .etape.actif .etape-num { border-width: 4px; background: Canvas; color: CanvasText; } /* l'étape en cours : contour épais */
}
