:root {
  --fond: #F4F7F2;
  --blanc: #FFFFFF;
  --encre: #12301F;
  --vert: #1F6B45;
  --doux: #3D5246;
  --bord: #6B8576;
  --trait: #C9D6CC;
  --accent: #F5C518;
  --erreur: #9B1C1C;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font-family: 'Inter', system-ui, sans-serif; font-size: 17px; line-height: 1.55;
}
h1, h2, h3, .marque { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; }
h1, h2, h3, p { margin: 0; }
a { color: var(--encre); }
a:hover { color: var(--vert); }
[hidden] { display: none !important; }

.conteneur { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.etroit { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.pile { display: flex; flex-direction: column; gap: 16px; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.entre { justify-content: space-between; }
.doux { color: var(--doux); }
.petit { font-size: 15px; }

/* En-tête */
.entete { padding: 20px 0; }
.marque { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; text-decoration: none; color: var(--encre); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.nav a { text-decoration: none; font-weight: 500; padding: 12px 0; }

/* Boutons */
.bouton {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--encre); border: none; border-radius: 999px;
  padding: 13px 22px; min-height: 44px;
}
.bouton:hover { color: var(--encre); filter: brightness(0.95); }
.bouton.grand { font-size: 18px; padding: 16px 28px; }
.bouton.second { background: transparent; border: 1.5px solid var(--encre); }
.bouton.sombre { background: var(--encre); color: var(--fond); }
.bouton:disabled { opacity: 0.5; cursor: not-allowed; }
.lien-bouton { font: inherit; background: none; border: none; padding: 12px 0; cursor: pointer; color: var(--encre); text-decoration: underline; }

/* Page de présentation */
.sur-titre { font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vert); }
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 56px; padding-bottom: 88px; }
.hero > .texte { flex: 1 1 440px; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }
.hero .chapo { font-size: 20px; color: var(--doux); max-width: 520px; }
.hero > .visuel { flex: 1 1 340px; display: flex; justify-content: center; }
.carte-fid {
  width: 100%; max-width: 400px; background: var(--encre); color: var(--fond); border-radius: 24px;
  padding: 28px; display: flex; flex-direction: column; gap: 28px; transform: rotate(-3deg);
}
.carte-fid .clair { color: #BFD4C4; font-size: 13px; }
.carte-fid .solde { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 52px; line-height: 1; color: var(--accent); }
.puce { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid #5F8570; }

.bande { padding: 88px 0; }
.bande.blanche { background: var(--blanc); }
.bande.sombre { background: var(--encre); color: var(--fond); }
.bande.sombre .sur-titre { color: var(--accent); }
.bande h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.01em; }
.colonnes { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 48px; }
.colonnes > * { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.numero { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 44px; line-height: 1; color: var(--vert); }
.colonnes h3 { font-size: 21px; font-weight: 600; font-family: 'Inter', sans-serif; }
.liste-coches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.liste-coches li { display: flex; gap: 12px; align-items: flex-start; }
.liste-coches svg { flex: none; margin-top: 2px; }

/* Cartes et formulaires */
.carte { background: var(--blanc); border-radius: 20px; padding: 28px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-weight: 600; font-size: 15px; }
.champ input, .champ select {
  font: inherit; padding: 13px 14px; border: 1.5px solid var(--bord); border-radius: 10px;
  background: var(--blanc); color: var(--encre); width: 100%;
}
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.case input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.msg { padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.msg.ok { background: #DDEFE2; color: var(--encre); }
.msg.erreur { background: #FBE4E4; color: var(--erreur); }
.msg.info { background: #FFF4C7; color: var(--encre); }

/* Espaces client et commerçant */
.page { padding: 24px 0 88px; display: flex; flex-direction: column; gap: 24px; }
.page h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; }
.page h2 { font-size: 24px; }
.grand-solde { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 64px; line-height: 1; color: var(--vert); }
.rangee { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--trait); }
.rangee:first-child { border-top: none; }
.etiquette { font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #DDEFE2; }
.etiquette.attente { background: #EEF1EC; color: var(--doux); }
.onglets { display: flex; gap: 8px; }
.onglets button { flex: 1; font: inherit; font-weight: 600; padding: 12px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--blanc); color: var(--encre); cursor: pointer; }
.onglets button[aria-pressed="true"] { background: var(--encre); color: var(--fond); border-color: var(--encre); }
.qr { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr img { width: 260px; height: 260px; image-rendering: pixelated; }
.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stats > div { flex: 1 1 160px; }
.stats .chiffre { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 40px; line-height: 1; color: var(--vert); }

.pied { border-top: 1px solid var(--trait); padding: 28px 0; font-size: 15px; color: var(--doux); }

/* Impression de l'affiche QR */
.affiche { display: none; }
@media print {
  body > *:not(.affiche) { display: none !important; }
  .affiche { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; min-height: 90vh; }
  .affiche img { width: 12cm; height: 12cm; image-rendering: pixelated; }
  .affiche h1 { font-size: 34pt; }
  .affiche p { font-size: 18pt; }
}
