/* Intredys Academy — couleurs et typographies reprises d'intredys.fr */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --brand: oklch(55% .2 250);
  --brand-hover: oklch(49% .2 252);
  --brand-deep: oklch(28% .12 255);
  --brand-soft: oklch(96% .03 245);
  --logo-indigo: #2e3192;
  --logo-cyan: #2a9bd7;

  --background: oklch(100% 0 0);
  --foreground: oklch(18% .04 250);
  --muted: oklch(97% .012 250);
  --muted-foreground: oklch(50% .03 250);
  --border: oklch(92% .012 250);
  --card: oklch(100% 0 0);

  --term-bg: oklch(17% .035 255);
  --term-fg: oklch(90% .02 250);
  --term-dim: oklch(65% .03 250);
  --ok: oklch(76.5% .177 163);
  --err: oklch(70% .19 25);
  --warn: oklch(82.8% .189 84);

  --gradient-hero: linear-gradient(135deg, oklch(28% .12 255) 0%, oklch(40% .18 250) 100%);
  --shadow-soft: 0 4px 24px -8px oklch(40% .18 250 / .18);
  --shadow-card: 0 8px 32px -12px oklch(40% .18 250 / .22);
  --shadow-glow: 0 0 60px -10px oklch(55% .2 245 / .45);

  --radius: .875rem;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--logo-cyan); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(800px, 100% - 32px); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 600; text-decoration: none; border-radius: 999px;
  padding: .7em 1.3em; border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { font-size: .9rem; padding: .55em 1.1em; }
.btn-lg { font-size: 1.05rem; padding: .85em 1.6em; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { color: #fff; border-color: oklch(100% 0 0 / .35); }
.btn-ghost:hover { background: oklch(100% 0 0 / .1); border-color: oklch(100% 0 0 / .6); }
.btn-outline { color: var(--brand); border-color: var(--border); background: var(--card); }
.btn-outline:hover { border-color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { background: var(--brand-soft); }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(100% 0 0 / .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 16px -10px oklch(40% .18 250 / .25); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 140px; height: auto; }
.brand-tag {
  font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--logo-indigo); background: var(--brand-soft); padding: .25em .6em; border-radius: 6px;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--foreground); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--brand); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 18px; height: 2px; background: var(--foreground); border-radius: 2px; position: relative; transition: transform .2s, background .2s;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--background); border-bottom: 1px solid var(--border);
    padding: 8px 16px 20px; box-shadow: var(--shadow-card);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 16px; }
}

/* Hero */
.hero { position: relative; color: #fff; background: var(--gradient-hero); overflow: hidden; padding: clamp(56px, 9vw, 112px) 0; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 20%, oklch(60% .15 225 / .35), transparent 70%),
    radial-gradient(500px 360px at 10% 110%, oklch(45% .2 265 / .45), transparent 70%),
    linear-gradient(oklch(100% 0 0 / .05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, oklch(100% 0 0 / .05) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); margin-bottom: .45em; }
.hero .hl {
  background: linear-gradient(90deg, oklch(82% .12 220), var(--logo-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: oklch(92% .02 250); max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero-note { font-size: .9rem; color: oklch(85% .03 250); margin: 0; }

.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: .9em;
}
.eyebrow-light { color: oklch(85% .09 225); }

/* Terminal */
.terminal {
  background: var(--term-bg); border-radius: var(--radius); overflow: hidden;
  border: 1px solid oklch(100% 0 0 / .12); box-shadow: var(--shadow-glow), 0 30px 60px -20px oklch(10% .08 255 / .6);
  min-width: 0;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: oklch(22% .04 255); border-bottom: 1px solid oklch(100% 0 0 / .06); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.terminal-title { margin-left: 10px; font-family: var(--font-mono); font-size: .78rem; color: var(--term-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal-body {
  margin: 0; padding: 18px 20px 22px; font-family: var(--font-mono); font-size: clamp(.72rem, 1.1vw, .84rem); line-height: 1.75;
  color: var(--term-fg); overflow-x: auto; min-height: 15em;
}
.t-line { white-space: pre; }
.t-prompt { color: var(--logo-cyan); user-select: none; }
.t-out { color: var(--term-dim); }
.t-err { color: var(--err); font-weight: 700; }
.t-ok { color: var(--ok); font-weight: 700; }
.t-comment { color: var(--warn); font-style: italic; }
.t-result { color: var(--ok); }
.terminal-body.is-typing .t-line { visibility: hidden; }
.terminal-body.is-typing .t-line.is-shown { visibility: visible; }
.t-line.is-current::after {
  content: ""; display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -.2em;
  background: var(--logo-cyan); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Chiffres */
.stats { border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 36px 16px; text-align: center; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.1; color: var(--brand-deep); }
.stat span { color: var(--muted-foreground); font-size: .95rem; }

/* Références */
.trust { padding: 36px 0 8px; }
.trust-title { text-align: center; color: var(--muted-foreground); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.trust-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
.trust-list li { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: oklch(45% .04 250); }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-muted { background: var(--muted); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-lead { color: var(--muted-foreground); font-size: 1.08rem; }

.cards { display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-soft);
}

/* Formations */
.course { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.course:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: oklch(85% .05 250); }
.course-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--logo-indigo), var(--logo-cyan));
}
.course-icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.course-list { list-style: none; padding: 0; margin: 0 0 20px; color: oklch(35% .03 250); font-size: .95rem; }
.course-list li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.course-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--logo-cyan); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; }
.tags span { font-family: var(--font-mono); font-size: .74rem; padding: .25em .65em; border-radius: 6px; background: var(--brand-soft); color: var(--logo-indigo); }

/* Méthode */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
.step-num { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--brand); display: block; margin-bottom: 14px; }
.step-when { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--logo-cyan); margin-bottom: .3em; }
.step p:last-child { color: var(--muted-foreground); margin: 0; font-size: .95rem; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 46px; right: -21px; width: 22px; height: 2px; background: var(--border);
}

/* Pédagogie */
.pedago { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.pedago h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 10.5 2.5 2.5L14 7.5' fill='none' stroke='%232e3192' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.ratio { padding: 32px; }
.ratio-title { font-weight: 600; margin-bottom: 14px; }
.ratio-bar { display: flex; height: 48px; border-radius: 10px; overflow: hidden; gap: 3px; font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.ratio-bar span { display: flex; align-items: center; padding: 0 14px; color: #fff; }
.ratio-labs { background: linear-gradient(90deg, var(--logo-indigo), var(--brand)); }
.ratio-theory { background: var(--logo-cyan); justify-content: center; }
.ratio-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 12px 0 28px; font-size: .88rem; color: var(--muted-foreground); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-labs { background: var(--brand); } .sw-theory { background: var(--logo-cyan); margin-left: 10px; }
.pull {
  margin: 0; padding: 20px 0 0; border-top: 1px solid var(--border);
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; line-height: 1.45; color: var(--brand-deep);
}

/* Publics */
.audience h3 { margin-bottom: .3em; }
.audience-sub { font-size: .9rem; font-weight: 600; color: var(--brand); }
.audience p:last-child { color: oklch(35% .03 250); margin: 0; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.format { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; border-radius: var(--radius); background: var(--brand-soft); }
.format strong { font-family: var(--font-display); color: var(--logo-indigo); }
.format span { font-size: .95rem; color: oklch(35% .03 250); }

/* À propos */
.about { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; max-width: 960px; }
.about-avatar {
  width: clamp(120px, 16vw, 180px); aspect-ratio: 1; border-radius: 28px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.4rem); color: #fff;
  background: var(--gradient-hero); box-shadow: var(--shadow-glow);
}
.about h2 { margin-bottom: .2em; }
.about-role { color: var(--brand); font-weight: 600; }
.about-links { margin-top: 24px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 24px; }
.faq details[open] { box-shadow: var(--shadow-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 32px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--brand); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: oklch(35% .03 250); padding-bottom: 20px; margin: 0; }

/* CTA */
.cta { background: var(--gradient-hero); color: #fff; padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 300px at 90% 0%, oklch(60% .15 225 / .4), transparent 70%); }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: .3em; }
.cta p { color: oklch(90% .02 250); font-size: 1.1rem; margin: 0; max-width: 36em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Pied de page */
.site-footer { background: oklch(16% .04 255); color: oklch(78% .02 250); padding: 56px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand img { width: 140px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { max-width: 28em; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: oklch(78% .02 250); text-decoration: none; }
.site-footer nav a:hover { color: #fff; }
.footer-title { color: #fff; font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid oklch(100% 0 0 / .1); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .terminal { max-width: 520px; margin: 0 auto 32px; text-align: left; }
.notfound .terminal-body { min-height: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .pedago { grid-template-columns: 1fr; }
  .cards-3, .formats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .cards-3, .formats, .steps { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .cta-actions .btn { flex: 1 1 100%; }
  .brand img { width: 118px; }
  .terminal-body { min-height: 0; }
}

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