/* ==========================================================================
   Base : remise à zéro, typographie, en-tête, menu, pied de page, composants
   communs. Le détail de l'accueil est dans home.css, le mouvement dans anim.css.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--charbon);
  font-family: var(--font-texte);
  font-size: 17px;
  line-height: 1.55;
  /* `clip` et non `hidden` : `hidden` ferait du body un conteneur de
     défilement, ce qui neutraliserait les `position: sticky` de la page. */
  overflow-x: clip;
  position: relative;
}

@media (max-width: 639px) { body { font-size: 16px; } }

/* `height: auto` neutralise l'attribut height du HTML, qui prendrait sinon le
   pas sur les `aspect-ratio` du CSS. Les règles de classe le redéfinissent. */
img { max-width: 100%; height: auto; }

h1, h2, h3, p, figure, blockquote, ul, dl { margin: 0; }

/* Les `display` des composants ne doivent jamais l'emporter sur `hidden`. */
[hidden] { display: none !important; }
ul { padding: 0; list-style: none; }

a {
  color: var(--charbon);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: var(--focus); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 60;
  background: var(--charbon);
  color: var(--creme);
  padding: 14px 18px;
  font-weight: 700;
  text-decoration: none;
  transition: top var(--duree-courte) var(--sortie);
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Conteneur ----------------------------------------------------------- */

.wrap {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding-inline: var(--gouttiere);
}

/* --- Titres -------------------------------------------------------------- */

.titre { font-family: var(--font-titre); font-variation-settings: 'wdth' 75, 'opsz' 96; font-weight: 800; letter-spacing: -0.02em; }

.mono { font-family: var(--font-mono); }

.citation { font-family: var(--font-citation); font-style: italic; }

/* Le filet coloré qui ouvre une strate + son titre */
.strate-tete {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  /* La dernière ligne de l'intro s'aligne sur la ligne de base du titre.
     `last baseline` le fait exactement, sans valeur magique et à toute taille ;
     `flex-end` reste le repli pour les navigateurs qui l'ignorent. */
  align-items: flex-end;
  align-items: last baseline;
  gap: 16px 48px;
  border-top: 6px solid var(--charbon);
  padding-top: 20px;
}
.strate-titre {
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.85;
}
.strate-tete > p { max-width: 36em; font-size: clamp(16px, 1.4vw, 18px); }

/* Les intros d'Écouter et de Voyager tombent sur deux lignes très inégales :
   `text-wrap: balance` répartit le texte, la largeur maximale les tient à deux. */
@media (min-width: 768px) {
  .ecouter .strate-tete > p,
  .voyager__tete > .voyager__intro {
    max-width: 25em;
    text-wrap: balance;
  }
}

/* --- Boutons et liens ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cible-tactile);
  padding: 15px 22px;
  border: 0;
  background: var(--charbon);
  color: var(--creme);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn--bordeaux { background: var(--bordeaux); color: var(--creme); }
.btn--jaune { background: var(--jaune); color: var(--charbon); border: 2px solid var(--charbon); }
.btn--bloc { width: 100%; }

/* Lien texte appuyé, avec soulignement animé (voir anim.css) */
.lien-fort { font-weight: 700; }

/* Champ de formulaire */
.champ {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--charbon);
  background: var(--papier);
  color: var(--charbon);
  font-size: 16px;
}
.etiquette { font-weight: 700; font-size: 15px; }

/* Fiche « antisèche » : papier légèrement incliné, pointillé de découpe */
.antiseche {
  background: var(--papier);
  border-top: 2px dashed var(--charbon);
  box-shadow: 0 1px 0 var(--charbon);
  padding: 16px 20px 18px;
  transform: rotate(-2deg);
}

/* Papier millimétré de BIM! */
.grid-paper {
  background-color: var(--pervenche);
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 24px 24px;
}
@media (max-width: 639px) { .grid-paper { background-size: 20px 20px; } }

/* ==========================================================================
   En-tête
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--creme);
  border-bottom: 1px dashed var(--charbon);
}

.site-header__inner {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 12px var(--gouttiere);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.logo__nom { font-size: clamp(22px, 2.2vw, 28px); font-variation-settings: 'wdth' 75, 'opsz' 48; }
.logo__sous { font-size: 13px; margin-top: 5px; }
@media (max-width: 479px) { .logo__sous { display: none; } }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}
.nav a {
  text-decoration: none;
  min-height: var(--cible-tactile);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pastille-bim {
  background: var(--pervenche);
  color: #FFFFFF;
  padding: 2px 7px;
  font-weight: 800;
}
.pastille-jaune { background: var(--jaune); padding: 2px 6px; }

/* Barre compacte : BIM! + Lettres + bouton Menu */
.nav-compacte {
  display: none;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}
.nav-compacte a {
  text-decoration: none;
  min-height: var(--cible-tactile);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
}
.nav-compacte .lien-bim { background: var(--pervenche); color: #FFFFFF; font-weight: 800; }
.nav-compacte .lien-lettres { background: var(--jaune); color: var(--charbon); }

.btn-menu {
  background: transparent;
  border: 2px solid var(--charbon);
  font-weight: 700;
  min-height: var(--cible-tactile);
  padding: 0 16px;
  cursor: pointer;
}

@media (max-width: 1099px) {
  .nav { display: none; }
  .nav-compacte { display: flex; }
}
@media (max-width: 479px) {
  .nav-compacte .lien-lettres { display: none; }
}

/* Marque-page sur le bord droit (desktop seulement) */
.bookmark {
  position: absolute;
  right: 0;
  top: 720px;
  z-index: 30;
  background: var(--jaune);
  border: 2px solid var(--charbon);
  border-right: 0;
  padding: 18px 9px;
  writing-mode: vertical-rl;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  color: var(--charbon);
}
@media (max-width: 1099px) { .bookmark { display: none; } }

/* ==========================================================================
   Menu plein écran
   ========================================================================== */

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--charbon);
  color: var(--creme);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.menu[hidden] { display: none; }

.menu__tete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px var(--gouttiere);
  border-bottom: 1px dashed var(--gris-inactif);
}
.menu__tete .titre { font-size: 22px; }
.menu__fermer {
  background: transparent;
  color: var(--creme);
  border: 2px solid var(--creme);
  font-weight: 700;
  min-height: var(--cible-tactile);
  padding: 0 14px;
  cursor: pointer;
}
.menu__nav {
  padding: 20px var(--gouttiere);
  display: flex;
  flex-direction: column;
}
.menu__nav a {
  color: var(--creme);
  text-decoration: none;
  font-family: var(--font-titre);
  font-variation-settings: 'wdth' 75, 'opsz' 96;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.08;
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu__nav .pastille-bim { font-size: 0.6em; padding: 0 8px; }
.menu__lettres {
  margin-top: auto;
  background: var(--jaune);
  color: var(--charbon);
  padding: 18px var(--gouttiere);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu__lettres .titre { font-size: 30px; }
.menu__lettres a { color: var(--charbon); font-weight: 700; }
.menu__social {
  padding: 14px var(--gouttiere) 24px;
  display: flex;
  gap: 20px;
  font-weight: 700;
}
.menu__social a { color: var(--creme); }

body.menu-ouvert { overflow: hidden; }

/* ==========================================================================
   Pied de page
   ========================================================================== */

.site-footer { background: var(--charbon); color: var(--creme); }
.site-footer a { color: var(--creme); }

.site-footer__inner {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 56px var(--gouttiere) 28px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  /* Sert de référence aux unités cqw de la signature géante. */
  container-type: inline-size;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  align-items: flex-end;
  border-bottom: 1px dashed var(--gris-chaud);
  padding-bottom: 40px;
}
.footer-social__titre {
  flex: 1 1 360px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.95;
}
.footer-social__liens {
  flex: 1 1 420px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  font-size: 18px;
}
.footer-social__liens a {
  display: flex;
  flex-direction: column;
  min-height: var(--cible-tactile);
  justify-content: center;
}
.footer-social__liens span { font-size: 15px; color: var(--gris-chaud); }

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  font-size: 16px;
}
.footer-col {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col > strong { color: var(--gris-chaud); font-weight: 600; }
.footer-col a { min-height: 32px; display: inline-flex; align-items: center; }
.footer-col .lien-jaune { color: var(--jaune); font-weight: 700; }

.langue {
  display: inline-flex;
  align-self: flex-start;
  border: 2px solid var(--creme);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.langue > * {
  min-width: 52px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.langue [aria-current] { background: var(--creme); color: var(--charbon); }

.footer-signature {
  font-size: clamp(44px, 10.5vw, 158px);
  line-height: 0.82;
}

/* « Les Antisèches du Bonheur » tient sur une seule ligne à toutes les
   largeurs : la taille est un pourcentage de la largeur disponible, avec ~5 %
   de marge. */
@supports (container-type: inline-size) {
  .footer-signature { font-size: 11.2cqw; white-space: nowrap; }
}

@media (max-width: 639px) {
  .footer-cols { gap: 24px; }
  .footer-col { flex: 1 1 140px; }
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 14px;
  color: var(--gris-chaud);
}
.footer-legal a { color: var(--gris-chaud); }
