/* ============================================================
   Modus Vivendi — design system
   Palette : #3F4144 (encre) · #DFF2FE (ciel) · #788765 (sauge)
             #E9FC7A (citron vert)
   Thème clair par défaut ; thème sombre via prefers-color-scheme.
   ============================================================ */

/* --- Polices auto-hébergées (Manrope variable, OFL) --- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-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+20AC, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Jetons (thème clair) --- */
:root {
  color-scheme: light dark;

  /* Couleurs de marque fixes */
  --ink: #3F4144;   /* encre — fonds sombres, texte sur accents clairs */
  --sky: #DFF2FE;   /* ciel — texte/accents clairs sur fond sombre */
  --lime: #E9FC7A;  /* citron — CTA, surbrillance */

  /* Thème clair */
  --paper: #ffffff;       /* fond de page */
  --bg: #fbfdfe;          /* sections teintées */
  --surface: #ffffff;     /* cartes, formulaires */
  --text: #3F4144;        /* texte principal */
  --text-soft: #5a5e61;   /* texte secondaire */
  --text-faint: #6b6e71;  /* légendes */
  --sage: #788765;        /* sauge — accent */
  --sage-bg: #e3e9dd;     /* fond teinté sauge */
  --sky-bg: #DFF2FE;      /* fond teinté ciel */
  --line: rgba(63, 65, 68, 0.16);
  --line-strong: rgba(63, 65, 68, 0.28);

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(63, 65, 68, 0.06);
  --shadow-md: 0 10px 30px rgba(63, 65, 68, 0.10);

  --content: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Jetons (thème sombre) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1f2226;       /* fond de page sombre */
    --bg: #25282d;          /* sections teintées */
    --surface: #2a2e33;     /* cartes, formulaires */
    --text: #f2f5f7;        /* texte principal */
    --text-soft: #c4cacd;   /* texte secondaire */
    --text-faint: #98a1a5;  /* légendes */
    --sage: #9db092;        /* sauge éclaircie (lisible sur fond sombre) */
    --sage-bg: #333a31;     /* fond teinté sauge */
    --sky-bg: #22303a;      /* fond teinté ciel */
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.28);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

/* --- Réinitialisation --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:hover { text-decoration-thickness: 0.14em; text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--ink);
  border-radius: 4px;
}

/* Lien d'évitement */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: var(--sky);
  border-radius: var(--radius-s);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* --- Conteneur & sections --- */
.container {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tinted { background: var(--bg); }
.section--sky { background: var(--sky-bg); }

.kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}
.kicker::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: var(--sage);
  vertical-align: middle;
  margin-right: 0.6rem;
  transform: translateY(-1px);
}

.h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 750;
  max-width: 22ch;
}
.lede {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-soft);
  max-width: 60ch;
}

/* --- En-tête --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 4.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.brand__logo { height: 2.5rem; width: auto; }
.brand__logo--clair { display: none; }
@media (prefers-color-scheme: dark) {
  .brand__logo--sombre { display: none; }
  .brand__logo--clair { display: block; }
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav__links { display: flex; gap: 0.25rem; list-style: none; padding: 0; }
.nav__link {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
}
.nav__link:hover { background: var(--sky-bg); }

.lang-switch {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  margin-left: 0.75rem;
}
.lang-switch a {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-soft);
}
.lang-switch a[aria-current='page'],
.lang-switch a.is-active {
  background: var(--ink);
  color: var(--sky);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-s);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--text);
  margin: 0.28rem auto;
  border-radius: 2px;
}

/* --- Héros --- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 88% -12%, var(--sky-bg) 0%, transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, var(--sage-bg) 0%, transparent 55%),
    var(--paper);
}
.hero__inner {
  max-width: 52rem;
  padding-block: clamp(4.5rem, 10vw, 8rem);
}
.hero__title {
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 16ch;
}
.hero__title em {
  font-style: normal;
  color: var(--sage);
}
.hero__sub {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  color: var(--text-soft);
  max-width: 52ch;
}
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--lime);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(63, 65, 68, 0.28);
}
.btn--primary:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--text); }

.btn--link {
  padding: 0;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.btn--link:hover { text-decoration-thickness: 0.2em; }

/* --- Manifeste --- */
.manifesto__block {
  border-left: 3px solid var(--lime);
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
  max-width: 56rem;
}
.manifesto__lead {
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  font-weight: 650;
  text-wrap: balance;
}
.manifesto__rest {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-soft);
  max-width: 58ch;
}
.manifesto__statement {
  margin-top: 1.75rem;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 750;
  color: var(--sage);
  max-width: 30ch;
}
.accent { color: var(--sage); font-weight: 650; }

/* --- Bandeau de chiffres --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-top: 3rem;
}
.stat {
  background: var(--surface);
  padding: 1.75rem 1.5rem;
}
.stat__num {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat__num .unit { color: var(--sage); font-size: 0.6em; }
.stat__label { margin-top: 0.5rem; color: var(--text-soft); font-size: 0.9375rem; }

/* --- Méthode (positionnement) --- */
.method__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.method-card {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}
.method-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-s);
  background: var(--sky-bg);
  color: var(--text);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.method-card__icon svg { width: 1.4rem; height: 1.4rem; }
.method-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.method-card p { color: var(--text-soft); font-size: 0.975rem; }

.method__note {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-m);
  background: var(--sage-bg);
  color: var(--text);
  font-weight: 600;
  max-width: 72ch;
}

/* --- Boussoles --- */
.compasses__intro { max-width: 58ch; margin-top: 1rem; }

.compasses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.compass-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.compass-card--live {
  border-color: var(--sage);
  box-shadow: var(--shadow-md);
}
.compass-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.compass-card__domain {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.compass-card h3 { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; }
.compass-card__desc { color: var(--text-soft); font-size: 0.975rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.badge__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sage); }
.badge--reflexion { background: transparent; border-style: dashed; }
.badge--reflexion .badge__dot { background: var(--text-faint); }
.badge--projet { background: var(--sky-bg); border-color: transparent; }
.badge--projet .badge__dot { background: var(--sage); }
.badge--developpement { background: var(--sage-bg); border-color: transparent; }
.badge--developpement .badge__dot { background: var(--sage); }
.badge--test { background: var(--sage-bg); border-color: var(--sage); }
.badge--test .badge__dot { background: var(--sage); }
.badge--live { background: var(--lime); border-color: rgba(63, 65, 68, 0.28); color: var(--ink); }
.badge--live .badge__dot { background: var(--ink); }

.compass-card__foot { margin-top: auto; padding-top: 0.25rem; }

.progress { display: flex; gap: 4px; }
.progress__seg {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--sky-bg);
}
.progress__seg.is-done { background: var(--sage); }
.progress__seg.is-current {
  background: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(63, 65, 68, 0.3);
}
.progress__meta {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-weight: 600;
}
.compass-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
}
.compass-card__link:hover { text-decoration: underline; }

/* --- Contact --- */
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.contact__aside p { margin-top: 1rem; color: var(--text-soft); max-width: 46ch; }
.contact__direct {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
}

.form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sm);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.9375rem; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
}
.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--lime);
  outline-offset: 0;
  border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field__hint { font-size: 0.8125rem; color: var(--text-faint); }
.form__submit { justify-self: start; }
.form__note { font-size: 0.8125rem; color: var(--text-faint); }

/* --- Pied de page (toujours sombre) --- */
.site-footer {
  background: var(--ink);
  color: var(--sky);
  padding-block: 3rem 2rem;
}
.site-footer a { color: var(--lime); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer__brand { max-width: 30rem; }
.site-footer__brand .brand { color: var(--sky); }
.site-footer__logo { height: 2.75rem; width: auto; }
.site-footer__tag { margin-top: 0.9rem; color: rgba(223, 242, 254, 0.78); font-size: 0.9375rem; max-width: 40ch; }
.site-footer__tag .accent { color: #9db092; }
.site-footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.9375rem; }
.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(223, 242, 254, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(223, 242, 254, 0.7);
}

/* --- Pages simples (légales, merci, 404) --- */
.simple { max-width: 46rem; padding-block: clamp(3rem, 7vw, 5rem); }
.simple h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; font-weight: 800; }
.simple .lede { margin-top: 1rem; }
.prose { margin-top: 2rem; display: grid; gap: 1.25rem; }
.prose h2 { font-size: 1.35rem; font-weight: 750; margin-top: 1rem; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.prose a { color: var(--text); text-decoration: underline; }

/* --- Réactivité --- */
@media (max-width: 52rem) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .method__grid { grid-template-columns: 1fr; }
  .compasses-grid { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 4.75rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem var(--gutter) 1rem;
    gap: 0.25rem;
    display: none;
  }
  .nav__links[data-open] { display: flex; }
  .nav__link { padding: 0.7rem 0.5rem; }
  .lang-switch { margin-left: 0; }
}
@media (max-width: 40rem) {
  .form__row { grid-template-columns: 1fr; }
}

/* --- Accessibilité : mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Impression --- */
@media print {
  .site-header, .site-footer, .form, .btn--primary, .btn--ghost {
    display: none !important;
  }
}
