/* ==========================================================================
   CRB — Base CSS : reset, fonts, typo de base, layout helpers
   ========================================================================== */

/* Marcellus et Manrope sont chargés via Google Fonts CDN dans le <head>.
   font-display: swap géré côté Google Fonts. Sous-ensemble latin + latin-extended.
   Pour passer en self-hosted en production : ajouter les WOFF2 dans assets/fonts/
   et déclarer @font-face ici en remplaçant l'import Google Fonts du HTML. */

/* ==== Reset moderne ==== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
    font-family: var(--crb-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--crb-c-ink);
    background: var(--crb-c-cream);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus { outline: none; }
:focus-visible {
    outline: 3px solid var(--crb-c-orange-ci);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==== Typographie de base ==== */
h1, h2, h3, h4 {
    font-family: var(--crb-font-display);
    font-weight: 400;
    line-height: 1.18;
    color: var(--crb-c-green-deep);
    letter-spacing: 0;
}
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { line-height: 1.7; }
strong, b { font-weight: 700; }
em, i { font-style: italic; }

.crb-eyebrow {
    display: inline-block;
    font-family: var(--crb-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--crb-c-gold);
    margin-bottom: var(--crb-space-3);
}
.crb-lede {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--crb-c-ink);
}
.crb-tabular { font-variant-numeric: tabular-nums; }

/* ==== Layout helpers ==== */
.crb-container {
    width: 100%;
    max-width: var(--crb-container-max);
    margin-inline: auto;
    padding-inline: var(--crb-space-5);
}
.crb-container--narrow { max-width: var(--crb-content-max); }
.crb-section {
    padding-block: var(--crb-space-7);
}
@media (min-width: 1024px) {
    .crb-container { padding-inline: var(--crb-space-7); }
    .crb-section { padding-block: var(--crb-space-9); }
}

.crb-grid { display: grid; gap: var(--crb-space-5); }
.crb-grid--2 { grid-template-columns: 1fr; }
.crb-grid--3 { grid-template-columns: 1fr; }
.crb-grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .crb-grid--2 { grid-template-columns: repeat(2, 1fr); } .crb-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .crb-grid--3 { grid-template-columns: repeat(3, 1fr); } .crb-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.crb-flex { display: flex; gap: var(--crb-space-4); }
.crb-flex--center { align-items: center; justify-content: center; }
.crb-flex--between { justify-content: space-between; align-items: center; }
.crb-flex--col { flex-direction: column; }
.crb-flex--wrap { flex-wrap: wrap; }

/* Skip link accessibilité */
.crb-skip {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--crb-c-green-deep);
    color: var(--crb-c-cream);
    padding: var(--crb-space-3) var(--crb-space-5);
    z-index: var(--crb-z-toast);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 var(--crb-radius-md) 0;
}
.crb-skip:focus { top: 0; }

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Visually hidden */
.crb-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;
}
