/* =========================================================
   NevezLab — feuille de style
   Couleur de marque : cobalt #2F5FD0 (relevée sur le logo)
   ========================================================= */

:root {
  --brand: #2f5fd0;
  --brand-strong: #244db3;
  --brand-text: #2552bd;          /* bleu lisible sur fond clair */
  --brand-soft: #e9effc;

  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5a6170;
  --border: #e2e6ee;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --header-bg: rgba(255, 255, 255, .85);
  --focus: #2f5fd0;

  --radius: 14px;
  --wrap: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #4a78e6;
  --brand-strong: #6a90ee;
  --brand-text: #8aaaf5;          /* bleu lisible sur fond sombre */
  --brand-soft: #18223a;

  --bg: #0d1117;
  --bg-alt: #131924;
  --surface: #161d2a;
  --text: #eceef2;
  --text-muted: #a3abba;
  --border: #252e3e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --header-bg: rgba(13, 17, 23, .85);
  --focus: #8aaaf5;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background-color .25s ease, color .25s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-text); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.015em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.muted { color: var(--text-muted); }
.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-text); margin-bottom: .8em;
}
.accent { color: var(--brand-text); }

/* ---------- Logos clair / sombre ---------- */
.logo--dark { display: none; }
:root[data-theme="dark"] .logo--light { display: none; }
:root[data-theme="dark"] .logo--dark { display: block; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand .logo { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: var(--brand-text); }
.nav .nav-cta { padding: 8px 18px; border-radius: 999px; background: var(--brand); color: #fff; }
.nav .nav-cta:hover { background: var(--brand-strong); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle, .menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; padding: 0;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--brand); color: var(--brand-text); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-toggle { display: none; flex-direction: column; gap: 4px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav .nav-cta { margin-top: 12px; text-align: center; border-bottom: 0; }
  .brand .logo { height: 36px; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-text); }

/* ---------- Accroche ---------- */
.hero {
  padding: clamp(64px, 11vw, 128px) 0 clamp(56px, 8vw, 96px);
  background:
    radial-gradient(900px 420px at 85% -10%, var(--brand-soft), transparent 70%),
    var(--bg);
}
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); max-width: 17ch; margin-bottom: .45em; font-weight: 700; }
.hero .lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 62ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 64px; }

.stats {
  list-style: none; margin: 0; padding: 28px 0 0; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stats strong { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--brand-text); line-height: 1.1; letter-spacing: -.02em; }
.stats span { display: block; font-size: .92rem; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p:last-child { color: var(--text-muted); font-size: 1.08rem; }

/* ---------- Cartes expertises ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
@media (max-width: 600px) { .card { padding: 24px; } }
.card p { color: var(--text-muted); }
.card ul { list-style: none; margin: 0; padding: 0; }
.card li { position: relative; padding-left: 22px; margin: 8px 0; font-size: .98rem; }
.card li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand);
}
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text); margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Approche ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; gap: 28px; } }
.pillar { border-top: 2px solid var(--brand); padding-top: 20px; }
.pillar p { color: var(--text-muted); margin: 0; }
.pillar-num { display: block; font-weight: 700; color: var(--brand-text); margin-bottom: 8px; font-size: .95rem; }

/* ---------- Parcours ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 40px; } }
.about-intro { position: sticky; top: 104px; }
@media (max-width: 900px) { .about-intro { position: static; } }
.portrait { margin: 8px 0 24px; width: 168px; }
.portrait img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 36px 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--brand);
}
.timeline li.tl-now::before { background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.tl-date { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--brand-text); margin-bottom: 6px; letter-spacing: .02em; }
.timeline h3 { font-size: 1.15rem; }
.timeline p { color: var(--text-muted); margin: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 32px; } }
.contact-intro p { color: var(--text-muted); }
.contact-mail a { font-weight: 600; }

.form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
@media (max-width: 600px) { .form { padding: 20px; } }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field label span { color: var(--brand-text); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #d14343; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--text-muted); }
.form-status { margin: 16px 0 0; font-weight: 500; min-height: 1.5em; }
.form-status.ok { color: #1f8a4c; }
.form-status.err { color: #d14343; }
:root[data-theme="dark"] .form-status.ok { color: #5fd08f; }
:root[data-theme="dark"] .form-status.err { color: #f08080; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; font-size: .9rem; color: var(--text-muted); }
.footer-inner { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.footer-inner .logo { height: 40px; width: auto; }
.legal { flex: 1; min-width: 240px; }
.legal p { margin: 0 0 .6em; }
.legal summary { cursor: pointer; color: var(--text); font-weight: 500; }
.legal details p { margin-top: .6em; }
