/* ────────────────────────────────────────────────
   Zakaria Belkacemi — feuille de style commune
   Polices : Libre Caslon (titres) + Atkinson Hyperlegible (texte)
   Toutes deux auto-hébergées dans /fonts (aucun appel à Google).
   ──────────────────────────────────────────────── */

@font-face { font-family: "Caslon Display"; src: url("fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #13120f;
  --bg-2: #1b1915;
  --bg-3: #24211b;
  --line: rgba(237, 230, 216, .12);
  --line-strong: rgba(237, 230, 216, .24);
  --text: #ede6d8;
  --muted: #a8a090;
  --faint: #6f695d;
  --ocre: #d9a441;      /* volet éloquence */
  --ocre-soft: rgba(217, 164, 65, .12);
  --menthe: #74c4ab;    /* volet sciences */
  --menthe-soft: rgba(116, 196, 171, .12);
  --display: "Caslon Display", "Caslon", Georgia, serif;
  --serif: "Caslon", Georgia, serif;
  --sans: "Atkinson", "Segoe UI", system-ui, sans-serif;
  --wrap: 1160px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ocre); color: var(--bg); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 2rem; }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 18, 15, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1.5rem; }
.nav-logo { font-family: var(--display); font-size: 1.35rem; text-decoration: none; letter-spacing: .02em; }
.nav-logo span { color: var(--ocre); }
.nav-links { display: flex; gap: 1.8rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--ocre); padding-bottom: 2px; }
.page-sciences .nav-links a[aria-current="page"] { border-color: var(--menthe); }

/* ── Typo commune ── */
.kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ocre);
}
.page-sciences .kicker, .kicker.menthe { color: var(--menthe); }
h1, h2, h3 { font-weight: 400; }
.h-display { font-family: var(--display); line-height: 1.02; letter-spacing: -.01em; }
.h-section { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; margin: .5rem 0 1rem; }
.h-section em, .h-display em { font-family: var(--serif); font-style: italic; color: var(--ocre); }
.page-sciences .h-section em, .page-sciences .h-display em { color: var(--menthe); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

section { padding: 5.5rem 0; }
section + section { border-top: 1px solid var(--line); }

/* ── Boutons / liens ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 3px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  background: var(--ocre); color: var(--bg);
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: #e6b65a; }
.btn.menthe { background: var(--menthe); }
.btn.menthe:hover { background: #8dd3bd; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { border-color: var(--text); background: transparent; }
.link-arrow { font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link-arrow:hover { color: var(--ocre); }

/* ── Apparition au défilement (fondu) ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; }
.fade-in { animation: fadeUp .9s cubic-bezier(.16,1,.3,1) both; }
.fade-in.d1 { animation-delay: .1s; } .fade-in.d2 { animation-delay: .25s; } .fade-in.d3 { animation-delay: .4s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .fade-in { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Pied de page ── */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: .9rem; color: var(--faint); }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .discret { color: var(--faint); opacity: .55; }
.footer .discret:hover { opacity: 1; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 1.25rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: .88rem; }
  .nav-links .hide-sm { display: none; }
  section { padding: 4rem 0; }
}
