/* ANEMOD — fondations visuelles du site HSM + PKI. */
:root {
  color-scheme: light;
  --c-magenta: #e94b87;
  --c-orange: #b94f23;
  --c-violet: #7766e8;
  --grad-brand: linear-gradient(118deg, var(--c-magenta), var(--c-orange) 48%, var(--c-violet));
  --bg: #f4f1eb;
  --bg-soft: #ece9e2;
  --surface: #fbfaf7;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #19191d;
  --ink-2: #3c3b42;
  --muted: #62616a;
  --line: rgba(25, 25, 29, 0.12);
  --line-strong: rgba(25, 25, 29, 0.2);
  --focus: #9b3268;
  --link: #6d2850;
  --shadow: 0 28px 80px rgba(34, 30, 25, 0.12);
  --shadow-soft: 0 18px 48px rgba(34, 30, 25, 0.08);
  --font-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --step--1: clamp(0.78rem, 0.75rem + 0.13vw, 0.86rem);
  --step-0: clamp(0.98rem, 0.93rem + 0.22vw, 1.08rem);
  --step-1: clamp(1.08rem, 1rem + 0.36vw, 1.25rem);
  --step-2: clamp(1.38rem, 1.2rem + 0.75vw, 1.78rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.45vw, 2.7rem);
  --step-4: clamp(2.55rem, 1.9rem + 2.8vw, 4.25rem);
  --step-5: clamp(3.1rem, 2rem + 4.7vw, 6rem);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 24px;
  --radius-small: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --c-orange: #f27d43;
    --bg: #0b0c0f;
    --bg-soft: #111216;
    --surface: #15161a;
    --surface-glass: rgba(21, 22, 26, 0.82);
    --ink: #f5f3ee;
    --ink-2: #d3d1cc;
    --muted: #a8a8b3;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --focus: #ff8cba;
    --link: #ffafce;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.24);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --c-orange: #f27d43;
  --bg: #0b0c0f;
  --bg-soft: #111216;
  --surface: #15161a;
  --surface-glass: rgba(21, 22, 26, 0.82);
  --ink: #f5f3ee;
  --ink-2: #d3d1cc;
  --muted: #a8a8b3;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --focus: #ff8cba;
  --link: #ffafce;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.24);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f1eb;
  --bg-soft: #ece9e2;
  --surface: #fbfaf7;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #19191d;
  --ink-2: #3c3b42;
  --muted: #62616a;
  --line: rgba(25, 25, 29, 0.12);
  --line-strong: rgba(25, 25, 29, 0.2);
  --focus: #9b3268;
  --link: #6d2850;
  --shadow: 0 28px 80px rgba(34, 30, 25, 0.12);
  --shadow-soft: 0 18px 48px rgba(34, 30, 25, 0.08);
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover { text-decoration: underline; text-underline-offset: 4px; }

button { color: inherit; font: inherit; }

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

::selection { background: rgba(233, 75, 135, 0.26); }

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }

p { margin: 0; }

.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section { padding-block: clamp(82px, 10vw, 128px); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.5fr);
  align-items: end;
  justify-content: space-between;
  gap: clamp(28px, 6vw, 72px);
  margin-bottom: clamp(38px, 5vw, 58px);
}

.section-head > div { display: grid; gap: 17px; }

.section-head > p {
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 5px rgba(233, 75, 135, 0.09);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  color: #fff;
  background: #19191d;
  box-shadow: 0 12px 28px rgba(25, 25, 29, 0.18);
}

:root[data-theme='dark'] .btn--primary { color: #19191d; background: #f5f3ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn--primary { color: #19191d; background: #f5f3ee; } }

.btn--secondary {
  color: var(--ink);
  background: var(--surface-glass);
  border-color: var(--line-strong);
}

.btn--light {
  color: #19191d;
  background: #f7f4ee;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.skip {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transform: translateY(-180%);
}

.skip:focus { transform: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal { opacity: 1; transform: none; }

.reveal.is-pending {
  transform: translateY(16px);
  transition: transform 600ms var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }
.delay-60 { transition-delay: 60ms; }
.delay-80 { transition-delay: 80ms; }
.delay-120 { transition-delay: 120ms; }

[hidden] { display: none !important; }

section[id],
div[id] { scroll-margin-top: 96px; }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section { padding-block: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .reveal.is-pending { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
