/* ============================================================
   LaboScolaire_Informatique
   palette: black / white / cobalt — typography: geometric bold
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #f3f4f7;
  --surface-2: #e9ebf1;
  --ink: #0a0a0c;
  --ink-soft: #4a4d57;
  --ink-mute: #6b6f7b;
  --rule: #dfe1e8;
  --accent: #1f4bff;
  --accent-ink: #ffffff;
  --accent-soft: #e7ecff;
  --shadow: 0 1px 2px rgba(10, 10, 12, .05), 0 12px 32px -18px rgba(10, 10, 12, .28);
  --radius: 14px;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(64px, 9vw, 120px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0c10;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --ink: #f4f5f8;
  --ink-soft: #c2c6d2;
  --ink-mute: #9aa0b0;
  --rule: #262a35;
  --accent: #5b7bff;
  --accent-ink: #06070c;
  --accent-soft: #1a2140;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0b0c10;
    --surface: #14161d;
    --surface-2: #1b1e27;
    --ink: #f4f5f8;
    --ink-soft: #c2c6d2;
    --ink-mute: #9aa0b0;
    --rule: #262a35;
    --accent: #5b7bff;
    --accent-ink: #06070c;
    --accent-soft: #1a2140;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: .98rem;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  flex: none;
}
.brand-underscore { color: var(--accent); }
.brand-name { white-space: nowrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-radius: 8px;
  transition: color .18s ease, background-color .18s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav .nav-cta {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 600;
  padding: 10px 16px;
  margin-left: 6px;
}
.site-nav .nav-cta:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(1.08); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
  transition: color .18s ease, border-color .18s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-mute); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

@media (max-width: 940px) {
  .site-nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 560px) {
  .brand-name { font-size: .86rem; }
  .site-nav .nav-cta { padding: 10px 12px; font-size: .84rem; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 84px) clamp(48px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 500;
}
.hero h1 { margin-bottom: 22px; }
.accent-word {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.lede {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 30px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-mute); background: var(--surface); }

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: .92rem;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}
.hero-facts strong { color: var(--ink); font-weight: 600; }

.hero-media { margin: 0; }
.hero-media img {
  width: 100%;
  height: clamp(300px, 46vw, 520px);
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-media figcaption,
.split-media figcaption {
  margin-top: 12px;
  font-size: .82rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media img { height: clamp(240px, 52vw, 380px); }
}

/* ---------- strip ---------- */
.strip {
  border-block: 1px solid var(--rule);
  background: var(--surface);
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-block: 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.strip-inner p { display: flex; align-items: center; gap: 10px; }
.strip-inner p::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- sections ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface); border-block: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { margin-bottom: 18px; }
.section-intro { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.step {
  display: grid;
  grid-template-columns: 72px minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(24px, 3vw, 34px);
  border-bottom: 1px solid var(--rule);
}
.step-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .82rem;
  color: var(--accent);
  font-weight: 500;
  padding-top: 4px;
}
.step h3 { padding-top: 2px; }
.step p { color: var(--ink-soft); font-size: .98rem; max-width: 62ch; }
@media (max-width: 720px) {
  .step { grid-template-columns: 44px 1fr; gap: 12px 16px; }
  .step p { grid-column: 2; }
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.card {
  background: var(--bg);
  padding: clamp(22px, 2.6vw, 30px);
  transition: background-color .2s ease;
}
.card:hover { background: var(--surface-2); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .95rem; line-height: 1.62; }

/* ---------- split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split-copy h2 { margin-bottom: 20px; }
.split-copy p { color: var(--ink-soft); margin-bottom: 16px; max-width: 58ch; }
.split-media { margin: 0; }
.split-media img {
  width: 100%;
  height: clamp(280px, 38vw, 460px);
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.check-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: .96rem;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}
.check-list strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; }
  .split-media img { height: clamp(220px, 48vw, 340px); }
}

/* ---------- roles ---------- */
.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.role {
  border-top: 2px solid var(--accent);
  padding-top: 20px;
}
.role h3 { margin-bottom: 10px; }
.role p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- faq ---------- */
.faq-wrap { max-width: 900px; }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 44px 20px 0;
  position: relative;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p {
  padding: 0 0 22px;
  color: var(--ink-soft);
  font-size: .97rem;
  max-width: 68ch;
}
.todo {
  color: var(--ink-mute);
  border-bottom: 1px dotted var(--ink-mute);
  font-style: italic;
}

/* ---------- contact ---------- */
.section-contact { background: var(--surface); border-top: 1px solid var(--rule); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-copy h2 { margin-bottom: 20px; }
.contact-copy > p { color: var(--ink-soft); max-width: 52ch; }
.contact-details {
  margin: 32px 0 0;
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}
.contact-details dt {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.contact-details dd { margin: 0; font-size: .97rem; }

.contact-form {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label {
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font: inherit;
  font-size: .97rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 12px 14px;
  min-height: 46px;
  width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-mute); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form .btn { width: 100%; }
.form-status {
  font-size: .9rem;
  color: var(--ink-soft);
  margin: 0;
}
.form-status.is-error { color: #c0392b; }
html[data-theme="dark"] .form-status.is-error { color: #ff8f80; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .form-status.is-error { color: #ff8f80; }
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(36px, 5vw, 56px) clamp(56px, 6vw, 72px);
  background: var(--bg);
}
.footer-inner {
  display: grid;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 60ch;
}
.footer-brand p { font-size: .92rem; color: var(--ink-mute); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: .9rem;
}
.footer-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 6px;
  transition: color .18s ease;
}
.footer-nav a:hover { color: var(--accent); }
.attribution {
  font-size: .78rem;
  color: var(--ink-mute);
  margin: 0;
}
.attribution a { color: var(--ink-mute); text-decoration: underline; text-underline-offset: 2px; }
.attribution a:hover { color: var(--ink-soft); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeRise {
    from { opacity: 0; translate: 0 14px; }
    to { opacity: 1; translate: 0 0; }
  }
  @supports (animation-timeline: view()) {
    .section-head,
    .step,
    .card,
    .role,
    .split-copy,
    .split-media {
      animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

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