/* ═══════════════════════════════════════════════════════════════
   Template AS — Split-scroll image fixe
   WebStudio Caraïbes — Template Library
   Typographie : Cormorant Garamond (titres serif) + Inter (corps)
   Grammaire : colonne droite sticky · scroll-spy · 5–7 chapitres
   ═══════════════════════════════════════════════════════════════ */

/* ── 0. PREFERS-REDUCED-MOTION (toujours en tête) ──────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 1. CUSTOM PROPERTIES ───────────────────────────────────── */
:root {
  /* Palette — 1 seul accent + neutres */
  --c-bg:        #faf9f7;
  --c-surface:   #ffffff;
  --c-text:      #1a1a18;
  --c-muted:     #6b6b62;
  --c-rule:      #d8d5cc;
  --c-accent:    #c17c3a;   /* teinte ambre unique */
  --c-accent-lt: #f2e4d0;   /* version claire pour bg */

  /* Typographies */
  --ff-serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --ff-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Tailles fluides */
  --fs-hero:    clamp(2.75rem, 7vw, 5.5rem);
  --fs-display: clamp(2rem,    4vw, 3rem);
  --fs-h2:      clamp(1.5rem,  2.5vw, 2rem);
  --fs-h3:      clamp(1.125rem, 1.5vw, 1.375rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-label:   0.6875rem;

  --lh-hero:    1.05;
  --lh-heading: 1.15;
  --lh-body:    1.75;

  /* Poids */
  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* Espacement */
  --space-xs:   0.5rem;
  --space-s:    1rem;
  --space-m:    1.75rem;
  --space-l:    3.5rem;
  --space-xl:   6rem;
  --space-2xl:  10rem;

  /* Layout split-scroll */
  --col-left:   55%;
  --col-right:  45%;
  --sticky-top: 0;

  /* Transitions */
  --t-fast:  200ms ease;
  --t-med:   400ms ease;
  --t-svg:   600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 2. RESET ───────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
}

/* ── 3. TYPOGRAPHIE ─────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--ff-serif);
  font-weight: var(--fw-semi);
  line-height: var(--lh-heading);
  letter-spacing: 0.01em;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin-block-end: 1em; }
p:last-child { margin-block-end: 0; }

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--c-text); }
a:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── 4. HEADER / NAV ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-rule);
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-family: var(--ff-serif);
  font-size: 1.25rem;
  font-weight: var(--fw-semi);
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.header-nav {
  display: none; /* affiché tablette+ */
}

.header-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-m);
}

.header-nav a {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  transition: color var(--t-fast);
}
.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--c-accent);
}

.header-cta {
  font-family: var(--ff-sans);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--c-accent);
  color: var(--c-accent);
  border-radius: 2px;
  transition: background var(--t-fast), color var(--t-fast);
}
.header-cta:hover {
  background: var(--c-accent);
  color: var(--c-surface);
}

/* ── 5. LAYOUT PRINCIPAL — SPLIT SCROLL ─────────────────────── */
.split-wrapper {
  display: block;
  padding-top: 3.5rem; /* compense header fixe */
}

/* Colonne gauche — défile normalement */
.col-left {
  padding: var(--space-xl) clamp(1.25rem, 6vw, 4rem) var(--space-2xl);
}

/* Colonne droite — affichée en block sur mobile, sticky sur desktop */
.col-right {
  display: none; /* masquée sur mobile */
}

/* ── 6. CHAPITRE HERO (00) ──────────────────────────────────── */
.chapter-hero {
  padding-block-end: var(--space-xl);
  border-bottom: 1px solid var(--c-rule);
  margin-block-end: var(--space-xl);
}

.chapter-hero__num {
  display: block;
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  margin-block-end: var(--space-s);
}

.chapter-hero__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-hero);
  font-weight: var(--fw-semi);
  line-height: var(--lh-hero);
  margin-block-end: var(--space-m);
}

.chapter-hero__sub {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-family: var(--ff-serif);
  font-weight: var(--fw-light);
  color: var(--c-muted);
  font-style: italic;
  max-width: 38ch;
  margin-block-end: var(--space-m);
}

.chapter-hero__intro {
  max-width: 52ch;
  color: var(--c-muted);
  font-size: 1.0625rem;
}

/* Visuel intro mobile (cover) */
.chapter-hero__visual-mobile {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--c-accent-lt);
  border-radius: 4px;
  margin-block-start: var(--space-m);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chapter-hero__visual-mobile svg {
  width: 60%;
  height: 60%;
  opacity: 0.6;
}

/* ── 7. CHAPITRES (01–06) ───────────────────────────────────── */
.chapter {
  padding-block: var(--space-xl);
  border-bottom: 1px solid var(--c-rule);
}
.chapter:last-of-type { border-bottom: none; }

.chapter__num {
  display: block;
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  margin-block-end: var(--space-s);
}

.chapter__title {
  margin-block-end: var(--space-s);
  color: var(--c-text);
}

.chapter__body {
  max-width: 56ch;
  color: var(--c-muted);
}

/* Visuel mobile per-chapter */
.chapter__visual-mobile {
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--c-accent-lt);
  border-radius: 4px;
  margin-block-start: var(--space-m);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chapter__visual-mobile svg {
  width: 55%;
  height: 55%;
  opacity: 0.55;
}

/* ── 8. LISTE / ITEMS ───────────────────────────────────────── */
.feature-list {
  list-style: none;
  margin-block-start: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.feature-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.feature-list li::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  margin-top: 0.55em;
  flex-shrink: 0;
}

/* ── 9. PANNEAU VISUEL DROIT (sticky, desktop only) ─────────── */
.sticky-panel {
  position: sticky;
  top: var(--sticky-top);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-accent-lt);
  overflow: hidden;
}

/* Conteneur de chaque visuel SVG */
.visual-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10%;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-svg), transform var(--t-svg);
  pointer-events: none;
}

.visual-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.visual-slide svg {
  width: 100%;
  height: auto;
  max-width: 340px;
}

/* AnimationDesigner — slot SVG accent */
/* .accent-path { stroke-dasharray: 800; stroke-dashoffset: 800; } */
/* .is-active .accent-path { animation: draw-path 1.2s var(--t-svg) forwards; } */
/* @keyframes draw-path { to { stroke-dashoffset: 0; } } */

/* Numéro de chapitre sur le panneau */
.sticky-panel__num {
  position: absolute;
  bottom: var(--space-m);
  right: var(--space-m);
  font-family: var(--ff-serif);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: var(--fw-semi);
  color: var(--c-accent);
  opacity: 0.12;
  line-height: 1;
  user-select: none;
  transition: opacity var(--t-med);
}

/* ── 10. SECTION CONTACT ────────────────────────────────────── */
.contact-section {
  padding: var(--space-xl) clamp(1.25rem, 6vw, 4rem);
  background: var(--c-surface);
  border-top: 1px solid var(--c-rule);
}

.contact-section h2 {
  margin-block-end: var(--space-m);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  max-width: 480px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.875rem;
  background: var(--c-bg);
  border: 1.5px solid var(--c-rule);
  border-radius: 2px;
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  color: var(--c-text);
  transition: border-color var(--t-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--c-accent);
}

.form-group textarea { min-height: 120px; resize: vertical; }

.btn-submit {
  align-self: flex-start;
  padding: 0.75rem 2rem;
  background: var(--c-accent);
  color: var(--c-surface);
  border: none;
  border-radius: 2px;
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.btn-submit:hover { background: var(--c-text); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* ── 11. FOOTER ─────────────────────────────────────────────── */
.site-footer {
  padding: var(--space-l) clamp(1.25rem, 6vw, 4rem);
  background: var(--c-text);
  color: var(--c-bg);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

.footer-brand {
  font-family: var(--ff-serif);
  font-size: 1.125rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.02em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
}

.footer-nav a {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.6);
  transition: color var(--t-fast);
}
.footer-nav a:hover { color: var(--c-accent); }

.footer-legal {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-s);
}

.footer-studio {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.35);
}

.footer-studio a {
  color: rgba(255,255,255,0.45);
}
.footer-studio a:hover { color: var(--c-accent); }

/* ── 12. TABLETTE (768 px+) ─────────────────────────────────── */
@media (min-width: 768px) {
  .header-nav { display: block; }

  .chapter-hero__visual-mobile { display: none; }
  .chapter__visual-mobile { display: none; }

  .split-wrapper {
    display: flex;
    align-items: flex-start;
  }

  .col-left {
    width: var(--col-left);
    min-width: 0;
  }

  .col-right {
    display: block;
    width: var(--col-right);
    position: sticky;
    top: 3.5rem; /* sous le header fixe */
    height: calc(100vh - 3.5rem);
  }

  .sticky-panel {
    top: 0;
    height: 100%;
  }
}

/* ── 13. DESKTOP (1024 px+) ─────────────────────────────────── */
@media (min-width: 1024px) {
  :root {
    --col-left: 52%;
    --col-right: 48%;
  }

  .col-left {
    padding-inline-start: clamp(2rem, 6vw, 5rem);
    padding-inline-end: clamp(2rem, 4vw, 3.5rem);
  }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--space-s);
  }

  .footer-legal {
    border-top: none;
    padding-top: 0;
    margin-left: auto;
    text-align: right;
  }
}

/* ── 14. SKIP LINK ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--c-accent);
  color: var(--c-surface);
  font-size: var(--fs-small);
  border-radius: 0 0 4px 4px;
  z-index: 999;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }
