/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* scroll-behavior: auto — géré par Lenis, pas le CSS natif */

/* ─── VARIABLES (palette originale) ─── */
:root {
  --bg:           #f5f2ed;
  --bg-card:      #ffffff;
  --bg-dark:      #1a1a2e;
  --bg-dark2:     #16213e;
  --ink:          #1c1c1c;
  --ink-soft:     #4a4a5a;
  --ink-muted:    #8a8a9a;
  --accent:       #2d6a4f;
  --accent-light: #52b788;
  --accent-pale:  #d8f3dc;
  --accent2:      #b5450b;
  --accent2-pale: #fde8dc;
  --gold:         #c9a84c;
  --gold-pale:    #fdf3d8;
  --border:       #e2ddd5;
  --border2:      #cdc8bf;
  --nav-h:        64px;
  --max:          1020px;
  --r:            12px;
  --r-lg:         18px;
  --shadow:       0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.10);
}

/* ─── BASE ─── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(245,242,237,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 2.5rem; gap: 2rem;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  letter-spacing: 0.01em; white-space: nowrap; flex-shrink: 0;
}
.nav-logo em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; gap: 0.15rem; list-style: none; margin-left: auto; }
.nav-links a {
  font-size: 0.84rem; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  padding: 0.45rem 0.9rem; border-radius: 7px;
  transition: all .18s;
}
.nav-links a:hover { color: var(--ink); background: var(--accent-pale); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

/* burger */
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; margin-left: auto; flex-direction: column; gap: 5px; }
.nav-burger span { display: block; width: 22px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: all .3s; }
.nav-mobile {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 1rem 2rem; flex-direction: column; gap: 0.2rem; z-index: 190;
  box-shadow: var(--shadow-lg);
}
.nav-mobile.open { display: flex; }
.nav-mobile a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; padding: 0.6rem 0.75rem; border-radius: 7px; transition: all .18s; }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--accent); background: var(--accent-pale); }

/* ─── SHARED WRAPPER ─── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 2.5rem; }

/* ─── HERO ─── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 5%; right: -8%;
  width: 550px; height: 550px; border-radius: 50%;
  background: radial-gradient(circle, rgba(82,183,136,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 10%; left: -5%;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(181,69,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: var(--max); margin: 0 auto; padding: 4rem 2.5rem; width: 100%; position: relative; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'DM Mono', monospace; font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(45,106,79,.2);
  background: var(--accent-pale); padding: 0.3rem 0.8rem;
  border-radius: 100px; margin-bottom: 2rem;
}
.hero-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.03em; margin-bottom: 1.25rem;
  color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-soft); max-width: 560px;
  margin-bottom: 2.5rem; font-weight: 400;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 4rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600;
  padding: 0.7rem 1.4rem; border-radius: 8px;
  text-decoration: none; border: none; cursor: pointer; transition: all .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #235a41; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(45,106,79,.25); }
.btn-ghost { background: var(--bg-card); color: var(--ink); border: 1px solid var(--border2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* hero cards */
.hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.hero-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.4rem 1.5rem;
  text-decoration: none; color: var(--ink);
  transition: all .22s; display: flex; flex-direction: column; gap: 0.5rem;
  box-shadow: var(--shadow);
}
.hero-card:hover { border-color: var(--accent-light); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hero-card-title { font-weight: 600; font-size: 0.97rem; }
.hero-card-desc { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; }
.hero-card-arrow { color: var(--accent); font-size: 0.9rem; margin-top: auto; padding-top: 0.5rem; }

/* ─── PAGE HEADER (bandeau sombre) ─── */
.page-top {
  padding-top: var(--nav-h);
  background: var(--bg-dark);
  position: relative; overflow: hidden;
}
.page-top::after {
  content: ''; position: absolute; top: -40%; right: -8%;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(82,183,136,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-top-inner { max-width: var(--max); margin: 0 auto; padding: 3.5rem 2.5rem 2.5rem; position: relative; z-index: 1; }
.page-eyebrow {
  font-family: 'DM Mono', monospace; font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-light); margin-bottom: 0.6rem;
}
.page-top h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.02em; color: #fff;
  margin-bottom: 0.75rem;
}
.page-top .lead { font-size: 0.975rem; color: rgba(255,255,255,0.55); max-width: 600px; font-style: italic; }

/* ─── SECTIONS ─── */
.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-eyebrow {
  font-family: 'DM Mono', monospace; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.85rem); font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 0.6rem; color: var(--ink);
}
.section-intro { color: var(--ink-soft); font-size: 0.935rem; max-width: 620px; margin-bottom: 2rem; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.75rem 2rem;
  box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border2); box-shadow: var(--shadow-lg); }
.card-left-accent { border-left: 3px solid var(--accent); }

/* grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.25rem; }

/* ─── BADGES / TAGS ─── */
.badge {
  display: inline-flex; align-items: center;
  font-family: 'DM Mono', monospace; font-size: 0.67rem; font-weight: 500;
  padding: 0.2rem 0.6rem; border-radius: 4px; letter-spacing: 0.04em;
}
.badge-green  { background: var(--accent-pale); color: var(--accent); }
.badge-orange { background: var(--accent2-pale); color: var(--accent2); }
.badge-gold   { background: var(--gold-pale); color: var(--gold); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }

/* ─── TIMELINE ─── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0.5rem; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent-pale)); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 2.25rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -2.42rem; top: 0.35rem; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent-light); }
.tl-year { font-family: 'DM Mono', monospace; font-size: 0.7rem; font-weight: 600; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.tl-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.25rem 1.5rem; box-shadow: var(--shadow); }
.tl-card h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.tl-card .school { font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.tl-card p { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.68; }

/* ─── AC LIST ─── */
.ac-list { display: flex; flex-direction: column; gap: 1.25rem; }
.ac-item { border-left: 3px solid var(--accent-pale); padding-left: 1.2rem; transition: border-color .2s; }
.ac-item:hover { border-left-color: var(--accent-light); }
.ac-code { font-family: 'DM Mono', monospace; font-size: 0.67rem; font-weight: 500; color: var(--accent); background: var(--accent-pale); padding: 0.15rem 0.5rem; border-radius: 4px; margin-bottom: 0.35rem; display: inline-block; }
.ac-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--ink); }
.ac-item p { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.72; }

/* ─── EXAMPLES ─── */
.example {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem 1.75rem 1.5rem 1.5rem;
  position: relative;
}
.example::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; background: linear-gradient(to bottom, var(--accent), var(--accent-light)); border-radius: 4px 0 0 4px; }
.example-source {
  font-size: 0.67rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent2); background: var(--accent2-pale);
  padding: 0.2rem 0.55rem; border-radius: 4px; margin-bottom: 0.7rem; display: inline-block;
}
.example h4 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--ink); }
.example p { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.73; margin-bottom: 0.65rem; }
.example p:last-child { margin-bottom: 0; }
.ol-steps { list-style: none; counter-reset: steps; margin: 0.75rem 0; display: flex; flex-direction: column; gap: 0.4rem; }
.ol-steps li { counter-increment: steps; display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.55; }
.ol-steps li::before { content: counter(steps); display: flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; border-radius: 50%; background: var(--accent-pale); color: var(--accent); font-family: 'DM Mono', monospace; font-size: 0.66rem; font-weight: 600; flex-shrink: 0; margin-top: .15rem; }
.ul-dash { list-style: none; margin: 0.65rem 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ul-dash li { display: flex; gap: 0.6rem; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.55; }
.ul-dash li::before { content: '—'; color: var(--accent-light); flex-shrink: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.65rem 0; }
.pill { background: var(--bg-card); border: 1px solid var(--border); border-radius: 7px; padding: 0.35rem 0.65rem; font-size: 0.78rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.35rem; }
.pill::before { content: '↗'; color: var(--accent-light); font-size: .72rem; }
.measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px,1fr)); gap: 0.75rem; margin: 0.75rem 0; }
.measure-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 0.9rem 1rem; }
.measure-card h5 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.3rem; }
.measure-card h5::before { content: '✔'; font-size: 0.68rem; }
.measure-card li { font-size: 0.8rem; color: var(--ink-soft); list-style: none; padding: 0.12rem 0; border-bottom: 1px solid var(--border); line-height: 1.45; }
.measure-card li:last-child { border: none; }

/* ─── TABS ─── */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tab-btn { padding: 0.8rem 1.1rem; font-size: 0.82rem; font-weight: 500; color: var(--ink-muted); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; transition: all .18s; white-space: nowrap; }
.tab-btn:hover { color: var(--ink-soft); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s ease both; }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:none; } }

/* ─── SAE CARDS ─── */
.sae-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.5rem 1.75rem;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: all .22s; box-shadow: var(--shadow);
}
.sae-card:hover { border-color: var(--accent-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sae-num { font-family: 'DM Mono', monospace; font-size: 0.68rem; font-weight: 600; color: var(--accent2); background: var(--accent2-pale); padding: 0.18rem 0.55rem; border-radius: 4px; align-self: flex-start; }
.sae-card h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.sae-card p { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.5; }
.sae-arrow { color: var(--accent); font-size: 0.9rem; margin-top: auto; }

/* ─── COMP CARDS ─── */
.comp-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.5rem 1.75rem;
  cursor: pointer; text-decoration: none; color: var(--ink);
  transition: all .22s; display: flex; flex-direction: column; gap: 0.5rem;
  box-shadow: var(--shadow);
}
.comp-card:hover { border-color: var(--accent-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.comp-num { font-family: 'DM Mono', monospace; font-size: 0.68rem; font-weight: 600; color: var(--accent); background: var(--accent-pale); padding: 0.18rem 0.55rem; border-radius: 4px; align-self: flex-start; }
.comp-card h3 { font-family: 'Playfair Display', serif; font-size: 0.98rem; font-weight: 600; line-height: 1.3; }
.comp-card p { font-size: 0.8rem; color: var(--ink-muted); line-height: 1.5; }

/* ─── TRAIT CARDS ─── */
.trait-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem 1.25rem; box-shadow: var(--shadow); }
.trait-emoji { font-size: 1.4rem; margin-bottom: 0.5rem; }
.trait-card h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--ink); }
.trait-card p { font-size: 0.8rem; color: var(--ink-muted); line-height: 1.5; }

/* ─── PROFILE ─── */
.profile-block { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: start; }
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-pale), var(--accent-light)); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; flex-shrink: 0; }
.profile-name { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--ink); }
.profile-role { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 1rem; }
.profile-text p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.75; margin-bottom: 0.65rem; }

/* ─── STEP LIST (projet) ─── */
.step-row { display: flex; align-items: flex-start; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.step-row:last-child { border: none; }
.step-n { font-family: 'DM Mono', monospace; font-size: 0.75rem; font-weight: 700; color: #fff; background: var(--accent); padding: 0.3rem 0.6rem; border-radius: 6px; flex-shrink: 0; margin-top: 0.1rem; }
.step-row strong { display: block; font-size: 0.9rem; margin-bottom: 0.2rem; color: var(--ink); }
.step-row p { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.65; }

/* ─── NOTICE ─── */
.notice { background: var(--gold-pale); border: 1px solid rgba(201,168,76,.3); border-radius: var(--r); padding: 0.8rem 1.1rem; font-size: 0.82rem; color: #7a5c0a; margin-bottom: 1.75rem; display: flex; gap: 0.5rem; }
.notice::before { content: '✏️'; flex-shrink: 0; }

/* ─── DIVIDER ─── */
.divider { height: 1px; background: var(--border); }

/* ─── FOOTER ─── */
footer { border-top: 1px solid var(--border); padding: 2.5rem; background: var(--bg-dark); }
.footer-inner { max-width: var(--max); margin: 0 auto; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.4); text-decoration: none; transition: color .18s; }
.footer-links a:hover { color: var(--accent-light); }
footer p { font-size: 0.82rem; color: rgba(255,255,255,0.3); }
footer strong { color: rgba(255,255,255,0.6); }

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .grid-2, .grid-3, .hero-cards { grid-template-columns: 1fr; }
  .profile-block { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .wrap, .hero-inner, .page-top-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
  nav { padding: 0 1.5rem; }
}
@media (max-width: 540px) {
  .measure-grid { grid-template-columns: 1fr; }
  .hero-cards { grid-template-columns: 1fr; }
}

/* ─── COMP ANCHORS (barre de nav rapide dans la page compétences) ─── */
.comp-anchors {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
}
.comp-anchors-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0;
}
.comp-anchor {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.75rem 1.1rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .18s;
}
.comp-anchor:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-pale);
}

/* ─── EXAMPLES STACK ─── */
.examples-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ─── AC BLOCK (AC + exemple directement en dessous) ─── */
.ac-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px dashed var(--border);
}
.ac-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.ac-block-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}
.ac-block-header .ac-code {
  margin-bottom: 0;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.ac-block-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.ac-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.73;
  margin-bottom: 1.25rem;
  padding-left: calc(0.67rem * 2 + 0.9rem + 0.5rem); /* align under title */
}
.ac-block .example {
  margin-left: calc(0.67rem * 2 + 0.9rem + 0.5rem);
}
@media (max-width: 600px) {
  .ac-desc, .ac-block .example { margin-left: 0; }
}


/* ============================================================
   EFFETS VISUELS — Lenis / Scroll reveals / Cursor / Transitions
   ============================================================ */

/* ── SCROLL REVEAL ── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variante décalée pour les grilles — les enfants héritent du délai inline */
.grid-2 .reveal-on-scroll,
.grid-3 .reveal-on-scroll,
.grid-auto .reveal-on-scroll {
  transition-duration: 0.55s;
}

/* ── PROGRESS BAR ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 999;
  transition: transform 0.05s linear;
  opacity: 0.8;
}

/* ── CUSTOM CURSOR ── */

/*
  Le curseur natif est caché UNIQUEMENT une fois que le JS
  a confirmé que la souris a bougé (classe .cursor-ready sur body).
  Avant ça, le curseur natif reste visible → pas de trou noir.
*/
@media (pointer: fine) {
  body.cursor-ready,
  body.cursor-ready a,
  body.cursor-ready button { cursor: none; }
}

#cursor-ring {
  position: fixed;
  /* Part de -9999px pour être invisible avant le 1er mousemove */
  top: 0; left: 0;
  width: 38px; height: 38px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  /* Invisible jusqu'au 1er mouvement */
  opacity: 0;
  /* translate() géré par JS via CSS custom props */
  transform: translate(var(--cx, -9999px), var(--cy, -9999px)) translate(-50%, -50%);
  transition:
    width   0.35s cubic-bezier(0.22, 1, 0.36, 1),
    height  0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s,
    background   0.25s,
    opacity 0.3s;
  /* Pas de mix-blend-mode : lisible sur fond clair comme sombre */
  will-change: transform;
}

#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(var(--cx, -9999px), var(--cy, -9999px)) translate(-50%, -50%);
  transition: opacity 0.25s, width 0.2s, height 0.2s, background 0.2s;
  will-change: transform;
}

/* Visible après le 1er mouvement */
body.cursor-ready #cursor-ring,
body.cursor-ready #cursor-dot {
  opacity: 1;
}

/* État hover — cercle agrandi, point disparaît */
body.cursor-ready #cursor-ring.cursor-hover {
  width: 56px;
  height: 56px;
  border-color: var(--accent-light);
  background: rgba(45, 106, 79, 0.07);
}
body.cursor-ready #cursor-dot.cursor-hover {
  opacity: 0;
}

/* Masquer entièrement sur touch */
@media (pointer: coarse) {
  #cursor-ring, #cursor-dot { display: none; }
}

/* ── PAGE TRANSITION OVERLAY ── */
#page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 9000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#page-overlay.page-out {
  opacity: 0;
}

/* ── HERO PARALLAX ── */
.hero-inner {
  will-change: transform, opacity;
  transition: opacity 0.1s linear;
}

/* ── NAV ANCHOR ACTIVE STATE ── */
.comp-anchor.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── BURGER ANIMATION ── */
.nav-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-burger span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* scroll-behavior intentionnellement absent : Lenis gère le scroll */
html {
  scroll-behavior: auto !important;
}
