/* ============================================================
   SCARSELLATO — SHELL partagé (pages département)
   Extrait du flagship 2026-08-05 : tokens, chrome, vocabulaire.
   Une seule source pour le topbar / langue / chips / statements /
   curseur / poussière / assistant. Chaque page n'ajoute que SES sections.
   La home (index.html racine) reste sur son fichier historique —
   migration prévue dans une session dédiée (sa mécanique 3D est fragile).
   Vanilla only. Aucun script tiers.
   ============================================================ */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 300 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-italic-latin.woff2') format('woff2');
  font-weight: 300 600; font-style: italic; font-display: swap;
}

:root {
  --noir: #0d1114;
  --noir-deep: #090c0e;
  --cream: #eae2d8;
  --cream-mut: #b3aca1;
  --gold: #c6a56c;
  --gold-soft: rgb(198 165 108 / 0.35);
  --font-d: 'Fraunces', Georgia, serif;
  --font-b: 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b); background: var(--noir); color: var(--cream);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
.italic { font-style: italic; }
.gold { color: var(--gold); }
main { position: relative; z-index: 2; }

body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.dust { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
html:not(.js) .dust { display: none; }

/* ---------- preloader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; }
.loader-slats { position: absolute; inset: 0; display: flex; }
.loader-slats i { flex: 1; background: var(--noir-deep); }
.loader-core { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; }
.loader-name { font-family: var(--font-d); font-size: 1.6rem; }
.loader-count { font-family: var(--font-d); font-weight: 340; font-size: clamp(4rem, 12vw, 9rem); line-height: 1; }
.loader-bar { width: min(18rem, 60vw); height: 1px; background: rgb(198 165 108 / 0.25); }
.loader-bar span { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }
.loader.done .loader-core { opacity: 0; transition: opacity 0.3s var(--ease); }
.loader.done .loader-slats i { transform: translateY(-101%); transition: transform 0.85s var(--ease); }
.loader.done .loader-slats i:nth-child(2) { transition-delay: 0.06s; }
.loader.done .loader-slats i:nth-child(3) { transition-delay: 0.12s; }
.loader.done .loader-slats i:nth-child(4) { transition-delay: 0.18s; }
.loader.done .loader-slats i:nth-child(5) { transition-delay: 0.24s; }
.loader.done .loader-slats i:nth-child(6) { transition-delay: 0.3s; }
html:not(.js) .loader { display: none; }
@media (prefers-reduced-motion: reduce) { .loader { display: none; } }

/* ---------- rail + curseur ---------- */
.progress-rail { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 60; background: linear-gradient(90deg, #8a6a33, var(--gold)); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid var(--gold); border-radius: 50%; pointer-events: none; z-index: 90; opacity: 0;
  transition: opacity 0.3s var(--ease), width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), background 0.25s var(--ease);
}
.cursor-ring.on { opacity: 0.6; }
.cursor-ring.hot { width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 1; background: rgb(198 165 108 / 0.1); }
.cursor-dot { position: fixed; top: -3px; left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); pointer-events: none; z-index: 91; opacity: 0; }
.cursor-dot.on { opacity: 1; }
@media (pointer: coarse) { .cursor-ring, .cursor-dot { display: none; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.6rem;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgb(9 12 14 / 0.62), transparent);
}
.wordmark { font-family: var(--font-d); font-size: 1.35rem; color: var(--cream); text-decoration: none; }
.live-line { margin-left: 0.6rem; font-size: 0.625rem; letter-spacing: 0.18em; color: var(--cream-mut); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.top-links { margin-left: auto; display: flex; gap: 1.6rem; }
.top-links a { color: var(--cream-mut); text-decoration: none; font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; transition: color 0.3s var(--ease); }
.top-links a:hover, .top-links a[aria-current="page"] { color: var(--gold); }
.lang-switch { display: flex; align-items: center; }
.lang-switch button { background: none; border: 0; padding: 0.5rem 0.55rem; font-family: inherit; font-size: 0.6875rem; letter-spacing: 0.2em; color: var(--cream-mut); text-transform: uppercase; transition: color 0.3s var(--ease); }
.lang-switch button:hover { color: var(--gold); }
.lang-switch button[aria-current="true"] { color: var(--gold); text-decoration: underline; text-underline-offset: 0.4em; text-decoration-color: var(--gold-soft); }
.lang-switch button + button { border-left: 1px solid rgb(255 255 255 / 0.14); }

.btn-pill {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; padding: 0.6rem 1.4rem;
  border: 1px solid var(--gold); border-radius: 999px; background: rgb(9 12 14 / 0.35); backdrop-filter: blur(6px);
  color: var(--gold); text-decoration: none; font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease); will-change: transform;
}
.pill-dot { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; border-radius: 999px; background: var(--gold); color: var(--noir); transition: transform 0.3s var(--ease); }
.btn-pill:hover { background: var(--gold); color: var(--noir); }
.btn-pill:hover .pill-dot { transform: rotate(45deg); background: var(--noir); color: var(--gold); }
.btn-pill.big { font-size: 0.8125rem; padding: 0.9rem 2rem; }

/* ---------- vocabulaire ---------- */
.chip { font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream); background: rgb(9 12 14 / 0.5); backdrop-filter: blur(5px); border: 1px solid var(--gold-soft); padding: 0.45rem 0.85rem; width: fit-content; }
.whisper { font-size: 0.6875rem; letter-spacing: 0.16em; line-height: 1.9; text-transform: uppercase; color: var(--cream); opacity: 0.85; text-align: right; }
.chip-tl { position: absolute; top: 5.2rem; left: clamp(1.25rem, 4vw, 3rem); z-index: 3; }
.chip-br { position: absolute; bottom: 2rem; right: clamp(1.25rem, 4vw, 3rem); z-index: 3; }
.whisper-tr { position: absolute; top: 5.4rem; right: clamp(1.25rem, 4vw, 3rem); z-index: 3; }
/* overflow:hidden sert au masque du reveal ; il clippe au bord du padding,
   d'où le padding-bottom qui rend leur place aux jambages (g, y, p, j). */
.st-line { transform: skewY(var(--vskew, 0deg)); font-family: var(--font-d); font-weight: 340; font-size: clamp(1.9rem, 4.6vw, 3.9rem); line-height: 1.06; letter-spacing: -0.02em; overflow: hidden; padding-bottom: 0.34em; margin-bottom: -0.34em; }
.st-line.big { font-size: clamp(2.4rem, 6.4vw, 5.4rem); }
.st-in { display: inline-block; }
.statement { position: relative; z-index: 2; }

/* ---------- pano ---------- */
.pano { position: relative; min-height: 100vh; overflow: hidden; }
.pano-bg { position: absolute; inset: -4%; }
.pano-bg img { width: 100%; height: 100%; object-fit: cover; }
.pano-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgb(9 12 14 / 0.5) 0%, transparent 26%, transparent 55%, rgb(9 12 14 / 0.78) 100%),
    radial-gradient(ellipse 80% 60% at 70% 30%, transparent 50%, rgb(9 12 14 / 0.35) 100%);
}
.pano-scrim.deep { background: linear-gradient(180deg, rgb(9 12 14 / 0.72) 0%, rgb(9 12 14 / 0.5) 45%, rgb(9 12 14 / 0.88) 100%); }
.pano-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.pano-bg video.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pano-bg video { display: none; } }

/* ---------- formulaire ---------- */
.atelier-form { margin-top: 2.4rem; width: min(38rem, 100%); display: flex; flex-direction: column; gap: 0.7rem; }
.af-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.af-row input { flex: 1 1 12rem; }
.atelier-form input, .atelier-form textarea {
  background: rgb(9 12 14 / 0.55); border: 1px solid var(--gold-soft); color: var(--cream);
  font-family: var(--font-b); font-size: 0.8125rem; letter-spacing: 0.1em; padding: 0.85rem 1rem;
}
.atelier-form textarea { min-height: 7rem; resize: vertical; }
.atelier-form ::placeholder { color: rgb(179 172 161 / 0.7); letter-spacing: 0.12em; font-size: 0.6875rem; text-transform: uppercase; }
.atelier-form input:focus, .atelier-form textarea:focus { outline: none; border-color: var(--gold); }
.atelier-form .btn-pill { align-self: flex-start; }

/* ---------- assistant (le produit lui-même) ---------- */
.chat { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 70; }
.chat-toggle {
  width: 3.4rem; height: 3.4rem; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold); border-radius: 50%; background: var(--noir-deep); color: var(--gold);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.5); position: relative;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.chat-toggle svg { width: 1.5rem; height: 1.5rem; }
.chat-toggle:hover { background: var(--gold); color: var(--noir); transform: translateY(-2px); }
@media (prefers-reduced-motion: no-preference) {
  .chat-toggle::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--gold); border-radius: 50%; animation: fab-ping 3.6s var(--ease) infinite; }
  @keyframes fab-ping { 0%, 55% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
}
.chat-panel[hidden] { display: none; }
.chat-panel {
  position: absolute; right: 0; bottom: 4.2rem; width: min(22rem, calc(100vw - 2.5rem)); max-height: min(28rem, 70vh);
  display: flex; flex-direction: column; background: var(--noir-deep); border: 1px solid var(--gold-soft); box-shadow: 0 16px 50px rgb(0 0 0 / 0.6);
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0.9rem 0.4rem; }
.chat-close { background: none; border: none; color: var(--cream-mut); font-size: 1.5rem; line-height: 1; padding: 0.2rem 0.6rem; }
.chat-close:hover { color: var(--gold); }
.chat-log { overflow-y: auto; padding: 0.75rem 1rem; flex: 1; }
.chat-msg { font-size: 0.8125rem; line-height: 1.5; margin-bottom: 0.7rem; padding: 0.6rem 0.8rem; max-width: 94%; }
.chat-msg.bot { background: rgb(198 165 108 / 0.08); border-left: 2px solid var(--gold); color: var(--cream); }
.chat-msg.user { background: rgb(198 165 108 / 0.16); color: var(--cream); margin-left: auto; }
.chat-msg.pending { color: var(--cream-mut); font-style: italic; }
.chat-sugg-toggle { display: block; width: 100%; text-align: left; background: none; border: none; border-top: 1px solid rgb(198 165 108 / 0.16); color: var(--cream-mut); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.55rem 1rem 0.45rem; cursor: pointer; transition: color 0.25s var(--ease); }
.chat-sugg-toggle:hover { color: var(--gold); }
.chat-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.15rem 1rem 0.9rem; }
.chat-choices.collapsed { display: none; }
.chat-choice { background: none; border: 1px solid var(--gold-soft); border-radius: 999px; color: var(--cream-mut); font-size: 0.72rem; padding: 0.42rem 0.75rem; transition: color 0.25s var(--ease), border-color 0.25s var(--ease); }
.chat-choice:hover { color: var(--gold); border-color: var(--gold); }
.chat-form { display: flex; gap: 0.4rem; padding: 0.7rem 1rem 0.9rem; border-top: 1px solid rgb(198 165 108 / 0.16); }
.chat-input { flex: 1; min-width: 0; background: var(--noir); border: 1px solid var(--gold-soft); color: var(--cream); font-family: var(--font-b); font-size: 0.8125rem; padding: 0.55rem 0.7rem; }
.chat-input::placeholder { color: rgb(179 172 161 / 0.6); letter-spacing: 0.06em; }
.chat-input:focus { outline: none; border-color: var(--gold); }
.chat-send { background: none; border: 1px solid var(--gold-soft); color: var(--gold); padding: 0 0.85rem; font-size: 0.9rem; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.chat-send:hover:not(:disabled) { background: var(--gold); color: var(--noir); }
.chat-send:disabled { opacity: 0.45; }
.chat-note { padding: 0 1rem 0.9rem; font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgb(179 172 161 / 0.65); }

/* ---------- pied ---------- */
.foot-line { padding: 3rem clamp(1.25rem, 5vw, 4rem); font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-mut); border-top: 1px solid rgb(198 165 108 / 0.14); }
.foot-line a { color: var(--gold); text-decoration: none; }

@media (pointer: fine) { *, a, button, input, textarea, select, label { cursor: none !important; } }
@media (max-width: 47rem) {
  /* Même traitement que la home (correctif 08-03) : sous 375 px, wordmark + liens +
     langue + CTA font 644 px de large — le CTA sortait de l'écran et « Contact » était
     coupé. Les liens tombent, la langue prend la place, le CTA devient rond (icône seule).
     La navigation reste assurée par le wordmark (→ accueil) et les liens de bas de section. */
  .live-line, .top-links { display: none; }
  .lang-switch { margin-left: auto; }
  .lang-switch button { padding: 0.5rem 0.4rem; }
  .topbar { gap: 0.9rem; padding: 0.8rem 1rem; }
  .topbar .btn-pill { padding: 0.55rem; }
  .topbar .btn-pill .pill-label { display: none; }
  .whisper-tr { display: none; }
  .st-line.big { font-size: clamp(2.2rem, 9.5vw, 5.4rem); }
  .chip-tl { top: 4.6rem; }
  .atelier-form input, .atelier-form textarea, .chat-input { font-size: 1rem; }
}

/* viewport stable : pas de saut quand la barre d'URL mobile se replie */
@supports (height: 100svh) { .pano { min-height: 100svh; } }
