:root {
  /* Palette — identique à la prod */
  --bg: #0F0E0C;
  --bg-alt: #161412;
  --ink: #E8D5B7;
  --bright: #F4E8D2;
  --accent: #D9A876;
  --accent-bright: #EAC9A5;
  --mute: #8C8378;
  --rule: rgba(232, 213, 183, 0.15);
  --rule-soft: rgba(232, 213, 183, 0.07);

  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  --sidebar: clamp(15rem, 22vw, 21rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--ink); color: var(--bg); }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }

:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ============ Index sidebar ============ */

.index {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar);
  padding: 2.4rem 1.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  border-right: 1px solid var(--rule);
  background: var(--bg);
  z-index: 10;
  animation: fade 0.9s ease both;
}

.index-top { display: block; }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--bright);
  display: block;
}
.wordmark:hover { color: var(--accent-bright); }

.wordmark-sub {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.65;
  margin: 0.85rem 0 0;
  max-width: 15rem;
}

.index-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.nav-group { display: flex; flex-direction: column; gap: 0.3rem; }

.nav-head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.nav-head:hover { color: var(--accent-bright); }
.nav-head.active { color: var(--accent); }

.rn {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--mute);
  min-width: 1.7rem;
}
.nav-head.active .rn { color: var(--accent); }

.nav-sub {
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.6;
  padding-left: 2.45rem;
}

.index-foot { display: flex; flex-direction: column; gap: 1.1rem; }

.foot-cta {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.foot-cta:hover { color: var(--accent-bright); }

.foot-meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--mute);
  line-height: 1.7;
  margin: 0;
}

.foot-legal {
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.04em;
  margin: 0;
}
.foot-legal a {
  color: var(--mute);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}
.foot-legal a:hover { color: var(--accent); }

/* ============ Main column ============ */

main { margin-left: var(--sidebar); }

.hero { height: 100vh; min-height: 600px; overflow: hidden; position: relative; }

.hero-slideshow { position: absolute; inset: 0; }

.hero-slide {
  position: absolute;
  inset: 0;
  background-color: var(--bg-alt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 3s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }

.img-hero { background-image: url("images/hero.jpg"); }
.img-bandeau-1 { background-image: url("images/bandeau-1.jpg"); }
.img-bandeau-2 { background-image: url("images/bandeau-2.jpg"); }

/* ---- Blocks ---- */

.block {
  padding: 7rem clamp(1.6rem, 5.5vw, 5.5rem);
  border-top: 1px solid var(--rule-soft);
}

.sec-index {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.sec-index .rn { color: var(--mute); min-width: 0; }

.statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 3.3vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--bright);
  margin: 0 0 3.2rem;
  max-width: 22ch;
}
.statement em { font-style: italic; color: var(--accent); }
.statement.big { max-width: 20ch; font-size: clamp(2rem, 4.2vw, 3.4rem); margin-bottom: 2.5rem; }

/* ---- Entries (portes / champs) ---- */

.entries { display: grid; gap: 3rem 3.5rem; }
.entries-3 { grid-template-columns: repeat(3, 1fr); }
.entries-2 { grid-template-columns: repeat(2, 1fr); max-width: 64rem; }

.entry { border-top: 1px solid var(--rule); padding-top: 1.4rem; }

.entry-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.95rem;
}

.entry h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  color: var(--bright);
  margin: 0 0 0.65rem;
}

.entry p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink);
  margin: 0;
}

.block-note {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 40rem;
  margin: 4rem 0 0;
  text-wrap: pretty;
}
.block-note em { font-style: normal; color: var(--accent); }

/* ---- Prose (tarifs / studio) ---- */

.prose { max-width: 40rem; }
.prose p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.72;
  color: var(--ink);
  margin: 0 0 1.15rem;
}
.prose p:last-child { margin-bottom: 0; }

/* ---- Steps (méthode) ---- */

.steps { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.steps li {
  display: flex;
  gap: 2.3rem;
  padding: 1.9rem 0;
  border-top: 1px solid var(--rule-soft);
}
.steps li:first-child { border-top: none; padding-top: 0; }

.step-n {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  min-width: 2rem;
  padding-top: 0.4rem;
}

.steps h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  color: var(--bright);
  margin: 0 0 0.5rem;
}
.steps p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink);
  margin: 0;
  max-width: 38rem;
}

/* ---- Questions ---- */

.qa-list { max-width: 44rem; }
.qa { padding: 1.8rem 0; border-top: 1px solid var(--rule-soft); }
.qa:first-child { border-top: none; padding-top: 0; }
.qa h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.14rem;
  color: var(--bright);
  margin: 0 0 0.6rem;
}
.qa p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

/* ---- Pull quote (studio) ---- */

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--bright);
  max-width: 22ch;
  margin: 3.8rem 0 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--accent);
  text-wrap: balance;
}

/* ---- Full-bleed image breaks ---- */

.bleed { margin: 0; }
.bleed-img {
  width: 100%;
  aspect-ratio: 2.4 / 1;
  background-color: var(--bg-alt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---- Closing ---- */

.closing { padding-top: 6rem; padding-bottom: 8rem; }

.cta {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.cta::after { content: "→"; transition: transform 0.25s ease-out; display: inline-block; }
.cta:hover { color: var(--accent-bright); }
.cta:hover::after { transform: translateX(8px); }

/* ============ Dedicated section pages (comportement Dan Fink) ============ */

.page-manifesto {
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem clamp(1.5rem, 5vw, 4rem);
  animation: fade 1s ease both;
}
.page-manifesto .sec-index { justify-content: center; margin-bottom: 2.4rem; }

.manifesto-line {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--bright);
  max-width: 34ch;
  margin: 0;
  text-wrap: balance;
}
.manifesto-line em { font-style: italic; color: var(--accent); }

.scroll-hint {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--mute);
  margin-top: 3.5rem;
  animation: bob 2.4s ease-in-out infinite;
}

.page-body {
  border-top: 1px solid var(--rule-soft);
  padding: 5.5rem clamp(1.6rem, 5.5vw, 5.5rem) 7.5rem;
  display: flex;
  justify-content: center;
}
.page-content { width: 100%; max-width: 46rem; }

.page-eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin: 0 0 3rem;
}

.page-entries { grid-template-columns: 1fr; gap: 2.6rem; }
.page-cta { margin-top: 4rem; }

/* ============ Animations ============ */

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ============ Mobile ============ */

@media (max-width: 900px) {
  /* La sidebar se déplie en colonne. .index passe en display:contents pour que ses
     enfants deviennent des items flex du body : le diaporama (home) ou le contenu
     (pages section) remonte avant le pied, et le pied — CTA + identité + mentions —
     se pose tout en bas, après le contenu, comme un vrai footer. */
  body { display: flex; flex-direction: column; min-height: 100vh; }
  .index { display: contents; }

  .index-top  { order: 1; padding: 1.7rem 1.4rem 1.3rem; }
  .index-nav  { order: 2; padding: 0 1.4rem 1.6rem; border-bottom: 1px solid var(--rule);
                flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.3rem; }
  main        { order: 3; margin-left: 0; }
  .index-foot { order: 4; padding: 1.6rem 1.4rem; gap: 0.8rem; border-top: 1px solid var(--rule); }

  .nav-group { flex-direction: row; }
  .nav-sub { display: none; }

  .hero { height: 62vh; min-height: 360px; }

  .block { padding: 4.5rem 1.4rem; }
  .entries-3, .entries-2 { grid-template-columns: 1fr; gap: 2.5rem; }
  .bleed-img { aspect-ratio: 3 / 2; }

  /* Titres : sauts desktop masqués + police réduite pour tenir sur deux lignes (balance équilibre). */
  .manifesto-line br.br-d { display: none; }
  .manifesto-line { font-size: clamp(1.3rem, 5.4vw, 2rem); }

  /* CTA de fin de contenu masqué en mobile : le footer porte déjà l'appel à l'action.
     Conservé sur desktop (sidebar fixe, le CTA de contenu reste utile en bas de page). */
  .page-cta { display: none; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .hero-slide.is-active { opacity: 1; }
}

/* ============ Pages légales (mentions, CGV) ============ */

.legal main {
  margin: 0 auto;
  max-width: 44rem;
  padding: 4rem 1.6rem 2rem;
}

.legal .back {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3.5rem;
}
.legal .back::before { content: "←"; display: inline-block; transition: transform 0.25s ease-out; }
.legal .back:hover { color: var(--accent); }
.legal .back:hover::before { transform: translateX(-5px); }

.legal h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--bright);
  margin: 0 0 0.8rem;
}

.legal .meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 1rem;
}

.legal section {
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.legal section:last-of-type { border-bottom: none; }

.legal h2 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}

.legal h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
  color: var(--bright);
  margin: 1.9rem 0 0.6rem;
}

.legal p, .legal li {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: none;
}
.legal p { margin: 0 0 1.1rem; }
.legal ul, .legal ol { padding-left: 1.2rem; margin: 0 0 1.1rem; }
.legal li { margin-bottom: 0.5rem; }

.legal strong { font-weight: 600; color: var(--bright); }
.legal em { font-style: italic; }

.legal a:not(.back) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.legal a:not(.back):hover { color: var(--accent-bright); text-decoration-color: var(--accent-bright); }

.legal footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 0;
  margin-top: 4rem;
}
.legal footer p {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--mute);
  line-height: 1.6;
  margin: 0 0 0.5rem;
}
.legal .fine { font-size: 0.6rem; }
.legal .fine a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}
.legal .fine a:hover { color: var(--accent-bright); }

@media (min-width: 720px) {
  .legal main { padding: 6rem 2rem 3rem; }
}
