/* --- RESET & VARIABLES DE BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-cream: #fffcf9;
  --color-blue-dark: #012095;
  --color-blue: #012cc9;
  --color-blue-light: #72a9ff;
  --color-ink: #1a0b5b;
  --color-gold: #ffdb70;
  --color-gold-light: #fff681;
  --brand-gradient: linear-gradient(135deg, #012095 0%, #012cc9 100%);
  --separator-gradient: linear-gradient(90deg, #72a9ff, #012095);
  --content-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-card: 0 8px 20px rgba(1, 32, 149, 0.14);
  --focus-ring: 3px solid #efbf04;
}

html {
  overflow-x: hidden;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-cream);
  width: 100%;
  overflow-x: hidden;
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 6px;
  background: #fff681;
  color: #012095;
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color: #1a0b5b;
  line-height: 1.3;
  margin-bottom: 0.5em;
  text-wrap: balance;
}

a,
button,
summary,
input,
textarea {
  min-width: 0;
}

a {
  color: var(--color-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* Un focus très visible aide à se repérer au clavier et au zoom. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-radius: 4px;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

@media (forced-colors: active) {
  a,
  button,
  summary {
    forced-color-adjust: auto;
  }
}

a:hover {
  color: var(--color-blue-dark);
  text-decoration: underline;
}

p,
li {
  max-width: 70ch;
}

main a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

main a:not(.btn):hover,
main a:not(.btn):focus-visible {
  text-decoration-thickness: 0.14em;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

main {
  flex: 1 0 auto;
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
  padding-left: clamp(16px, 3vw, 32px);
  padding-right: clamp(16px, 3vw, 32px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--color-blue-light);
  border-radius: 999px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--brand-gradient);
  color: #fff;
}

.btn.primary:hover,
.btn.primary:focus-visible {
  color: #fff;
  filter: brightness(1.12);
}

.btn.ghost {
  background: transparent;
  color: var(--color-blue-dark);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: rgba(114, 169, 255, 0.12);
}

section {
  scroll-margin-top: 1.5rem;
}

@media (max-width: 700px) {
  body {
    line-height: 1.6;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}