/* YBA FINANCE — feuille de style unique, construite à partir de DESIGN.md
   Palette : 6 variables uniquement. Polices : Instrument Serif + Figtree (woff2 locaux). */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/figtree-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/figtree-600.woff2") format("woff2"); }

:root {
  --fond: #e7f4f1;
  --surface: #dee9e7;
  --texte: #325750;
  --primaire: #cc2849;
  --accent: #e335be;
  --filet: #b0c4c0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Figtree", Arial, sans-serif;
  --filet-pointille: 2px dotted var(--filet);
  --section: 56px;
  --gouttiere: 24px;
  --decalage: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primaire); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--texte); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
strong { font-weight: 600; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--texte); margin: 0 0 20px; }
h1 { font-size: clamp(48px, 6.1vw, 88px); line-height: 0.92; letter-spacing: -0.01em; }
h2 { font-size: clamp(36px, 4.2vw, 60px); line-height: 0.98; }
h3 { font-size: 26px; line-height: 1.15; margin-bottom: 8px; }
h4 { font-size: 22px; line-height: 1.2; margin-bottom: 6px; }

/* ÉLÉMENT SIGNATURE : surligneur sous les mots-clés */
mark.hl, .hl {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 -0.38em 0 0 var(--accent);
  padding: 0 0.08em;
}

.conteneur { max-width: 1280px; margin: 0 auto; padding: 0 var(--gouttiere); }
.chapeau { font-size: 20px; line-height: 1.5; max-width: 640px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* BOUTONS : rectangle plein, aucun arrondi */
.btn {
  display: inline-block;
  background: var(--primaire);
  color: var(--fond);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 28px;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--texte); color: var(--fond); }
.btn-second { background: var(--texte); }
.btn-second:hover, .btn-second:focus-visible { background: var(--fond); color: var(--texte); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* EN-TÊTE : bandeau fin + logo centré + barre de liens entre deux filets */
.bandeau {
  background: var(--surface);
  border-bottom: var(--filet-pointille);
  font-size: 12px;
  letter-spacing: 0.04em;
  height: 32px;
}
.bandeau .conteneur { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.zone-logo { position: relative; height: 96px; display: flex; align-items: center; justify-content: center; }
.zone-logo a { display: block; line-height: 0; }
.zone-logo img { height: 56px; width: auto; }
.menu-btn { display: none; }
.barre-liens { border-top: var(--filet-pointille); border-bottom: var(--filet-pointille); }
.barre-liens ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 32px; height: 48px; align-items: center; }
.barre-liens a { color: var(--texte); font-weight: 600; font-size: 15px; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.barre-liens a:hover { border-bottom-color: var(--texte); }
.barre-liens a[aria-current="page"] { border-bottom-color: var(--primaire); }
.barre-liens a.lien-action { color: var(--primaire); }

/* HERO : collage photo + bloc de couleur décalé de 24 px vers le bas et la droite */
.hero { padding: var(--section) 0; border-bottom: var(--filet-pointille); }
.hero-grille { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
.hero h1 { margin-bottom: 24px; }
.collage { position: relative; margin: 0 var(--decalage) var(--decalage) 0; }
.collage img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.collage::after {
  content: "";
  position: absolute;
  left: var(--decalage);
  top: var(--decalage);
  width: 100%;
  height: 100%;
  background: var(--primaire);
  z-index: 0;
}
.collage-form { position: relative; margin: 0 var(--decalage) var(--decalage) 0; }
.collage-form::after {
  content: "";
  position: absolute;
  left: var(--decalage);
  top: var(--decalage);
  width: 100%;
  height: 100%;
  background: var(--primaire);
  z-index: 0;
}
.collage-form .formulaire { position: relative; z-index: 1; background: var(--surface); border: var(--filet-pointille); padding: 24px; }
.collage-form .champ { margin-bottom: 14px; }
.collage-form h2 { font-size: 30px; margin-bottom: 14px; }
.hero-simple { padding: var(--section) 0 40px; border-bottom: var(--filet-pointille); }
.hero-simple h1 { max-width: 1100px; }

/* SECTIONS : padding 56 px, mises en page distinctes */
section { padding: var(--section) 0; }
.filet-bas { border-bottom: var(--filet-pointille); }

/* 1 — trois mots-clés sur une ligne, sans carte */
.mots-cles { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; font-family: var(--serif); font-size: clamp(40px, 5vw, 72px); line-height: 1; margin: 0; padding: 0; list-style: none; }
.mots-cles li { flex: 0 1 auto; }
.mots-cles li + li::before { content: "·"; color: var(--accent); margin-right: 24px; }

/* 2 — liste de définitions */
.defs { margin: 0; }
.defs > div { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 20px 0; border-top: var(--filet-pointille); }
.defs > div:last-child { border-bottom: var(--filet-pointille); }
.defs dt { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.defs dd { margin: 0; }
.defs dd p:last-child { margin-bottom: 0; }

/* 3 — frise chronologique verticale */
.frise { list-style: none; margin: 0; padding: 0 0 0 44px; border-left: var(--filet-pointille); }
.frise li { position: relative; padding: 0 0 32px 36px; }
.frise li:last-child { padding-bottom: 0; }
.frise .num { position: absolute; left: -44px; top: -6px; transform: translateX(-50%); font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--accent); background: var(--fond); padding: 0 8px; }
.frise h3 { margin-top: 0; }

/* 4 — citation en très grand corps entre deux filets */
.citation { margin: 0; padding: 40px 0; border-top: var(--filet-pointille); border-bottom: var(--filet-pointille); max-width: 1000px; font-family: var(--serif); font-style: italic; font-size: clamp(28px, 3.4vw, 48px); line-height: 1.15; }
.citation p { margin: 0; }
.citation footer { font-family: var(--sans); font-style: normal; font-size: 15px; margin-top: 16px; }

/* 5 — deux colonnes texte / image */
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.deux-col img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* 6 — bande de couleur pleine largeur avec appel à l'action */
.bande { background: var(--primaire); color: var(--fond); padding: 40px 0; }
.bande h2, .bande p { color: var(--fond); }
.bande .conteneur { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.bande h2 { margin: 0; }
.bande a:not(.btn) { color: var(--fond); }

/* 7 — encadré sur aplat de couleur */
.encadre { background: var(--surface); border: var(--filet-pointille); padding: 32px; max-width: 880px; }
.encadre > :last-child { margin-bottom: 0; }

/* STRUCTURE : grille magazine 3 colonnes, filets entre les colonnes, hauteurs différentes */
.mag { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; align-items: start; }
.mag > * { padding: 0 24px; border-left: var(--filet-pointille); min-width: 0; }
.mag > *:first-child { padding-left: 0; border-left: 0; }
.mag > *:last-child { padding-right: 0; }
.mag .large { grid-column: span 2; }
.mag .num-grand { font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--accent); margin: 0 0 8px; }
.mag .bloc + .bloc { margin-top: 24px; padding-top: 24px; border-top: var(--filet-pointille); }
.mag img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 12px; }
.mag figcaption { font-size: 14px; }
.mag .defs > div { grid-template-columns: 1fr; gap: 6px; }
.defs dd, .pied-infos { overflow-wrap: anywhere; }

/* NUMÉROS EN GRAND CORPS (iconographie) */
.num-grand { font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--accent); }

/* FORMULAIRES */
.formulaire { max-width: 640px; }
.champ { margin-bottom: 18px; }
.champ label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.champ input[type="text"], .champ input[type="email"], .champ input[type="tel"], .champ textarea {
  width: 100%;
  background: var(--fond);
  color: var(--texte);
  border: 2px solid var(--texte);
  border-radius: 0;
  height: 48px;
  padding: 0 14px;
  font: 16px var(--sans);
}
.champ textarea { height: 160px; padding: 12px 14px; resize: vertical; }
.champ input:focus, .champ textarea:focus { border-color: var(--primaire); outline: 2px solid var(--accent); outline-offset: 2px; }
.champ-case { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14px; }
.champ-case input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primaire); }
.champ-aide { font-size: 13px; margin-top: 4px; }
.statut { display: none; margin: 0 0 24px; padding: 20px 24px; background: var(--surface); border: var(--filet-pointille); font-size: 16px; }
.statut.visible { display: block; }
.statut.erreur { border-color: var(--primaire); }

/* CARTE à la demande */
.carte-zone { border: var(--filet-pointille); background: var(--surface); padding: 24px; }
.carte-zone iframe { width: 100%; height: 360px; border: 0; display: block; margin-top: 16px; }

/* PIED DE PAGE : dénomination en 6 vw puis liens et informations */
.pied { background: var(--surface); border-top: var(--filet-pointille); padding: 40px 0 32px; margin-top: 0; }
.pied .denomination { font-family: var(--serif); font-size: max(40px, 6vw); line-height: 1; margin: 0 0 24px; color: var(--texte); }
.pied-liens { list-style: none; margin: 0 0 20px; padding: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: var(--filet-pointille); }
.pied-liens a, .pied-liens button { font: 600 14px var(--sans); color: var(--texte); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.pied-liens a:hover, .pied-liens button:hover { text-decoration: underline; }
.pied-infos { font-size: 13px; line-height: 1.6; margin: 0; }
.pied-infos a { color: var(--texte); }

/* BANDEAU COOKIES */
.cookies {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-top: var(--filet-pointille);
  padding: 20px 24px;
  display: none;
}
.cookies.visible { display: block; }
.cookies .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cookies p { margin: 0; font-size: 15px; max-width: 760px; }
.cookies-boutons { display: flex; gap: 12px; flex-shrink: 0; }
.cookies-boutons .btn { width: 140px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ADAPTATION ≤ 900 px */
@media (max-width: 900px) {
  :root { --section: 40px; --gouttiere: 16px; }
  body { font-size: 16px; }
  .bandeau .bandeau-droite { display: none; }
  .zone-logo { height: 72px; }
  .zone-logo img { height: 44px; }
  .zone-logo { flex-direction: column; height: auto; padding-bottom: 12px; }
  .zone-logo a { height: 72px; display: flex; align-items: center; }
  .menu-btn { display: flex; position: static; width: 100%; height: 44px; align-items: center; justify-content: center; padding: 0; }
  .barre-liens ul { display: none; flex-direction: column; gap: 0; height: auto; align-items: stretch; }
  .barre-liens.ouvert ul { display: flex; }
  .barre-liens li + li { border-top: var(--filet-pointille); }
  .barre-liens a { display: block; height: 48px; line-height: 48px; padding: 0 var(--gouttiere); border-bottom: 0; }
  .barre-liens a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--primaire); }
  .hero-grille { grid-template-columns: 1fr; gap: 32px; }
  .hero-grille .chapeau { order: 3; }
  .hero-grille .collage, .hero-grille .collage-form { order: 2; }
  .hero-grille h1 { order: 1; margin-bottom: 0; }
  .chapeau { font-size: 18px; }
  .mots-cles { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mots-cles li + li::before { content: none; }
  .defs > div { grid-template-columns: 1fr; gap: 8px; }
  .frise { padding-left: 36px; }
  .frise li { padding-left: 28px; }
  .frise .num { left: -36px; font-size: 56px; top: -2px; }
  .deux-col { grid-template-columns: 1fr; gap: 24px; }
  .mag { grid-template-columns: 1fr; }
  .mag > * { padding: 24px 0; border-left: 0; border-top: var(--filet-pointille); }
  .mag > *:first-child { padding-top: 0; border-top: 0; }
  .mag .large { grid-column: auto; }
  .encadre { padding: 24px; }
  .collage-form .formulaire { padding: 20px; }
  .cookies { padding: 14px 16px; }
  .cookies p { font-size: 14px; line-height: 1.4; }
  .cookies .conteneur { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookies-boutons .btn { height: 40px; }
  .cookies-boutons .btn { width: 50%; }
  .num-grand, .mag .num-grand { font-size: 56px; }
}

/* ÉCART JUSTIFIÉ (DESIGN.md § 16) : décalage du collage 16 px sous 480 px */
@media (max-width: 480px) {
  :root { --decalage: 16px; }
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
}
