/* Myboook WebTech, direction « Rangement » (06/11/2026) : la charte de myboook.com.
   Monde clair et bleu : bleu #3074aa (boutons, texte blanc), encres #1a6aad / #2a6698, bleus nuit #06294a / #001d37,
   clair #eaf6fe, bordure #bfe1f7, gris bleute #e8eef5, texte #141414 / #525252, fond #f5f5f5, rayon 8px.
   Titres Space Grotesk 700, texte Inter. Tout est servi sur place (CSP font-src 'self'). */

@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/space-grotesk-var.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --page: #f5f5f5;
  --surface: #ffffff;
  --clair: #eaf6fe;
  --gris-bleu: #e8eef5;
  --bord: #d4d4d4;
  --bord-bleu: #bfe1f7;
  --texte: #141414;
  --doux: #525252;
  --bleu: #3074aa;
  --bleu-encre: #1a6aad;
  --bleu-fonce: #2a6698;
  --nuit: #06294a;
  --nuit-2: #001d37;
  --ok: #1d6b45;
  --err: #b3261e;

  /* Couleurs du plateau de l'accueil : la scene les change en direct (voir src/scene/accueil.js) */
  --fond: #eaf6fe;
  --encre: #06294a;
  --accent: #3074aa;

  --titre: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --corps: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --rayon: 8px;
  --gouttiere: max(16px, min(4.2vw, 64px));
  --large: 84rem;
  --section: clamp(4rem, 8.5vw, 8rem);
  --h-entete: 72px;
  --ombre-carte: 0 0 0 1px var(--bord-bleu), 0 2px 0 var(--bord-bleu), 0 30px 60px -28px rgba(0, 29, 55, .32);

  --z-entete: 30;
  --z-menu: 40;
  --z-evitement: 50;

  --sortie: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--h-entete) + 16px); background: var(--page); }
body {
  margin: 0; background: var(--page); color: var(--texte);
  font-family: var(--corps); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--titre); font-weight: 700; margin: 0; text-wrap: balance; color: var(--nuit); }
h1 { font-size: clamp(2.5rem, 5.4vw, 5.2rem); line-height: 1; letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1.03; letter-spacing: -.033em; }
h3 { font-size: clamp(1.22rem, 1.8vw, 1.5rem); line-height: 1.18; letter-spacing: -.02em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--bleu); color: #fff; }

.cadre { width: 100%; max-width: calc(var(--large) + 2 * var(--gouttiere)); margin-inline: auto; padding-inline: max(var(--gouttiere), env(safe-area-inset-left, 0px)) max(var(--gouttiere), env(safe-area-inset-right, 0px)); }
.evitement { position: absolute; left: 12px; top: -80px; z-index: var(--z-evitement); background: var(--nuit); color: #fff; padding: .6rem 1rem; border-radius: var(--rayon); font-weight: 600; }
.evitement:focus { top: 12px; }

/* ---------------------------------------------------------------- en-tete */
.entete { position: sticky; top: 0; z-index: var(--z-entete); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--gris-bleu); }
.entete__dedans { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); min-height: var(--h-entete); }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: 1.14rem; letter-spacing: -.02em; white-space: nowrap; color: var(--nuit); }
.logo b { font-weight: 700; color: var(--bleu); }
.logo img { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 1.9vw, 1.9rem); font-size: .97rem; font-weight: 500; }
.nav > a, .deroulant > summary { color: var(--doux); text-decoration: none; cursor: pointer; padding-block: .5rem; transition: color .18s ease; }
.nav > a:hover, .deroulant > summary:hover, .deroulant[open] > summary { color: var(--nuit); }
.nav > a[aria-current] { color: var(--nuit); text-decoration: underline; text-decoration-color: var(--bleu); text-underline-offset: .45em; text-decoration-thickness: 2px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.deroulant > summary { display: inline-flex; align-items: center; gap: .4rem; }
.deroulant > summary::after { content: ""; width: .42em; height: .42em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.12em) rotate(45deg); transition: transform .2s var(--sortie); }
.deroulant[open] > summary::after { transform: translateY(.1em) rotate(225deg); }
.deroulant__liste {
  position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-menu);
  background: var(--surface); border-bottom: 1px solid var(--bord-bleu); box-shadow: 0 24px 40px -24px rgba(0, 29, 55, .28);
  padding: clamp(1.2rem, 2.5vw, 2rem) max(var(--gouttiere), calc((100vw - var(--large)) / 2));
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem clamp(1rem, 2vw, 2rem);
}
.deroulant__liste a { display: block; padding: .85rem .9rem; border-radius: var(--rayon); text-decoration: none; transition: background .16s ease; }
.deroulant__liste a:hover, .deroulant__liste a:focus-visible { background: var(--clair); }
.deroulant__liste strong { display: block; font-family: var(--titre); font-size: 1.08rem; letter-spacing: -.015em; color: var(--nuit); margin-bottom: .15rem; }
.deroulant__liste span { display: block; font-size: .9rem; line-height: 1.4; color: var(--doux); }
.deroulant__liste a[aria-current] strong { color: var(--bleu); }
.entete__droite { margin-left: auto; display: flex; align-items: center; gap: clamp(.75rem, 1.6vw, 1.4rem); }
.langues { display: inline-flex; gap: .2rem; font-size: .78rem; font-weight: 600; letter-spacing: .03em; }
.langues a { color: var(--doux); text-decoration: none; padding: .32rem .45rem; border-radius: 6px; }
.langues a:hover { color: var(--nuit); background: var(--clair); }
.langues a[aria-current] { color: var(--nuit); background: var(--clair); box-shadow: inset 0 0 0 1px var(--bord-bleu); }
.tiroir { display: none; }

/* ---------------------------------------------------------------- boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: var(--bleu); color: #fff; font: 600 1.06rem/1.2 var(--corps); letter-spacing: -.005em;
  padding: 1rem 1.4rem 1.05rem; border: 0; border-radius: var(--rayon); text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--nuit);
  transition: background-color .15s linear, transform .09s ease-out, box-shadow .09s ease-out;
}
.bouton:hover { background: var(--bleu-fonce); }
.bouton:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--nuit); }
.bouton:focus-visible { outline: 3px solid var(--nuit); outline-offset: 4px; }
.bouton[disabled] { opacity: .7; cursor: progress; }
.bouton--petit { padding: .6rem .95rem .64rem; font-size: .92rem; box-shadow: 0 3px 0 var(--nuit); white-space: nowrap; }
.bouton--petit:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--nuit); }
.boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.5rem; }
.lien { color: var(--bleu-encre); font-weight: 600; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; text-decoration-color: var(--bord-bleu); transition: text-decoration-color .18s ease, color .18s ease; }
.lien:hover { color: var(--nuit); text-decoration-color: currentColor; }
.lien--fleche { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.lien--fleche::after { content: "\2192"; transition: transform .25s var(--sortie); }
.lien--fleche:hover::after { transform: translateX(4px); }

/* ---------------------------------------------------------------- sections */
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--gris-bleu); }
.section--serree { padding-block: clamp(3rem, 5vw, 4.5rem); }
.section__titre { max-width: 22ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section__intro { max-width: 40rem; color: var(--doux); margin: -1.4rem 0 clamp(2rem, 4vw, 3.2rem); font-size: 1.12rem; }

/* Savoir-faire : lignes reglees cliquables */
.rangs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 5rem); border-bottom: 1px solid var(--bord-bleu); }
.rangs a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding-block: 1.35rem; border-top: 1px solid var(--bord-bleu); text-decoration: none; }
.rangs h3 { transition: color .2s ease; }
.rangs p { grid-column: 1; color: var(--doux); font-size: 1rem; }
.rangs a::after { content: "\2192"; grid-column: 2; grid-row: 1; color: var(--bleu); transition: transform .3s var(--sortie); }
.rangs a:hover h3 { color: var(--bleu); }
.rangs a:hover::after { transform: translateX(5px); }

/* Realisations */
.cas { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.cas + .cas { margin-top: clamp(3rem, 6vw, 5.5rem); }
.cas--inverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.cas--inverse > :first-child { order: 2; }
.cas__image { display: block; border-radius: var(--rayon); overflow: hidden; background: var(--surface); box-shadow: var(--ombre-carte); }
.cas__image img { width: 100%; transition: transform .9s var(--sortie); }
a.cas__image:hover img { transform: scale(1.018); }
.cas h2, .cas h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.05; letter-spacing: -.03em; margin-bottom: .7rem; }
.cas h2 a, .cas h3 a { text-decoration: none; }
.cas h2 a:hover, .cas h3 a:hover { color: var(--bleu); }
.cas p { color: var(--doux); margin-bottom: 1rem; }
.etiquettes { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .82rem; font-weight: 600; margin-bottom: 1.2rem; }
.etiquettes li { padding: .3rem .7rem; border-radius: 999px; background: var(--clair); color: var(--bleu-fonce); }
.cas-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(3rem, 6vw, 5.5rem); }
.cas-mini h3 { margin: 1rem 0 .4rem; }
.cas-mini h3 a { text-decoration: none; }
.cas-mini p { color: var(--doux); font-size: 1rem; }

/* Duo : titre colle a gauche, matiere a droite */
.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.duo__titre { position: sticky; top: calc(var(--h-entete) + 2rem); font-size: clamp(1.85rem, 3.2vw, 2.8rem); }
.duo__texte > p { color: var(--doux); max-width: 40rem; }
.duo__texte > p + p { margin-top: 1rem; }
.duo__texte > p:first-child { font-size: 1.15rem; color: var(--texte); }
.reglee > li { padding-block: 1.25rem; border-top: 1px solid var(--bord-bleu); }
.reglee > li:last-child { border-bottom: 1px solid var(--bord-bleu); }
.reglee h3 { margin-bottom: .3rem; }
.reglee p { color: var(--doux); max-width: 38rem; font-size: 1.02rem; }

/* Sequence reelle : la seule liste numerotee du site */
.etapes { counter-reset: etape; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.etapes li { counter-increment: etape; background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); padding: 1.4rem 1.3rem 1.5rem; }
.etapes li::before { content: counter(etape); display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: var(--rayon); background: var(--bleu); color: #fff; font-family: var(--titre); font-size: 1.3rem; font-weight: 700; line-height: 1; margin-bottom: 1.1rem; }
.etapes h3 { margin-bottom: .4rem; }
.etapes p { color: var(--doux); font-size: 1rem; }

/* Cartes blanches posees sur la page : conversation, journal, reponse d'IA */
.fil, .journal-agent, .reponse-ia { background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); padding: clamp(1.1rem, 2.4vw, 1.75rem); min-width: 0; }
.fil { display: grid; gap: .8rem; font-size: 1rem; }
.fil__bulle { padding: .75rem 1rem; border-radius: 12px; max-width: 88%; line-height: 1.45; }
.fil__bulle--moi { justify-self: end; background: var(--bleu); color: #fff; border-bottom-right-radius: 4px; }
.fil__bulle--ia { background: var(--clair); color: var(--nuit); border-bottom-left-radius: 4px; }
.fil__geste { font-family: var(--mono); font-size: .78rem; color: var(--doux); padding-inline: .2rem; }
.fil__geste::before { content: "\25B8\00A0"; color: var(--bleu); }
.legende { font-size: .88rem; color: var(--doux); margin-top: .8rem; }

.journal-agent { font-family: var(--mono); font-size: .84rem; line-height: 1.5; }
.journal-agent li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .8rem; padding-block: .55rem; border-top: 1px solid var(--gris-bleu); }
.journal-agent li:first-child { border-top: 0; }
.journal-agent time { color: var(--doux); }
.journal-agent .a-relire { color: var(--bleu-encre); font-weight: 600; }

.reponse-ia__q { font-weight: 600; color: var(--nuit); margin-bottom: .8rem; }
.reponse-ia__r { color: var(--doux); }
.reponse-ia__r mark { background: var(--clair); color: var(--bleu-encre); font-weight: 600; padding: 0 .2em; border-radius: 4px; }
.reponse-ia__sources { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; font-size: .78rem; font-weight: 600; }
.reponse-ia__sources span { padding: .26rem .6rem; border-radius: 999px; background: var(--gris-bleu); color: var(--doux); }
.reponse-ia__sources .est-vous { background: var(--bleu); color: #fff; }

/* Tete de page interieure */
.fil-ariane { padding-top: 1.4rem; font-size: .88rem; color: var(--doux); }
.fil-ariane ol { display: flex; flex-wrap: wrap; gap: .25rem .55rem; max-width: calc(var(--large) + 2 * var(--gouttiere)); margin-inline: auto; padding-inline: var(--gouttiere); }
.fil-ariane li + li::before { content: "/"; margin-right: .55rem; color: var(--bord); }
.fil-ariane a { text-decoration: none; }
.fil-ariane a:hover { color: var(--nuit); text-decoration: underline; text-underline-offset: .2em; }
.tete { padding-block: clamp(1.6rem, 4vw, 3.5rem) var(--section); }
.tete__grille { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.tete h1 { font-size: clamp(2.3rem, 4.6vw, 4.3rem); margin-bottom: 1.3rem; }
.tete__lead { font-size: clamp(1.1rem, 1.5vw, 1.28rem); line-height: 1.55; color: var(--doux); margin-bottom: 2rem; max-width: 38rem; }
.tete--seule h1 { max-width: 20ch; }
.tete--seule .tete__lead { max-width: 44rem; }
.visuel { border-radius: var(--rayon); overflow: hidden; background: var(--surface); box-shadow: var(--ombre-carte); }
.visuel--nu { box-shadow: none; background: none; border-radius: 0; overflow: visible; }

/* Objet 3D d'une page de prestation : un plateau bleu clair, l'objet anime au centre.
   La capture fixe reste en place sans WebGL, en mouvement reduit ou tant que la toile n'a pas rendu. */
.objet3d { position: relative; grid-column: 1 / -1; height: clamp(15rem, 34vh, 22rem); margin-bottom: clamp(1.6rem, 3.5vw, 2.8rem); border-radius: 12px; background: var(--clair); box-shadow: inset 0 0 0 1px var(--bord-bleu); overflow: hidden; }
.objet3d__repli { position: absolute; left: 50%; top: 0; height: 100%; width: auto; max-width: none; translate: -50% 0; transition: opacity .4s ease; }
.objet3d__toile { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s ease; }
.objet3d.est-prete .objet3d__toile { opacity: 1; }
.objet3d.est-prete .objet3d__repli { opacity: 0; }
.objet3d__seul { padding-top: clamp(1.6rem, 4vw, 3.5rem); }
/* Ordinateur : l'objet monte dans la colonne de droite, au-dessus du visuel, pour que le titre reste
   dans le premier ecran (en bande pleine largeur, il poussait le h1 a 600 px). */
@media (min-width: 861px) {
  .tete__grille:has(> .objet3d) { row-gap: clamp(1.2rem, 2vw, 1.8rem); align-items: start; }
  .tete__grille > .objet3d { grid-column: 2; grid-row: 1; height: clamp(15rem, 30vh, 19rem); margin-bottom: 0; }
  .tete__grille > .objet3d + div { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: clamp(.5rem, 2vw, 2rem); }
  .tete__grille > .objet3d + div + * { grid-column: 2; grid-row: 2; }
}


/* Mosaique : les images gardent leur proportion, jamais recadrees */
.mosaique { columns: 3 18rem; column-gap: clamp(.8rem, 1.6vw, 1.4rem); }
.mosaique figure { break-inside: avoid; margin: 0 0 clamp(.8rem, 1.6vw, 1.4rem); }
.mosaique img, .mosaique video { width: 100%; border-radius: var(--rayon); background: var(--gris-bleu); }
.mosaique figcaption { font-size: .86rem; color: var(--doux); padding-top: .5rem; }

.triptyque { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: clamp(.8rem, 1.6vw, 1.4rem); align-items: start; }
.triptyque a { text-decoration: none; display: block; }
.triptyque img, .triptyque video { width: 100%; border-radius: var(--rayon); background: var(--gris-bleu); }
.triptyque h3 { margin: 1rem 0 .3rem; transition: color .2s ease; }
.triptyque a:hover h3 { color: var(--bleu); }
.triptyque p { color: var(--doux); font-size: 1rem; }

/* Questions */
.faq__q { border-top: 1px solid var(--bord-bleu); }
.faq__q:last-child { border-bottom: 1px solid var(--bord-bleu); }
.faq__q summary { display: flex; justify-content: space-between; gap: 1.2rem; padding-block: 1.15rem; cursor: pointer; font-family: var(--titre); font-size: clamp(1.08rem, 1.5vw, 1.25rem); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; color: var(--nuit); transition: color .18s ease; }
.faq__q summary:hover { color: var(--bleu); }
.faq__q summary::after { content: ""; flex: none; width: .72em; height: .72em; margin-top: .3em; color: var(--bleu); background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; transition: transform .3s var(--sortie); }
.faq__q[open] summary::after { transform: rotate(135deg); }
.faq__r { padding-bottom: 1.3rem; color: var(--doux); max-width: 44rem; }
.faq__r a { color: var(--bleu-encre); font-weight: 600; }

/* Bande d'appel : la section sombre du site, en bleu nuit */
.bande { background: var(--nuit); color: #fff; padding-block: clamp(3.2rem, 6.5vw, 6rem); }
.bande__dedans { display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.bande h2 { color: #fff; font-size: clamp(2rem, 3.9vw, 3.5rem); max-width: 20ch; margin-bottom: .9rem; }
.bande p { max-width: 38rem; font-size: 1.12rem; line-height: 1.5; color: var(--clair); }
.bande .bouton { box-shadow: 0 5px 0 var(--nuit-2); }
.bande .bouton:active { box-shadow: 0 1px 0 var(--nuit-2); }
.bande .bouton:focus-visible { outline-color: #fff; }
.bande .lien { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
.bande .lien:hover { color: var(--bord-bleu); text-decoration-color: currentColor; }
.bande .boutons { justify-content: flex-end; }

/* Pied */
.pied { padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; background: var(--surface); border-top: 1px solid var(--gris-bleu); }
.pied__haut { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .7fr); gap: clamp(2rem, 5vw, 5rem); padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.pied__promesse { font-family: var(--titre); font-size: clamp(1.35rem, 2.1vw, 1.8rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; color: var(--nuit); max-width: 24ch; margin-bottom: 1.4rem; }
.pied__contact { display: grid; gap: .3rem; }
.pied__contact a { text-decoration: none; font-weight: 600; color: var(--nuit); }
.pied__contact a:hover { color: var(--bleu); }
.pied__contact span { color: var(--doux); font-size: .88rem; margin-left: .4rem; }
.pied__titre { font-family: var(--corps); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bleu-fonce); margin-bottom: .9rem; }
.pied__liste { display: grid; gap: .35rem; }
.pied__liste a { text-decoration: none; }
.pied__liste a:hover { color: var(--bleu); }
.pied__bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 2rem; padding-top: 1.3rem; border-top: 1px solid var(--gris-bleu); font-size: .88rem; color: var(--doux); }
.pied__legal { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.3rem; }
.pied__legal > a { text-decoration: none; }
.pied__legal > a:hover { color: var(--nuit); }

/* Formulaire : une carte blanche, aux couleurs de myboook.com */
.formulaire { display: grid; gap: 1.1rem; background: var(--surface); color: var(--texte); border-radius: 12px; box-shadow: var(--ombre-carte); padding: clamp(1.3rem, 2.8vw, 2.2rem); min-width: 0; }
.formulaire__ligne { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.champ { display: grid; gap: .45rem; min-width: 0; }
.champ label { font-size: .9rem; font-weight: 600; color: var(--nuit); }
.champ input, .champ textarea { width: 100%; min-height: 50px; font: 400 1rem/1.4 var(--corps); color: var(--texte); background: #f5f9fd; border: 1px solid var(--bord); border-radius: var(--rayon); padding: .8rem .9rem; -webkit-appearance: none; appearance: none; transition: border-color .15s linear, box-shadow .15s linear, background-color .15s linear; }
.champ textarea { resize: vertical; min-height: 7.5rem; }
.champ input::placeholder, .champ textarea::placeholder { color: #7d8896; }
.champ input:hover, .champ textarea:hover { border-color: #a9c3da; }
.champ input:focus, .champ textarea:focus { outline: none; background: #fff; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(48, 116, 170, .18); }
.formulaire__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulaire__envoi { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: .2rem; }
.formulaire__msg { font-size: .96rem; font-weight: 500; min-height: 1.4em; color: var(--doux); }
.formulaire__msg[data-state="ok"] { color: var(--nuit); background: var(--clair); border-left: 3px solid var(--bleu); padding: .6rem .8rem; border-radius: 0 var(--rayon) var(--rayon) 0; }
.formulaire__msg[data-state="err"] { color: var(--err); }
.formulaire__note { font-size: .84rem; color: var(--doux); }
.formulaire__note a { color: var(--bleu-encre); }

.coordonnees { display: grid; gap: 1.3rem; }
.coordonnees dt { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bleu-fonce); margin-bottom: .2rem; }
.coordonnees dd { margin: 0; font-size: 1.08rem; }
.coordonnees a { text-decoration: none; font-weight: 600; color: var(--nuit); }
.coordonnees a:hover { color: var(--bleu); }

/* Texte long : articles et pages legales */
.prose { max-width: 44rem; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.12; letter-spacing: -.025em; margin-top: 2.8rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.2rem; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4rem; }
.prose li::marker { color: var(--bleu); }
.prose a { color: var(--bleu-encre); text-underline-offset: .18em; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--gris-bleu); padding: .1em .35em; border-radius: 5px; }
.prose blockquote { margin-inline: 0; padding: 1.1rem 1.3rem; background: var(--clair); border-left: 3px solid var(--bleu); border-radius: 0 var(--rayon) var(--rayon) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .98rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--gris-bleu); vertical-align: top; }
.prose th { font-size: .78rem; font-weight: 700; letter-spacing: .03em; color: var(--bleu-fonce); }
.prose--large { max-width: none; overflow-x: auto; }
.prose--large table { display: table; min-width: 40rem; }
.article__meta { font-size: .84rem; font-weight: 500; color: var(--doux); margin-bottom: 1.3rem; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.chapeau { font-size: clamp(1.14rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--texte); }

.articles { border-bottom: 1px solid var(--bord-bleu); }
.articles a { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .3rem 2rem; padding-block: 1.5rem; border-top: 1px solid var(--bord-bleu); text-decoration: none; }
.articles time { font-size: .84rem; font-weight: 600; color: var(--bleu-fonce); padding-top: .35rem; }
.articles h2 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: .4rem; transition: color .2s ease; }
.articles a:hover h2 { color: var(--bleu); }
.articles p { color: var(--doux); max-width: 44rem; }

.grand-texte { font-family: var(--titre); font-size: clamp(1.5rem, 2.8vw, 2.4rem); font-weight: 700; line-height: 1.15; letter-spacing: -.03em; color: var(--nuit); max-width: 30ch; }
.page-erreur { padding-block: clamp(4rem, 12vw, 10rem); }
.page-erreur h1 { margin-bottom: 1rem; }
.page-erreur p { color: var(--doux); max-width: 36rem; margin-bottom: 1.6rem; }

/* Apparition liee au defilement : le contenu reste visible sans ce support, et aucune
   minuterie ne peut le laisser cache puisque l'etat depend seulement de la position. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .apparait { animation: apparaitre linear both; animation-timeline: view(); animation-range: entry 0% entry 42%; }
  }
}
/* translate (et non transform) : le relief des captures garde transform pour lui */
@keyframes apparaitre { from { opacity: .001; translate: 0 26px; } to { opacity: 1; translate: none; } }

/* ------------------------------------------------ pages interieures, 07/11
   Meme vie que l'accueil, sans WebGL : chiffres qui montent, captures en relief,
   listes qui se posent au defilement. Tout reste lisible sans script et en mouvement reduit. */
.chiffres { padding-block: 0 var(--section); margin-top: calc(var(--section) * -.45); }
.chiffres__liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); overflow: hidden; }
.chiffre { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .35rem; padding: clamp(1.2rem, 2.4vw, 1.9rem) clamp(1.1rem, 2.2vw, 1.8rem); border-left: 1px solid var(--gris-bleu); min-width: 0; }
.chiffre:first-child { border-left: 0; }
.chiffre dd { margin: 0; font-family: var(--titre); font-weight: 700; font-size: clamp(2.1rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -.04em; color: var(--bleu); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chiffre dt { color: var(--doux); font-size: .98rem; line-height: 1.35; }

.en-relief { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--sortie), box-shadow .5s var(--sortie); will-change: transform; position: relative; }
.en-relief::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), rgba(255, 255, 255, .22), transparent 55%); opacity: 0; transition: opacity .4s ease; }
.en-relief:hover { box-shadow: 0 0 0 1px var(--bord-bleu), 0 2px 0 var(--bord-bleu), 0 44px 80px -30px rgba(0, 29, 55, .42); }
.en-relief:hover::after { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  /* La capture de tete se deplie a l'arrivee sur la page */
  .tete .visuel:not(.visuel--nu) { animation: deplier 1.1s var(--sortie) .12s backwards; transform-origin: 50% 100%; }
  .tete h1, .tete__lead, .tete .boutons { animation: monter .9s var(--sortie) both; }
  .tete__lead { animation-delay: .08s; }
  .tete .boutons { animation-delay: .16s; }
  .chiffre { animation: monter .8s var(--sortie) both; animation-delay: calc(.25s + var(--i, 0) * .08s); }
}
@keyframes deplier { from { opacity: 0; transform: perspective(1100px) rotateX(16deg) translateY(30px) scale(.97); } to { opacity: 1; transform: perspective(1100px) rotateX(0) translateY(0) scale(1); } }
@keyframes monter { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: none; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reglee > li, .faq__q, .cas-mini > a { animation: apparaitre linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .reglee > li { position: relative; }
    .reglee > li::before { content: ""; position: absolute; left: 0; top: -1px; width: 3.5rem; height: 2px; background: var(--bleu); transform-origin: 0 50%; animation: tracer linear both; animation-timeline: view(); animation-range: entry 20% entry 80%; }
  }
}
@keyframes tracer { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 640px) {
  .chiffres__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chiffre { border-left: 0; border-top: 1px solid var(--gris-bleu); }
  .chiffre:nth-child(-n+2) { border-top: 0; }
  .chiffre:nth-child(even) { border-left: 1px solid var(--gris-bleu); }
  .chiffre:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* =================================================================== accueil
   La scene « Rangement » : la toile est fixe derriere, le texte HTML defile par-dessus.
   Sans script (ou sans WebGL, ou en mouvement reduit) tout se lit a la suite : captures des projets
   et des photos affichees, image fixe du tas a l'ouverture. La classe .arme n'est posee que par la scene. */
body.page-accueil { background: var(--fond); transition: background-color .35s linear; }
.page-accueil .entete { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom: 0; }
.page-accueil .entete .logo { color: var(--encre); }
.page-accueil .entete .logo b { color: var(--accent); }
.page-accueil main > section, .page-accueil .pied { position: relative; z-index: 2; }
.page-accueil main > section { background: var(--page); }
.page-accueil main > section:first-of-type { border-top: 0; }

#scene { display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
.arme #scene { display: block; }
.sans3d #scene { display: none; }
.scene-a { color: var(--encre); transition: color .22s linear; touch-action: pan-y pinch-zoom; }
.scene-a section { position: relative; z-index: 1; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.scene-a h1, .scene-a h2, .scene-a h3 { color: inherit; letter-spacing: -.035em; line-height: 1; }
.scene-a h1 { font-size: clamp(40px, 12.2vw, 112px); }
.scene-a h2 { font-size: clamp(36px, 10.6vw, 92px); }
.scene-a h3 { font-size: clamp(30px, 8.4vw, 60px); letter-spacing: -.03em; }
.scene-a h3 a { text-decoration: none; }
.scene-a h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .12em; }
.scene-a .bouton { font-size: 1.12rem; padding: 17px 24px 18px; white-space: nowrap; }
/* Sur les objets qui passent derriere, le texte garde un contour de la couleur du plateau */
.detoure { text-shadow: 2px 0 0 var(--fond), -2px 0 0 var(--fond), 0 2px 0 var(--fond), 0 -2px 0 var(--fond), 2px 2px 0 var(--fond), -2px 2px 0 var(--fond), 2px -2px 0 var(--fond), -2px -2px 0 var(--fond); }

#ouverture { min-height: 100vh; min-height: 100svh; padding-top: calc(var(--h-entete) + 10px); display: flex; flex-direction: column; align-items: flex-start; }
#ouverture h1 { margin-top: 12px; max-width: 12em; }
.agence { margin-top: 14px; font-size: 1rem; font-weight: 600; line-height: 1.4; max-width: 22em; }
#ouverture .bouton { margin-top: 22px; }
.invite { margin-top: 18px; font-size: 1rem; font-weight: 500; max-width: 24em; }
.ouverture__repli { position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 100vh; height: 100svh; pointer-events: none; }
.ouverture__repli img { width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: 50% 100%; }
.scene-prete:not(.sans3d) .ouverture__repli { display: none; }

#offre { padding-top: 9vh; padding-bottom: 12vh; }
.offre__chapeau { margin-top: 16px; margin-bottom: 9vh; font-size: 1.12rem; font-weight: 500; line-height: 1.45; max-width: 24em; }
.savoirs li { padding: 0 0 7vh; }
.savoirs p { margin-top: 12px; max-width: 27em; font-size: 1.06rem; }

#realisations { padding-top: 10vh; padding-bottom: 10vh; }
#realisations h2 { margin-bottom: 8vh; }
.projet { padding-bottom: 8vh; }
.projet p { margin-top: 12px; max-width: 29em; }
.projet ul { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .94rem; font-weight: 600; }
.projet .repli { width: 100%; max-width: 900px; height: auto; margin: 0 0 18px; border-radius: var(--rayon); box-shadow: var(--ombre-carte); }
.arme .repli { display: none; }
.sans3d .repli { display: block; }

#image { padding-top: 10vh; padding-bottom: 10vh; }
#image p { margin-top: 12px; font-size: 1.06rem; max-width: 24em; }
.planche { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 24px; align-items: start; }
.planche img { width: 100%; height: auto; margin: 0; border-radius: var(--rayon); }
.arme .planche { display: none; }
.sans3d .planche { display: grid; }

#contact { padding-top: 12vh; padding-bottom: 12vh; overflow-x: clip; }
#contact p { margin-top: 16px; font-size: 1.06rem; max-width: 24em; }
#contact .bouton { margin-top: 24px; }

/* Lien vers la vraie page de chaque realisation : grand, net, au pouce */
.voir { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 16px; padding: 11px 18px 12px; border: 2px solid currentColor; border-radius: var(--rayon); background: var(--fond); font: 600 1rem/1.2 var(--corps); text-decoration: none; transition: background-color .15s linear, color .15s linear; }
.voir span { font-size: 1.12rem; transition: transform .15s ease-out; }
.voir:hover { background: var(--encre); color: var(--fond); }
.voir:hover span { transform: translateX(3px); }
.voir:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#image .voir { margin-top: 18px; }

/* Boite fermee : une legende tient l'ecran le temps que le couvercle se rouvre */
.scene-legende { display: none; }
.arme .scene-legende {
  display: block; position: fixed; z-index: 2; left: 0; right: 0; top: max(9vh, env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  font-family: var(--titre); font-weight: 700; letter-spacing: -.035em; line-height: 1; font-size: clamp(36px, 10.6vw, 92px); color: var(--encre);
  opacity: 0; transform: translateY(14px); transition: opacity .28s linear, transform .4s cubic-bezier(.2, 1.3, .4, 1); pointer-events: none;
}
.arme.ferme-la .scene-legende { opacity: 1; transform: none; }

/* Arme par la scene seulement : sans elle, tout reste lisible a la suite */
.piste { display: none; }
.arme .piste { display: block; }
.arme #piste-rangement { height: 125vh; height: 125lvh; }
.arme #piste-boite { height: 270vh; height: 270lvh; }
.arme #piste-image { height: 70vh; height: 70lvh; }
.arme #piste-tampon { height: 60vh; height: 60lvh; }
.arme #offre { padding-top: 0; padding-bottom: 0; }
.arme .offre__chapeau { margin-bottom: 30vh; margin-bottom: 30lvh; }
.arme .savoirs li { min-height: 30vh; min-height: 30lvh; padding: 0; }
.arme .savoirs li:last-child { min-height: 60vh; min-height: 60lvh; }
.arme #realisations { padding-top: 0; padding-bottom: 0; }
.arme #realisations h2 { margin-bottom: 12vh; margin-bottom: 12lvh; }
.arme .projet { min-height: 66vh; min-height: 66lvh; padding: 0; }
.arme .projet:last-child { min-height: 60vh; min-height: 60lvh; }
.arme #image { min-height: 330vh; min-height: 330lvh; padding-top: 0; padding-bottom: 0; }
.arme #image .collant { position: sticky; top: max(14px, env(safe-area-inset-top, 0px)); }
.arme #contact { min-height: 100vh; min-height: 100lvh; padding-top: max(30px, env(safe-area-inset-top, 0px)); padding-bottom: 14vh; }
/* Le titre de fin arrive avec le defilement ; la phrase et le bouton tombent avec le coup de tampon */
.arme .fin-scene > :not(h2) { opacity: 0; transform: scale(1.14); transform-origin: 0 40%; }
.arme.frappe .fin-scene > :not(h2) { opacity: 1; transform: none; transition: opacity .09s linear, transform .26s cubic-bezier(.2, 1.6, .4, 1); }
.arme .invite { opacity: 0; }
.arme.invite-la .invite { opacity: 1; transition: opacity .5s linear; }
.sans3d .invite { display: none; }
html:not(.arme) .invite { display: none; }

/* Grand ecran : texte a gauche, plateau a droite */
@media (min-aspect-ratio: 21/20) {
  .scene-a h1 { font-size: clamp(56px, 6.3vw, 112px); }
  .scene-a h2 { font-size: clamp(46px, 4.6vw, 84px); }
  .scene-a h3 { font-size: clamp(30px, 2.5vw, 46px); }
  .scene-a section { padding-left: max(48px, 5vw); padding-right: max(48px, 5vw); }
  #ouverture { padding-top: calc(var(--h-entete) + 26px); }
  .arme .scene-legende { padding-left: max(48px, 5vw); padding-right: 54vw; top: auto; bottom: 16vh; font-size: clamp(48px, 5.4vw, 92px); }
  .arme #offre, .arme #realisations, .arme #image { padding-right: 56vw; }
  .arme #contact { padding-right: 48vw; }
  .arme .offre__chapeau { margin-bottom: 22vh; }
  .arme #piste-rangement { height: 150vh; height: 150lvh; }
  .arme #realisations h2 { margin-bottom: 10vh; }
}

/* --------------------------------------------------------------- tablettes */
@media (max-width: 1120px) {
  .nav { display: none; }
  .entete__droite > .langues { display: none; }
  .tiroir { display: block; }
  .tiroir > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .4rem .85rem; border: 1px solid var(--bord-bleu); background: var(--surface); color: var(--nuit); border-radius: var(--rayon); cursor: pointer; font-size: .92rem; font-weight: 600; }
  .tiroir[open] > summary { background: var(--clair); }
  .tiroir__panneau { position: fixed; inset: var(--h-entete) 0 0; z-index: var(--z-menu); background: var(--surface); color: var(--texte); overflow-y: auto; overscroll-behavior: contain; padding: 1.4rem var(--gouttiere) 3rem; border-top: 1px solid var(--gris-bleu); display: grid; align-content: start; gap: 1.5rem; }
  .page-accueil .tiroir__panneau { top: var(--h-entete); }
  .tiroir__titre { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bleu-fonce); }
  .tiroir__services { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0 1.5rem; margin-top: -.8rem; }
  .tiroir__services a { display: block; padding-block: .75rem; border-bottom: 1px solid var(--gris-bleu); text-decoration: none; }
  .tiroir__services strong { display: block; font-family: var(--titre); font-size: 1.14rem; letter-spacing: -.015em; color: var(--nuit); }
  .tiroir__services span { display: block; font-size: .9rem; color: var(--doux); line-height: 1.4; }
  .tiroir__nav { display: grid; gap: .55rem; font-size: 1.1rem; font-weight: 500; }
  .tiroir__nav a { text-decoration: none; padding-block: .1rem; }
  .tiroir .langues { font-size: .86rem; }
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------- telephones */
@media (max-width: 860px) {
  :root { --h-entete: 62px; }
  .rangs, .cas, .cas--inverse, .duo, .tete__grille, .bande__dedans, .triptyque, .pied__haut { grid-template-columns: minmax(0, 1fr); }
  .cas--inverse > :first-child { order: 0; }
  .duo__titre { position: static; }
  .bande .boutons { justify-content: flex-start; }
  .formulaire__ligne { grid-template-columns: minmax(0, 1fr); }
  .articles a { grid-template-columns: minmax(0, 1fr); }
  .entete__droite .bouton--petit { display: none; }
  .logo { font-size: 1.02rem; }
  .objet3d { height: clamp(12rem, 30vh, 16rem); }
}
@media (max-width: 520px) {
  .etapes { grid-template-columns: minmax(0, 1fr); }
  .boutons .bouton { width: 100%; }
  .formulaire .bouton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .entete, .pied, .bande, .formulaire, #scene, .objet3d { display: none; }
  body { background: #fff; color: #000; }
}
