/* base.css — reset + typographie + utilitaires */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h-mobile);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: clip; /* clip, pas hidden — ne crée pas de conteneur de scroll (PIÈGE #11) */
  max-width: 100vw;
  /* TEX-5 : papier chaud */
  background-image: radial-gradient(
    120% 80% at 50% 0%,
    color-mix(in srgb, var(--accent) 6%, var(--bg)) 0%,
    var(--bg) 60%
  );
  background-attachment: fixed;
}

/* Resets essentiels */
img, video, iframe, svg { max-width: 100%; display: block; }
figure { margin: 0; }            /* PIÈGE #5 — UA margin 40px corrigée */
[hidden] { display: none !important; } /* PIÈGE #8 — flex ne surcharge plus hidden */
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}
button { cursor: pointer; }
input, textarea, select { min-width: 0; } /* PIÈGE #10 — select overflow */

/* Micro-détails propres */
::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
}
::-webkit-scrollbar { width: 8px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 45%, var(--bg));
  border-radius: 4px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }
::placeholder { color: var(--text-mute); opacity: 1; }

/* Typographie */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  line-height: 1.08;
  color: var(--text);
  font-weight: 500;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p  { font-size: clamp(1rem, 1.15vw, 1.05rem); line-height: 1.7; }
small { font-size: 0.82rem; }

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}

/* Sections */
section { padding: 56px 0; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-md);
  font-family: var(--ff-ui);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--tr-base), color var(--tr-base),
              transform var(--tr-base), border-color var(--tr-base),
              box-shadow var(--tr-base);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 82%, #000);
  border-color: color-mix(in srgb, var(--accent) 82%, #000);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 32%, transparent);
}
.btn-outline:hover {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border-color: var(--text);
}

.btn-wa {
  background: var(--wa-green);
  color: #fff;
  border-color: var(--wa-green);
}
.btn-wa:hover { background: #1ebe52; border-color: #1ebe52; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
