:root {
  --vert: #0E4D3A; --vert-fonce: #0A3A2C; --vert-clair: #E3EFE7; --citron: #C6F36B;
  --encre: #10231C; --gris: #4A5751; --gris-2: #56645E; --bord: #D9DDD6; --trait: #ECEEE9;
  --fond: #F6F5F0; --blanc: #FFFFFF; --rouge: #B3261E; --positif: #0E6B45; --ambre-fond: #FDF1D6; --ambre: #7A4B00;
  --titre: 'Sora', system-ui, sans-serif; --texte: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #E9EAE4; color: var(--encre); font-family: var(--texte); font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--vert); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--fond); display: flex; flex-direction: column; position: relative; }
.ecran { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 28px 22px 28px; }
.ecran.avec-onglets { padding-bottom: 96px; }
.pousse { flex: 1; }

.barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.barre h1 { margin: 0; font-family: var(--titre); font-size: 18px; font-weight: 700; text-align: center; flex: 1; }
.btn-icone { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--bord); background: var(--blanc); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; text-decoration: none; color: var(--encre); }
.btn-icone.citron { background: var(--citron); border: none; }
.vide-44 { width: 44px; flex-shrink: 0; }

.marque { display: flex; align-items: center; gap: 10px; font-family: var(--titre); font-weight: 700; font-size: 20px; }
.marque .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--vert); display: flex; align-items: center; justify-content: center; }

h2.grand { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.5px; }
h2.moyen { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 24px; line-height: 1.2; }
h3 { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 16px; }
.intro { margin: 0; font-size: 16px; line-height: 1.5; color: var(--gris); }
.petit { font-size: 13px; color: var(--gris-2); line-height: 1.5; }
.centre { text-align: center; }
.positif { color: var(--positif); }
.negatif-texte { color: var(--rouge); }

.champ { display: flex; flex-direction: column; gap: 8px; }
.champ label, .label { font-size: 14px; font-weight: 500; color: var(--gris); }
.input { height: 54px; border-radius: 14px; border: 1px solid var(--bord); background: var(--blanc); padding: 0 14px; font-size: 16px; width: 100%; outline: none; }
.input:focus { border: 1.5px solid var(--vert); }
.tel { display: flex; align-items: center; height: 56px; border: 1.5px solid var(--vert); border-radius: 14px; background: var(--blanc); overflow: hidden; }
.tel span { padding: 0 14px; height: 100%; display: flex; align-items: center; border-right: 1px solid var(--bord); font-weight: 700; font-size: 17px; }
.tel input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 17px; background: transparent; height: 100%; min-width: 0; }
.code-input { height: 64px; text-align: center; font-family: var(--titre); font-size: 30px; letter-spacing: 12px; border-radius: 14px; border: 1.5px solid var(--vert); background: var(--blanc); width: 100%; outline: none; }

.btn { height: 56px; border: none; border-radius: 14px; background: var(--vert); color: var(--blanc); font-weight: 700; font-size: 17px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondaire { background: transparent; border: 1.5px solid var(--vert); color: var(--vert); }
.btn.texte { background: transparent; color: var(--vert); height: 48px; }
.btn.danger { background: var(--blanc); border: 1.5px solid var(--rouge); color: var(--rouge); }
.btn.noir { background: #000; height: 52px; font-size: 16px; }
.btn.petit-btn { height: 44px; font-size: 15px; width: auto; padding: 0 18px; }

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--bord); background: var(--blanc); font-size: 14px; font-weight: 500; }
.puce.active { border: 1.5px solid var(--vert); background: var(--vert-clair); color: var(--vert); font-weight: 700; }
.puce.sombre.active { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.grille-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grille-4 .puce { padding: 0; }

.carte-blanche { background: var(--blanc); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.liste { background: var(--blanc); border-radius: 20px; padding: 2px 16px; display: flex; flex-direction: column; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); min-height: 56px; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; text-decoration: none; color: var(--encre); font-size: 15px; }
.ligne:last-child { border-bottom: none; }
.ligne .corps { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ligne .corps .t { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne .corps .s { font-size: 13px; color: var(--gris-2); }
.ligne .montant { font-size: 15px; font-weight: 700; white-space: nowrap; }
.ligne .montant.barre-texte { text-decoration: line-through; color: var(--gris-2); }
.pastille { width: 40px; height: 40px; border-radius: 12px; background: #F1F2EE; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pastille.verte { background: var(--vert-clair); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; min-height: 48px; border-bottom: 1px solid var(--trait); }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--gris); }
.kv strong { text-align: right; }

.solde { border-radius: 22px; background: var(--vert); color: var(--blanc); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.solde .haut { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #CFE3D8; }
.solde .haut button { width: 44px; height: 44px; margin: -10px -10px -10px 0; border: none; background: transparent; display: flex; align-items: center; justify-content: center; }
.solde .montant { font-family: var(--titre); font-weight: 700; font-size: 34px; letter-spacing: -0.5px; }
.solde .montant small { font-size: 18px; color: var(--citron); }
.solde .num { font-size: 13px; color: #CFE3D8; }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--encre); font-size: 13px; font-weight: 500; }
.action span { width: 56px; height: 56px; border-radius: 18px; background: var(--blanc); border: 1px solid var(--bord); display: flex; align-items: center; justify-content: center; }
.action.principale span { background: var(--citron); border: none; }

.onglets { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 74px; background: var(--blanc); border-top: 1px solid #E3E6E0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.onglets a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--gris-2); font-size: 12px; font-weight: 500; }
.onglets a.actif { color: var(--vert); font-weight: 700; }

.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.etapes div { height: 6px; border-radius: 3px; background: var(--bord); }
.etapes div.fait { background: var(--vert); }
.photo-zone { border-radius: 16px; background: var(--encre); min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; color: var(--fond); font-size: 14px; position: relative; overflow: hidden; }
.photo-zone img { max-width: 100%; max-height: 220px; border-radius: 10px; }
.photo-zone .cadre { width: 100%; min-height: 120px; border: 2px dashed var(--citron); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.photo-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.carte-bancaire { aspect-ratio: 1.6; border-radius: 20px; background: var(--encre); color: var(--fond); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.carte-bancaire.gelee { filter: grayscale(1); opacity: 0.75; }
.carte-bancaire .rond { position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 110px; border: 28px solid var(--vert); }
.carte-bancaire .l1 { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.carte-bancaire .nom { font-family: var(--titre); font-weight: 700; font-size: 18px; }
.carte-bancaire .badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: var(--citron); color: var(--encre); }
.carte-bancaire .pan { font-family: var(--titre); font-size: 20px; letter-spacing: 2px; position: relative; }
.carte-bancaire .l3 { display: flex; justify-content: space-between; align-items: flex-end; position: relative; }
.carte-bancaire .l3 div { display: flex; flex-direction: column; gap: 2px; }
.carte-bancaire .l3 small { font-size: 11px; color: #B8C4BE; }
.carte-bancaire .reseau { font-size: 16px; font-weight: 700; font-style: italic; text-transform: capitalize; }
.interrupteur { width: 46px; height: 28px; accent-color: var(--vert); }

.badge-etat { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: var(--vert-clair); color: var(--vert); white-space: nowrap; }
.badge-etat.ambre { background: var(--ambre-fond); color: var(--ambre); }
.badge-etat.rouge { background: #F9DEDC; color: var(--rouge); }
.jauge { height: 8px; border-radius: 4px; background: var(--trait); overflow: hidden; }
.jauge div { height: 8px; background: var(--vert); }
.montant-geant { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.montant-geant input { width: 210px; border: none; background: transparent; text-align: right; font-family: var(--titre); font-weight: 700; font-size: 44px; outline: none; }
.montant-geant span { font-family: var(--titre); font-weight: 700; font-size: 20px; color: var(--gris); }
.choix { min-height: 64px; border-radius: 16px; border: 1px solid var(--bord); background: var(--blanc); padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.choix.actif { border: 1.5px solid var(--vert); }
.choix input { width: 22px; height: 22px; accent-color: var(--vert); }
.logo-op { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.logo-op.wave { background: #DCEEFB; color: #0B4F7A; }
.logo-op.orange { background: #FDE8D4; color: #8A3F00; }
.section-titre { font-size: 13px; font-weight: 700; color: var(--gris-2); letter-spacing: 0.5px; text-transform: uppercase; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--vert); color: var(--citron); display: flex; align-items: center; justify-content: center; font-family: var(--titre); font-weight: 700; flex-shrink: 0; }
.avatar.grand { width: 72px; height: 72px; border-radius: 36px; font-size: 24px; background: var(--vert-clair); color: var(--vert); }
.bulle { max-width: 82%; padding: 12px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.bulle.moi { align-self: flex-end; background: var(--vert); color: var(--blanc); border-bottom-right-radius: 4px; }
.bulle.eux { align-self: flex-start; background: var(--blanc); border-bottom-left-radius: 4px; }
.fil { display: flex; flex-direction: column; gap: 10px; }

.bandeau-dev { background: var(--ambre-fond); color: var(--ambre); font-size: 13px; padding: 10px 14px; border-radius: 12px; line-height: 1.4; }
.erreur { background: #F9DEDC; color: #8C1D18; font-size: 14px; padding: 12px 14px; border-radius: 12px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--encre); color: var(--blanc); padding: 12px 18px; border-radius: 14px; font-size: 15px; z-index: 50; max-width: 90%; box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.voile { position: fixed; inset: 0; background: rgba(16,35,28,0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.feuille { background: var(--fond); width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; padding: 24px 22px 32px; display: flex; flex-direction: column; gap: 16px; max-height: 90vh; overflow-y: auto; }
.pave { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pave button { height: 58px; border-radius: 14px; border: none; background: var(--blanc); font-family: var(--titre); font-size: 22px; font-weight: 600; }
.points { display: flex; justify-content: center; gap: 14px; }
.points span { width: 14px; height: 14px; border-radius: 7px; border: 2px solid var(--vert); }
.points span.plein { background: var(--vert); }
.chargement { padding: 40px; text-align: center; color: var(--gris-2); }

@media print {
  body { background: #fff; }
  .onglets, .non-imprime { display: none !important; }
  #app { max-width: none; background: #fff; }
}
.contenu { flex: 1; display: flex; flex-direction: column; }
.avatar.auto { margin: 0 auto; }
