/*
 * Styles communs à toutes les pages (accueil et pages tableaux).
 * Charte : clients/georges/design.md, §3 (dépôt de l'agence).
 * Mobile d'abord : les règles de base visent le téléphone, les @media élargissent.
 */

/* ---------- Police ---------- */
/* Archivo variable, hébergée sur le site (fonts/, licence OFL). Sous-ensemble latin. */
@font-face {
  font-family: Archivo;
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-var.woff2") format("woff2");
}

/* ---------- Jetons ---------- */
:root {
  /* Couleurs : la couleur, ce sont les tableaux. */
  --fond: #F3F0EA;       /* mur de galerie, blanc cassé chaud */
  --fond-entete: rgba(243, 240, 234, .92); /* --fond à 92 % */
  --encre: #161514;      /* textes, bouton plein */
  --gris: #5E5A54;       /* textes secondaires (>= 4,5:1 sur --fond et --fond-2) */
  --fond-2: #E6E1D8;     /* bloc contact, pied de page */
  --filet: #8A857D;      /* filets et contours, jamais pour du texte */

  --police: Archivo, system-ui, sans-serif;

  /* Échelle d'espacement (rem) */
  --e-1: .5rem;
  --e-2: 1rem;
  --e-3: 1.5rem;
  --e-4: 2rem;
  --e-5: 3rem;
  --e-6: 4rem;
  --e-7: 6rem;
  --e-8: 8rem;

  --marge: 20px;          /* marge latérale : 20 px mobile, 48 px tablette, 6 vw ordinateur */
  --largeur-max: 1280px;
  --entre-blocs: var(--e-7);
  --entete-h: 56px;
}

@media (min-width: 768px) {
  :root { --marge: 48px; --entete-h: 64px; }
}

@media (min-width: 1024px) {
  :root { --marge: 6vw; --entre-blocs: var(--e-8); }
}

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

body, h1, h2, h3, p, figure, ul, ol { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Les ancres ne passent pas sous l'en-tête fixe. */
  scroll-padding-top: var(--entete-h);
  /* Place de la barre de défilement réservée, même masquée : sans ça, l'atterrissage de l'intro sauterait
     sous Windows (G-14). */
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* G-14, A3 : navigation entre pages, fondu ; le tableau grandit jusqu'à sa place (.mur img, css/tableau.css). */
  @view-transition { navigation: auto; }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 450ms;
    animation-timing-function: cubic-bezier(.45, 0, .15, 1);
  }
}

body {
  background: var(--fond);
  color: var(--encre);
  font: 400 1.125rem/1.6 var(--police); /* texte courant : 18 px */
  overflow-wrap: break-word;
}

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

a { color: inherit; }

h2 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}

h3 { font-size: 1.125rem; font-weight: 600; }

/* Petits textes : jamais sous 15 px. */
.petit {
  font-size: .9375rem;
  color: var(--gris);
  font-variant-numeric: tabular-nums;
}

/* Masqué à l'écran, lu par les lecteurs d'écran et les moteurs. */
.visuellement-masque {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Conteneur : marges latérales + largeur max. */
.conteneur {
  width: 100%;
  max-width: calc(var(--largeur-max) + 2 * var(--marge));
  margin-inline: auto;
  padding-inline: var(--marge);
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--encre);
  outline-offset: 3px;
}

/* Lien d'évitement : premier élément focusable, visible seulement au focus. */
.evitement {
  position: absolute;
  top: var(--e-1);
  left: var(--e-1);
  z-index: 100;
  padding: .75rem var(--e-2);
  background: var(--encre);
  color: var(--fond);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.evitement:focus { transform: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--e-3);
  border: 1.5px solid var(--encre);
  border-radius: 0;
  font: 600 1rem/1.2 var(--police);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.btn--plein { background: var(--encre); color: var(--fond); }
.btn--contour { background: transparent; color: var(--encre); }

/* Survol : le plein passe en contour et inversement. */
@media (hover: hover) {
  .btn--plein:hover { background: transparent; color: var(--encre); }
  .btn--contour:hover { background: var(--encre); color: var(--fond); }
}

/* ---------- En-tête fixe ---------- */
.entete {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--entete-h);
  background: var(--fond-entete);
  border-bottom: 1px solid var(--filet);
}

.entete__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-2);
  height: 100%;
}

.entete__nom {
  font-weight: 700;
  font-stretch: 125%;
  font-size: 1.125rem;
  text-decoration: none;
  /* Zone cliquable d'au moins 48 px de haut */
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

/* Navigation : seulement sur ordinateur (pas de burger, la page est courte). */
.entete__nav { display: none; }

.entete__nav ul {
  display: flex;
  gap: var(--e-4);
  padding: 0;
  list-style: none;
}

.entete__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
}
.entete__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.entete .btn { padding: 0 var(--e-2); }

/* Numéro : masqué visuellement sur mobile (lu quand même), affiché sur ordinateur. */
.appeler__numero {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .entete__nav { display: block; margin-left: auto; }
  .entete .btn { margin-left: var(--e-4); }
  .appeler__numero { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: pre; }
}

/* Le contenu commence sous l'en-tête fixe. */
.page { padding-top: var(--entete-h); }

/* ---------- Pied de page ---------- */
.pied {
  background: var(--fond-2);
  border-top: 1px solid var(--filet);
  padding-block: var(--e-4);
}

.pied p + p { margin-top: var(--e-1); }

/* Mentions légales (G-05) : bloc dépliable, pas de 2e page. */
.mentions { margin-top: var(--e-2); }

.mentions summary {
  display: list-item; /* garde le triangle d'ouverture */
  width: fit-content;
  padding-block: 12px; /* 24 px de ligne + 24 = zone de 48 px */
  color: var(--encre);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.mentions dl { max-width: 40em; padding-top: var(--e-1); }
.mentions dt { color: var(--encre); font-weight: 600; }
.mentions dt:not(:first-child) { margin-top: var(--e-2); }
.mentions dd { margin: 0; }
.mentions a { color: var(--encre); }
