/* ─────────────────────────────────────────────────────────────────────
   base.css — Foundation mobile-first partagée
   Variables, reset, layout helpers, nav drawer, boutons, animations.
   ───────────────────────────────────────────────────────────────────── */

/* ─── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }

/* ─── Variables (mobile-first defaults) ───────────────────────────────── */
:root {
  /* Colors */
  --bg:       #f8f7f4;
  --bg-warm:  #f2f0ec;
  --dk:       #0e1210;
  --dk2:      #182018;
  --tx:       #111111;
  --tx2:      #686865;
  --tx3:      rgba(17,17,17,.35);
  --ac:       #0d6e64;
  --ac2:      #c47c2e;
  --br:       rgba(17,17,17,.1);
  --br-inv:   rgba(248,247,244,.12);

  /* Fonts */
  --ff-d: 'Fraunces', Georgia, serif;
  --ff-b: 'IBM Plex Sans', system-ui, sans-serif;
  --ff-m: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout — mobile first */
  --w:    1100px;
  --px:   20px;
  --sv:   64px;
}
@media (min-width: 768px)  { :root { --px: 32px; --sv: 88px; } }
@media (min-width: 1100px) { :root { --px: 40px; --sv: 110px; } }

/* ─── Base ────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--ff-b);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Grain overlay — tactile, distinctif */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: .055;
  pointer-events: none;
  z-index: 9999;
}

/* ─── Utilities ───────────────────────────────────────────────────────── */
.wrap  { max-width: var(--w); margin: 0 auto; padding: 0 var(--px); }
.sec   { padding: var(--sv) 0; }
.dark  { background: radial-gradient(ellipse 120% 100% at 65% 40%, #182018 0%, #0b0f0d 100%); color: var(--bg); }
.dark2 { background: radial-gradient(ellipse 100% 100% at 30% 60%, #1e271e 0%, #0e1210 100%); color: var(--bg); }
.teal  { background: var(--ac); color: #fff; }

/* ─── Typography (fluid, shared) ─────────────────────────────────────── */
h1, h2, h3 { font-family: var(--ff-d); font-weight: 300; letter-spacing: -.025em; line-height: 1.15; }

/* ─── Buttons (shared, ≥44px tactile) ────────────────────────────────── */
.btn-solid {
  font-size: 14.5px; font-weight: 500;
  padding: 14px 28px;
  background: linear-gradient(135deg, #1e1e1e 0%, var(--tx) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 10px rgba(17,17,17,.22);
  color: var(--bg); border-radius: 3px;
  transition: opacity .2s, transform .15s;
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-solid:hover { opacity: .82; }
.btn-solid:active { transform: scale(.97); }

.btn-ghost {
  font-size: 14.5px; color: var(--tx2);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  transition: color .2s;
}
.btn-ghost span { transition: transform .2s; }
.btn-ghost:hover { color: var(--tx); }
.btn-ghost:hover span { transform: translateX(5px); }

/* ─── Navigation ──────────────────────────────────────────────────────── */
nav#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 62px; display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
nav#nav.on {
  background: rgba(248,247,244,.94);
  backdrop-filter: blur(12px);
  border-color: var(--br);
}
.nav-in {
  max-width: var(--w); margin: 0 auto; padding: 0 var(--px);
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.nav-logo {
  font-family: var(--ff-d); font-size: 17px; font-weight: 400;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.nav-logo img { height: 26px; width: auto; }

.nav-links { display: none; list-style: none; }
.nav-voice { display: none; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-cta {
  display: none;
  font-size: 13.5px; padding: 9px 18px;
  border: 1px solid var(--tx); border-radius: 3px;
  transition: background .2s, color .2s;
  align-items: center; min-height: 38px;
}
.nav-cta:hover { background: var(--tx); color: var(--bg); }

/* Burger button — mobile only */
.nav-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  margin-right: -8px;
  color: var(--tx);
  position: relative;
}
.nav-burger span {
  display: block; position: absolute;
  left: 12px; right: 12px;
  height: 1.5px; background: currentColor;
  transition: transform .3s ease, opacity .25s ease, top .25s ease;
}
.nav-burger span:nth-child(1) { top: 16px; }
.nav-burger span:nth-child(2) { top: 22px; }
.nav-burger span:nth-child(3) { top: 28px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed; inset: 62px 0 0 0;
  background: var(--bg);
  z-index: 99;
  padding: 28px var(--px) 40px;
  display: flex; flex-direction: column;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.16,1,.3,1), visibility 0s linear .35s;
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-drawer.open {
  transform: translateY(0);
  visibility: visible;
  transition: transform .35s cubic-bezier(.16,1,.3,1), visibility 0s linear 0s;
}
.nav-drawer ul { list-style: none; display: flex; flex-direction: column; }
.nav-drawer a:not(.drawer-voice):not(.drawer-cta) {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 4px;
  font-family: var(--ff-d); font-size: 26px; font-weight: 300;
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--br);
  color: var(--tx);
}
.nav-drawer a:not(.drawer-voice):not(.drawer-cta):active { color: var(--ac); }
.nav-drawer .drawer-voice {
  margin-top: 32px;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--ff-b); font-size: 14.5px; font-weight: 500;
  padding: 14px 22px;
  border: 1px solid var(--br); border-radius: 3px;
  color: var(--tx);
  align-self: flex-start;
  min-height: 48px;
}
.nav-drawer .drawer-cta {
  margin-top: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-b); font-size: 14.5px; font-weight: 500;
  padding: 14px 22px;
  background: var(--tx); color: var(--bg); border-radius: 3px;
  align-self: flex-start;
  min-height: 48px;
}

body.nav-open { overflow: hidden; }

/* Desktop nav: show links inline, hide burger/drawer */
@media (min-width: 800px) {
  .nav-logo { font-size: 19px; }
  .nav-logo img { height: 28px; }
  .nav-links {
    display: flex; align-items: center; gap: 28px;
  }
  .nav-links a {
    font-size: 13.5px; color: var(--tx2);
    transition: color .2s;
  }
  .nav-links a:hover { color: var(--tx); }
  .nav-voice {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: var(--tx2);
    transition: color .2s;
  }
  .nav-voice:hover { color: var(--tx); }
  .nav-right { gap: 16px; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
  .nav-drawer { display: none; }
}

/* ─── Section label / title (shared) ──────────────────────────────────── */
.slabel {
  font-family: var(--ff-m); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--tx2); margin-bottom: 36px;
  display: flex; align-items: center; gap: 16px;
}
.slabel::after {
  content: ''; width: 0; height: 1px;
  background: currentColor; opacity: .35;
  transition: width .6s ease .35s;
}
.slabel.v::after { width: 48px; }
.dark .slabel, .dark2 .slabel { color: rgba(248,247,244,.4); }
.dark .slabel::after, .dark2 .slabel::after { background: rgba(248,247,244,.3); }
.teal .slabel { color: rgba(255,255,255,.5); }
.teal .slabel::after { background: rgba(255,255,255,.35); }
@media (min-width: 768px) { .slabel { margin-bottom: 52px; } }

/* ─── Scroll-in animations ────────────────────────────────────────────── */
.fi-anim {
  opacity: 0; transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.fi-anim.v { opacity: 1; transform: none; }

/* ─── Voice dot (shared keyframe) ─────────────────────────────────────── */
@keyframes pdot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .45; transform: scale(1.4); }
}
.voice-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ac); flex-shrink: 0;
  animation: pdot 2s ease-in-out infinite;
}

/* ─── Pastille RGPD sticky ────────────────────────────────────────────── */
.rgpd-pill {
  position: fixed; bottom: 12px; right: 12px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(14,18,16,.92); color: var(--bg);
  border: 1px solid rgba(248,247,244,.14); border-radius: 999px;
  font-family: var(--ff-m); font-size: 10px; letter-spacing: .04em;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity .2s, transform .2s, border-color .2s;
  text-decoration: none;
}
.rgpd-pill:hover { transform: translateY(-2px); border-color: rgba(248,247,244,.3); }
.rgpd-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(74,222,128,.55);
}
@media (min-width: 600px) {
  .rgpd-pill { bottom: 22px; right: 22px; padding: 9px 14px; font-size: 10.5px; }
}

/* ─── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .fi-anim { opacity: 1; transform: none; }
}
