/* Klein Production — v6 : un voyage à travers quatre mondes (espace, plan, papier, cinéma) */
@property --texte { syntax: "<color>"; inherits: true; initial-value: #eef2ff; }
@property --doux { syntax: "<color>"; inherits: true; initial-value: #a3acc9; }
@property --trait { syntax: "<color>"; inherits: true; initial-value: rgba(160, 180, 255, .16); }
@property --verre { syntax: "<color>"; inherits: true; initial-value: rgba(6, 10, 26, .62); }
@property --voile { syntax: "<color>"; inherits: true; initial-value: rgba(1, 3, 10, .82); }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #9fb6ff; }
@property --fond { syntax: "<color>"; inherits: true; initial-value: #01030a; }
@property --plein { syntax: "<color>"; inherits: true; initial-value: #eef2ff; }
@property --sur-plein { syntax: "<color>"; inherits: true; initial-value: #01030a; }

:root {
  --bleu: #002fa7;      /* bleu Klein */
  --vif: #4a74ff;       /* bleu Klein éclairé */
  --g: clamp(1.2rem, 5vw, 4.5rem);
  --f: "Archivo", system-ui, sans-serif;
  --sortie: cubic-bezier(.16, 1, .3, 1);
  transition: --texte .7s, --doux .7s, --trait .7s, --verre .7s, --voile .7s, --accent .7s, --fond .7s, --plein .7s, --sur-plein .7s;
}
/* les mondes : couleurs du texte et des surfaces (le fond, lui, est peint par cosmos.js) */
[data-monde="plan"] { --texte: #ffffff; --doux: #c2d0ff; --trait: rgba(220, 230, 255, .38); --verre: rgba(0, 30, 120, .55); --voile: rgba(1, 28, 112, .8); --accent: #ffffff; --fond: #04238c; --plein: #ffffff; --sur-plein: #002fa7; }
[data-monde="papier"] { --texte: #0a1033; --doux: #3d4566; --trait: rgba(10, 16, 51, .2); --verre: rgba(255, 255, 255, .72); --voile: rgba(236, 238, 243, .88); --accent: #002fa7; --fond: #eceef3; --plein: #002fa7; --sur-plein: #ffffff; }
[data-monde="atelier"] { --texte: #eef0f4; --doux: #9ba1b0; --trait: rgba(220, 225, 235, .16); --verre: rgba(14, 16, 22, .62); --voile: rgba(10, 11, 15, .82); --accent: #ffab6b; --fond: #0a0b0e; --plein: #eef0f4; --sur-plein: #0a0b0e; }
[data-monde="cinema"] { --texte: #f7eee2; --doux: #bba996; --trait: rgba(247, 238, 226, .2); --verre: rgba(20, 12, 8, .62); --voile: rgba(10, 7, 5, .82); --accent: #ff9a4d; --fond: #0b0806; --plein: #f7eee2; --sur-plein: #0b0806; }

*, *::before, *::after { box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1.0625rem/1.65 var(--f); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 112%; letter-spacing: -.028em; line-height: 1; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--vif); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 99; background: var(--vif); color: #fff; padding: .6rem 1rem; }
.skip:focus { left: .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* hauteur du plus grand écran (barre d'adresse repliée) : pas de bande vide en bas sur les grands téléphones */
#cosmos { position: fixed; inset: 0 0 auto; width: 100%; height: 100vh; height: 100lvh; display: block; }
.no3d #cosmos { display: none; }
main, .foot { position: relative; z-index: 1; }

@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: .5s var(--sortie) both vt-sortie; }
  ::view-transition-new(root) { animation: 1s var(--sortie) both vt-entree; }
}
@keyframes vt-sortie { to { opacity: 0; } }
@keyframes vt-entree { from { opacity: 0; } }

/* Boutons et liens */
.btn {
  display: inline-block; padding: .95rem 1.6rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--plein); color: var(--sur-plein); font: 700 1rem var(--f); font-stretch: 108%; text-decoration: none;
  transition: transform .3s var(--sortie), box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-sm { padding: .6rem 1.1rem; font-size: .92rem; }
.lien { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; text-decoration: none; }
.lien::after { content: ""; width: 2.2rem; height: 1px; background: currentColor; transition: width .4s var(--sortie); }
.lien:hover::after { width: 3.4rem; }
.mail { font-weight: 600; text-underline-offset: .3em; text-decoration-color: var(--trait); }

/* En-tête */
.top { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; gap: 1.8rem; padding: 1.2rem var(--g); }
.logo { display: flex; align-items: center; gap: .6rem; white-space: nowrap; text-decoration: none; font-weight: 800; font-stretch: 118%; letter-spacing: -.01em; }
.logo i { width: .85rem; height: .85rem; background: var(--bleu); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset; }
.top nav { display: flex; gap: 1.8rem; margin-left: auto; }
.top nav a { text-decoration: none; color: var(--doux); transition: color .2s; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--texte); }
.top nav .nav-contact, .menu-btn { display: none; }
.menu-btn, .son-btn { height: 2.4rem; border-radius: 999px; border: 1px solid var(--trait); background: var(--verre); color: var(--texte); font: 600 .9rem var(--f); cursor: pointer; backdrop-filter: blur(10px); }
.menu-btn { padding: 0 1rem; }
.son-btn { display: flex; align-items: center; gap: 3px; padding: 0 .85rem; }
.son-btn i { width: 2px; height: 14px; border-radius: 2px; background: var(--doux); transform: scaleY(.25); transition: transform .4s, background .3s; }
.son-btn[aria-pressed="true"] i { background: var(--texte); animation: barre .9s ease-in-out infinite alternate; }
.son-btn[aria-pressed="true"] i:nth-child(2) { animation-delay: -.35s; }
.son-btn[aria-pressed="true"] i:nth-child(3) { animation-delay: -.6s; }
.son-btn[aria-pressed="true"] i:nth-child(4) { animation-delay: -.15s; }
@keyframes barre { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* Sommaire du voyage (à droite) */
.plan-vol {
  position: fixed; right: var(--g); top: 50%; z-index: 20; transform: translateY(-50%);
  display: grid; gap: .9rem; justify-items: end; opacity: 0; transition: opacity .6s;
}
.en-vol .plan-vol { opacity: 1; }
.plan-vol a { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--doux); font-size: .82rem; }
.plan-vol a::after { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--doux); transition: background .4s, border-color .4s; }
.plan-vol span { opacity: 0; transform: translateX(6px); transition: opacity .4s, transform .4s; }
.plan-vol a.on, .plan-vol a:hover { color: var(--texte); }
.plan-vol a.on::after { background: var(--texte); border-color: var(--texte); }
.plan-vol a.on span, .plan-vol a:hover span { opacity: 1; transform: none; }

/* Chapitres : épinglés pendant que la démo avance (--p de 0 à 1) */
.chapitre { position: relative; height: 250vh; }
.cadre {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: 5rem calc(var(--g) + 7rem) 3rem var(--g);
}
.texte { display: grid; gap: 1.4rem; justify-items: start; }
.texte h1 { font-size: clamp(3rem, 6.8vw, 7.4rem); }
.mot-cle { font: italic 600 1.12em/1 "Bodoni Moda", serif; letter-spacing: -.01em; }
.texte h2 { font-size: clamp(2.3rem, 4.6vw, 4.8rem); }
.texte p { color: var(--doux); font-size: clamp(1.05rem, 1.25vw, 1.25rem); max-width: 34ch; }
.texte .chapo { color: var(--texte); }
.repere { font-size: .95rem !important; color: var(--accent) !important; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: .6rem; }
.indice { display: flex; align-items: center; gap: .9rem; font-size: .92rem; margin-top: 1.2rem; }
.indice i { position: relative; width: 1px; height: 3rem; background: var(--trait); overflow: hidden; }
.indice i::after { content: ""; position: absolute; inset: 0; background: var(--texte); animation: goutte 2.2s var(--sortie) infinite; }
@keyframes goutte { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
.demo { position: relative; justify-self: center; width: 100%; max-width: 46rem; }

/* Chaque monde a sa typographie */
.chapitre:is([data-monde="espace"], [data-monde="atelier"]) .texte :is(h1, h2, p) { text-shadow: 0 2px 24px rgba(1, 3, 10, .9); }
.chapitre[data-monde="plan"] .texte :is(h1, h2) { font-weight: 300; font-stretch: 68%; letter-spacing: -.01em; line-height: .95; }
.chapitre[data-monde="plan"] .texte h2 { font-size: clamp(2.8rem, 5.6vw, 6rem); }
.chapitre[data-monde="papier"] .texte :is(h1, h2) { font-weight: 900; font-stretch: 125%; letter-spacing: -.045em; line-height: .9; }
.chapitre[data-monde="cinema"] .texte :is(h1, h2) { font-weight: 250; font-stretch: 125%; letter-spacing: .06em; line-height: 1.05; }
.chapitre[data-monde="cinema"] .texte h2 { font-size: clamp(2rem, 4vw, 4.2rem); }
.chapitre[data-monde="cinema"] .texte h1 { font-size: clamp(2.6rem, 4.8vw, 5.4rem); }

/* Contenus après le voyage, sur un voile aux couleurs du monde */
.bloc { position: relative; padding: clamp(5rem, 11vw, 9rem) var(--g); background: linear-gradient(transparent, var(--voile) 14%, var(--voile) 86%, transparent); }
.bloc > h2 { font-size: clamp(2.2rem, 4.4vw, 4.4rem); max-width: 16ch; margin-bottom: clamp(2.6rem, 6vw, 4.5rem); }
.bloc > .intro { color: var(--doux); font-size: clamp(1.08rem, 1.4vw, 1.25rem); max-width: 46ch; margin: -1.6rem 0 clamp(2.6rem, 6vw, 4.5rem); }
.fade { opacity: 0; transform: translateY(22px); transition: opacity 1.1s var(--sortie), transform 1.1s var(--sortie); }
.fade.in, .no3d .fade { opacity: 1; transform: none; }
.details h3 { font-size: 1.3rem; font-stretch: 108%; line-height: 1.15; margin-bottom: .6rem; }
.details p { color: var(--doux); max-width: 32ch; }
.details { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 3vw, 3rem); }
.details li { padding: 1.6rem 0 2.4rem; border-top: 1px solid var(--trait); }
.liaisons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.liaisons a { display: grid; gap: .6rem; padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: 1.2rem; border: 1px solid var(--trait); background: var(--verre); text-decoration: none; transition: border-color .4s, transform .5s var(--sortie); }
.liaisons a:hover { border-color: var(--accent); transform: translateY(-3px); }
.liaisons b { font-size: 1.35rem; font-stretch: 108%; }
.liaisons span { color: var(--doux); }
.appel { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; padding-top: clamp(4rem, 9vw, 7rem); }
.appel h2 { font-size: clamp(2.4rem, 5vw, 5rem); max-width: 12ch; }
.appel p { color: var(--doux); max-width: 38ch; margin-top: 1.2rem; }

/* Formulaire de contact (fin de chaque page) : il prend les couleurs du monde */
.contact-fin { scroll-margin-top: 4.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.cf-intro { display: grid; gap: 1.3rem; position: sticky; top: 7rem; }
.cf-intro h2 { font-size: clamp(2.4rem, 5vw, 5rem); max-width: 12ch; }
.cf-intro p { color: var(--doux); max-width: 38ch; font-size: 1.1rem; }
.cf-direct { font-size: 1rem !important; }
.cf-reseaux { display: flex; gap: .75rem; }
.cf-reseaux a { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--trait); background: var(--verre); color: var(--texte); transition: background .2s, color .2s, border-color .2s, transform .2s; }
.cf-reseaux a:hover, .cf-reseaux a:focus-visible { background: var(--plein); color: var(--sur-plein); border-color: var(--plein); transform: translateY(-2px); }
.cf-reseaux svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.contact { display: grid; gap: 1.2rem; padding: clamp(1.4rem, 3vw, 2.6rem); border-radius: 1.4rem; background: var(--verre); border: 1px solid var(--trait); backdrop-filter: blur(16px); }
.cf-besoin { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; }
.cf-besoin legend { padding: 0; margin-bottom: .6rem; color: var(--doux); }
.cf-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.choix { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix label { cursor: pointer; }
.choix input { position: absolute; opacity: 0; }
.choix span { display: block; padding: .55rem 1.05rem; border-radius: 999px; border: 1px solid var(--trait); transition: background .2s, color .2s, border-color .2s; }
.choix label:hover span { border-color: var(--texte); }
.choix input:checked + span { background: var(--plein); border-color: var(--plein); color: var(--sur-plein); }
.choix input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field { display: grid; gap: .35rem; color: var(--doux); font-size: .95rem; }
.field small { font-size: .82rem; opacity: .8; }
.field :is(input, textarea, select) { font: inherit; font-size: 1.05rem; color: var(--texte); background: transparent; border: 0; border-bottom: 1px solid var(--trait); padding: .55rem 0; border-radius: 0; resize: vertical; transition: border-color .3s; }
.field select { appearance: none; cursor: pointer; background: linear-gradient(45deg, transparent 50%, currentColor 50%) right .35rem top 55% / .4rem .4rem no-repeat, linear-gradient(-45deg, transparent 50%, currentColor 50%) right 0 top 55% / .4rem .4rem no-repeat; }
.field select option { color: #0a1033; }
.field :is(input, textarea, select):focus { outline: none; border-bottom-color: var(--texte); }
.field textarea { height: 6.5rem; }
.field textarea::placeholder { color: var(--doux); opacity: .6; }
.field [aria-invalid="true"] { border-bottom-color: #ff6b6b; }
.cf-delai { max-width: 18rem; }
.cf-envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.cf-envoi .btn:disabled { opacity: .6; cursor: wait; }
.note { font-size: .88rem; color: var(--doux); }
.cf-merci { display: grid; gap: .6rem; font-size: 1.1rem; color: var(--doux); }
.cf-merci strong { font-size: clamp(1.6rem, 3vw, 2.4rem); font-stretch: 112%; line-height: 1.1; color: var(--texte); }
.contact.envoye { animation: monte .6s var(--sortie); }
.secoue { animation: secoue .45s; }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
@keyframes secoue { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (max-width: 900px) {
  .contact-fin { grid-template-columns: 1fr; gap: 1.3rem; }
  /* le formulaire juste sous le titre ; l'e-mail et les réseaux passent dessous */
  .cf-intro { display: contents; }
  .contact-fin > .contact { margin-block: 1.2rem; }
  .cf-direct, .cf-reseaux { order: 1; }
}
/* téléphone : le formulaire tient en un écran (deux champs par ligne, message plus court) */
@media (max-width: 600px) {
  .contact { padding: 1.1rem; gap: .85rem; }
  .cf-ligne { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
  .field input { min-width: 0; }
  .choix span { padding: .4rem .8rem; font-size: .92rem; }
  .field { gap: .1rem; font-size: .88rem; }
  .field small { display: none; }
  .field :is(input, select) { padding: .4rem 0; }
  .field textarea { height: 4.6rem; }
  .cf-envoi { gap: .5rem 1rem; }
  .note { font-size: .78rem; }
}
/* Page suivante */
.suivant { display: block; padding: clamp(5rem, 11vw, 9rem) var(--g) 0; text-decoration: none; }
.suivant span { display: block; color: var(--doux); margin-bottom: .8rem; }
.suivant strong { display: block; font-size: clamp(2.8rem, 8vw, 8rem); font-weight: 800; font-stretch: 112%; line-height: .95; letter-spacing: -.035em; transition: color .4s; }
.suivant:hover strong { color: var(--accent); }

/* Pied de page */
.foot { padding: clamp(5rem, 10vw, 8rem) var(--g) 2rem; color: var(--doux); background: linear-gradient(transparent, var(--fond) 30%); }
.foot-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; padding-bottom: 2.4rem; border-bottom: 1px solid var(--trait); }
.foot-haut .logo, .foot-haut .mail { color: var(--texte); }
.foot-haut nav { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; }
.foot a { text-decoration: none; }
.foot nav a:hover, .foot-bas a:hover { color: var(--texte); }
.foot-haut .mail { margin-left: auto; }
.foot-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; font-size: .88rem; }
.foot-bas .reseaux { display: flex; gap: 1.4rem; }

/* Mentions légales */
.page { position: relative; z-index: 1; padding: 8rem var(--g) 5rem; max-width: 52rem; }
.page h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 2.5rem; }
.page h2 { font-size: 1.35rem; margin: 2.5rem 0 .8rem; }
.page p { max-width: 68ch; margin: 0 0 .9rem; color: var(--doux); }
.todo { background: #5c4a00; color: #ffe27a; padding: 0 .25em; }

/* ——— DÉMOS ——— */

/* Plan : cote au-dessus du titre et cartouche d'architecte, tracés au défilement */
.cote { display: flex; align-items: center; gap: .6rem; width: min(100%, 26rem); font-size: .85rem; color: var(--doux); font-variant-numeric: tabular-nums; }
.cote i { position: relative; flex: 1; height: 1px; background: currentColor; transform: scaleX(min(calc(var(--p, 0) * 4), 1)); }
.cote i:first-child { transform-origin: right; }
.cote i:last-child { transform-origin: left; }
.cote i::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: currentColor; }
.cote i:first-child::after { left: 0; }
.cote i:last-child::after { right: 0; }
.cartouche {
  display: grid; grid-template-columns: auto 1fr; margin-top: 1rem; width: min(100%, 24rem); border: 1px solid var(--trait); font-size: .88rem;
  clip-path: inset(0 calc(100% - min(var(--p, 0) * 300%, 100%)) 0 0);
}
.cartouche > * { padding: .45rem .8rem; border-bottom: 1px solid var(--trait); }
.cartouche > :nth-last-child(-n+2) { border-bottom: 0; }
.cartouche span { color: var(--doux); border-right: 1px solid var(--trait); }
.cartouche b { font-weight: 500; }

/* Papier : la chaîne d'automatisations qui se coche */
.chaine { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .1rem; width: min(100%, 26rem); }
.chaine li { position: relative; display: flex; align-items: center; gap: .9rem; padding: .55rem 0; color: var(--doux); transition: color .4s; }
.chaine li i { position: relative; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid var(--trait); transition: background .4s, border-color .4s, transform .5s var(--sortie); }
.chaine li i::after { content: ""; position: absolute; left: .45rem; top: .22rem; width: .38rem; height: .7rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .4s var(--sortie) .1s; }
.chaine li:not(:last-child)::before { content: ""; position: absolute; left: .72rem; top: 2.1rem; width: 1.5px; height: calc(100% - 1.6rem); background: var(--accent); transform-origin: top; transform: scaleY(0); transition: transform .5s var(--sortie) .15s; }
.chaine li.on { color: var(--texte); }
.chaine li.on i { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.chaine li.on i::after { transform: rotate(45deg) scale(1); }
.chaine li.on:not(:last-child)::before { transform: scaleY(1); }

/* Cinéma : générique en typographie animée */
.mots { display: grid; justify-items: center; text-align: center; margin: 0; }
.mots > * {
  grid-area: 1 / 1; font-weight: 200; font-stretch: 125%; font-size: clamp(2.4rem, 4.4vw, 6rem); letter-spacing: .04em; line-height: 1; white-space: nowrap;
  opacity: 0; filter: blur(14px); transform: scale(1.25); transition: opacity .7s, filter .9s, transform 1.4s var(--sortie), letter-spacing 1.6s var(--sortie);
}
.mots > .courant { opacity: 1; filter: none; transform: none; letter-spacing: .1em; }
.mots > .on:not(.courant) { opacity: 0; filter: blur(8px); transform: translateY(-.35em) scale(.92); }
.viseur { position: absolute; inset: auto 0 -3.2rem; display: flex; justify-content: space-between; font-size: .85rem; color: var(--doux); font-variant-numeric: tabular-nums; letter-spacing: .08em; }

/* Démo sites web : du plan au site fini (étapes : tracé, cotes, mots, couleurs, mobile) */
.maquette { display: grid; justify-items: center; gap: 1.4rem; }
.ecran {
  --l: rgba(255, 255, 255, .8);
  width: min(100%, 40rem); aspect-ratio: 16 / 11; display: grid; grid-template-rows: auto auto 1fr auto; gap: .9rem; padding: 0 0 1rem;
  border: 1px dashed var(--l); border-radius: .5rem; overflow: hidden; font-size: clamp(.7rem, 1vw, .9rem); color: #fff;
  clip-path: inset(0 0 calc(100% - min(var(--p, 0) * 900%, 100%)) 0);
  transition: width 1.2s var(--sortie), aspect-ratio 1.2s var(--sortie), background .9s, color .9s, border-color .9s, box-shadow .9s, border-radius 1s;
}
.ecran > *, .ecran .m-cartes > * { position: relative; border: 1px dashed var(--l); border-radius: .3rem; transition: border-color .9s, background .9s, opacity .6s; }
.ecran > * { margin: 0 1rem; }
.m-barre { display: flex; align-items: center; gap: .35rem; margin: 0 !important; padding: .5rem .8rem; border-width: 0 0 1px !important; border-radius: 0 !important; }
.m-barre i { width: .5rem; height: .5rem; border-radius: 50%; border: 1px solid var(--l); }
.m-barre span { margin-left: 1rem; opacity: .7; }
.m-nav { display: flex; align-items: center; gap: 1rem; padding: .5rem .8rem; }
.m-nav span { width: 3rem; height: .35rem; border-radius: 1rem; background: var(--l); opacity: .5; }
.m-nav b { margin-right: auto; }
.m-nav em { font-style: normal; padding: .25rem .7rem; border: 1px solid var(--l); border-radius: 1rem; }
.m-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; padding: 1rem; border: 0 !important; }
.m-texte { display: grid; align-content: center; gap: .6rem; }
.m-titre { font-size: 2.1em; font-weight: 800; font-stretch: 112%; line-height: 1; letter-spacing: -.02em; }
.m-ligne { height: .4rem; border-radius: 1rem; background: var(--l); opacity: .45; }
.m-ligne.court { width: 70%; }
.m-bouton { justify-self: start; padding: .45rem .9rem; border: 1px solid var(--l); border-radius: 2rem; }
.m-image { border: 1px dashed var(--l); border-radius: .4rem; background: linear-gradient(to top right, transparent calc(50% - .5px), var(--l) 50%, transparent calc(50% + .5px)); min-height: 7rem; }
.m-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; border: 0 !important; }
.m-cartes > * { height: 3.4rem; }
/* mots et cotes cachés au début */
.ecran :is(.m-titre, .m-bouton, .m-nav b, .m-nav em, .m-barre span) { opacity: 0; transition: opacity .6s; }
.ecran .m-titre::after, .ecran .m-cartes::after { position: absolute; font-size: .78rem; font-weight: 400; letter-spacing: 0; color: #c2d0ff; opacity: 0; transition: opacity .6s; }
.ecran .m-titre { position: relative; }
.ecran .m-titre::after { content: "Titre : Archivo 800, 72 px"; left: 0; top: -1.6em; }
.ecran .m-cartes { position: relative; }
.ecran .m-cartes::after { content: "3 colonnes, 24 px d'écart"; right: 0; bottom: -1.5em; }
.maquette .legendes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font-size: .88rem; color: var(--doux); }
.maquette .legendes li { transition: color .4s; }
.maquette .legendes li.courant { color: var(--texte); }
.maquette .legendes li::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; border: 1px solid currentColor; vertical-align: .05em; }
.maquette .legendes li.on::before { background: currentColor; }
[data-etape="2"] .ecran :is(.m-titre, .m-cartes)::after, [data-etape="3"] .ecran :is(.m-titre, .m-cartes)::after { opacity: 1; }
:is([data-etape="3"], [data-etape="4"], [data-etape="5"]) .ecran :is(.m-titre, .m-bouton, .m-nav b, .m-nav em, .m-barre span) { opacity: 1; }
:is([data-etape="4"], [data-etape="5"]) .ecran {
  --l: transparent; background: #f4f5f8; color: #0a1033; border: 1px solid #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 20, .7);
}
:is([data-etape="4"], [data-etape="5"]) .ecran .m-barre { background: #e3e6ee; }
:is([data-etape="4"], [data-etape="5"]) .ecran .m-barre i { background: #c3c8d6; }
:is([data-etape="4"], [data-etape="5"]) .ecran .m-nav span, :is([data-etape="4"], [data-etape="5"]) .ecran .m-ligne { background: #0a1033; opacity: .18; }
:is([data-etape="4"], [data-etape="5"]) .ecran .m-nav em, :is([data-etape="4"], [data-etape="5"]) .ecran .m-bouton { background: #002fa7; color: #fff; }
:is([data-etape="4"], [data-etape="5"]) .ecran .m-image { background: radial-gradient(circle at 70% 30%, #ffb36b, transparent 45%), linear-gradient(150deg, #4a74ff, #002fa7 60%, #0a1033); }
:is([data-etape="4"], [data-etape="5"]) .ecran .m-cartes > * { background: #fff; box-shadow: 0 6px 18px -8px rgba(10, 16, 51, .3); }
[data-etape="5"] .ecran { width: min(100%, 15rem); aspect-ratio: 9 / 18; border-radius: 1.6rem; border: 6px solid #0a1033; }
[data-etape="5"] .ecran .m-hero { grid-template-columns: 1fr; }
[data-etape="5"] .ecran .m-nav span { display: none; }
[data-etape="5"] .ecran .m-cartes { grid-template-columns: 1fr; }
[data-etape="5"] .ecran .m-cartes > :nth-child(n+2) { display: none; }

/* Démo logiciels : une réservation déclenche tout le reste */
.appli { position: relative; }
.a-fenetre { display: grid; grid-template-columns: 9.5rem 1fr; min-height: 22rem; border-radius: 1rem; overflow: hidden; background: #fff; color: #0a1033; box-shadow: 0 30px 70px -30px rgba(10, 16, 51, .45), 0 0 0 1px rgba(10, 16, 51, .08); font-size: .92rem; }
.a-cote { display: grid; align-content: start; gap: .3rem; padding: 1.1rem .9rem; background: #0a1033; color: #aab3d6; }
.a-cote b { color: #fff; margin-bottom: 1rem; font-stretch: 112%; }
.a-cote span { padding: .35rem .6rem; border-radius: .4rem; }
.a-cote span.actif { background: rgba(255, 255, 255, .1); color: #fff; }
.a-corps { display: grid; align-content: start; gap: .55rem; padding: 1.3rem; }
.a-resa { display: grid; gap: .15rem; padding: .9rem 1rem; margin-bottom: .6rem; border-radius: .7rem; background: #eef2ff; border: 1px solid #c9d4ff; opacity: 0; transform: translateY(-12px) scale(.97); transition: opacity .5s, transform .7s var(--sortie); }
.a-resa small { color: #002fa7; font-weight: 600; }
.a-resa b { font-size: 1.15rem; font-stretch: 108%; }
.a-resa span { color: #3d4566; }
.a-resa.on { opacity: 1; transform: none; animation: sonne 1s var(--sortie); }
@keyframes sonne { 0% { box-shadow: 0 0 0 0 rgba(0, 47, 167, .45); } 100% { box-shadow: 0 0 0 18px rgba(0, 47, 167, 0); } }
.a-etape { display: flex; align-items: center; gap: .8rem; padding: .55rem .2rem; color: #9aa1bb; border-bottom: 1px solid #eef0f5; transition: color .4s; }
.a-etape i { position: relative; flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 1.5px solid #c9cede; transition: background .4s, border-color .4s; }
.a-etape i::after { content: ""; position: absolute; left: .38rem; top: .17rem; width: .32rem; height: .6rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .4s var(--sortie) .1s; }
.a-etape em { margin-left: auto; font-style: normal; font-size: .8rem; color: #002fa7; opacity: 0; transition: opacity .4s .2s; }
.a-etape.on { color: #0a1033; }
.a-etape.on i { background: #002fa7; border-color: #002fa7; }
.a-etape.on i::after { transform: rotate(45deg) scale(1); }
.a-etape.on em { opacity: 1; }
.a-toast { position: absolute; right: -1rem; bottom: -1.4rem; padding: .9rem 1.2rem; border-radius: .8rem; background: #0a1033; color: #fff; box-shadow: 0 20px 40px -16px rgba(10, 16, 51, .6); opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .7s var(--sortie); }
.a-toast.on { opacity: 1; transform: none; }

/* Démo audiovisuel : table de montage */
.montage { display: grid; gap: .8rem; width: min(100%, 44rem); }
.m-moniteur { position: relative; aspect-ratio: 2.39 / 1; display: grid; place-items: center; background: #050302; border: 1px solid var(--trait); overflow: hidden; }
.m-moniteur .pas { display: grid; }
.m-moniteur .pas > * { grid-area: 1 / 1; text-align: center; font-weight: 250; font-stretch: 125%; letter-spacing: .14em; font-size: clamp(1.1rem, 2.4vw, 2rem); opacity: 0; transform: scale(1.06); transition: opacity .5s, transform 2s var(--sortie); }
.m-moniteur .pas > .courant { opacity: 1; transform: none; }
.m-pistes { position: relative; display: grid; gap: .35rem; padding: .7rem 0; font-size: .75rem; color: var(--doux); }
.m-piste { display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: .5rem; }
.m-piste div { position: relative; height: 1.6rem; }
.m-piste b { position: absolute; top: 0; bottom: 0; border-radius: .25rem; font-weight: 500; padding: .2rem .4rem; overflow: hidden; white-space: nowrap; color: #1a0f06; }
.m-piste.v b { background: #ff9a4d; }
.m-piste.t b { background: #f7eee2; }
.m-piste.a b { background: repeating-linear-gradient(90deg, rgba(255, 154, 77, .9) 0 2px, transparent 2px 4px) 0 50% / 100% 70% no-repeat, rgba(255, 154, 77, .2); }
.m-tete { position: absolute; top: 0; bottom: 0; left: calc(2.5rem + (100% - 2.5rem) * var(--p, 0)); width: 2px; background: #fff; box-shadow: 0 0 10px #fff; }
.m-tete::before { content: ""; position: absolute; top: -.4rem; left: -.35rem; border: .4rem solid transparent; border-top-color: #fff; }
.montage .viseur { position: static; }

@media (max-width: 1000px) {
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .top > .btn, .top nav, .plan-vol { display: none; }
  .son-btn { margin-left: auto; }
  .menu-btn { display: block; }
  .menu-ouvert .top nav {
    position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: column; justify-content: center; gap: .3rem;
    padding: 6rem var(--g) 3rem; background: var(--voile); backdrop-filter: blur(24px);
  }
  .menu-ouvert .top nav a { color: var(--texte); font-size: clamp(2.2rem, 10vw, 3.4rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.2; }
  .menu-ouvert .top nav .nav-contact { display: block; color: var(--accent); }
  /* en portrait : la forme en haut, le texte en bas ; une démo passe au-dessus du texte */
  .cadre { grid-template-columns: minmax(0, 1fr); align-content: end; padding: 5rem var(--g) 9vh; gap: 1.4rem; }
  .cadre:has(.demo) { align-content: center; }
  .texte { gap: 1rem; }
  .texte p { font-size: 1rem; }
  /* l'en-tête garde un voile : le texte qui défile ne se mélange plus au logo */
  .top::before { content: ""; position: absolute; inset: 0 0 -2rem; z-index: -1; pointer-events: none; background: linear-gradient(var(--fond) 65%, transparent); }
  /* le texte porte son propre voile aux couleurs du monde : les particules et l'écran 3D passent derrière, où que soit le texte
     (il s'efface avant le bas du cadre : pas de ligne quand la barre d'adresse se replie) */
  .cadre:not(:has(.demo)) .texte { position: relative; }
  .cadre:not(:has(.demo)) .texte::before { content: ""; position: absolute; inset: -3.5rem calc(-1 * var(--g)) -9vh; z-index: -1; pointer-events: none; background: linear-gradient(transparent, var(--voile) 3.5rem, var(--voile) calc(100% - 9vh), transparent); }
  .cartouche { display: none; }
  .demo { order: -1; }
  .demo:has(.viseur:last-child) { margin-bottom: 2.6rem; }
  .mots > * { font-size: clamp(2rem, 9vw, 4rem); }
  [data-etape="5"] .ecran { aspect-ratio: 9 / 12.5; }
  .viseur { bottom: -2rem; }
  .cadre:has(.demo) .texte .lien, .cadre:has(.demo) .texte p:not(.chapo) { display: none; }
  .ecran { width: min(100%, 22rem); }
  .a-fenetre { grid-template-columns: 1fr; min-height: 0; }
  .a-cote { display: none; }
  .a-toast { right: .5rem; }
  .liaisons { grid-template-columns: 1fr; }
  .foot-haut .mail { margin-left: 0; }
}
@media (max-width: 600px) {
  .details { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Démo sites web : la recherche qui se tape au défilement */
.recherche { display: grid; gap: .9rem; width: min(100%, 34rem); }
.r-champ { display: flex; align-items: center; gap: .9rem; min-height: 3.4rem; padding: .8rem 1.3rem; border: 1px solid var(--trait); border-radius: 999px; background: var(--verre); font-size: 1.05rem; }
.r-champ::before { content: ""; flex: none; width: .8rem; height: .8rem; border: 2px solid currentColor; border-radius: 50%; }
.r-champ span::after { content: ""; display: inline-block; width: 1px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: currentColor; animation: clignote 1s steps(1) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
.recherche ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.r-resultat { display: grid; gap: .25rem; padding: 1rem 1.3rem; border: 1px dashed var(--trait); border-radius: .9rem; opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .7s var(--sortie); }
.r-resultat.on { opacity: 1; transform: none; }
.r-resultat small { color: var(--doux); }
.r-resultat b:empty, .r-resultat span:empty { display: block; height: .55rem; width: 60%; border-radius: 1rem; background: var(--trait); }
.r-resultat span:empty { width: 85%; }
.r-resultat.vous { background: #fff; color: #0a1033; border: 0; box-shadow: 0 24px 50px -20px rgba(0, 0, 30, .6); }
.r-resultat.vous small { color: #002fa7; }
.r-resultat.vous b { font-size: 1.15rem; font-stretch: 108%; }
.r-resultat.vous span { color: #3d4566; }

/* Invitation au son (première visite) */
.son-btn { position: relative; }
.son-btn::after {
  content: "Le voyage se vit avec le son"; position: absolute; top: calc(100% + .7rem); right: 0; padding: .55rem .9rem; border-radius: .7rem;
  background: var(--plein); color: var(--sur-plein); font: 600 .85rem var(--f); white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateY(-6px); transition: opacity .5s, transform .6s var(--sortie);
}
.son-btn.invite::after { opacity: 1; transform: none; }
.son-btn.invite { animation: appelle 1.6s ease-in-out 3; }
@keyframes appelle { 50% { box-shadow: 0 0 0 8px transparent, 0 0 0 1px var(--accent); } }


/* Raccourci : passer le voyage (défilement accéléré jusqu'à l'essentiel) */
.depart { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 1.2rem; }
.depart .indice { margin-top: 0; }
.raccourci { font-size: .92rem; color: var(--doux); text-underline-offset: .35em; text-decoration-color: var(--trait); transition: color .3s; }
.raccourci:hover { color: var(--texte); }

/* Méthode : quatre chapitres-étapes dans l'atelier (monde à part, plus courts que les autres chapitres) ;
   cosmos.js y fabrique un écran en 3D : croquis, fil de fer, matières, puis il s'allume et s'envole */
.chapitre.etape { height: 170vh; }
.etape .sur-etape { font-size: .95rem; font-weight: 600; color: var(--doux); max-width: 40ch; }
.etape .numero { margin: 0 0 -.4rem; font-weight: 200; font-stretch: 125%; font-size: clamp(4.2rem, 10vw, 9rem); line-height: .85; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--accent); }
.etape .numero span { margin-left: .08em; font-size: .28em; letter-spacing: 0; color: var(--doux); }

/* « Pas convaincu ? » : en fin de page, la même agence dans une tout autre interface (bureau.html) */
.autre-style { display: grid; justify-items: center; gap: 1.3rem; text-align: center; padding-block: clamp(4.5rem, 10vw, 8rem); }
.autre-style h2 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); }
.autre-style p { max-width: 46ch; color: var(--doux); font-size: 1.1rem; }

/* Chapitre « Le progrès » : on remonte en 1985 (tout en pixels), puis le progrès avance jusqu'à aujourd'hui */
.texte .annee { margin: 0; font-weight: 800; font-stretch: 125%; font-size: clamp(3.4rem, 9vw, 8.5rem); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--accent); }
.progres.pixel-on :is(.annee, h2) { font-family: "Press Start 2P", ui-monospace, monospace; font-weight: 400; font-stretch: 100%; letter-spacing: 0; text-shadow: 4px 4px 0 #002fa7; }
.progres.pixel-on .texte .annee { font-size: clamp(2.4rem, 6vw, 5.6rem); line-height: 1.1; color: #ffd84a; }
.progres.pixel-on h2 { font-size: clamp(1.3rem, 2.6vw, 2.4rem); line-height: 1.35; }
.progres.pixel-on p:not(.annee) { font-family: ui-monospace, "Courier New", monospace; }
