/* Police Archivo hébergée sur le site : aucun appel à Google (RGPD) */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 300 800; font-stretch: 62% 125%; font-display: swap; src: url(../fonts/archivo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 300 800; font-stretch: 62% 125%; font-display: swap; src: url(../fonts/archivo-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #0d0d0e;
  --ink-2: #161618;
  --paper: #efede8;
  --paper-2: #e4e1da;
  --text: #f1efea;
  --muted: #8e8c87;
  --line: rgba(255, 255, 255, 0.14);
  --line-dark: rgba(13, 13, 14, 0.14);
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--ink); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3 { font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.05; }

/* ---------- Chargement ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 14px; background: var(--ink); transition: opacity .6s, visibility .6s; }
.loader-bar { width: 180px; height: 1px; background: var(--line); }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--text); transition: width .3s; }
.loader p { font-size: 12px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.loader.hidden { opacity: 0; visibility: hidden; }

/* ---------- Boutons ---------- */
.btn { display: inline-block; padding: 15px 26px; background: var(--text); color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--text); transition: background .2s, color .2s; }
.btn:hover { background: transparent; color: var(--text); }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: transparent; color: var(--ink); }

/* ---------- En-tête ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 40px; padding: 0 var(--gutter); height: 76px; transition: background .3s; }
.scrolled .topbar { background: rgba(13, 13, 14, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: block; color: var(--text); line-height: 0; }
/* Logo Carbone Covering (dessiné une fois en haut de chaque page, réutilisé partout) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.logo { display: block; height: 48px; width: calc(48px * 383.32 / 128.58); }
.loader-logo { height: 52px; width: calc(52px * 383.32 / 128.58); margin: 0 auto 10px; color: var(--text); }
.nav { display: flex; gap: 34px; margin-left: auto; font-size: 14px; font-weight: 500; }
.nav a { position: relative; white-space: nowrap; padding: 6px 0; color: #cfcdc8; transition: color .2s; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .25s; }
.nav a:hover { color: var(--text); }
.nav a:hover::after { right: 0; }
.btn-cta { padding: 13px 24px; }
/* Sur l'animation (fond clair de la baie vitrée) : liens et bouton à l'encre pour rester lisibles */
@media (min-width: 769px) {
  body:not(.scrolled):not(.page):not(.no-webgl) .nav a { color: var(--ink); font-weight: 600; }
  body:not(.scrolled):not(.page):not(.no-webgl) .nav a:hover { color: #000; }
  body:not(.scrolled):not(.page):not(.no-webgl) .btn-cta { background: var(--ink); color: var(--text); border-color: var(--ink); }
  body:not(.scrolled):not(.page):not(.no-webgl) .btn-cta:hover { background: transparent; color: var(--ink); }
}
.menu-toggle { display: none; }

/* ---------- Expérience 3D ---------- */
.experience { height: 700vh; position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#scene { width: 100%; height: 100%; display: block; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(13, 13, 14, .82) 0%, rgba(13, 13, 14, .35) 32%, transparent 52%), linear-gradient(0deg, rgba(13, 13, 14, .5) 0%, transparent 25%); }

.panel { position: absolute; left: var(--gutter); top: 50%; max-width: 420px; transform: translateY(calc(-50% + 24px)); opacity: 0; pointer-events: none; transition: opacity .5s ease, transform .5s ease; }
.panel.visible { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.panel-intro { max-width: 680px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #cfcdc8; margin-bottom: 22px; }
.panel h1 { font-size: clamp(40px, 6vw, 88px); font-weight: 800; font-stretch: 115%; letter-spacing: -0.025em; line-height: .98; }
.panel h1 span { color: #a9a7a2; font-weight: 300; }
/* Titre d'accueil : la ligne fine passe devant le bas clair de la baie vitrée, une ombre douce la détache */
.panel-intro h1 span { color: #c9c7c2; text-shadow: 0 2px 22px rgba(13, 13, 14, .55), 0 0 2px rgba(13, 13, 14, .35); }
.panel h2 { font-size: clamp(30px, 3.4vw, 48px); margin-bottom: 16px; }
.panel p { color: #d6d4cf; font-size: 17px; }
.step-num { font-size: 13px !important; font-weight: 600; color: var(--muted) !important; letter-spacing: .1em; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.scroll-hint { margin-top: 48px; font-size: 12px !important; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) !important; display: flex; align-items: center; gap: 14px; }
.scroll-hint::before { content: ''; width: 1px; height: 40px; background: linear-gradient(var(--muted), transparent); animation: drip 2s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.configurator { margin: 26px 0 28px; }
.label { font-size: 11px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) !important; margin-bottom: 10px; }
.swatches { display: flex; gap: 8px; margin-bottom: 20px; }
.swatches button { width: 28px; height: 28px; background: var(--c); border: 1px solid rgba(255, 255, 255, .2); outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .2s; }
.swatches button.active, .swatches button:hover { outline-color: var(--text); }
.finishes { display: flex; border: 1px solid var(--line); width: max-content; }
.finishes button { padding: 9px 16px; font-size: 13px; color: var(--muted); border-right: 1px solid var(--line); transition: color .2s, background .2s; }
.finishes button:last-child { border-right: 0; }
.finishes button:hover { color: var(--text); }
.finishes button.active { background: var(--text); color: var(--ink); }

.rail { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); list-style: none; display: flex; flex-direction: column; gap: 20px; counter-reset: step; }
.rail li { counter-increment: step; display: flex; align-items: center; justify-content: flex-end; gap: 14px; font-size: 12px; color: #6f6d69; cursor: pointer; transition: color .3s; }
.rail li::after { content: counter(step, decimal-leading-zero); font-variant-numeric: tabular-nums; width: 20px; text-align: right; }
.rail li span { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s; }
.rail li:hover span, .rail li.current span { opacity: 1; transform: none; }
.rail li.done { color: #a9a7a2; }
.rail li.current { color: var(--text); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 160px) 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.light { background: var(--paper); color: var(--ink); }
.section-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; padding-bottom: 28px; margin-bottom: clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--line); }
.light .section-head { border-color: var(--line-dark); }
.section-head h2 { white-space: nowrap; font-size: clamp(40px, 6vw, 84px); font-weight: 800; letter-spacing: -0.03em; }
.section-head p { font-size: 18px; color: #4c4a46; max-width: 520px; justify-self: end; }

/* Prestations : texte et photos en quinconce */
.split { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split + .split { margin-top: clamp(64px, 9vw, 128px); }
.split-reverse { grid-template-columns: 6fr 5fr; }
.split-reverse .photo { order: 2; }
.photo { position: relative; aspect-ratio: 4 / 5; background: var(--paper-2) center / cover no-repeat; display: grid; place-items: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-a img { object-position: 68% 50%; }
.photo-b img { object-position: 62% 50%; }
.photo span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8b887f; }
.split-text { display: grid; gap: 52px; padding-top: 8px; }
.split-text h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 18px; }
.split-text p { color: #3f3d3a; font-size: 16.5px; max-width: 560px; }
.split-text p + p { margin-top: 12px; }

/* Réalisations : défilement continu de droite à gauche */
#realisations .section-head { margin-bottom: 48px; }
.marquee { overflow: hidden; }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.shot { width: clamp(260px, 30vw, 420px); aspect-ratio: 4 / 3; background: var(--ink-2) center / cover no-repeat; border: 1px solid var(--line); flex: none; padding: 0; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.shot-photo { cursor: zoom-in; }
.shot-photo:hover img, .shot-photo:focus-visible img { transform: scale(1.04); }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }

/* Agrandissement d'une réalisation */
.lightbox { margin: auto; border: 0; padding: 0; max-width: min(1100px, 94vw); max-height: 92vh; background: var(--ink); color: var(--text); display: none; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(5, 5, 6, .86); }
.lightbox img { width: 100%; height: 100%; max-height: 92vh; object-fit: contain; background: #000; display: block; }
.lightbox-text { padding: 40px 36px; align-self: end; }
.lightbox.wide[open] { grid-template-columns: 1fr; }
.lightbox.wide img { max-height: 72vh; }
.lightbox.wide .lightbox-text { padding: 22px 32px 28px; }
.lightbox-text h3 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 12px; }
.lightbox-text p { color: #cfcdc8; font-size: 16px; }
.lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 1; font-size: 30px; line-height: 1; color: var(--text); padding: 4px 12px 8px; background: rgba(13, 13, 14, .72); }
@media (max-width: 768px) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox img { max-height: 62vh; }
  .lightbox-text { padding: 22px 20px 26px; }
}

/* Histoire */
.story-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 64px); }
.story-cols h3 { font-size: 22px; margin-bottom: 14px; }
.story-cols p { color: #3f3d3a; }
.story-cols p + p { margin-top: 10px; }
.todo { font-style: italic; color: #9a3412 !important; }
.story-cols { row-gap: 56px; }
.story-media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.diploma { aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; }
.diploma.has-img { background: #fff; padding: 12px; border: 0; width: 100%; cursor: zoom-in; overflow: hidden; }
.diploma.has-img img { transition: transform .4s; }
.diploma.has-img:hover img, .diploma.has-img:focus-visible img { transform: scale(1.03); }
.diploma img { width: 100%; height: 100%; object-fit: contain; display: block; }
.diploma span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8b887f; }

/* Où */
.zone { border-top: 1px solid var(--line); }
.zone-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: baseline; }
.zone h2 { font-size: clamp(40px, 6vw, 84px); font-weight: 800; letter-spacing: -0.03em; }
.zone p { font-size: clamp(18px, 1.8vw, 24px); color: #cfcdc8; max-width: 560px; }
.zone strong { color: var(--text); font-weight: 600; }
.zone .zone-detail { margin-top: 20px; font-size: 16.5px; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(40px, 7vw, 120px); }
.contact-info h2 { font-size: clamp(40px, 6vw, 84px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 40px; }
.contact-info dl { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--line-dark); margin-bottom: 36px; }
.contact-info dt, .contact-info dd { padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.contact-info dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #77746d; padding-top: 17px; }
.contact-info dd a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact-info dd a:hover { border-color: currentColor; }

.form h3 { font-size: 28px; margin-bottom: 28px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5d5a54; margin-bottom: 22px; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 8px; padding: 12px 0; border: 0; border-bottom: 1px solid #b4b0a6; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 400; transition: border-color .2s; }
.form textarea { resize: vertical; }
.form input[type=file] { font-size: 14px; padding: 10px 0; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #4c4a46; }
.form .check input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.form-msg { margin-top: 16px; font-size: 14px; }

/* Pied de page */
.footer { padding: 36px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.footer .brand { color: var(--text); }
.footer .logo { height: 44px; width: calc(44px * 383.32 / 128.58); }
.footer-links { display: flex; gap: 24px; margin-left: auto; }
.footer a:hover { color: var(--text); }

.fab { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 54px; height: 54px; border-radius: 50%; display: none; place-items: center; background: #25d366; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }

.no-webgl .experience { height: auto; }
.no-webgl .stage { height: auto; padding: 160px var(--gutter) 80px; position: static; }
.no-webgl #scene, .no-webgl .rail, .no-webgl .vignette, .no-webgl .panel:not(.panel-intro) { display: none; }
.no-webgl .panel-intro { position: static; opacity: 1; transform: none; }

/* Informations encore manquantes : à retirer avant la mise en ligne */
mark.todo { background: #ffd400; color: #0d0d0e; padding: 1px 6px; font-weight: 600; font-size: .9em; }

/* ---------- Pages secondaires (mentions légales, confidentialité, 404) ---------- */
.page .topbar { background: var(--ink); border-bottom: 1px solid var(--line); }
.page .btn-cta { margin-left: auto; }
.legal { padding-top: 150px; min-height: 100vh; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.legal-date { font-size: 14px; color: #5d5a54; margin-bottom: 56px; }
.legal h2 { font-size: 20px; margin: 44px 0 12px; padding-top: 24px; border-top: 1px solid var(--line-dark); }
.legal p { margin-bottom: 12px; color: #2c2b28; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: start; gap: 18px; padding: 0 var(--gutter); }
.notfound h1 { font-size: clamp(36px, 6vw, 72px); font-weight: 800; letter-spacing: -0.03em; }
.notfound p { color: #cfcdc8; }
.notfound .btn { margin-top: 12px; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 960px) {
  .section-head, .zone-inner, .contact { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .section-head h2 { white-space: normal; }
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .photo { order: 0; }
  .split-reverse .split-text { padding-top: 0; }
  .photo { aspect-ratio: 4 / 3; }
  .story-cols { grid-template-columns: 1fr; }
  .story-media { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar .logo { height: 40px; width: calc(40px * 383.32 / 128.58); }
  .topbar { height: 64px; gap: 16px; background: linear-gradient(rgba(13, 13, 14, .85), transparent); }
  .btn-cta { margin-left: auto; padding: 10px 14px; font-size: 11px; }
  .menu-toggle { display: grid; gap: 6px; width: 28px; padding: 8px 0; }
  .menu-toggle span { display: block; height: 1.5px; background: var(--text); transition: transform .25s; }
  .menu-open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav { position: fixed; inset: 64px 0 auto; flex-direction: column; gap: 0; padding: 8px 16px 24px; background: var(--ink); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; }
  .nav a { padding: 14px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }

  .vignette { background: linear-gradient(180deg, rgba(13, 13, 14, .8) 0%, transparent 20%), linear-gradient(0deg, rgba(13, 13, 14, .95) 0%, rgba(13, 13, 14, .6) 32%, transparent 55%); }
  .panel { left: 16px; right: 16px; top: auto; bottom: 28px; max-width: none; transform: translateY(24px); }
  .panel.visible { transform: none; }
  .panel p { font-size: 15px; }
  .scroll-hint { margin-top: 24px; }
  .rail { top: 76px; right: 16px; left: 16px; transform: none; flex-direction: row; justify-content: space-between; gap: 6px; }
  .rail li { flex: 1; justify-content: center; font-size: 11px; }
  .rail li span { display: none; }
  .configurator { margin: 16px 0 20px; }
  .swatches { gap: 6px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
  .contact-info dl { grid-template-columns: 96px 1fr; }
  .footer-links { margin-left: 0; }
  .page .topbar { background: var(--ink); }
  .show-fab .fab { display: grid; }
  .fab { width: 42px; height: 42px; right: 12px; bottom: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
  .fab svg { width: 21px; height: 21px; }
}

/* Anti-spam du formulaire : champ masqué aux visiteurs */
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .check a { text-decoration: underline; text-underline-offset: 2px; }
.form-msg.ok { color: #1f6b3a; }
.form-msg.err { color: #a3201a; }
