/* ==========================================================================
   Base — reset, typographie, utilitaires
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

::selection { background: var(--blue-soft); color: var(--ink); }

/* Titres */
h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: var(--text-2xl); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: var(--text-xl); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); line-height: 1.3; letter-spacing: -0.01em; }

p { color: var(--muted); line-height: 1.65; text-wrap: pretty; }

/* Médias */
img { max-width: 100%; display: block; }

svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Contrôles */
a { color: inherit; text-decoration: none; }

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

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

:focus { outline: none; }

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

/* Champs de formulaire */
input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: var(--text-md);
  transition: border-color var(--fast), box-shadow var(--fast);
}

textarea { min-height: 110px; resize: vertical; }

input::placeholder,
textarea::placeholder { color: var(--subtle); }

input:hover,
select:hover,
textarea:hover { border-color: var(--subtle); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--ring);
  outline: none;
}

input[type="file"] {
  padding: 9px;
  font-size: var(--text-sm);
  background: var(--surface-2);
  border-style: dashed;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

label {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--label);
}

label input[type="checkbox"] { width: 18px; }

/* Utilitaires */
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.row { display: flex; align-items: center; gap: var(--space-3); }
.between { justify-content: space-between; }
.stack { display: grid; gap: var(--space-4); }

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

/* Animations partagées */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
