/* CBM — feuille de style unique, aucune ressource externe.
   Couleurs du logo : rouge, ardoise, noir.
   Police : Jost (libre, licence OFL, inspirée de Futura), hébergée sur le site : static/fonts/ */

@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-latin-wght.woff2") format("woff2");
  font-weight: 100 900;   /* police variable : toutes les graisses dans un seul fichier */
  font-style: normal;
  font-display: swap;     /* texte affiché tout de suite, Jost remplace dès qu'elle est chargée */
}
/* Vraie italique (téléchargée par le navigateur seulement si une page contient de l'italique) */
@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --rouge: #c8001e;
  --rouge-fonce: #9e0018;
  --ardoise: #676d93;
  --noir: #141414;
  --texte: #222;
  --gris: #666;
  --trait: #d9d9d9;
  --fond-gris: #f2f2f2;
  --police: "Jost", "Century Gothic", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--police); font-size: 1.0625rem; line-height: 1.55; color: var(--texte); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rouge-fonce); text-underline-offset: .15em; }
a:hover { color: var(--rouge); }
:focus-visible { outline: 2px solid var(--noir); outline-offset: 2px; }
h1, h2, h3 { color: var(--noir); line-height: 1.2; }

.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--noir); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* En-tête : fond blanc, le logo est dessiné pour un fond clair */
.site-header { border-bottom: 1px solid var(--trait); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--noir); text-decoration: none; font-weight: 600; }
.brand img { width: 72px; height: 72px; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-header nav a { color: var(--texte); text-decoration: none; padding: .25rem 0; }
.site-header nav a:hover { color: var(--rouge); }
.site-header nav a[aria-current="page"] { color: var(--rouge-fonce); border-bottom: 2px solid currentColor; }

/* Accueil : la photo entière, puis une bande de texte en dessous */
/* Photo pleine largeur au format 16:9 (presque toute la photo visible),
   limitée à 85 % de la hauteur de la fenêtre sur les écrans larges et peu hauts */
.hero-photo { position: relative; }
.hero-img { width: 100%; height: min(56.25vw, 85vh); object-fit: cover; object-position: 30% 25%; }
/* Crédit photo discret, en bas à droite de la photo */
.credit { position: absolute; bottom: .4rem; right: .6rem; margin: 0; font-size: .7rem; color: #fff; opacity: .55; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
/* Bande noire pleine largeur collée sous la photo, texte aligné sur le reste de la page */
.hero-band { background: var(--noir); color: #ddd; }
.hero-text { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; align-items: start; padding-block: 1.75rem 2rem; }
.hero-text h1 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.hero-text p { margin: 0 0 1rem; }
.btn { display: inline-block; background: var(--rouge); color: #fff; text-decoration: none; padding: .55rem 1.1rem; border-radius: 2px; font-weight: 600; }
.btn:hover { background: var(--rouge-fonce); color: #fff; }

.notice { background: var(--fond-gris); border-bottom: 1px solid var(--trait); }
.notice p { margin-block: 0; padding-block: .9rem; }
.nowrap { white-space: nowrap; }
.notice strong { color: var(--rouge-fonce); }
.notice--ok strong { color: #1d6b35; }

.infos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; padding-block: 2.5rem; }
.infos h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.infos address { font-style: normal; }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th, .tableau td { padding: .35rem 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { text-align: left; font-weight: 600; }
.tableau td { text-align: right; white-space: nowrap; }
.tableau small { font-weight: 400; color: var(--gris); }

/* Pages de texte */
.prose { max-width: 42rem; }
.accueil { position: relative; overflow: hidden; border-top: 1px solid var(--trait); padding-block: 1rem 3.5rem; }
.accueil .wrap { position: relative; z-index: 1; }
/* Logo avec l'année, en filigrane à droite du texte */
.accueil::after {
  content: ""; position: absolute; top: 2rem; right: max(0rem, calc((100vw - 66rem) / 2));
  width: min(24rem, 36vw); aspect-ratio: 3851 / 3147;
  background: var(--filigrane) no-repeat center / contain; opacity: .12; pointer-events: none;
}
.page { padding-top: 2rem; padding-bottom: 3rem; }
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.25rem; margin-top: 2rem; }

/* Pied de page */
.site-footer { background: var(--noir); color: #bbb; font-size: .95rem; padding-block: 1.75rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .75rem; }
.footer-legal { color: #999; margin-bottom: 0; }

@media (max-width: 800px) {
  /* Téléphone : photo d'un bord à l'autre, entière (format d'origine 3:2) */
  .hero-img { height: auto; aspect-ratio: 3 / 2; }
  .hero-text { grid-template-columns: 1fr; padding-block: 1.5rem 1.75rem; }
  .infos { grid-template-columns: 1fr; gap: 1.75rem; padding-block: 2rem; }
  .accueil::after { display: none; }
}
@media (max-width: 520px) {
  .brand img { width: 56px; height: 56px; }
  .brand span { font-size: .95rem; }
  .site-header ul { gap: 1.1rem; }
}
