/* ==========================================================================
   BENERE — site vitrine
   Jetons issus de documentation/02_BRAND_BRIEF.md. Ne pas introduire de
   couleur hors de cette liste : une seule couleur d'accent par section.
   ========================================================================== */

:root {
  /* Marque */
  --marine-900: #011f56;
  --marine-700: #1b4b9b;
  --marine-100: #e8eef9;
  --or: #febb04;

  /* Sémantique de paiement (identique à l'application) */
  --vert: #01712e;
  --vert-fond: #e6f3ea;
  --ambre-texte: #9a5b00;
  --ambre-fond: #fff4d6;
  --rouge: #e11a13;
  --rouge-fond: #fde8e7;

  /* Neutres */
  --fond: #f5f7fa;
  --surface: #ffffff;
  --texte: #1c2530;
  --texte-2: #5b6472;
  --bordure: #e2e8f0;

  /* Élévation — volontairement minimale (cf. §9 du brief) */
  --ombre-carte: 0 1px 2px rgba(1, 31, 86, 0.06);
  --ombre-flottante: 0 18px 48px -12px rgba(1, 31, 86, 0.18);

  --rayon: 8px;
  --rayon-lg: 12px;

  /* Pas de webfont : le site doit rester rapide sur une connexion mobile
     lente. Voir site/README.md pour passer à Inter auto-hébergée. */
  --police: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --police-titre: "Poppins", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
}

/* --------------------------------------------------------------- Base --- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--police);
  font-size: 17px;
  line-height: 1.65;
  color: var(--texte);
  background: var(--surface);
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--police-titre);
  color: var(--marine-900);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 600;
}
h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 600;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}

p {
  margin: 0;
  max-width: 65ch;
}

a {
  color: var(--marine-700);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

:focus-visible {
  outline: 2px solid var(--marine-700);
  outline-offset: 3px;
  border-radius: 4px;
}

.conteneur {
  width: min(1140px, 100% - 3rem);
  margin-inline: auto;
}

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--marine-900);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.saut-contenu:focus {
  left: 1rem;
  top: 1rem;
}

/* ------------------------------------------------------------ En-tête --- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--bordure);
}

.entete__interieur {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: 72px;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}
.marque__blason {
  width: 36px;
  height: 36px;
}
.marque__mot {
  width: auto;
  height: 17px;
}

.nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  align-items: center;
}
.nav a {
  color: var(--texte-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav a:hover {
  color: var(--marine-900);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.375rem;
  border-radius: var(--rayon);
  font-family: var(--police);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn--primaire {
  background: var(--marine-900);
  color: #fff;
}
.btn--primaire:hover {
  background: var(--marine-700);
}

.btn--secondaire {
  background: var(--surface);
  color: var(--marine-900);
  border-color: var(--bordure);
}
.btn--secondaire:hover {
  border-color: var(--marine-700);
  color: var(--marine-700);
}

.btn--clair {
  background: #fff;
  color: var(--marine-900);
}
.btn--clair:hover {
  background: var(--marine-100);
}

.btn--fantome {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--fantome:hover {
  border-color: #fff;
}

/* ------------------------------------------------------------ Sections -- */

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}
.section--fond {
  background: var(--fond);
  border-block: 1px solid var(--bordure);
}

.section__entete {
  max-width: 44rem;
  margin-bottom: 3.5rem;
}
.section__entete p {
  margin-top: 1rem;
  color: var(--texte-2);
  font-size: 1.0625rem;
}

/* Filet or : le seul usage décoratif de l'or, discret, au-dessus des titres */
.surtitre {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-2);
  margin-bottom: 1rem;
  padding-top: 0.875rem;
  border-top: 3px solid var(--or);
}

/* --------------------------------------------------------------- Héros -- */

.heros {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem);
  background: linear-gradient(180deg, var(--fond) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--bordure);
}

.heros__grille {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 940px) {
  .heros__grille {
    grid-template-columns: 1.02fr 0.98fr;
  }
}

.heros__signature {
  color: var(--vert);
  font-family: var(--police-titre);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 1.125rem;
}

.heros h1 {
  margin-bottom: 1.375rem;
}

.heros__accroche {
  font-size: 1.1875rem;
  color: var(--texte-2);
  max-width: 34rem;
}

.heros__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.25rem;
}

.heros__note {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--texte-2);
}

/* ------------------------------------------ Maquette produit (héros) ---- */

/* La réserve basse laisse la carte d'état déborder sous le reçu sans jamais
   recouvrir le montant ni l'affectation : la lisibilité du reçu prime. */
.apercu {
  position: relative;
  padding-bottom: 9rem;
}

.carte-produit {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-lg);
  box-shadow: var(--ombre-flottante);
}

/* Reçu A5 */
.recu {
  padding: 1.75rem;
  font-size: 0.875rem;
}
.recu__entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bordure);
}
.recu__ecole {
  font-family: var(--police-titre);
  font-weight: 600;
  color: var(--marine-900);
  font-size: 1rem;
}
.recu__lieu {
  color: var(--texte-2);
  font-size: 0.8125rem;
}
.recu__tampon {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--vert);
  background: var(--vert-fond);
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  white-space: nowrap;
}
.recu__numero {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--texte-2);
  margin: 1rem 0 1.25rem;
}
.recu__ligne {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4375rem 0;
}
.recu__ligne dt {
  color: var(--texte-2);
}
.recu__ligne dd {
  margin: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.recu__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bordure);
}
.recu__total span:first-child {
  color: var(--texte-2);
}
.recu__montant {
  font-family: var(--police-titre);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--marine-900);
  font-variant-numeric: tabular-nums;
}
.recu__lettres {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--texte-2);
  text-align: right;
}

/* Petite carte d'état superposée */
.etat-flottant {
  position: absolute;
  left: -2rem;
  bottom: 0;
  width: min(19.5rem, 84%);
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-lg);
  box-shadow: var(--ombre-flottante);
}
.etat-flottant__titre {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-2);
  margin-bottom: 0.75rem;
}
.etat-flottant__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.3125rem 0;
  font-size: 0.875rem;
}
.etat-flottant__ligne span:first-child {
  color: var(--texte);
}

@media (max-width: 939px) {
  .etat-flottant {
    position: static;
    width: 100%;
    margin-top: 1rem;
    box-shadow: var(--ombre-carte);
  }
  .apercu {
    padding-bottom: 0;
  }
}

/* Badge d'état : pastille + libellé, jamais la couleur seule */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge--ok {
  color: var(--vert);
  background: var(--vert-fond);
}
.badge--proche {
  color: var(--ambre-texte);
  background: var(--ambre-fond);
}
.badge--retard {
  color: var(--rouge);
  background: var(--rouge-fond);
}

/* -------------------------------------------------------------- Grilles - */

.grille {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.carte {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.75rem;
  box-shadow: var(--ombre-carte);
}
.carte h3 {
  margin-bottom: 0.5rem;
}
.carte p {
  color: var(--texte-2);
  font-size: 0.9375rem;
}

.carte__icone {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--rayon);
  background: var(--marine-100);
  color: var(--marine-900);
  margin-bottom: 1.125rem;
}
.carte__icone svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Douleurs — liste sobre, filet fin plutôt qu'aplat */
.liste-constat {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--bordure);
}
.liste-constat > div {
  display: grid;
  gap: 0.375rem 2.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--bordure);
}
@media (min-width: 720px) {
  .liste-constat > div {
    grid-template-columns: 15rem 1fr;
    align-items: baseline;
  }
}
.liste-constat h3 {
  font-size: 1.0625rem;
}
.liste-constat p {
  color: var(--texte-2);
  font-size: 0.9375rem;
}

/* Rôles */
.role {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.role__nom {
  font-family: var(--police-titre);
  font-weight: 600;
  color: var(--marine-900);
}
.role__desc {
  color: var(--texte-2);
  font-size: 0.9375rem;
}

/* Feuille de route */
.jalons {
  display: grid;
  gap: 1.25rem;
}
.jalon {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding-left: 1.75rem;
  position: relative;
}
@media (min-width: 720px) {
  .jalon {
    grid-template-columns: 13rem 1fr;
    align-items: baseline;
  }
}
.jalon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bordure);
  background: var(--surface);
}
.jalon--livre::before {
  background: var(--vert);
  border-color: var(--vert);
}
.jalon__titre {
  font-weight: 600;
  color: var(--marine-900);
}
.jalon__detail {
  color: var(--texte-2);
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------- Appel final - */

.appel {
  background: var(--marine-900);
  color: #fff;
  padding: clamp(4rem, 8vw, 6rem) 0;
  text-align: center;
}
.appel h2 {
  color: #fff;
}
.appel p {
  margin: 1.125rem auto 0;
  color: rgba(255, 255, 255, 0.78);
  max-width: 38rem;
}
.appel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  margin-top: 2.25rem;
}

/* --------------------------------------------------------------- Pied --- */

.pied {
  background: var(--fond);
  border-top: 1px solid var(--bordure);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.9375rem;
}
.pied__grille {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.pied__marque img {
  width: 132px;
  margin-bottom: 1rem;
}
.pied__signature {
  color: var(--vert);
  font-weight: 600;
  font-family: var(--police-titre);
  font-size: 0.9375rem;
}
.pied__descripteur {
  color: var(--texte-2);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  max-width: 22rem;
}
.pied h3 {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-2);
  margin-bottom: 0.875rem;
}
.pied ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.pied a {
  color: var(--texte);
  text-decoration: none;
}
.pied a:hover {
  color: var(--marine-700);
  text-decoration: underline;
}
.pied__bas {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bordure);
  color: var(--texte-2);
  font-size: 0.8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ------------------------------------------------------------ Réactif --- */

@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .entete__interieur {
    justify-content: space-between;
  }
  .entete .btn {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
