/* ===========================================================
   42 Initiative — design system (reprise de l'identité 42 Paris)
   Thème clair · Jost (substitut libre de Futura PT) · bleu/marine/jaune
   =========================================================== */

/* Fallback aux métriques proches de Jost — limite le décalage (CLS) au chargement de la police */
@font-face {
  font-family: "Jost-fallback";
  src: local("Arial");
  size-adjust: 94%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f8fa;
  --blue: #04809f;          /* bleu signature 42 */
  --blue-dark: #036b85;
  --navy: #173d7a;          /* marine — titres */
  --slate: #475b67;         /* texte courant */
  --yellow: #f2c600;        /* accent */
  --ink: #0e2233;           /* footer / textes forts */
  --line: #e3e8ec;
  --max: 1180px;
  --radius: 3px;
  --font: "Jost", "Jost-fallback", "Futura PT", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--slate);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); text-transform: uppercase; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin: 0 0 1.1em; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--navy); }
img, svg { max-width: 100%; display: block; }

/* --- a11y helpers --- */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; background: var(--navy); color: #fff; padding: 12px 20px; font-weight: 700; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- layout --- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy); }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #d6deea; }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; color: var(--blue-dark); margin: 0 0 1rem; }
.eyebrow--yellow { color: var(--navy); border-left: 4px solid var(--yellow); padding-left: 12px; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* --- pixel band (motif 42) --- */
.pixel-band { display: flex; height: 8px; width: 100%; }
.pixel-band i { flex: 1; }
.pixel-band i:nth-child(4n+1) { background: var(--blue); }
.pixel-band i:nth-child(4n+2) { background: var(--navy); }
.pixel-band i:nth-child(4n+3) { background: var(--yellow); }
.pixel-band i:nth-child(4n+4) { background: #fff; }

/* --- header / nav --- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav__logo { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.nav__logo:hover { text-decoration: none; }
.nav__logo svg { width: 48px; height: auto; color: var(--navy); }
.nav__logo img { height: 50px; width: auto; display: block; }
.nav__logo span { font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.95rem; color: var(--navy); }
.nav__links { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.76rem; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--blue-dark); text-decoration: none; }
.nav__cta { background: var(--blue-dark); color: #fff !important; padding: 12px 20px; border-radius: var(--radius); }
.nav__cta:hover { background: var(--navy); text-decoration: none; }
.nav__toggle { display: none; background: none; border: 1px solid var(--line); color: var(--navy); width: 46px; height: 46px; border-radius: var(--radius); cursor: pointer; font-size: 1.4rem; }

@media (max-width: 1060px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease);
  }
  .nav__links[data-open="true"] { max-height: 520px; }
  .nav__links li { width: 100%; border-top: 1px solid var(--line); }
  .nav__links a { display: block; padding: 16px 24px; }
  .nav__cta { margin: 12px 24px; text-align: center; }
}

/* --- buttons --- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; padding: 15px 30px; border-radius: var(--radius); cursor: pointer; border: 2px solid transparent; transition: transform 0.15s var(--ease), background 0.2s, color 0.2s, border-color 0.2s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }
.btn--primary:hover { background: var(--navy); border-color: var(--navy); }
.btn--yellow { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn--yellow:hover { background: #d9b200; border-color: #d9b200; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--navy); }

/* --- hero (photo plein cadre + overlay) --- */
.hero { position: relative; color: #fff; background: var(--navy); }
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(13,30,58,0.55) 0%, rgba(13,30,58,0.78) 100%),
    var(--hero-img, url("../img/hero-astana.jpg"));
  background-size: cover; background-position: center 30%;
}
.hero__inner { position: relative; z-index: 1; padding: clamp(5rem, 16vh, 11rem) 0 clamp(4rem, 10vh, 8rem); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: #eaf0f6; }
.hero .eyebrow { color: var(--yellow); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 2rem; }

/* --- grid / cards --- */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.card:hover { box-shadow: 0 14px 34px rgba(23,61,122,0.12); transform: translateY(-4px); }
.card__icon { width: 52px; height: 52px; margin-bottom: 1rem; color: var(--blue); }
.card h3 { color: var(--navy); }
.card p:last-child { margin-bottom: 0; }

/* --- stats --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
@media (max-width: 880px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat__value { font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--blue); line-height: 1; }
.section--navy .stat__value { color: var(--yellow); }
.stat__label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin-top: 0.4rem; }
.section--navy .stat__label { color: #e3ebf5; }

/* --- steps --- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 18px; }
.steps li { position: relative; padding: 26px 26px 26px 88px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 26px; top: 24px; font-weight: 700; font-size: 1.6rem; color: var(--blue); }
.steps h3 { margin-bottom: 0.3em; }
.steps p { margin-bottom: 0; }

/* --- values list --- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 36px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); }
.checklist li::after { content: "✓"; position: absolute; left: 5px; top: 3px; color: var(--ink); font-weight: 700; font-size: 0.85rem; }

/* --- CTA band --- */
.cta { background: var(--blue-dark); color: #fff; text-align: center; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.cta h2 { color: #fff; }
.cta p { color: #fff; max-width: 52ch; margin-inline: auto; }

/* --- forms --- */
.form { display: grid; gap: 20px; max-width: 640px; }
.form label { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--navy); display: block; margin-bottom: 8px; }
.form input, .form textarea, .form select { width: 100%; background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 14px 16px; border-radius: var(--radius); font-family: var(--font); font-size: 1rem; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--blue); outline: none; }
.form textarea { min-height: 150px; resize: vertical; }

/* --- generic prose --- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }

/* --- FAQ --- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 22px; margin-bottom: 14px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.5rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; margin: 0; }

.page-hero { background: var(--bg-alt); padding: clamp(3rem, 9vh, 5rem) 0 clamp(2rem, 5vh, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--navy); }

/* --- footer --- */
.site-footer { background: var(--ink); color: #c7d2dd; padding: 4rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #c7d2dd; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; }
.footer__brand svg { width: 56px; color: #fff; margin-bottom: 1rem; }
.footer__brand img { height: 56px; width: auto; margin-bottom: 1rem; }
.footer__bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: #8da0b0; font-size: 0.82rem; }

/* --- reveal --- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
