/* DORA FINANCE — feuille de style. Règles issues de DESIGN.md. */

@font-face {
  font-family: "Brygada 1918";
  src: url("/fonts/brygada-1918-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --fond: #fcfcfc;
  --surface: #f4eff3;
  --texte: #603953;
  --primaire: #e41134;
  --accent: #b64dcb;
  --filet: #d4c4cf;

  --titres: "Brygada 1918", serif;
  --courant: "Instrument Sans", sans-serif;
  --barre: 72px;
  --cadre: 12px;
  --rayon: 8px;
  --marge: 48px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--barre) + 24px);
}
html.menu-ouvert { overflow: hidden; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 18px/1.6 var(--courant);
}

[hidden] { display: none !important; }

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--titres);
  font-weight: 600;
  text-align: left;
}
h1, h2 { text-wrap: balance; }
h1 { font-size: 64px; line-height: 1.06; letter-spacing: -0.01em; }
h2 { font-size: 44px; line-height: 1.12; max-width: 820px; margin-bottom: 40px; }
h3 { font-size: 26px; line-height: 1.2; }

p { margin: 0 0 20px; }
strong, b { font-weight: 600; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--primaire);
}
a:hover { color: var(--primaire); }
a[href^="mailto:"] { white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.barre :focus-visible,
.panneau :focus-visible,
.bande :focus-visible,
.encadre:not(.encadre--clair) :focus-visible,
.cookies :focus-visible { outline-color: var(--fond); }

.evitement {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--fond);
  color: var(--texte);
  border-radius: var(--rayon);
  font-weight: 600;
}
.evitement:focus { top: 14px; }

/* ---------- Barre de navigation ---------- */

.barre {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--barre);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--marge);
  background: var(--primaire);
  color: var(--fond);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--fond);
  font: 600 24px/1 var(--titres);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { color: var(--fond); }
.logo img { width: 40px; height: 40px; }

.btn-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  background: var(--fond);
  color: var(--primaire);
  font: 600 16px/1 var(--courant);
  border-radius: var(--rayon);
  text-decoration: none;
  cursor: pointer;
}
.btn-menu:hover { background: var(--surface); color: var(--primaire); }

/* ---------- Panneau de menu plein écran ---------- */

.panneau {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: var(--primaire);
  color: var(--fond);
}
.panneau:target,
.panneau.ouvert { display: flex; }

.panneau-haut {
  flex: none;
  height: var(--barre);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--marge);
}
.panneau-liens {
  list-style: none;
  margin: auto 0;
  padding: 48px var(--marge);
  display: grid;
  gap: 10px;
  justify-items: start;
}
.panneau-liens a {
  color: var(--fond);
  font: 600 88px/1.08 var(--titres);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.panneau-liens a:hover,
.panneau-liens a[aria-current] {
  color: var(--fond);
  text-decoration-line: underline;
  text-decoration-thickness: 6px;
  text-underline-offset: 10px;
  text-decoration-color: var(--fond);
}
.panneau-bas { margin: 0; padding: 0 var(--marge) 44px; }
.panneau-bas a { color: var(--fond); text-decoration-color: var(--fond); }
.panneau-bas a:hover { color: var(--fond); text-decoration-thickness: 4px; }

/* ---------- Haut de page : photo + bande de titre + rond ---------- */

.tete { position: relative; }

.tete-visuel {
  position: relative;
  height: 56vh;
  min-height: 400px;
  max-height: 620px;
  border: var(--cadre) solid var(--primaire);
  background: var(--surface);
  overflow: hidden;
}
.tete--accueil .tete-visuel {
  height: calc(100vh - var(--barre) - var(--bandeau, 0px));
  height: calc(100svh - var(--barre) - var(--bandeau, 0px));
  min-height: 560px;
  max-height: none;
}
.tete--courte .tete-visuel { height: 44vh; min-height: 340px; max-height: 480px; }

.tete-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.titre-zone {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: min(780px, calc(100% - 140px));
}
.rond {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--accent);
}
.tete--accueil .rond { top: -110px; right: -110px; width: 220px; height: 220px; }

.bande {
  position: relative;
  padding: 40px 60px 40px 36px;
  background: var(--primaire);
  color: var(--fond);
  border-radius: 0 var(--rayon) 0 0;
}
.bande p { margin: 18px 0 0; max-width: 600px; font-size: 20px; line-height: 1.45; }

/* ---------- Colonne et sections ---------- */

.colonne {
  width: min(1100px, calc(100% - 2 * var(--marge)));
  margin-inline: auto;
}

.section { margin-block: 160px; }
.section--image { margin-block: 200px; }

.grand { margin: 0 0 28px; font-size: 30px; line-height: 1.42; }
.grand:last-child { margin-bottom: 0; }
.suite { margin: 56px 0 0; }

/* 2 — image pleine largeur + légende */
.image-large { margin: 0; }
.image-large img,
.carte {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border: var(--cadre) solid var(--primaire);
}
.image-large figcaption { margin-top: 24px; font-size: 15px; line-height: 1.55; }
.image-large figcaption p { max-width: 560px; margin: 0; }

.carte {
  display: grid;
  place-items: center;
  height: 480px;
  background: var(--surface);
}
.carte iframe { display: block; width: 100%; height: 100%; border: 0; }

/* 3 — encadré sur aplat */
.encadre {
  padding: 88px 80px;
  background: var(--texte);
  color: var(--fond);
  border-radius: var(--rayon);
}
.encadre p { max-width: 780px; font-size: 22px; line-height: 1.5; }
.encadre p:last-child { margin-bottom: 0; }
.encadre a { color: var(--fond); text-decoration-color: var(--fond); }
.encadre a:hover { color: var(--fond); text-decoration-thickness: 4px; }
.encadre--clair { background: var(--surface); color: var(--texte); }
.encadre--clair p { font-size: 18px; line-height: 1.6; }
.encadre--clair a { color: var(--texte); text-decoration-color: var(--primaire); }
.encadre--clair a:hover { color: var(--primaire); text-decoration-thickness: 2px; }

/* 4 — liste numérotée / index */
.index {
  list-style: none;
  counter-reset: n;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 88px;
}
.index li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 20px;
  align-items: start;
}
.index li::before {
  content: counter(n);
  color: var(--accent);
  font: 600 64px/0.86 var(--titres);
}
.index h3 { margin-bottom: 8px; }
.index p { margin: 0; font-size: 17px; }

.index--long { grid-template-columns: 1fr; gap: 80px; }
.index--long li { grid-template-columns: 88px 300px 1fr; column-gap: 32px; }
.index--long li::before { font-size: 88px; }
.index--long h3 { font-size: 32px; line-height: 1.15; margin: 0; }
.index--long p { font-size: 18px; }

.repertoire {
  margin: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px 48px;
  align-items: baseline;
}
.repertoire dt { color: var(--accent); font: 600 28px/1.2 var(--titres); }
.repertoire dd { margin: 0; font-size: 22px; line-height: 1.45; }

/* 5 — questions / réponses en 2 colonnes */
.qr {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px 88px;
}
.qr dt {
  margin-bottom: 12px;
  color: var(--primaire);
  font: 600 26px/1.22 var(--titres);
}
.qr dd { margin: 0; }

/* 6 — frise chronologique verticale */
.frise { list-style: none; margin: 0; padding: 0; }
.frise li {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  column-gap: 88px;
  padding-bottom: 64px;
}
.frise li:last-child { padding-bottom: 0; }
.frise li::before {
  content: "";
  position: absolute;
  left: 322px;
  top: 8px;
  bottom: -8px;
  width: 4px;
  background: var(--filet);
}
.frise li:last-child::before { display: none; }
.frise li::after {
  content: "";
  position: absolute;
  left: 314px;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: var(--rayon);
  background: var(--primaire);
}
.frise-date {
  margin: 0;
  color: var(--accent);
  font: 600 28px/1.2 var(--titres);
  text-align: right;
}
.frise h3 { margin-bottom: 10px; }
.frise div p { margin: 0; max-width: 620px; }

/* 7 — 2 colonnes texte / image */
.duo {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: center;
}
.duo h2 { margin-bottom: 28px; }
.duo img {
  width: 100%;
  border: var(--cadre) solid var(--primaire);
  border-radius: var(--rayon);
}

/* ---------- Boutons ---------- */

.bouton {
  display: inline-block;
  padding: 17px 30px;
  background: var(--primaire);
  color: var(--fond);
  font: 600 17px/1.2 var(--courant);
  border: 0;
  border-radius: var(--rayon);
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover { background: var(--texte); color: var(--fond); }

.lien-bouton {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--primaire);
}
.lien-bouton:hover { color: var(--primaire); }

/* ---------- Formulaires ---------- */

.champ { display: grid; gap: 8px; margin-bottom: 22px; }
.champ label { font-size: 16px; font-weight: 600; }
.champ .facultatif { font-weight: 400; }
.champ input,
.champ textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--fond);
  color: var(--texte);
  font: 400 17px/1.4 var(--courant);
  border: 2px solid var(--texte);
  border-radius: var(--rayon);
}
.champ textarea { min-height: 180px; resize: vertical; }
.champ input:focus-visible,
.champ textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.champ [aria-invalid="true"] { border-color: var(--primaire); }

.erreur { margin: 0; color: var(--primaire); font-size: 15px; font-weight: 600; }

.consentement {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
  margin: 4px 0 24px;
  font-size: 15px;
  line-height: 1.5;
}
.consentement input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--primaire);
}
.consentement .erreur { grid-column: 2; }

.pot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.message-envoi {
  margin: 0 0 28px;
  padding: 18px 22px;
  background: var(--texte);
  color: var(--fond);
  font-weight: 600;
  border-radius: var(--rayon);
}
.message-envoi--erreur { background: var(--primaire); }
.message-envoi a,
.message-envoi a:hover { color: var(--fond); text-decoration-color: var(--fond); }

.formulaire { max-width: 720px; }

/* ---------- Landing page : formulaire dans le haut de page ---------- */

.tete--landing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: calc(100vh - var(--barre) - var(--bandeau, 0px));
  padding: 36px 72px 36px 0;
}
.tete--landing .tete-visuel {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  max-height: none;
}
.tete--landing h1 { font-size: 52px; line-height: 1.08; }
.tete--landing .titre-zone { max-width: min(700px, calc(100% - 640px)); }

.demande {
  position: relative;
  z-index: 1;
  width: 440px;
  padding: 26px 30px 28px;
  background: var(--fond);
  color: var(--texte);
  border-radius: var(--rayon);
}
.demande h2 { font-size: 26px; line-height: 1.15; margin-bottom: 8px; }
.demande > p { margin-bottom: 14px; font-size: 15px; line-height: 1.5; }
.demande .champ { gap: 6px; margin-bottom: 11px; }
.demande .champ label { font-size: 15px; }
.demande .champ input { padding: 9px 14px; }
.demande .consentement { margin: 4px 0 14px; font-size: 14px; }
.demande .bouton { width: 100%; text-align: center; }
.demande .message-envoi { margin-bottom: 18px; padding: 14px 16px; font-size: 15px; }

/* ---------- Pied de page ---------- */

.pied { margin-top: 200px; padding: 0 var(--marge) 56px; }
.pied-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 32px;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
.pied-nom { font: 600 20px/1.2 var(--titres); }

/* ---------- Bandeau cookies ---------- */

.cookies {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  padding: 18px var(--marge);
  background: var(--texte);
  color: var(--fond);
  font-size: 15px;
  line-height: 1.5;
}
.cookies p { margin: 0; max-width: 820px; }
.cookies a,
.cookies a:hover { color: var(--fond); text-decoration-color: var(--fond); }
.cookies-choix { display: flex; gap: 12px; flex: none; }
.cookies button {
  min-width: 140px;
  min-height: 46px;
  padding: 0 22px;
  background: var(--fond);
  color: var(--texte);
  font: 600 16px/1 var(--courant);
  border: 0;
  border-radius: var(--rayon);
  cursor: pointer;
}
.cookies button:hover { background: var(--surface); }

/* ---------- Largeurs intermédiaires ---------- */

@media (max-width: 1080px) {
  h1 { font-size: 52px; }
  .panneau-liens a { font-size: 68px; }
  .index--long li { grid-template-columns: 72px 1fr; column-gap: 24px; }
  .index--long li::before { font-size: 72px; grid-row: span 2; }
  .index--long h3 { margin-bottom: 12px; }
  .frise li { grid-template-columns: 200px 1fr; }
  .frise li::before { left: 242px; }
  .frise li::after { left: 234px; }
  .duo { gap: 56px; }
  .encadre { padding: 72px 56px; }

  /* landing : le formulaire passe sous la photo */
  .tete--landing { display: block; min-height: 0; padding: 0; }
  .tete--landing .tete-visuel { position: relative; inset: auto; height: 460px; }
  .tete--landing .titre-zone { max-width: min(700px, calc(100% - 120px)); }
  .demande {
    width: auto;
    padding: 40px var(--marge) 44px;
    background: var(--surface);
    border-radius: 0;
  }
  .demande form { max-width: 560px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  :root { --barre: 64px; --marge: 20px; }

  body { font-size: 17px; }
  h1 { font-size: 34px; line-height: 1.1; }
  h2 { font-size: 30px; line-height: 1.15; margin-bottom: 28px; }
  h3 { font-size: 22px; }

  .logo { font-size: 20px; gap: 10px; }
  .logo img { width: 36px; height: 36px; }
  .btn-menu { padding: 0 18px; }

  .panneau-liens { padding: 32px var(--marge); gap: 14px; }
  .panneau-liens a { font-size: 44px; line-height: 1.12; }
  .panneau-liens a:hover,
  .panneau-liens a[aria-current] { text-decoration-thickness: 4px; text-underline-offset: 7px; }
  .panneau-bas { padding-bottom: 32px; font-size: 17px; }

  .tete-visuel { min-height: 380px; }
  .tete--accueil .tete-visuel { min-height: 520px; }
  .titre-zone,
  .tete--landing .titre-zone { right: 60px; max-width: none; }
  .rond,
  .tete--accueil .rond { top: -48px; right: -48px; width: 96px; height: 96px; }
  .bande { padding: 22px 22px 22px 8px; }
  .bande p { margin-top: 12px; font-size: 16px; line-height: 1.45; }

  .section--image { margin-block: 120px; }
  .grand { font-size: 22px; line-height: 1.45; margin-bottom: 22px; }
  .suite { margin-top: 40px; }

  .image-large img { height: 300px; }
  .carte { height: 360px; }

  .encadre { padding: 48px 24px; }
  .encadre p { font-size: 19px; }
  .encadre--clair p { font-size: 17px; }

  .index { grid-template-columns: 1fr; gap: 40px; }
  .index li { grid-template-columns: 48px 1fr; column-gap: 14px; }
  .index li::before { font-size: 48px; }
  .index--long { gap: 56px; }
  .index--long li { grid-template-columns: 48px 1fr; column-gap: 14px; }
  .index--long li::before { font-size: 48px; }
  .index--long h3 { font-size: 26px; }
  .index--long p { font-size: 17px; }

  .repertoire { grid-template-columns: 1fr; gap: 6px; }
  .repertoire dt { font-size: 24px; }
  .repertoire dd { font-size: 19px; margin-bottom: 32px; }
  .repertoire dd:last-child { margin-bottom: 0; }

  .qr { grid-template-columns: 1fr; gap: 44px; }
  .qr dt { font-size: 24px; }

  .frise li { display: block; padding: 0 0 52px 40px; }
  .frise li::before { left: 8px; }
  .frise li::after { left: 0; }
  .frise-date { margin-bottom: 6px; font-size: 24px; text-align: left; }

  .duo { grid-template-columns: 1fr; gap: 40px; }

  .tete--landing .tete-visuel { height: 320px; min-height: 0; }
  .tete--landing h1 { font-size: 30px; line-height: 1.12; }
  .tete--landing .bande p { display: none; }
  .demande { padding: 36px var(--marge) 40px; }

  .pied-ligne { gap: 10px 22px; }

  .cookies {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px var(--marge) 16px;
    font-size: 14px;
  }
  .cookies-choix { gap: 10px; }
  .cookies button { flex: 1 1 0; min-width: 0; }
}
