/* base.css - Typographie et elements HTML de base
   ========================================================================== */

/* Polices : on essaie Google Fonts si dispo, sinon fallback system solide */
@import url("https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

html {
  font-size: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
}

/* Barre de defilement aux couleurs du site.
   Sur ecran tactile le navigateur garde sa barre fine qui se superpose au
   contenu : on ne la remplace que quand il y a une souris, pour ne pas
   manger de largeur sur mobile. */
html { scrollbar-gutter: stable; }
@supports not selector(::-webkit-scrollbar) {
  html, .product-modal, .mobile-menu {
    scrollbar-color: var(--color-primary) var(--color-secondary);
  }
}
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 14px; height: 14px; }
  ::-webkit-scrollbar-track { background: var(--color-secondary); }
  ::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border: 3px solid var(--color-secondary);
    border-radius: var(--radius-pill);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }
  ::-webkit-scrollbar-corner { background: var(--color-secondary); }
}
/* Fiche produit ouverte : la page derriere ne defile plus */
html.has-modal { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-body);
  background: var(--color-bg);
  color: var(--color-text);
  position: relative;
  overflow-x: hidden;
  font-weight: 400;
}

/* Titres */
h1, h2, h3, h4, h5, h6, .display {
  font-family: var(--font-display);
  font-weight: 400;   /* Anton n'a qu'un poids */
  line-height: 1;
  letter-spacing: var(--title-tracking);
  text-transform: uppercase;
  color: var(--color-text);
}
.display, h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  max-width: var(--text-max);
}

a {
  color: var(--color-primary-text);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--color-primary-hover); }
/* Liens dans le texte courant : reperables sans la couleur seule */
main p a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

strong, b { font-weight: 700; }

hr {
  border: 0;
  height: 1px;
  background: var(--color-border);
  margin: var(--sp-6) 0;
}

::selection {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}

:focus:not(:focus-visible) { outline: none; }
/* Anneau de focus : sombre sur fond clair, jaune sur fond sombre
     (le jaune seul sur le fond creme n'atteint pas 3:1). */
:focus-visible {
  outline: 3px solid var(--focus-ring, var(--color-secondary));
  outline-offset: 3px;
  border-radius: 4px;
}
.site-header--transparent,
.mobile-menu,
.hero,
.promo-bar,
.configurator,
.section--dark,
.site-footer { --focus-ring: var(--color-accent); }
.newsletter,
.config-summary { --focus-ring: #fff; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  background: var(--color-secondary);
  color: var(--color-text-on-dark);
  padding: 12px 18px;
  z-index: 9999;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 900px; }

section { padding-block: var(--section-spacing); }

.section-title {
  font-size: var(--fs-4xl);
  margin-bottom: var(--sp-2);
  line-height: 1;
}
.section-eyebrow {
  align-self: flex-start;
  display: inline-flex;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary-text);
  margin-bottom: var(--sp-3);
  padding: 6px 14px;
  background: var(--color-primary-soft);
  border-radius: var(--radius-pill);
  width: max-content;
  max-width: 100%;
}
.section-head--center .section-eyebrow { align-self: center; }
.section--dark .section-eyebrow {
  background: rgba(255,184,0,.15);
  color: var(--color-accent);
}
.section-lead {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--sp-7);
  line-height: 1.5;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}
.section-head--center {
  align-items: center;
  text-align: center;
}

@media print { body::before { display: none; } }
