/* Klein Production · style « Mercure » (métal liquide, studio photo gris perle) */
:root {
  --nuit: #02030a;
  --perle-haut: #fafbfc;
  --perle: #e6e9ee;
  --perle-bas: #c4cad3;
  --noir: #050608;
  --encre: #0a0c12;
  --acier: #464d5c;
  --filet: rgba(10, 12, 18, .14);
  --klein: #002fa7;
  --klein-clair: #4a74ff;
  --clair: #f3f5f9;
  --clair-doux: #aeb6c6;
  --didone: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --grotesque: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --gx: 50;
  --dk: 0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--nuit); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--grotesque); color: var(--encre); background: transparent; overflow-x: hidden; }
html.intro, html.bascule { overflow: hidden; }
html.intro body, html.bascule body { overflow: hidden; }
img, canvas { display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
:focus-visible { outline: 2px solid var(--klein-clair); outline-offset: 3px; border-radius: 2px; }

/* ---------- Fond : studio photo gris perle (clair) ou presque noir ---------- */
.studio { position: fixed; inset: 0; z-index: 0; --r: 150; opacity: 1; transition: opacity .5s ease;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--r) * 1% - 18%), transparent calc(var(--r) * 1%));
          mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--r) * 1% - 18%), transparent calc(var(--r) * 1%)); }
html.intro .studio { opacity: 0; }
.studio i { position: absolute; inset: 0; }
.studio-clair {
  background:
    radial-gradient(70% 55% at 50% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--perle-haut) 0%, var(--perle) 52%, #d5d9e0 74%, var(--perle-bas) 100%);
}
.studio-clair::after { /* sol du studio : léger dégradé là où le fond s'arrondit */
  content: ""; position: absolute; inset: auto 0 0 0; height: 32%;
  background: radial-gradient(80% 100% at 50% 100%, rgba(150, 158, 172, .35), transparent 70%);
}
.studio-sombre { opacity: var(--dk);
  background:
    radial-gradient(45% 55% at 18% 45%, rgba(0, 47, 167, .32), transparent 70%),
    radial-gradient(80% 70% at 60% 35%, #1a1d27 0%, #0a0b10 55%, var(--noir) 100%);
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- 1. Ouverture (évoque le voyage spatial actuel) ---------- */
.ouverture { position: fixed; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 0;
  text-align: center; padding: 24px 16px; color: #f2f4fb; font-family: "Archivo", var(--grotesque);
  transition: opacity .7s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1), filter .9s ease; }
html:not(.intro) .ouverture { opacity: 0; transform: scale(1.06); filter: blur(8px); pointer-events: none; }
html.revele .ouverture { visibility: hidden; }
.ouv-titre { font-weight: 300; font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: -.01em; line-height: 1; }
.ouv-phrase { margin-top: 18px; font-weight: 300; font-size: clamp(1rem, 1.6vw, 1.2rem); color: #b9c2da; }
.ouv-bouton { margin-top: 56px; position: relative; font: 400 1.125rem/1 "Archivo", var(--grotesque); color: #fff; cursor: pointer;
  padding: 19px 34px; border-radius: 999px; border: 1px solid transparent;
  background:
    linear-gradient(#070a18, #070a18) padding-box,
    linear-gradient(115deg, #5a6378, #ffffff 30%, #4a74ff 52%, #c9d0de 70%, #3c4458) border-box;
  box-shadow: 0 0 0 6px rgba(74, 116, 255, .08), 0 0 48px rgba(74, 116, 255, .35);
  transition: box-shadow .4s ease, transform .4s ease; }
.ouv-bouton::after { content: ""; position: absolute; inset: -7px; border-radius: inherit; border: 1px solid rgba(74, 116, 255, .4);
  animation: halo 2.6s ease-out infinite; }
.ouv-bouton:hover { box-shadow: 0 0 0 8px rgba(74, 116, 255, .14), 0 0 70px rgba(74, 116, 255, .55); transform: translateY(-1px); }
.ouv-aide { margin-top: 18px; font-size: .875rem; color: #7f89a6; font-weight: 300; }
@keyframes halo { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.18, 1.45); } }

/* ---------- 3. Le site transformé ---------- */
.site { position: relative; z-index: 2; opacity: 0; visibility: hidden; }
html.revele .site { opacity: 1; visibility: visible; transition: opacity .9s ease; }

/* Menu fixe */
.nav { position: fixed; z-index: 10; top: 16px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, 3.5vw); pointer-events: none; }
.nav > * { pointer-events: auto; }
.marque { font: italic 500 1.375rem/1 var(--didone); text-decoration: none; color: var(--encre); letter-spacing: -.01em; transition: color .5s; }
.nav nav { display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(250, 251, 253, .72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 12, 18, .08), 0 10px 30px -14px rgba(12, 18, 34, .35); transition: background .5s, box-shadow .5s; }
.nav nav a { font-size: .875rem; font-weight: 500; text-decoration: none; padding: 8px 15px; border-radius: 999px; color: var(--acier); white-space: nowrap;
  transition: color .3s, background .3s; }
.nav nav a:hover { color: var(--encre); }
.nav nav a[aria-current="true"] { color: #fff; background: linear-gradient(180deg, #2a2f3b, #07080c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
html[data-sombre] .marque { color: var(--clair); }
html[data-sombre] .nav nav { background: rgba(14, 16, 24, .72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(255, 255, 255, .08); }
html[data-sombre] .nav nav a { color: var(--clair-doux); }
html[data-sombre] .nav nav a:hover { color: #fff; }
html[data-sombre] .nav nav a[aria-current="true"] { color: var(--encre); background: linear-gradient(180deg, #ffffff, #c6ccd8); }

/* Sections : texte d'un côté, objet de mercure de l'autre */
.sec { position: relative; min-height: 100vh; min-height: 100svh; max-width: 1440px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center;
  padding: 120px max(24px, 4.5vw) 90px; scroll-margin-top: 0; }
.sec > .plaque, .sec > .hero-texte, .sec > .methode-texte { grid-column: 1 / 7; grid-row: 1; }
.sec > .scene { grid-column: 7 / 13; grid-row: 1; }
.sec.inverse > .plaque { grid-column: 7 / 13; }
.sec.inverse > .scene { grid-column: 1 / 7; }
.scene { position: relative; width: 100%; height: min(70vh, 44vw); min-height: 260px; }
.scene::after { /* ombre portée sous l'objet, visible quand le mercure est rassemblé */
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 2%; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(16, 20, 32, .32), rgba(16, 20, 32, 0));
  opacity: calc(var(--ombre, 0) * (1 - var(--dk))); filter: blur(4px); }

/* Titres chromés : dégradé métal qui glisse avec le curseur et le défilement */
.chrome {
  font-family: var(--didone); font-weight: 500; letter-spacing: -.02em; color: var(--encre);
  background: linear-gradient(100deg,
    #07080c 0%, #2b303c 12%, #5d6577 21%, #8c94a5 26%, #4a5266 32%, #0b0d13 44%,
    #262b36 54%, #6e7689 60%, #2a2f3a 66%, #0b0d13 72%, #535b6e 80%, #858d9e 85%, #3a4150 91%, #07080c 100%);
  background-size: 300% 100%; background-position: calc(var(--gx) * 1%) 50%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .9));
}
.sombre .chrome {
  background-image: linear-gradient(100deg,
    #ffffff 0%, #b9c0cf 12%, #7d8597 21%, #ffffff 30%, #cfd5e0 40%, #8c95a8 48%,
    #dfe4ee 56%, #9aa3b5 63%, #ffffff 72%, #8a93a5 82%, #e9ecf2 90%, #ffffff 100%);
  filter: none;
}

h1.chrome { font-size: clamp(3.1rem, 7.6vw, 8rem); line-height: .94; max-width: 9.5ch; padding-bottom: .06em; outline: none; }
h2.chrome { font-size: clamp(2.3rem, 4vw, 4rem); line-height: 1; max-width: 13ch; padding-bottom: .05em; }
.chapo { margin-top: 26px; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); line-height: 1.6; color: #262b36; max-width: 46ch; }

/* Accroche */
.hero-texte { align-self: center; padding-top: 4vh; }
.hero .chapo { margin-top: 32px; }
.actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px; border-radius: 999px;
  font: 500 1rem/1 var(--grotesque); color: #fff; text-decoration: none; cursor: pointer; border: 0;
  background: linear-gradient(180deg, #343a48 0%, #0b0d12 55%, #000 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .08), 0 14px 30px -14px rgba(8, 12, 30, .7);
  transition: transform .25s ease, box-shadow .25s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 1px rgba(74, 116, 255, .6), 0 18px 34px -14px rgba(0, 47, 167, .6); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.lien { color: var(--encre); text-decoration: underline; text-decoration-color: rgba(10, 12, 18, .3); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .3s; }
.lien:hover { text-decoration-color: var(--klein-clair); }

/* Plaques de texte : verre dépoli posé à côté de l'objet */
.plaque { position: relative; padding: clamp(28px, 3.6vw, 56px); border-radius: 3px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .84), rgba(238, 241, 245, .7));
  backdrop-filter: blur(22px) saturate(1.15); -webkit-backdrop-filter: blur(22px) saturate(1.15);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 12, 18, .06), 0 50px 90px -50px rgba(14, 20, 40, .45); }
.plaque::before { /* arête chromée en haut de la plaque */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #9aa2b2 15%, #fff 35%, #6d7587 55%, #4a74ff 68%, #c9ced8 80%, transparent); opacity: .9; }
.poincon { position: absolute; top: clamp(20px, 2.4vw, 30px); right: clamp(24px, 3.2vw, 48px);
  font: italic 400 .9375rem/1 var(--didone); color: var(--acier); display: flex; align-items: center; gap: 9px; }
.poincon::before { content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, #9aa3b4 45%, #2a2f3b 80%); box-shadow: 0 0 0 1px rgba(10, 12, 18, .12); }
.plaque > h2 { margin-top: 26px; }

.prestations { list-style: none; padding: 0; margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.prestations li { padding: 20px 0 22px; border-top: 1px solid var(--filet); }
.prestations h3, .etapes h3 { font: italic 500 1.375rem/1.15 var(--didone); letter-spacing: -.005em; color: var(--encre); }
.prestations p, .etapes p { margin-top: 8px; font-size: .9688rem; line-height: 1.55; color: var(--acier); }

/* Section contrastée : presque noir */
.sombre .plaque { background: linear-gradient(165deg, rgba(22, 25, 34, .82), rgba(6, 7, 11, .78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(255, 255, 255, .06), 0 50px 90px -40px rgba(0, 0, 0, .8); }
.sombre .chapo { color: #d6dbe5; }
.sombre .poincon { color: var(--clair-doux); }
.sombre .prestations li { border-color: rgba(255, 255, 255, .14); }
.sombre .prestations h3 { color: var(--clair); }
.sombre .prestations p { color: var(--clair-doux); }

/* Méthode : une perle de mercure par étape */
.methode-texte { align-self: center; }
.etapes { list-style: none; padding: 0; margin-top: 40px; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; display: grid; grid-template-columns: 64px 1fr; column-gap: 8px;
  padding: 18px 0 20px; border-top: 1px solid var(--filet); cursor: default; }
.etapes li::before { content: counter(etape); grid-row: 1 / 3; font: 400 2.75rem/.9 var(--didone); color: #9da4b2;
  transition: color .5s ease, transform .5s ease; }
.etapes li > * { grid-column: 2; }
.etapes li.actif::before { color: var(--klein); transform: translateX(4px); }
.etapes p { max-width: 44ch; }

/* Contact */
.contact { align-items: start; }
.contact > .scene { position: sticky; top: 14vh; }
.direct { margin-top: 16px; font-size: .9688rem; color: var(--acier); }
.formulaire { margin-top: 34px; display: grid; gap: 22px; }
.besoin { border: 0; padding: 0; margin: 0; }
.besoin legend, .champ > span { font-size: .875rem; font-weight: 500; color: var(--encre); padding: 0; margin-bottom: 10px; }
.champ > span small { font-weight: 400; color: var(--acier); font-size: inherit; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label { position: relative; cursor: pointer; }
.choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choix span { display: inline-block; padding: 10px 16px; border-radius: 999px; font-size: .9375rem; color: var(--encre);
  background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(10, 12, 18, .18); transition: background .25s, color .25s, box-shadow .25s; }
.choix label:hover span { box-shadow: inset 0 0 0 1px rgba(10, 12, 18, .45); }
.choix input:checked + span { color: #fff; background: linear-gradient(180deg, #343a48, #050608); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px #000; }
.choix input:focus-visible + span { outline: 2px solid var(--klein-clair); outline-offset: 3px; }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.champ { display: grid; }
.champ input, .champ textarea, .champ select { font: inherit; font-size: 1rem; color: var(--encre); width: 100%;
  padding: 12px 14px; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 1px rgba(10, 12, 18, .16), inset 0 2px 4px rgba(10, 12, 18, .04); transition: box-shadow .25s, background .25s; }
.champ textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.champ select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--acier) 50%), linear-gradient(135deg, var(--acier) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.champ input:hover, .champ textarea:hover, .champ select:hover { box-shadow: inset 0 0 0 1px rgba(10, 12, 18, .4); }
.champ input:focus-visible, .champ textarea:focus-visible, .champ select:focus-visible { outline: 2px solid var(--klein-clair); outline-offset: 2px; background: #fff; }
.champ [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b4232f; }
.champ ::placeholder { color: #737b8b; }
.delai { max-width: 280px; }
.envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.note { font-size: .875rem; color: var(--acier); max-width: 40ch; }
.merci { font-size: 1.0625rem; line-height: 1.6; }
.merci strong { display: block; font: italic 500 1.75rem/1.2 var(--didone); margin-bottom: 6px; }
.secoue { animation: secoue .4s ease; }
@keyframes secoue { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.pied { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; max-width: 1440px; margin: 0 auto;
  padding: 36px max(24px, 4.5vw) 96px; font-size: .875rem; color: var(--acier); border-top: 1px solid var(--filet); }

/* ---------- 4. Commandes fixes ---------- */
.commandes { position: fixed; z-index: 20; left: 16px; bottom: 16px; right: 16px; display: flex; gap: 8px; pointer-events: none; }
.cmd { pointer-events: auto; font: 500 .8125rem/1 var(--grotesque); padding: 10px 14px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  color: var(--encre); background: rgba(250, 251, 253, .74); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 12, 18, .1), 0 8px 20px -12px rgba(10, 14, 30, .4); transition: background .3s, color .3s; }
.cmd:hover { background: #fff; }
.cmd-son { margin-left: auto; }
.cmd-son[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, #1e3fb0, var(--klein)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
html.intro .cmd, html.bascule .cmd, html[data-sombre] .cmd { color: #e6e9f2; background: rgba(16, 19, 30, .66); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(255, 255, 255, .1); }
html.intro .cmd:hover, html[data-sombre] .cmd:hover { background: rgba(30, 35, 52, .85); }
html.intro .cmd-rejouer, html.bascule .cmd-rejouer { visibility: hidden; }

/* Sans WebGL : une sphère chromée en CSS tient lieu d'objet */
html.no3d .scene::before { content: ""; position: absolute; inset: 18%; margin: auto; aspect-ratio: 1; max-height: 64%; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 8%, #c9cfda 22%, #59617a 48%, #10131b 70%, #4a74ff 86%, #dfe3ea 100%);
  box-shadow: 0 30px 50px -30px rgba(10, 14, 30, .6); }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 960px) {
  .sec { column-gap: 16px; }
  .prestations { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .marque { display: none; }
  .nav { top: 10px; justify-content: center; padding: 0 10px; }
  .nav nav { gap: 0; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { font-size: .78rem; padding: 8px 9px; }
  .sec { display: flex; flex-direction: column; min-height: 0; padding: 76px 16px 56px; }
  .sec > .scene { order: -1; height: 42vh; height: 42svh; min-height: 240px; max-height: 380px; margin-bottom: 8px; }
  .hero { min-height: 100vh; min-height: 100svh; justify-content: center; padding-bottom: 80px; }
  .hero > .scene { height: 40svh; }
  .hero-texte { padding-top: 0; }
  h1.chrome { font-size: clamp(2.7rem, 13vw, 4rem); }
  h2.chrome { font-size: clamp(2.05rem, 9.4vw, 2.8rem); }
  .methode > .scene { height: 34svh; min-height: 220px; }
  .contact > .scene { position: relative; top: 0; height: 30svh; min-height: 200px; }
  .plaque { padding: 26px 20px 24px; }
  .poincon { position: static; margin-bottom: 0; }
  .plaque > h2 { margin-top: 16px; }
  .chapo { margin-top: 18px; }
  .prestations { margin-top: 26px; }
  .ligne { grid-template-columns: 1fr; }
  .etapes li { grid-template-columns: 44px 1fr; }
  .etapes li::before { font-size: 2.2rem; }
  .actions { margin-top: 30px; }
  .commandes { left: 8px; right: 8px; bottom: 8px; gap: 6px; }
  .cmd { font-size: .75rem; padding: 9px 11px; }
  .pied { padding-bottom: 80px; }
  .ouv-bouton { margin-top: 44px; }
}

/* ---------- Animations réduites ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ouv-bouton::after { animation: none; opacity: 0; }
  .ouverture { transition: opacity .4s ease; }
  html:not(.intro) .ouverture { transform: none; filter: none; }
  .studio { -webkit-mask-image: none; mask-image: none; transition: opacity .45s ease; }
  html.revele .site { transition: opacity .45s ease; }
  .btn, .ouv-bouton, .etapes li::before { transition: none; }
}
