/* ==========================================================================
   AV-Connexion — Base
   --------------------------------------------------------------------------
   @font-face Avenir, reset moderne, typographie de base.
   À charger après tokens.css et avant components.css.
   ========================================================================== */

/* --- Fontes Avenir ---------------------------------------------------------
   Format préféré : WOFF2 (≈5× plus léger que TTF, supporté par tous les nav.
   modernes). Le TTF reste en fallback tant que les .woff2 n'ont pas été générés
   (cf. assets/fonts/README.md pour la commande de conversion).
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'Avenir';
  src: url('../assets/fonts/Avenir-Light.woff2') format('woff2'),
       url('../assets/fonts/Avenir-Light.ttf')   format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Avenir';
  src: url('../assets/fonts/Avenir-Roman.woff2') format('woff2'),
       url('../assets/fonts/Avenir-Roman.ttf')   format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Avenir';
  src: url('../assets/fonts/Avenir-Medium.woff2') format('woff2'),
       url('../assets/fonts/Avenir-Medium.ttf')   format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Avenir';
  src: url('../assets/fonts/Avenir-MediumOblique.woff2') format('woff2'),
       url('../assets/fonts/Avenir-MediumOblique.ttf')   format('truetype');
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Avenir';
  src: url('../assets/fonts/Avenir-Oblique.woff2') format('woff2'),
       url('../assets/fonts/Avenir-Oblique.ttf')   format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Avenir';
  src: url('../assets/fonts/Avenir-Black.woff2') format('woff2'),
       url('../assets/fonts/Avenir-Black.ttf')   format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* --- Reset moderne minimal ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Body & typographie de base ------------------------------------------- */
html {
  font-family: var(--av-font);
  font-size: var(--av-text-base);
  line-height: var(--av-lh-base);
  color: var(--av-text);
  background: var(--av-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.15s ease;
}
body { min-height: 100vh; font-weight: var(--av-w-roman); }

h1, .av-h1 {
  font-size: var(--av-text-2xl); line-height: var(--av-lh-2xl);
  font-weight: var(--av-w-black); letter-spacing: -0.02em;
}
h2, .av-h2 {
  font-size: var(--av-text-xl); line-height: var(--av-lh-xl);
  font-weight: var(--av-w-black); letter-spacing: -0.02em;
}
h3, .av-h3 {
  font-size: var(--av-text-lg); line-height: var(--av-lh-lg);
  font-weight: var(--av-w-bold);
}
h4, .av-h4 {
  font-size: var(--av-text-md); line-height: var(--av-lh-md);
  font-weight: var(--av-w-bold);
}

p { line-height: 1.6; }

code, kbd, pre, samp, .av-mono {
  font-family: var(--av-font-mono);
  font-size: 0.95em;
}

::selection { background: var(--av-brand); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--av-border-strong);
  border-radius: var(--av-radius-full);
  border: 2px solid var(--av-bg);
}

/* --- Accessibilité : respect du prefers-reduced-motion -------------------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --av-duration-instant: 0ms;
    --av-duration-quick:   0ms;
    --av-duration-smooth:  0ms;
    --av-duration-slow:    0ms;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
