/* ==========================================================================
   AI Job Fit — feuille de style du site (landing + pages légales).
   Palette dérivée du logo : bleu #054B95, turquoise #13ADB1.
   Le turquoise brut ne passe pas 4.5:1 sur blanc → réservé au décor,
   --teal-ink pour tout ce qui est texte.
   ========================================================================== */

/* --- Police auto-hébergée (pas de requête Google, cf. section vie privée) --- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/pjs-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/pjs-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------- Tokens -------------------------------- */
:root {
  --brand: #054B95;
  --brand-hover: #0a3f7a;
  --brand-soft: #eaf2fb;
  --teal: #13adb1;
  --teal-ink: #0a6e71;
  --teal-soft: #e6f7f7;

  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-2: #f1f5fa;
  --ink: #0d1b2a;
  --ink-2: #475569;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --ok: #15803d;
  --warn: #b45309;
  --danger: #dc2626;

  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .06), 0 1px 3px rgba(13, 27, 42, .04);
  --shadow-md: 0 4px 12px rgba(13, 27, 42, .07), 0 2px 4px rgba(13, 27, 42, .04);
  --shadow-lg: 0 18px 48px rgba(13, 27, 42, .12), 0 4px 12px rgba(13, 27, 42, .06);

  /* densité 4/10 — échelle standard */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --maxw: 1120px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4a9be8;
    --brand-hover: #6fb2f0;
    --brand-soft: #10233c;
    --teal: #2dd4d8;
    --teal-ink: #7fe3e6;
    --teal-soft: #0d2b2c;

    --bg: #0b1220;
    --surface: #121c2e;
    --surface-2: #16223a;
    --ink: #f1f5f9;
    --ink-2: #a3b3c9;
    --border: #223250;
    --border-strong: #33476b;

    --ok: #4ade80;
    --warn: #fbbf24;
    --danger: #f87171;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }

p { text-wrap: pretty; }
img, video { max-width: 100%; height: auto; display: block; }
strong { color: var(--ink); font-weight: 700; }

a { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button, summary, [role="button"] { cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-5); }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--brand); color: #fff; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 700;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: var(--space-4); }

/* ------------------------------- En-tête --------------------------------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
header.site .container {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; /* cible tactile */
  font-weight: 800; font-size: 1.05rem; color: var(--ink);
  text-decoration: none; letter-spacing: -.02em; white-space: nowrap;
}
.brand img { width: 30px; height: 30px; }
.brand span { color: var(--teal-ink); }

header.site nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-5); }
header.site nav a:not(.btn) {
  font-size: .93rem; font-weight: 600; color: var(--ink-2);
  text-decoration: none; transition: color .18s var(--ease);
}
header.site nav a:not(.btn):hover { color: var(--brand); }

.nav-toggle { display: none; }

/* ------------------------------- Boutons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  font: inherit; font-weight: 700; font-size: 1rem;
  border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
    transform .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(0); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06121f; } }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.btn-sm { min-height: 42px; padding: 8px 20px; font-size: .92rem; }

/* --------------------------------- Hero ---------------------------------- */
.hero { padding: var(--space-9) 0 var(--space-8); text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; margin-bottom: var(--space-5);
  background: var(--teal-soft); color: var(--teal-ink);
  border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
  border-radius: 999px; font-size: .85rem; font-weight: 700;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 22%, transparent);
}

.hero h1 { margin-bottom: var(--space-5); font-size: clamp(1.8rem, 1.3rem + 2.6vw, 3.3rem); }
.hero h1 > span { display: block; margin-top: .3em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .sub {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  max-width: 680px; margin: 0 auto var(--space-6);
}

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.cta-note { display: block; margin-top: var(--space-4); font-size: .88rem; color: var(--ink-2); }

.trust {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-7); padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
}
.trust li { display: flex; align-items: center; gap: 8px; list-style: none; }
.trust svg { width: 18px; height: 18px; color: var(--teal-ink); flex: none; }

/* ------------------------- Section : titres communs ----------------------- */
section { padding: var(--space-8) 0; }
/* « Et aussi » prolonge la section précédente : on ne double pas la respiration. */
#fonctionnalites { padding-bottom: var(--space-6); }
.section-head { max-width: 720px; margin: 0 auto var(--space-7); text-align: center; }
.section-head .kicker {
  display: block; margin-bottom: var(--space-3);
  font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-ink);
}
.section-head h2 { margin-bottom: var(--space-4); }
.section-head p { font-size: 1.05rem; }

/* --------------------------- Démo vidéo (sombre) -------------------------- */
.demo {
  background: #0b1220;
  color: #a3b3c9;
  border-block: 1px solid #1c2941;
}
/* En thème sombre, la page est déjà bleu nuit : on descend la section démo
   d'un cran pour qu'elle continue de se détacher. */
@media (prefers-color-scheme: dark) {
  .demo { background: #05090f; border-block-color: #1c2941; }
}
.demo h2, .demo h3 { color: #f1f5f9; }
.demo .section-head .kicker { color: #2dd4d8; }
.demo strong { color: #f1f5f9; }

.demo-layout {
  display: grid; gap: var(--space-6);
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  align-items: start;
}

.player {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid #253654;
  background: #060c16;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  aspect-ratio: 16 / 9;
}
.player video { width: 100%; height: 100%; object-fit: cover; background: #060c16; }

.player-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-4);
  border: 0; width: 100%;
  /* Voile assez dense pour que le libellé reste lisible par-dessus le poster,
     qui est une capture d'écran claire et chargée. */
  background: linear-gradient(180deg, rgba(6, 12, 22, .35) 0%, rgba(6, 12, 22, .78) 100%);
  color: #fff; font: inherit;
  transition: opacity .25s var(--ease), visibility .25s var(--ease);
}
.player-overlay .play-ring {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--teal); color: #06121f;
  box-shadow: 0 0 0 10px rgba(19, 173, 177, .22);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.player-overlay .play-ring svg { width: 30px; height: 30px; margin-left: 4px; }
.player-overlay:hover .play-ring { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(19, 173, 177, .28); }
.player-overlay .label { font-weight: 700; font-size: 1rem; }
.player-overlay .meta { font-size: .85rem; opacity: .85; }
.player.is-playing .player-overlay { opacity: 0; visibility: hidden; }

/* Affiché quand un chapitre est demandé avant que la vidéo soit en mémoire
   (cf. le contournement Range dans index.html). */
.player.is-loading::after {
  content: 'Chargement de la démo…';
  position: absolute; top: 12px; left: 12px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(6, 12, 22, .88); color: #fff;
  font-size: .82rem; font-weight: 600;
  pointer-events: none;
}

.chapters { display: flex; flex-direction: column; gap: var(--space-3); }
.chapters h3 { font-size: 1rem; }
.chapters ol { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.chapters button {
  display: flex; align-items: baseline; gap: var(--space-3);
  width: 100%; min-height: 44px; padding: 9px 12px;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-size: .93rem; text-align: left; color: #cbd5e1;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.chapters button:hover { background: #16223a; color: #fff; }
.chapters button .t {
  font-variant-numeric: tabular-nums; font-size: .82rem; font-weight: 700;
  color: #8ba0bd; flex: none;
}
.chapters button[aria-current="true"] {
  background: #16223a; border-color: #2dd4d8; color: #fff; font-weight: 700;
}
.chapters button[aria-current="true"] .t { color: #2dd4d8; }
.chapters .hint { font-size: .82rem; color: #8ba0bd; padding-inline: 12px; }

/* --------------------------------- Étapes -------------------------------- */
.steps-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.step {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.step .num {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: var(--space-4);
  border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: 1.05rem;
}
.step h3 { margin-bottom: var(--space-2); }
.step p { font-size: .96rem; }

/* -------------------- Fonctionnalités : lignes alternées ------------------ */
.feature {
  display: grid; gap: var(--space-7);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  padding-block: var(--space-7);
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature.reversed .feature-media { order: -1; }

.feature-body .tag {
  display: inline-block; margin-bottom: var(--space-3);
  padding: 4px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.feature-body h3 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.7rem); font-weight: 800; margin-bottom: var(--space-3); }
.feature-body > p { margin-bottom: var(--space-4); }
.feature-body ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.feature-body li { display: flex; gap: var(--space-3); font-size: .97rem; }
.feature-body li svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--teal-ink); }

.feature-media {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.feature-media img { width: 100%; }

/* --------------------------- Grille « et aussi » -------------------------- */
.cards { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card .icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: var(--space-4);
  border-radius: 11px; background: var(--teal-soft); color: var(--teal-ink);
}
.card .icon svg { width: 21px; height: 21px; }
.card h3 { margin-bottom: 6px; font-size: 1.02rem; }
.card p { font-size: .93rem; }

/* ------------------------------ Confidentialité --------------------------- */
.privacy { background: var(--surface); border-block: 1px solid var(--border); }
.privacy-grid {
  display: grid; gap: var(--space-6) var(--space-7);
  /* min() : sans lui, une piste de 400px déborde d'un écran de 375px. */
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  margin-top: var(--space-6);
}
.privacy-item { display: flex; gap: var(--space-4); }
.privacy-item svg { width: 26px; height: 26px; flex: none; color: var(--teal-ink); }
.privacy-item h3 { font-size: 1rem; margin-bottom: 4px; }
.privacy-item p { font-size: .93rem; }

/* ---------------------------------- FAQ ----------------------------------- */
.faq { display: flex; flex-direction: column; gap: var(--space-3); max-width: 780px; margin-inline: auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s var(--ease);
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); min-height: 56px;
  font-weight: 700; color: var(--ink); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 11px; height: 11px;
  border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .answer { padding: 0 var(--space-5) var(--space-5); font-size: .96rem; }
.faq .answer p + p { margin-top: var(--space-3); }

/* ------------------------------- CTA finale ------------------------------- */
.final {
  text-align: center;
  background:
    radial-gradient(1000px 380px at 50% -10%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--border);
}
.final h2 { margin-bottom: var(--space-4); }
.final p { max-width: 560px; margin: 0 auto var(--space-6); font-size: 1.05rem; }

/* --------------------------------- Footer --------------------------------- */
footer.site {
  background: var(--surface); border-top: 1px solid var(--border);
  padding-block: var(--space-6); font-size: .9rem;
}
footer.site .container { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
footer.site a {
  display: inline-flex; align-items: center; min-height: 44px; /* cible tactile */
  color: var(--ink-2); text-decoration: none;
}
footer.site a:hover { color: var(--brand); text-decoration: underline; }

/* ------------------------------ Pages légales ----------------------------- */
main.legal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  max-width: 820px; margin: var(--space-8) auto; padding: clamp(24px, 5vw, 56px);
}
main.legal h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); margin-bottom: var(--space-2); }
main.legal p.updated { color: var(--ink-2); font-size: .88rem; margin-bottom: var(--space-6); }
main.legal h2 { font-size: 1.2rem; margin: var(--space-6) 0 var(--space-3); }
main.legal p, main.legal li { font-size: .97rem; margin-bottom: var(--space-3); }
main.legal ul { padding-left: var(--space-5); margin-bottom: var(--space-4); }

/* ------------------------------- Révélations ------------------------------
   Conditionné à .js : sans JavaScript (ou si le script casse), le contenu
   doit rester visible plutôt que de disparaître derrière un opacity:0. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* -------------------------------- Responsive ------------------------------ */
@media (max-width: 900px) {
  .demo-layout { grid-template-columns: 1fr; }
  /* Sous la vidéo, les chapitres tiennent sur deux colonnes : pas de zone
     scrollable qui masquerait la moitié de la liste. */
  .chapters ol {
    display: grid; gap: 2px var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  }
  .feature { grid-template-columns: 1fr; gap: var(--space-5); padding-block: var(--space-6); }
  .feature.reversed .feature-media { order: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: var(--space-8) 0; }
  .hero { padding: var(--space-8) 0 var(--space-7); }

  /* Menu déroulant seulement si le JS qui l'ouvre est là ; sinon la nav
     reste en flux et se contente de passer à la ligne. */
  header.site .container { flex-wrap: wrap; }
  .js header.site nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--space-3) var(--space-5) var(--space-5);
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  header.site nav[hidden] { display: none; }
  header.site nav { flex-wrap: wrap; gap: var(--space-4); }
  header.site nav a { padding: var(--space-3) 0; min-height: 44px; display: flex; align-items: center; }
  .js header.site nav .btn { margin-top: var(--space-3); }

  /* Pages légales : en-tête sans menu déroulant, la nav reste dans la barre. */
  header.site nav.simple {
    position: static; flex-direction: row; align-items: center; gap: var(--space-4);
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  header.site nav.simple a { padding: 0; min-height: 44px; }

  .js .nav-toggle {
    display: grid; place-items: center; margin-left: auto;
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    background: transparent; border: 1px solid var(--border-strong); color: var(--ink);
  }
  .nav-toggle svg { width: 22px; height: 22px; }

  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .trust { gap: var(--space-3); flex-direction: column; align-items: center; }
  footer.site .container { flex-direction: column; text-align: center; }
}

/* ------------------------------ Accessibilité ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
