/* ============================================================
   MAIN — Caractère Libre
   Reset · Typographie · Utilitaires · Scroll reveal
   ============================================================ */

/* Polices auto-hébergées : voir assets/css/fonts.css (enqueue « cl-fonts »).
   Plus de hotlink Google Fonts (RGPD + perf). tokens.css est chargé séparément
   via « cl-tokens » avant main.css — pas de @import ici. */

/* ── Reset ── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background: var(--color-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Liens dans les zones de texte (paragraphes de prose) : soulignés.
   Les liens structurels (nav, cards, boutons, breadcrumb, footer) ne vivent
   jamais dans un <p>, ils ne sont donc pas concernés. */
p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

p a:hover {
  opacity: 0.7;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}

ul,
ol {
  list-style: none;
}

/* Contenu riche des éditeurs WYSIWYG : le reset ci-dessus retire les puces ;
   on les rétablit UNIQUEMENT dans les zones de contenu. Les <li> gardent la
   taille de texte du bloc, donc identique aux paragraphes. */
:where(
  .domaine-about__content, .article-event__corps, .bloc-entete__desc,
  .oeno-intro__desc, .rencontres-intro__desc, .cave-entete__desc,
  .cave-thema__desc, .fdetail-honneur__texte, .farticle-en-une__desc,
  .histoire-actuellement__content, .fvin-description
) ul {
  list-style: disc outside;
  margin: 0 0 1em;
  padding-left: 1.4em;
}
:where(
  .domaine-about__content, .article-event__corps, .bloc-entete__desc,
  .oeno-intro__desc, .rencontres-intro__desc, .cave-entete__desc,
  .cave-thema__desc, .fdetail-honneur__texte, .farticle-en-une__desc,
  .histoire-actuellement__content, .fvin-description
) ol {
  list-style: decimal outside;
  margin: 0 0 1em;
  padding-left: 1.5em;
}
:where(
  .domaine-about__content, .article-event__corps, .bloc-entete__desc,
  .oeno-intro__desc, .rencontres-intro__desc, .cave-entete__desc,
  .cave-thema__desc, .fdetail-honneur__texte, .farticle-en-une__desc,
  .histoire-actuellement__content, .fvin-description
) li {
  margin-bottom: 0.3em;
}

/* Garantit que l'attribut HTML [hidden] n'est jamais écrasé
   par des règles CSS plus spécifiques (ex. display: flex sur les <li>). */
[hidden] { display: none !important; }

/* ── Typographie ── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wider);
 
  color: var(--color-blue);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }

p {
  line-height: var(--leading-relaxed);
}

@media (max-width: 767px) {
  p {
    font-size: 14px;
    line-height: 1.5; /* 21px — ratio confortable pour 14px */
  }
}

/* ── Layout ── */

.container {
  width: min(var(--container-max), calc(100% - var(--container-gutter) * 2));
  margin-inline: auto;
}

@media (max-width: 767px) {
  .container {
  width: calc(100% - 24px);
}
}
/* ── Utilitaires ── */

.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;
}

/* Scroll reveal (ex-spec 11 §8) supprimé le 2026-07-18 — fonctionnalité abandonnée. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
