/* =========================================================================
   BARSOUM Voyages — Socle
   Remise à zéro, typographie de base, accessibilité.
   ========================================================================= */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: var(--fs-500);
  line-height: var(--lh-texte);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--police-titre);
  font-weight: 800;
  line-height: var(--lh-titre);
  text-wrap: balance;
  margin: 0 0 var(--sp-4);
  color: var(--texte);
}

h1 { font-size: var(--fs-900); line-height: var(--lh-serre); letter-spacing: -0.015em; }
h2 { font-size: var(--fs-800); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-700); }
h4 { font-size: var(--fs-600); font-weight: 700; }

p, ul, ol { margin: 0 0 var(--sp-4); }
p { max-width: var(--largeur-texte); }

a { color: var(--lien); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lien-survol); }

strong { font-weight: 700; }
small { font-size: var(--fs-300); color: var(--texte-doux); }

/* Les montants et les dates s'alignent en colonnes. */
.bv-chiffre { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ STRUCTURE */

.bv-conteneur {
  width: 100%;
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.bv-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.bv-section--alt { background: var(--surface-alt); }
.bv-section--inverse { background: var(--surface-inverse); color: var(--texte-inverse); }
/* Tous les niveaux de titre, sans exception : un h1 oublié dans cette liste
   s'affiche en encre sombre sur fond bleu nuit, donc illisible. */
.bv-section--inverse h1,
.bv-section--inverse h2,
.bv-section--inverse h3,
.bv-section--inverse h4 { color: var(--texte-inverse); }
.bv-section--inverse p { color: var(--texte-inverse-doux); }

.bv-grille { display: grid; gap: var(--sp-5); }
.bv-grille--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.bv-grille--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* Sur-titre de section : catégorie, univers, rubrique. */
.bv-eyebrow {
  font-family: var(--police-titre);
  font-size: var(--fs-300);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--bv-or-600);
  margin: 0 0 var(--sp-2);
  display: block;
}
.bv-eyebrow--azur { color: var(--bv-azur-600); }
.bv-section--inverse .bv-eyebrow { color: var(--bv-orange-500); }

.bv-entete-section { margin-bottom: var(--sp-6); }
.bv-entete-section p { color: var(--texte-doux); }

/* Titre lu par les moteurs et les lecteurs d'écran, absent de l'image.
   Ce n'est pas du texte caché au sens des pénalités Google : c'est le titre
   exact de la page, simplement porté par la bannière plutôt que par une ligne
   de texte. */
.bv-hors-ecran {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------- ACCESSIBILITÉ */

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.bv-lien-evitement {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface-inverse);
  color: var(--texte-inverse);
  padding: var(--sp-3) var(--sp-4);
  z-index: 999;
}
.bv-lien-evitement:focus { left: 0; }

.bv-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================== GARDE-FOUS */
/* Chacune de ces règles répare une classe entière de défaut rencontrée en
   production, plutôt que le cas particulier où on l'a vue. Elles ne changent
   rien à l'apparence actuelle : elles empêchent le défaut de revenir sous une
   autre forme, dans un gabarit qui n'existe pas encore. */

/* 1. Fond sombre = tout le texte s'éclaircit, pas seulement les titres et les
      paragraphes. Une liste, un chiffre ou une étiquette ajoutés plus tard
      dans une section inversée resteraient sinon en encre sombre, illisibles. */
.bv-section--inverse :where(li, dt, dd, strong, b, em, small, span:not([class]), figcaption) {
  color: var(--texte-inverse-doux);
}

/* 2. Un mot trop long — une adresse e-mail, une URL collée par le client —
      ne peut plus élargir la page au-delà de l'écran. */
:where(h1, h2, h3, h4, p, li, td, th, dd, figcaption) { overflow-wrap: break-word; }

/* 3. Rien ne dépasse de son conteneur en largeur. */
:where(img, svg, video, iframe, table) { max-width: 100%; }

/* 4. Un bouton s'adapte à son libellé, il ne le laisse pas déborder. */
.bv-btn { max-width: 100%; }

/* 5. La pastille flottante est ronde au repos, quoi qu'on ajoute dedans.
      C'est le défaut de l'écart invisible : garanti impossible désormais. */
.bv-whatsapp:not(:hover):not(:focus-within) { aspect-ratio: 1; }
