/* ============================================================================
   FELDOR — Design system  ·  base.css
   Palette artisanale (crème · bois · noyer · espresso · or · sauge)
   Typographie éditoriale serif + sans contemporaine
   ========================================================================== */

:root {
  /* --ink-faint assombri pour repasser le contraste WCAG AA (texte secondaire). */
  /* ---- Surfaces claires ---- */
  --cream:       #f7f2e9;
  --cream-2:     #efe6d6;
  --cream-3:     #e8dcc6;
  --paper:       #fffdf8;

  /* ---- Encre / bois ---- */
  --ink:         #2a2018;
  --ink-soft:    #6f6253;
  --ink-faint:   #867a67;
  --line:        #e7dccb;
  --line-strong: #d8c9b0;

  /* ---- Accents bois & or ---- */
  --wood:        #b0875a;
  --wood-deep:   #8a6a43;
  --walnut:      #5e4630;
  --espresso:    #2f2418;
  --espresso-2:  #221a10;
  --gold:        #c9a35d;
  --gold-soft:   #e2c789;
  --gold-bright: #f0d79b;

  /* ---- Surfaces sombres (sections dramatiques) ---- */
  --night:       #1a130b;
  --night-2:     #120d07;
  --night-3:     #0c0804;
  --night-card:  #221910;
  --night-line:  rgba(201, 163, 93, .16);

  /* ---- États ---- */
  --sage:        #6f8a5f;
  --sage-bright: #8aa676;
  --danger:      #c05a3c;
  --danger-soft: #d98a6f;

  /* ---- Dégradés signature ---- */
  --grad-gold:   linear-gradient(135deg, #e7c87f 0%, #c9a35d 42%, #a17b3f 100%);
  --grad-gold-2: linear-gradient(180deg, #f0d79b, #c9a35d);
  --grad-wood:   linear-gradient(160deg, #6d4f33, #3a2c1d);
  --grad-night:  radial-gradient(120% 130% at 50% -10%, #2a1f12 0%, #160f08 55%, #0c0804 100%);

  /* ---- Typo ---- */
  --serif: "Cormorant Garamond", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Mesures ---- */
  --maxw: 1240px;
  --announce-h: 44px;
  --radius:    18px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --ease:      cubic-bezier(.22, 1, .36, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);

  --shadow-sm: 0 2px 8px rgba(47, 36, 24, .06);
  --shadow:    0 18px 50px -18px rgba(47, 36, 24, .28);
  --shadow-lg: 0 40px 100px -30px rgba(33, 26, 16, .45);
  --glow-gold: 0 0 0 1px rgba(201,163,93,.25), 0 24px 70px -22px rgba(201,163,93,.5);
}

/* ============================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  /* Les animations INFINIES ne s'arrêtent pas avec une durée quasi nulle : on les coupe. */
  .marquee__track, .scroll-cue .line, .scroll-cue .line::after, [data-dust] { animation: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt";
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
::selection { background: rgba(201, 163, 93, .3); color: var(--espresso); }

/* ============================================================================
   Typographie
   ========================================================================== */
.serif  { font-family: var(--serif); }
.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.01em;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--wood-deep);
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--wood));
}
.eyebrow.center::before { content: none; }

.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-soft); }

/* Marque Feldor (logo mark + wordmark) — partagé site + admin */
.brand { display: inline-flex; align-items: center; gap: 11px; line-height: 1; }
.brand__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand__name { font-family: var(--sans); font-weight: 800; font-size: 21px; letter-spacing: .18em; color: inherit; transition: color .3s; }
.brand--sm .brand__mark { width: 27px; height: 27px; }
.brand--sm .brand__name { font-size: 16px; letter-spacing: .2em; }

/* Texte avec dégradé or */
.gold-text {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================================
   Layout helpers
   ========================================================================== */
.container { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
.container-wide { width: min(1420px, 100% - 40px); margin-inline: auto; }
.section { position: relative; padding: clamp(80px, 11vw, 160px) 0; }
.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.stack-sm > * + * { margin-top: 12px; }

/* ============================================================================
   Boutons
   ========================================================================== */
.btn {
  --bg: var(--espresso);
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6em;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 700; letter-spacing: .01em;
  color: #f4e8d2; background: var(--bg);
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .3s;
  box-shadow: 0 12px 30px -12px rgba(47, 36, 24, .6);
  will-change: transform;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-gold); opacity: 0;
  transition: opacity .4s var(--ease);
  z-index: -1;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow-gold); }
.btn span, .btn svg { position: relative; z-index: 1; transition: color .3s; }
.btn--gold { --bg: transparent; color: var(--espresso); box-shadow: 0 14px 34px -12px rgba(201,163,93,.55); }
.btn--gold::after { opacity: 1; }
.btn--gold:hover { color: #1c1409; }
.btn--ghost {
  --bg: transparent;
  color: var(--espresso);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn--ghost::after { background: var(--espresso); }
.btn--ghost:hover { color: #f4e8d2; box-shadow: inset 0 0 0 1.5px var(--espresso); }
.btn--on-dark { color: var(--cream); box-shadow: inset 0 0 0 1.5px var(--night-line); --bg: transparent; }
.btn--on-dark::after { background: var(--grad-gold); }
.btn--on-dark:hover { color: #1c1409; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--lg { padding: 18px 34px; font-size: 15px; }

/* ============================================================================
   Textures · grain · vignette
   ========================================================================== */
.grain::before {
  content: ""; position: fixed; inset: 0; z-index: 9998;
  pointer-events: none; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Filet bois en haut de section sombre */
.hairline {
  height: 1px; border: none;
  background: linear-gradient(90deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
  margin: 0;
}

/* ============================================================================
   Reveal on scroll (piloté par effects.js)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(.94); }
[data-reveal].in {
  opacity: 1;
  transform: none;
}
/* Sur mobile, les translations horizontales sont converties en verticales
   pour éviter tout débordement / défilement horizontal parasite. */
@media (max-width: 920px) {
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(34px); }
}

/* Curseur lumineux personnalisé */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: normal;
}
.cursor-dot { width: 7px; height: 7px; background: var(--wood-deep); transition: opacity .3s, width .25s, height .25s; }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(176,135,90,.55);
  transition: width .35s var(--ease), height .35s var(--ease), border-color .35s, background .35s, opacity .3s;
}
.cursor-ring.hover { width: 64px; height: 64px; border-color: rgba(201,163,93,.8); background: rgba(201,163,93,.08); }
body.using-touch .cursor-dot, body.using-touch .cursor-ring { display: none; }

/* Barre de progression de défilement */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--grad-gold); z-index: 9997;
  box-shadow: 0 0 12px rgba(201,163,93,.7);
}

/* Accessibilité focus */
:focus-visible { outline: 2px solid var(--wood); outline-offset: 3px; border-radius: 4px; }

/* Utilitaires */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only:focus { position: fixed; top: 12px; left: 12px; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; padding: 10px 16px; background: var(--espresso); color: var(--cream); border-radius: 10px; z-index: 10000; box-shadow: var(--shadow); }
.nowrap { white-space: nowrap; }

/* ============================================================================
   Consentement cookies — bannière + modale (partagé site + pages légales)
   ========================================================================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9996;
  padding: 16px clamp(16px, 4vw, 40px) calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 13, 7, .92);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--night-line);
  box-shadow: 0 -20px 60px -30px rgba(0, 0, 0, .8);
  animation: cookie-rise .5s var(--ease-out) both;
}
@keyframes cookie-rise { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.cookie-banner__in {
  width: min(var(--maxw), 100% - 0px); margin-inline: auto;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: space-between;
}
.cookie-banner__text { flex: 1 1 420px; font-size: 13.5px; line-height: 1.55; color: rgba(247, 242, 233, .82); }
.cookie-banner__text strong { color: var(--cream); font-weight: 700; }
.cookie-banner__text a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__text a:hover { color: var(--gold-bright); }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.cookie-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 700; letter-spacing: .01em;
  transition: transform .25s var(--ease), background .3s, color .3s, border-color .3s; white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn--gold { background: var(--grad-gold); color: #1c1409; box-shadow: 0 12px 26px -12px rgba(201, 163, 93, .6); }
.cookie-btn--gold:hover { color: #1c1409; box-shadow: var(--glow-gold); }
.cookie-btn--ghost { background: transparent; color: var(--cream); border: 1px solid rgba(201, 163, 93, .34); }
.cookie-btn--ghost:hover { background: rgba(201, 163, 93, .12); border-color: rgba(201, 163, 93, .6); }

/* Modale */
.cookie-modal {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  padding: 20px; background: rgba(9, 6, 3, .62); backdrop-filter: blur(6px);
  animation: cookie-fade .3s ease both;
}
@keyframes cookie-fade { from { opacity: 0; } to { opacity: 1; } }
.cookie-modal__card {
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, #1c150d, #140e07); color: var(--cream);
  border: 1px solid var(--night-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 36px);
}
.cookie-modal__head h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; margin-bottom: 8px; }
.cookie-modal__head p { font-size: 14px; color: rgba(247, 242, 233, .66); margin-bottom: 22px; }
.cookie-modal__list { display: grid; gap: 14px; }
.cookie-cat {
  display: flex; align-items: flex-start; gap: 16px; justify-content: space-between;
  padding: 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .03); border: 1px solid var(--night-line);
}
.cookie-cat__info h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; color: var(--cream); }
.cookie-cat__info p { font-size: 13px; color: rgba(247, 242, 233, .62); line-height: 1.5; }
.cookie-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; cursor: pointer; }
.cookie-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cookie-switch__slider {
  position: absolute; inset: 0; border-radius: 999px; background: rgba(247, 242, 233, .18);
  transition: background .3s; border: 1px solid var(--night-line);
}
.cookie-switch__slider::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream); transition: transform .3s var(--ease);
}
.cookie-switch input:checked + .cookie-switch__slider { background: var(--grad-gold); }
.cookie-switch input:checked + .cookie-switch__slider::before { transform: translateX(20px); }
.cookie-switch input:disabled + .cookie-switch__slider { opacity: .7; cursor: not-allowed; }
.cookie-switch input:disabled { cursor: not-allowed; }
.cookie-modal__foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 24px; }

@media (max-width: 640px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .cookie-btn { flex: 1 1 auto; }
  .cookie-modal__foot { justify-content: stretch; }
  .cookie-modal__foot .cookie-btn { flex: 1 1 140px; }
}

/* ============================================================================
   Bandeau d'annonce (mini-CMS — injecté par content.js si activé)
   ========================================================================== */
.site-announce {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;                 /* au-dessus du header fixe (z-index 100) */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: var(--announce-h);
  padding: 8px 52px 8px 20px;
  background: var(--grad-night);
  color: var(--gold-soft);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-align: center;
  border-bottom: 1px solid var(--night-line);
}
.site-announce__in { color: var(--gold-soft); text-decoration: none; }
a.site-announce__in:hover { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.site-announce__x {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;          /* centre le « × » dans une cible tactile ~40px */
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--gold-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  opacity: .75;
  transition: opacity .18s, background .18s;
}
.site-announce__x:hover { opacity: 1; background: rgba(201, 163, 93, .14); }

/* Bandeau fixe présent (classe .has-announce posée par content.js) :
   on réserve sa hauteur en haut de page pour ne rien masquer sous la bannière.
   Le header fixe est décalé d'autant dans site.css. */
html.has-announce body { padding-top: var(--announce-h); }
