/* ============================================================
   Campus Privé · Design system
   Direction : luxe éditorial / raffinement pyrénéen
   Ivoire chaud · vert pin profond · laiton
   ============================================================ */

:root {
  /* Palette */
  --paper:      #F4EFE6;
  --paper-2:    #ECE4D6;
  --paper-3:    #E3D9C6;
  --ink:        #16201B;
  --ink-soft:   #4C574F;
  --ink-faint:  #7A8279;
  --pine:       #0F2A21;
  --pine-deep:  #0A1E17;
  --pine-soft:  #163a2d;
  --brass:      #B68A4E;
  --brass-bright:#D8B274;
  --line:       rgba(22, 32, 27, 0.14);
  --line-soft:  rgba(22, 32, 27, 0.08);
  --line-dark:  rgba(244, 239, 230, 0.16);

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Metrics */
  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--pine); color: var(--paper); }

/* ===== Grain overlay ===== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 9vw, 8.5rem); position: relative; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 10000;
  background: var(--pine); color: var(--paper);
  padding: 0.75rem 1.25rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ===== Typography ===== */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.04; letter-spacing: -0.015em; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; }
.amp { font-style: italic; color: var(--brass); padding-inline: 0.05em; }

h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.3rem);
  font-optical-sizing: auto;
}
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); letter-spacing: -0.01em; }

.eyebrow, .section-eyebrow, .hero-card-label, .footer-legal {
  font-family: var(--sans);
}

.section-eyebrow {
  display: inline-flex; align-items: baseline; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 1.6rem;
}
.section-eyebrow span {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: 1.05rem; color: var(--brass); letter-spacing: 0;
}
.section-eyebrow.light { color: rgba(244,239,230,0.66); }
.section-eyebrow.light span { color: var(--brass-bright); }

.section-head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem; border-radius: 100px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; transition: all 0.4s var(--ease);
  white-space: nowrap;
}
.btn svg { transition: transform 0.4s var(--ease); }
.btn-primary { background: var(--pine); color: var(--paper); }
.btn-primary:hover { background: var(--pine-deep); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: rgba(22,32,27,0.03); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

/* ===== Header ===== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(244, 239, 230, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; }

.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--pine); }
.brand-mark { color: var(--brass); display: grid; place-items: center; transition: transform 0.5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-18deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.32rem; letter-spacing: -0.01em; color: var(--ink); }
.brand-tag { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.32rem; font-weight: 600; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); position: relative; transition: color 0.3s; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 100%; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 0.25rem;
  padding: 0 var(--gutter) 1.5rem;
  background: rgba(244, 239, 230, 0.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a { padding: 0.85rem 0; font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.mobile-nav a:last-child { border-bottom: 0; }

/* ===== Hero ===== */
.hero { position: relative; padding-top: clamp(8rem, 14vh, 12rem); padding-bottom: clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero-glow {
  position: absolute; top: -25%; right: -10%; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at center, rgba(182,138,78,0.22), rgba(182,138,78,0) 62%);
  pointer-events: none; z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: end;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1.8rem;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 4px rgba(182,138,78,0.16); }
.hero h1 { margin-bottom: 1.8rem; max-width: 16ch; }
.hero-lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.28rem); color: var(--ink-soft); max-width: 52ch; margin-bottom: 2.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-card {
  background: var(--pine); color: var(--paper); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 2.5vw, 2.2rem); box-shadow: 0 30px 60px -30px rgba(15,42,33,0.5);
  position: relative; overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; top: 0; right: 0; width: 140px; height: 140px;
  background: radial-gradient(circle at top right, rgba(216,178,116,0.3), transparent 70%);
}
.hero-card-label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass-bright); margin-bottom: 1.1rem; font-weight: 600; }
.hero-card-statement { font-family: var(--display); font-size: 1.32rem; line-height: 1.25; margin-bottom: 1.6rem; }
.hero-card-statement strong { color: var(--brass-bright); font-weight: 500; font-style: italic; }
.hero-card-list { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.hero-card-list li { display: flex; gap: 0.85rem; align-items: baseline; font-size: 0.95rem; color: rgba(244,239,230,0.86); padding-top: 0.55rem; border-top: 1px solid var(--line-dark); }
.hero-card-list span { font-family: var(--display); font-style: italic; color: var(--brass-bright); font-size: 0.9rem; min-width: 1.4em; }

.hero-scroll { display: flex; align-items: center; gap: 0.8rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); color: var(--ink-faint); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; }
.hero-scroll-line { position: relative; width: 60px; height: 1px; background: var(--line); overflow: hidden; }
.hero-scroll-line::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--brass); animation: scrollline 2.4s var(--ease) infinite; }
@keyframes scrollline { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ===== Expertise / cards ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.card {
  position: relative; padding: clamp(1.8rem, 3vw, 2.6rem); border-radius: var(--radius);
  background: var(--paper-2); border: 1px solid var(--line-soft);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.5s var(--ease);
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 3px;
  background: var(--brass); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -32px rgba(15,42,33,0.4); background: var(--paper); }
.card:hover::after { transform: scaleY(1); transform-origin: top; }
.card-num { font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--brass); display: block; margin-bottom: 1.4rem; }
.card h3 { margin-bottom: 0.7rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ===== Méthode ===== */
.methode { background: var(--paper-2); border-block: 1px solid var(--line-soft); }
.methode-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.methode-intro { position: sticky; top: 7rem; }
.methode-lead { color: var(--ink-soft); margin-top: 1.5rem; max-width: 40ch; }
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); padding-block: clamp(1.6rem, 3vw, 2.4rem); border-top: 1px solid var(--line); align-items: start; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--display); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 400; color: var(--brass); line-height: 1; font-feature-settings: "ss01"; }
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--ink-soft); }

/* ===== Secteur (dark) ===== */
.secteur { background: var(--pine); color: var(--paper); overflow: hidden; }
.secteur::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 85% 0%, rgba(182,138,78,0.16), transparent 60%);
}
.secteur-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.secteur h2 { color: var(--paper); }
.secteur-copy > p { color: rgba(244,239,230,0.78); max-width: 52ch; margin-top: 0.5rem; }
.secteur-points { list-style: none; padding: 0; margin-top: 2rem; display: grid; gap: 0; }
.secteur-points li { padding: 0.95rem 0; border-top: 1px solid var(--line-dark); padding-left: 1.7rem; position: relative; color: rgba(244,239,230,0.92); }
.secteur-points li:last-child { border-bottom: 1px solid var(--line-dark); }
.secteur-points li::before { content: ""; position: absolute; left: 0; top: 1.35rem; width: 9px; height: 9px; border: 1px solid var(--brass-bright); transform: rotate(45deg); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--pine); padding: clamp(1.5rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: 0.6rem; transition: background 0.4s var(--ease); }
.stat:hover { background: var(--pine-soft); }
.stat-num { font-family: var(--display); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); color: var(--brass-bright); line-height: 1; font-weight: 400; }
.stat-label { font-size: 0.86rem; color: rgba(244,239,230,0.74); line-height: 1.35; }

/* ===== À propos ===== */
.apropos-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.apropos-copy > p { color: var(--ink-soft); margin-top: 1.4rem; max-width: 54ch; }
.legal-card { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(0.6rem, 2vw, 1rem) clamp(1.4rem, 3vw, 2rem); }
.legal-card > div { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line-soft); }
.legal-card > div:last-child { border-bottom: 0; }
.legal-card dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.legal-card dd { font-family: var(--display); font-size: 1.08rem; color: var(--ink); }

/* ===== Footer ===== */
.site-footer { background: var(--pine-deep); color: var(--paper); padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; padding-bottom: 3rem; border-bottom: 1px solid var(--line-dark); }
.footer-brand { max-width: 30ch; }
.footer-mark { display: block; margin-bottom: 0.9rem; }
.footer-mark svg { display: block; }
.footer-brand .brand-name { color: var(--paper); font-size: 1.5rem; }
.footer-brand p { color: rgba(244,239,230,0.62); margin-top: 0.7rem; font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; align-content: start; }
.footer-nav a { color: rgba(244,239,230,0.78); font-size: 0.95rem; transition: color 0.3s; }
.footer-nav a:hover { color: var(--brass-bright); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 2rem; }
.footer-legal { color: rgba(244,239,230,0.5); font-size: 0.8rem; max-width: 70ch; }
.footer-copy { color: rgba(244,239,230,0.5); font-size: 0.8rem; white-space: nowrap; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.menu-open { background: rgba(244,239,230,0.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .mobile-nav.open { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
  .hero h1 { max-width: 100%; }
  .methode-grid, .secteur-grid, .apropos-grid { grid-template-columns: 1fr; }
  .methode-intro { position: static; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-copy { white-space: normal; }
  .hero-scroll { display: none; }
}

/* ===== Legal page ===== */
.legal-page { padding-top: clamp(8rem, 14vh, 11rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.legal-page h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem); margin-bottom: 0.6rem; }
.legal-page .lead { color: var(--ink-soft); margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 56ch; }
.legal-block { max-width: 64ch; padding-block: clamp(1.6rem, 3vw, 2.2rem); border-top: 1px solid var(--line); }
.legal-block:first-of-type { border-top: 0; }
.legal-block h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); margin-bottom: 1rem; }
.legal-block p, .legal-block li { color: var(--ink-soft); }
.legal-block p + p { margin-top: 0.8rem; }
.legal-block ul { padding-left: 1.1rem; margin-top: 0.6rem; display: grid; gap: 0.45rem; }
.legal-block strong { color: var(--ink); font-weight: 600; }
.legal-block a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.legal-block a:hover { color: var(--brass); }
.back-home { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; }
.back-home:hover { color: var(--ink); }
.back-home svg { transition: transform 0.3s var(--ease); }
.back-home:hover svg { transform: translateX(-3px); }
