/* Sunu Mairie — styles (vert, jaune, rouge du Sénégal en accents) */
:root {
  --vert: #0b6e4f; --vert-fonce: #095c42; --vert2: #13896a; --vert-clair: #e7f4ef; --jaune: #f2b705; --rouge: #c8102e;
  --texte: #17231d; --doux: #6b7a72; --bord: #e6ebe8; --fond: #f5f7f6; --carte: #fff;
  --tx: #b45309; --tx-clair: #fff4e0; --ad: #3730a3; --ad-clair: #eef0ff;
  --ombre: 0 1px 2px rgba(16, 24, 20, .05), 0 4px 14px rgba(16, 24, 20, .05);
  --ombre-haute: 0 2px 4px rgba(16, 24, 20, .06), 0 10px 26px rgba(16, 24, 20, .09);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: var(--fond); -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 1rem; } h2 { font-size: 1.02rem; font-weight: 700; margin: 0 0 .75rem; }
a { color: var(--vert); }
button, .btn { font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; border: 1px solid var(--vert); background: var(--vert); color: #fff; padding: .5rem .95rem; border-radius: 10px; text-decoration: none; display: inline-block;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease; }
button:hover, .btn:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); }
button:active, .btn:active { transform: scale(.97); }
button.sec, .btn.sec { background: #fff; color: var(--vert); border-color: #cfe3da; }
button.sec:hover, .btn.sec:hover { background: var(--vert-clair); }
button.petit, .btn.petit { padding: .25rem .65rem; font-size: .84rem; border-radius: 8px; }
button:disabled { opacity: .5; cursor: default; transform: none; }
input, select, textarea { font: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid var(--bord); border-radius: 10px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vert2); box-shadow: 0 0 0 3px var(--vert-clair); }
label { display: block; font-size: .82rem; font-weight: 600; color: var(--doux); margin-bottom: .7rem; }
label > input, label > select, label > textarea { margin-top: .25rem; color: var(--texte); font-weight: 400; }

/* Mise en page */
.entete { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.1rem; background: linear-gradient(135deg, var(--vert), var(--vert2)); color: #fff; box-shadow: 0 2px 10px rgba(11, 110, 79, .18); }
.entete .marque { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.entete .esp { flex: 1; }
.entete .qui { font-size: .85rem; text-align: right; line-height: 1.25; }
.entete .qui .r { opacity: .85; }
.entete button { white-space: nowrap; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.45); padding: .3rem .65rem; }
.entete button:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.7); }
.corps { display: flex; min-height: calc(100vh - 56px); }
nav { width: 215px; background: #fff; border-right: 1px solid var(--bord); padding: 1rem .6rem; flex-shrink: 0; }
nav a { display: block; padding: .55rem .8rem; margin-bottom: .1rem; border-radius: 10px; color: var(--texte); text-decoration: none; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
nav a:hover { background: #f1f4f2; }
nav a.actif { background: var(--vert-clair); color: var(--vert); font-weight: 700; }
main { flex: 1; padding: 1.4rem; max-width: 1150px; min-width: 0; }
.bandeau-demo { background: var(--jaune); color: #3b2f00; padding: .3rem 1rem; font-size: .82rem; font-weight: 600; text-align: center; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; padding: 1.05rem; margin-bottom: 1rem; box-shadow: var(--ombre); }
.grille { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grille2 { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpi { transition: transform .18s ease, box-shadow .18s ease; }
.kpi .val { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--texte); font-variant-numeric: tabular-nums; }
.kpi .lib { color: var(--doux); font-size: .83rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; margin-bottom: .25rem; }
.kpi .lib i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; background: var(--vert-clair); display: inline-grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
.barre-outils { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.barre-outils input, .barre-outils select { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid #eef1ef; vertical-align: top; }
th { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); background: #fafbfa; }
tbody tr { transition: background-color .12s ease; } tbody tr:hover { background: #fafcfb; }
.pastille { display: inline-block; padding: .1rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 700; background: #eef1ef; white-space: nowrap; }
.st-soumise { background: var(--ad-clair); color: var(--ad); } .st-en_traitement { background: #fff4d6; color: #8a6200; }
.st-prete { background: #e3f5ea; color: #0a7a3e; } .st-delivree { background: #e8ecea; color: #33413a; } .st-rejetee { background: #fde4e7; color: var(--rouge); }
.ok { color: var(--vert); } .ko { color: var(--rouge); }
.msg { padding: .65rem .85rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 500; }
.msg.err { background: #fde4e7; color: var(--rouge); } .msg.info { background: var(--vert-clair); color: var(--vert); }
.barres .ligne { display: flex; align-items: center; gap: .5rem; margin: .45rem 0; font-size: .85rem; }
.barres .ligne span:last-child { white-space: nowrap; font-weight: 600; }
.barres .ligne span:first-child { width: 110px; color: var(--doux); flex-shrink: 0; }
.barres .ligne .b { height: 10px; background: linear-gradient(90deg, var(--vert), var(--vert2)); border-radius: 99px; min-width: 4px; transform-origin: left; }
.form2 { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Connexion */
.accueil { max-width: 980px; margin: 2rem auto; padding: 0 1rem; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.accueil .intro { grid-column: 1 / -1; text-align: center; }
.accueil .intro h1 { font-size: 2rem; color: var(--vert); margin-bottom: .2rem; }
.accueil .etroite { grid-column: 1 / -1; width: 100%; max-width: 440px; justify-self: center; }
.titre-connexion { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.titre-connexion h2 { margin: 0; }
.demo-page .intro h2 { margin: .8rem 0 .2rem; }
.profil { background: #fff; color: var(--texte); border: 1px solid var(--bord); text-align: left; display: grid; gap: .3rem; padding: 1rem; border-radius: 16px; box-shadow: var(--ombre); font-weight: 400; }
.profil:hover, .profil:focus-visible { background: #fff; border-color: var(--vert2); box-shadow: 0 0 0 3px var(--vert-clair), var(--ombre-haute); transform: translateY(-2px); }
.profil .ico { font-size: 1.6rem; width: 46px; height: 46px; border-radius: 14px; background: var(--vert-clair); display: grid; place-items: center; }
.profil strong { color: var(--vert); font-size: 1.05rem; }
.profil span:last-child { font-size: .88rem; color: #4b5563; line-height: 1.45; }
.demo-page .retour { grid-column: 1 / -1; text-align: center; }
.lang { position: fixed; top: .6rem; right: 1rem; }

/* Fenêtre modale */
.voile { position: fixed; inset: 0; background: rgba(12, 20, 16, .45); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; z-index: 10; }
.voile .carte { width: 100%; max-width: 820px; box-shadow: var(--ombre-haute); }

/* Document A4 (acte, reçu) */
.feuille { background: #fff; width: 210mm; max-width: 100%; min-height: 297mm; margin: 0 auto; padding: 18mm 18mm; box-shadow: 0 2px 12px rgba(0,0,0,.12); font-family: Georgia, "Times New Roman", serif; color: #000; }
.feuille.recu { min-height: auto; }
.feuille .tete { display: flex; justify-content: space-between; font-size: 12px; line-height: 1.4; }
.feuille .tete div { text-align: center; }
.feuille h2 { text-align: center; font-size: 20px; margin: 14mm 0 2mm; letter-spacing: .05em; }
.feuille .num { text-align: center; margin-bottom: 10mm; }
.feuille dl { display: grid; grid-template-columns: 45% 55%; gap: 3mm 0; font-size: 15px; }
.feuille dt { color: #333; } .feuille dd { margin: 0; font-weight: 700; border-bottom: 1px dotted #999; }
.feuille .signature { margin-top: 18mm; display: flex; justify-content: space-between; font-size: 14px; }
.feuille .drapeau { height: 6px; display: flex; margin: 3mm 0; } .feuille .drapeau i { flex: 1; }

.public { max-width: 640px; margin: 2rem auto; padding: 0 1rem; }
.public h1 { color: var(--vert); text-align: center; }
.espace-haut { margin-top: 1rem; }
.case { margin: 0; display: flex; align-items: center; gap: .3rem; } .case input { width: auto; margin: 0; }
.gros { font-size: 1.4rem; }
.feuille .num.grand { font-size: 28px; }
.feuille .verif { display: flex; gap: 4mm; align-items: center; margin-top: 10mm; font-size: 13px; }
.feuille .verif img { width: 30mm; height: 30mm; }
/* Démo : faux SMS, écran Wave / Orange Money, chiffres qui clignotent, fil en direct, QR pour la salle */
.sms { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: min(92vw, 380px); background: #fff; color: #111; border-radius: 16px; box-shadow: 0 8px 26px rgba(0,0,0,.25); padding: 10px 12px; z-index: 50; font-size: 14px; animation: sms-arrive .35s cubic-bezier(.2, .9, .3, 1.2); cursor: pointer; }
.sms b { display: block; font-size: 12px; color: #666; margin-bottom: 2px; }
@keyframes sms-arrive { from { transform: translate(-50%, -130%); } }
.voile.mobile { align-items: center; z-index: 20; }
.ecran-mobile { width: 100%; max-width: 380px; border-radius: 22px; padding-bottom: 16px; color: #fff; box-shadow: var(--ombre-haute); }
.m-wave .ecran-mobile { background: #1dc8f2; } .m-om .ecran-mobile { background: #ff7900; }
.ecran-mobile .marque { font-size: 30px; font-weight: 800; padding: 18px 20px 6px; }
.ecran-mobile .c { background: #fff; color: #1d2a23; margin: 10px 14px 0; border-radius: 16px; padding: 16px; }
.ecran-mobile .gros { font-size: 30px; font-weight: 800; margin: 6px 0; }
.ecran-mobile .centre { text-align: center; }
.m-wave .ecran-mobile button:not(.sec) { background: #0a8fb0; border-color: #0a8fb0; } .m-om .ecran-mobile button:not(.sec) { background: #e06a00; border-color: #e06a00; }
.ecran-mobile input[name=code] { font-size: 26px; letter-spacing: .6em; text-align: center; }
.attente { width: 48px; height: 48px; border: 5px solid #d6dbd8; border-top-color: var(--vert); border-radius: 50%; margin: 24px auto 8px; animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.kpi.flash { animation: kpi-flash 2s ease-out; }
@keyframes kpi-flash { 0%, 50% { background: #fff6cc; box-shadow: 0 0 0 3px var(--jaune); } }
.barre-titre { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.barre-titre h1 { margin-bottom: .6rem; }
.fil-activite { list-style: none; padding: 0; margin: 0; }
.fil-activite li { padding: .55rem .35rem; border-bottom: 1px solid #f0f2f1; border-radius: 8px; }
.fil-activite li:last-child { border-bottom: 0; }
.fil-activite li.nouveau { background: #fff8d6; animation: entre-gauche .4s ease both; }
.fil-activite small { color: var(--doux); }
.qr-salle { text-align: center; } .qr-salle img { width: min(80vw, 62vh); height: auto; }
button.danger { background: #b3261e; border-color: #b3261e; } button.danger:hover { background: #8f1d17; }
.tampon-demo { display: inline-block; margin-top: 2mm; color: #c0392b; border: 2px solid #c0392b; padding: 1mm 2mm; font-weight: 700; transform: rotate(-3deg); }
.carte-corps { display: flex; gap: 6mm; align-items: center; flex-wrap: wrap; }
.carte-corps dl { flex: 1; min-width: 240px; }
.qr { text-align: center; width: 160px; } .qr img { width: 150px; height: 150px; display: block; margin: 0 auto 2mm; }

/* Guide interactif */
.guide { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.guide-fond { position: fixed; inset: 0; background: rgba(0,0,0,.55); }
.guide-halo { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); outline: 3px solid var(--jaune); transition: all .25s; }
.guide-bulle { position: fixed; pointer-events: auto; width: min(340px, calc(100vw - 16px)); background: #fff; color: var(--texte); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); border-top: 4px solid var(--vert); animation: apparait .25s ease both; }
.guide-bulle.centre { top: 50%; left: 50%; transform: translate(-50%, -50%); animation: none; }
.guide-bulle h3 { margin: .2rem 0 .4rem; color: var(--vert); }
.guide-bulle p { margin: 0 0 .8rem; line-height: 1.45; }
.guide-bulle .actions { display: flex; gap: .4rem; align-items: center; }
.guide-bulle .esp { flex: 1; }
.guide-pas { font-size: .75rem; color: #6b7280; }

/* Menu : icônes ; avatar et « Plus » réservés au téléphone */
nav a i, nav .plus i { font-style: normal; margin-right: .55rem; }
.entete .avatar, nav .plus, nav a span.court { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; padding: 0; background: #fff; color: var(--vert); border: 0; font-weight: 800; font-size: .82rem; display: inline-grid; place-items: center; flex-shrink: 0; }
.compte { display: flex; align-items: center; gap: .7rem; padding-bottom: .8rem; border-bottom: 1px solid var(--bord); margin-bottom: .4rem; }
.compte .avatar { background: var(--vert); color: #fff; width: 44px; height: 44px; font-size: 1rem; }
.liste-plus a, .liste-plus button { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .75rem .3rem; background: none; border: 0; border-bottom: 1px solid #f0f2f1; border-radius: 0; color: var(--texte); text-decoration: none; text-align: left; font-size: .98rem; font-weight: 500; }
.liste-plus a:hover, .liste-plus button:hover { background: #f7f9f8; }
.liste-plus a:last-child, .liste-plus button:last-child { border-bottom: 0; }
.liste-plus a::after { content: "›"; margin-left: auto; color: #b5c0ba; font-size: 1.2rem; }
.liste-plus i { font-style: normal; font-size: 1.05rem; width: 32px; height: 32px; border-radius: 10px; background: var(--vert-clair); display: inline-grid; place-items: center; flex-shrink: 0; }

/* Téléphone : affichage façon application */
@media (max-width: 760px) {
  /* Pas de zoom automatique quand on touche une case (iPhone : texte d'au moins 16 px) */
  input, select, textarea { font-size: 16px; padding: .6rem .75rem; border-radius: 12px; }
  body { background: var(--fond); }
  .entete { position: sticky; top: 0; z-index: 5; gap: .5rem; padding: .65rem .95rem; border-radius: 0 0 18px 18px; }
  .entete .marque { font-size: 1.08rem; white-space: nowrap; }
  .entete .qui, .entete [data-action="lang"], .entete [data-action="logout"], .entete .lib-guide { display: none; }
  .entete [data-action="guide"] { width: 34px; height: 34px; border-radius: 50%; padding: 0; min-height: 0; }
  .entete .avatar { display: inline-grid; width: 34px; height: 34px; background: rgba(255,255,255,.16); color: #fff; border: 1.5px solid rgba(255,255,255,.6); padding: 0; min-height: 0; }
  .bandeau-demo { display: table; margin: .6rem auto 0; border-radius: 99px; padding: .2rem .8rem; font-size: .74rem; }
  .corps { display: block; min-height: 0; }
  main { padding: .9rem .9rem calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 1.4rem; margin-bottom: .8rem; }
  /* Barre de navigation en bas, flottante */
  nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 8; width: auto; display: flex; padding: .3rem .2rem; border: 1px solid var(--bord); border-radius: 20px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(16, 24, 20, .14); }
  nav a, nav .plus { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .25rem .1rem; margin: 0; border: 0; border-radius: 14px; background: none; color: #8a958f; font-size: .66rem; font-weight: 600; text-align: center; }
  nav a:hover, nav .plus:hover { background: none; }
  nav a span, nav .plus span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  nav a i, nav .plus i { margin: 0; font-size: 1.2rem; line-height: 1.5; width: 44px; border-radius: 10px; filter: grayscale(.7); transition: background-color .2s ease, transform .2s ease, filter .2s ease; }
  nav a.actif { background: none; color: var(--vert); }
  nav a.actif i { filter: none; background: var(--vert-clair); transform: translateY(-1px); }
  nav a.hors-barre, nav a span:not(.court) { display: none; }
  nav a span.court { display: block; }
  /* Cartes arrondies, boutons faciles à toucher sans être trop gros */
  .carte { border-radius: 16px; padding: .95rem; }
  .grille { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .grille2 { grid-template-columns: 1fr; }
  .kpi { margin: 0; padding: .8rem; } .kpi .val { font-size: 1.18rem; } .kpi .lib { font-size: .74rem; }
  .kpi .lib i { width: 22px; height: 22px; font-size: .75rem; border-radius: 7px; }
  button, .btn { min-height: 40px; border-radius: 11px; }
  button.petit, .btn.petit { min-height: 34px; }
  .carte form > button:not(.sec), .carte form > div + button:not(.sec) { width: 100%; padding: .65rem; font-weight: 700; }
  .barre-outils input, .barre-outils select { flex: 1; min-width: 0; }
  .form2 { grid-template-columns: 1fr; }
  /* Tableaux : chaque ligne devient une carte */
  .carte:has(> .table-wrap) { background: none; box-shadow: none; padding: 0; border: 0; }
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; background: none; }
  thead { display: none; }
  tr { background: #fff; border: 1px solid var(--bord); border-radius: 16px; box-shadow: var(--ombre); padding: .6rem .9rem; margin-bottom: .6rem; }
  tbody tr:hover { background: #fff; }
  td { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; border: 0; padding: .28rem 0; text-align: right; }
  td::before { content: attr(data-label); color: var(--doux); font-size: .76rem; font-weight: 600; text-align: left; flex-shrink: 0; padding-top: .1rem; }
  td:not([data-label]), td[data-label=""] { justify-content: flex-start; }
  td:not([data-label])::before { content: none; }
  td:first-child { font-size: 1rem; font-weight: 700; border-bottom: 1px solid #f0f2f1; padding-bottom: .45rem; margin-bottom: .2rem; }
  td select { width: auto; }
  td > .v { min-width: 0; overflow-wrap: anywhere; }
  td:not([data-label]) > .v { width: 100%; text-align: left; }
  /* Fenêtres : elles montent du bas de l'écran */
  .voile { align-items: flex-end; padding: 0; }
  .voile .carte { border: 0; border-radius: 24px 24px 0 0; max-height: 92vh; overflow-y: auto; padding: 1.3rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); margin: 0; }
  .voile .carte::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 99px; background: #d5dcd8; margin: -.5rem auto .9rem; }
  .voile.mobile { align-items: center; padding: 1rem; }
  /* Connexion et choix du rôle */
  .accueil { margin: 1.2rem auto; gap: .7rem; }
  .accueil .intro h1 { font-size: 1.7rem; }
  .feuille { padding: 8mm; min-height: auto; }
}

@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  body * { visibility: hidden; }
  .feuille, .feuille * { visibility: visible; }
  .feuille { position: absolute; left: 0; top: 0; box-shadow: none; width: 210mm; }
  .voile { position: static; background: none; }
  .voile .carte::before { display: none; }
}

/* Collecte : bouton de scan, fiche du commerçant, montant à encaisser, caméra */
.bouton-scan { width: 100%; padding: .75rem; font-size: 1rem; font-weight: 700; margin-bottom: .8rem; border-radius: 14px; box-shadow: 0 4px 14px rgba(11, 110, 79, .25); }
.fiche-tete { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .6rem; }
.fiche-tete h2 { margin: 0; font-size: 1.2rem; }
.matricule { align-self: flex-start; background: var(--vert-clair); color: var(--vert); font-weight: 800; border-radius: 99px; padding: .1rem .7rem; letter-spacing: .04em; }
.fiche-infos { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0 0 .6rem; font-size: .93rem; }
.fiche-infos dt { color: var(--doux); } .fiche-infos dd { margin: 0; font-weight: 600; }
.reste { margin: .4rem 0 .8rem; }
.a-encaisser { display: flex; flex-direction: column; justify-content: center; background: var(--vert-clair); border-radius: 14px; padding: .6rem .9rem; margin-bottom: .6rem; color: var(--doux); font-size: .83rem; font-weight: 600; }
.a-encaisser strong { color: var(--vert); font-size: 1.7rem; line-height: 1.2; font-weight: 800; }
.scan-video { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 1; max-height: 60vh; margin: .6rem 0; }
.scan-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-video .viseur { position: absolute; inset: 18%; border: 4px solid var(--jaune); border-radius: 18px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); animation: viseur 1.6s ease-in-out infinite; }
@keyframes viseur { 50% { inset: 20%; } }

/* Espaces (taxes / administratif) et filtre de période */
.entete a.marque { color: #fff; text-decoration: none; }
.salut { margin: 0 0 1rem; } .salut small { color: var(--doux); font-weight: 600; } .salut h1 { margin: .1rem 0 0; }
.titre-section { font-size: .74rem; font-weight: 700; color: var(--doux); text-transform: uppercase; letter-spacing: .07em; margin: 0 .1rem .6rem; }
.espaces { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 260px)); margin-bottom: 1.2rem; }
.espace-carte { position: relative; display: flex; flex-direction: column; gap: .05rem; padding: .9rem; border-radius: 16px; background: #fff; border: 1px solid var(--bord); box-shadow: var(--ombre); color: var(--texte); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.espace-carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-haute); }
.espace-carte:active { transform: scale(.98); }
.espace-carte::after { content: "›"; position: absolute; top: .65rem; right: .8rem; color: #b5c0ba; font-size: 1.3rem; }
.espace-carte .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: .45rem; }
.espace-carte.taxes .ic { background: var(--tx-clair); } .espace-carte.admin .ic { background: var(--ad-clair); }
.espace-carte.taxes:hover { border-color: #f3d6a8; } .espace-carte.admin:hover { border-color: #c9cdf7; }
.espace-carte b { font-size: 1rem; } .espace-carte small { color: var(--doux); font-size: .8rem; line-height: 1.35; }
.espace-carte .chiffre { margin-top: .5rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.espace-carte.taxes .chiffre { color: var(--tx); } .espace-carte.admin .chiffre { color: var(--ad); }
.onglets { display: flex; background: #e9eeeb; border-radius: 12px; padding: 3px; margin-bottom: 1rem; max-width: 420px; }
.onglets a { flex: 1; text-align: center; padding: .45rem; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--doux); text-decoration: none; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.onglets a.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.onglets a.taxes.on { color: var(--tx); } .onglets a.admin.on { color: var(--ad); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: 1rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; white-space: nowrap; background: #fff; color: var(--doux); border: 1px solid var(--bord); border-radius: 99px; padding: .3rem .8rem; font-size: .85rem; font-weight: 600; text-decoration: none; min-height: 0; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.chip:hover { background: #f1f4f2; color: var(--texte); border-color: var(--bord); }
.chip.on, .chip.on:hover { background: var(--texte); border-color: var(--texte); color: #fff; }
.ecart { display: inline-block; font-size: .72rem; font-weight: 700; margin-top: .35rem; padding: .05rem .5rem; border-radius: 99px; background: #eef1ef; color: var(--doux); }
.ecart.hausse { background: #e3f5ea; color: #0a7a3e; } .ecart.baisse { background: #fde4e7; color: var(--rouge); }
.compte-liste { font-size: .95rem; color: var(--doux); font-weight: 500; }
@media (max-width: 760px) {
  .espaces { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .espace-carte { padding: .8rem; }
  .onglets { max-width: none; }
  button.chip { min-height: 0; border-radius: 99px; }
}

/* Animations : arrivée des pages, fenêtres, barres ; coupées si le téléphone demande moins d'animations */
@keyframes monte { from { opacity: 0; transform: translateY(10px); } }
@keyframes apparait { from { opacity: 0; } }
@keyframes glisse-haut { from { transform: translateY(100%); } }
@keyframes zoom-entre { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes entre-gauche { from { opacity: 0; transform: translateX(-8px); } }
@keyframes pousse { from { transform: scaleX(0); } }
main.anime > * { animation: monte .38s cubic-bezier(.2, .8, .2, 1) both; }
main.anime > *:nth-child(2) { animation-delay: .04s; } main.anime > *:nth-child(3) { animation-delay: .08s; }
main.anime > *:nth-child(4) { animation-delay: .12s; } main.anime > *:nth-child(5) { animation-delay: .16s; } main.anime > *:nth-child(n+6) { animation-delay: .2s; }
main.anime .grille > *, main.anime .espaces > * { animation: zoom-entre .35s cubic-bezier(.2, .8, .2, 1) both; }
main.anime .grille > *:nth-child(2), main.anime .espaces > *:nth-child(2) { animation-delay: .05s; }
main.anime .grille > *:nth-child(3) { animation-delay: .1s; } main.anime .grille > *:nth-child(4) { animation-delay: .15s; } main.anime .grille > *:nth-child(n+5) { animation-delay: .2s; }
main.anime .barres .b { animation: pousse .7s cubic-bezier(.2, .8, .2, 1) .15s both; }
.accueil > * { animation: monte .4s cubic-bezier(.2, .8, .2, 1) both; }
.voile { animation: apparait .2s ease both; }
.voile .carte { animation: zoom-entre .25s cubic-bezier(.2, .8, .2, 1) both; }
.voile.mobile .ecran-mobile { animation: zoom-entre .25s cubic-bezier(.2, .8, .2, 1) both; }
@media (max-width: 760px) { .voile .carte { animation: glisse-haut .3s cubic-bezier(.2, .8, .2, 1) both; } }
@media (hover: hover) { .carte.kpi:hover { transform: translateY(-2px); box-shadow: var(--ombre-haute); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
.choix-entree { margin: .2rem 0 .9rem; }
