:root {
  --encre: #172340; --fond: #F2F4F7; --surface: #FFFFFF; --trait: #D9DEE6; --doux: #5A6478;
  --orange: #D9540B; --orange-fonce: #B44507; --vert: #157A39; --rouge: #B3261E; --ambre: #8A5200;
  --wa: #1A7F4B; --rayon: 10px;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--encre); background: var(--fond); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; font-size: 16px; padding-bottom: env(safe-area-inset-bottom, 0); }
a { color: var(--orange-fonce); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
small, .aide { color: var(--doux); }
.aide { font-size: .93rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ===== structure ===== */
.licence { margin: 0; padding: .6rem 1.25rem; background: #FFF1DB; color: var(--ambre); font-size: .92rem; }
.page { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.sans-menu .page { max-width: 760px; }
.titre-page { font-size: 1.7rem; margin: 0 0 1.1rem; letter-spacing: -.01em; }
.ico { width: 22px; height: 22px; flex: none; }
.marque { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; min-width: 0; }
.marque span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille { width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(217,84,11,.25); }

/* menu latéral (ordinateur) */
.cote { display: none; }
@media (min-width: 900px) {
  .avec-menu { padding-left: 248px; }
  .cote { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--encre); color: #fff; padding: 1.25rem .9rem; z-index: 5; }
  .cote .marque { padding: .3rem .6rem 1.4rem; font-size: 1.1rem; }
  .menu { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
  .menu a { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 9px; color: #C9D1E0; text-decoration: none; font-weight: 400; }
  .menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .menu a[aria-current] { background: rgba(255,255,255,.12); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--orange); }
  .moi { display: flex; align-items: center; gap: .65rem; padding: .9rem .4rem 0; border-top: 1px solid rgba(255,255,255,.12); }
  .avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; }
  .moi-nom { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
  .moi-nom small { display: block; color: #9AA5B8; font-size: .78rem; }
  .moi .sortir { color: #C9D1E0; padding: .4rem; border-radius: 8px; display: flex; }
  .moi .sortir:hover { background: rgba(255,255,255,.1); color: #fff; }
  .haut, .bas { display: none !important; }
  .page { padding: 2rem 2.25rem 3rem; }
}

/* en-tête et barre du bas (téléphone) */
.haut { background: var(--encre); display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: calc(.75rem + env(safe-area-inset-top, 0)) 1rem .75rem; position: sticky; top: 0; z-index: 4; }
.haut .sortir { color: #C9D1E0; text-decoration: none; font-size: .85rem; display: flex; align-items: center; gap: .3rem; }
.haut .sortir .ico { width: 18px; height: 18px; }
.bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; background: var(--surface); border-top: 1px solid var(--trait);
  padding-bottom: env(safe-area-inset-bottom, 0); box-shadow: 0 -6px 20px -14px rgba(23,35,64,.45); }
.bas a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem .2rem .45rem; color: var(--doux); text-decoration: none; font-size: .74rem; }
.bas a[aria-current] { color: var(--orange-fonce); font-weight: 700; }
.bas a[aria-current] .ico { stroke-width: 2.3; }
@media (max-width: 899px) { .avec-menu .page { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0)); } .titre-page { font-size: 1.4rem; } }

/* page « Plus » */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.tuile { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: 1.1rem; background: var(--surface); border: 1px solid var(--trait);
  border-radius: 14px; color: var(--encre); text-decoration: none; font-weight: 700; }
.tuile .ico { width: 28px; height: 28px; color: var(--orange-fonce); }
.tuile:hover { border-color: var(--orange); }

/* blocs */
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 1.35rem; margin: 1rem 0; box-shadow: 0 1px 2px rgba(23,35,64,.04); }
.carte h2 { margin-top: 0; }
.etroite { max-width: 440px; margin: 2rem auto; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--surface);
  border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; margin-bottom: 1rem; }
.chiffres > * { outline: 1px solid var(--trait); background: var(--surface); padding: .85rem 1rem; text-decoration: none; color: inherit; }
.chiffres span { display: block; font-size: .85rem; color: var(--doux); }
.chiffres strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.chiffres .alerte { background: #FFF1E6; }
.chiffres .alerte strong { color: var(--orange-fonce); }

.liste { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(23,35,64,.04); }
.liste li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem 1rem; border-top: 1px solid var(--trait); flex-wrap: wrap; }
.liste li:first-child { border-top: 0; }
.liste li.bloc { display: block; }
.liste.discret { font-size: .93rem; }
.code-mini { font-variant-numeric: tabular-nums; letter-spacing: .08em; background: var(--fond); padding: 0 .35rem; border-radius: 4px; }
.ref { font-weight: 700; letter-spacing: .03em; }
.vide { color: var(--doux); padding: 1rem 0; }

.etat { display: inline-block; font-size: .78rem; font-weight: 700; padding: .05rem .5rem; border-radius: 99px; vertical-align: 1px; }
.etat.actif { background: #E2F3E8; color: var(--vert); }
.etat.bientot { background: #FFF1DB; color: var(--ambre); }
.etat.coupe { background: #FBE6E4; color: var(--rouge); }

.message { padding: .7rem 1rem; border-radius: var(--rayon); margin: 0 0 1rem; border-left: 4px solid var(--vert); background: #E2F3E8; }
.message.erreur { border-color: var(--rouge); background: #FBE6E4; }
.message.attention { border-color: var(--ambre); background: #FFF1DB; }
.message.info { border-color: var(--encre); background: var(--surface); }

/* formulaires */
form label { display: block; margin-bottom: .9rem; font-weight: 700; font-size: .95rem; }
input, select { display: block; width: 100%; margin-top: .3rem; font: inherit; font-weight: 400; padding: .65rem .75rem;
  border: 1px solid #B9C1CE; border-radius: 8px; background: #fff; color: var(--encre); min-height: 46px; }
input:focus, select:focus { border-color: var(--orange); }
.case { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.case input { width: auto; min-height: 0; margin: 0; }
.ligne { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.ligne > * { flex: 1 1 160px; }
.ligne > button { flex: 0 0 auto; margin-bottom: .9rem; }
.filtres { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filtres input { flex: 1 1 200px; margin: 0; }
.filtres select { flex: 0 1 190px; margin: 0; width: auto; }

button, .bouton, :where(a.petit) { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--orange); color: #fff; border: 0; border-radius: 8px; padding: .7rem 1.2rem; min-height: 46px; text-decoration: none; }
button:hover, .bouton:hover, :where(a.petit):hover { background: var(--orange-fonce); }
.secondaire { background: var(--surface); color: var(--encre); border: 1px solid #B9C1CE; }
.secondaire:hover { background: var(--fond); }
.danger { background: var(--surface); color: var(--rouge); border: 1px solid #E3B4B0; }
.danger:hover { background: #FBE6E4; }
.wa { background: var(--wa); color: #fff; }
.wa:hover { background: #12643A; }
.grand { width: 100%; font-size: 1.1rem; min-height: 54px; }
.petit { min-height: 38px; padding: .4rem .8rem; font-size: .9rem; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; display: flex; gap: .4rem; }
.actions .refus input { margin: 0; min-height: 38px; width: 150px; padding: .4rem .6rem; }
.actions.centre { justify-content: center; margin-top: 1rem; }
details { margin-top: .7rem; }
summary { cursor: pointer; color: var(--orange-fonce); font-weight: 700; }
details form { margin-top: .7rem; }

.tableau { overflow-x: auto; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .6rem .75rem; border-top: 1px solid var(--trait); }
th { border-top: 0; font-size: .85rem; color: var(--doux); }
td:not(:first-child), th:not(:first-child) { text-align: right; }

/* ticket : le seul élément démonstratif */
.ticket { position: relative; max-width: 340px; margin: 1rem auto; background: var(--surface); border-radius: 14px;
  padding: 1.4rem 1.6rem 1.2rem; border-top: 8px solid var(--orange); box-shadow: 0 1px 0 var(--trait), 0 10px 30px -18px rgba(23,35,64,.6); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 46%; width: 22px; height: 22px; border-radius: 50%; background: var(--fond); }
.ticket::before { left: -11px; } .ticket::after { right: -11px; }
.ticket-haut { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; padding-bottom: .9rem; border-bottom: 2px dashed var(--trait); }
.ticket-haut span { color: var(--doux); }
.ticket-label { margin: 1rem 0 0; text-align: center; color: var(--doux); font-size: .9rem; }
.ticket-code { margin: .1rem 0 .8rem; text-align: center; font-size: 3.1rem; font-weight: 700; letter-spacing: .14em;
  font-variant-numeric: tabular-nums; line-height: 1.1; padding-left: .14em; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; padding-top: .8rem; border-top: 2px dashed var(--trait); font-size: .95rem; }
.ticket dt { color: var(--doux); } .ticket dd { margin: 0; text-align: right; font-weight: 700; }
.ticket-pied { margin: .9rem 0 0; text-align: center; font-size: .85rem; color: var(--doux); }

/* page client */
.marque-client { margin: 0 0 .3rem; color: var(--orange-fonce); font-weight: 700; }
.forfaits { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.forfaits legend { font-weight: 700; margin-bottom: .5rem; }
.forfait { margin: 0; }
.forfait input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.forfait span { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border: 2px solid var(--trait); border-radius: 10px; cursor: pointer; font-weight: 400; }
.forfait em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.forfait input:checked + span { border-color: var(--orange); background: #FFF4EC; }
.forfait input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.paiement { background: var(--fond); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; text-align: center; }
.paiement p { margin: 0 0 .3rem; }
.numero { font-size: clamp(1.3rem, 6.5vw, 1.7rem); white-space: nowrap; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  body { background: #fff; }
  .cote, .haut, .bas, .titre-page, .licence, .pas-imprime, .message { display: none !important; }
  .avec-menu { padding-left: 0 !important; }
  .ticket { box-shadow: none; border: 1px solid #999; border-top: 8px solid #000; margin: 0 auto; }
  .ticket::before, .ticket::after { display: none; }
}
td:not(:first-child) { white-space: nowrap; }
a.petit { color: #fff; }
a.petit.secondaire { color: var(--encre); }
a.petit.danger { color: var(--rouge); }

/* vente rapide */
.consigne { font-size: 1.25rem; margin: 1.5rem 0 .8rem; }
.grille-forfaits { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 0; }
.grille-forfaits button { flex-direction: column; min-height: 104px; box-shadow: 0 1px 2px rgba(23,35,64,.05); padding: .8rem; font-weight: 400; font-size: 1rem; line-height: 1.25;
  background: var(--surface); color: var(--encre); border: 2px solid var(--trait); border-radius: 14px; }
.grille-forfaits button:hover, .grille-forfaits button:active { background: #FFF4EC; border-color: var(--orange); }
.grille-forfaits .prix { font-size: 1.6rem; font-weight: 700; color: var(--orange-fonce); font-variant-numeric: tabular-nums; }
.etat.neuf { background: #E8ECF3; color: var(--encre); }
.filtres form { margin: 0; display: flex; }

/* feuille de tickets à imprimer */
.feuille { margin-top: 1rem; background: #fff; color: #111; }
.feuille.a4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.bon { border: 1px dashed #9AA3B2; padding: .7rem .5rem; text-align: center; display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; break-inside: avoid; page-break-inside: avoid; }
.bon-nom { font-size: .9rem; }
.bon-label { color: #555; font-size: .72rem; margin-top: .2rem; }
.bon-code { font-size: 1.7rem; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.bon small { color: #444; font-size: .72rem; }
.feuille.thermique { width: 58mm; max-width: 100%; }
.feuille.thermique .bon { border: 0; border-bottom: 1px dashed #000; padding: 4mm 2mm; }
.feuille.thermique .bon-code { font-size: 2rem; }
@media print {
  .feuille.a4 { grid-template-columns: repeat(4, 1fr); }
  .feuille.thermique { width: 58mm; margin: 0; }
  .avec-menu .page { max-width: none; padding: 0 !important; }
  body { background: #fff !important; }
}

/* vente par numéro */
.vente .consigne { display: block; font-size: 1.15rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
.numero-saisie { font-size: 1.8rem; letter-spacing: .08em; text-align: center; font-variant-numeric: tabular-nums; min-height: 62px; margin: 0; }
.grille-forfaits button:disabled { opacity: .45; cursor: not-allowed; }
.ticket-code.tel { font-size: 2.3rem; letter-spacing: .06em; }
.entete-ligne { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.recharge { margin-top: .6rem; }
.recharge label { margin-bottom: 0; font-size: .85rem; }
.recharge button { margin-bottom: 0; }
.solde-bas { color: var(--rouge); }

/* bilan brut / net */
.bilan { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); margin-bottom: 1rem; }
.bilan > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 1rem; padding: .7rem 1rem; border-top: 1px solid var(--trait); }
.bilan > div:first-child { border-top: 0; }
.bilan span { color: var(--doux); }
.bilan strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; text-align: right; }
.bilan small { grid-column: 1 / -1; font-size: .8rem; }
.bilan .moins strong { color: var(--rouge); font-weight: 400; }
.bilan .egal { border-top: 2px solid var(--encre); }
.bilan .fort { background: #E2F3E8; border-radius: 0 0 var(--rayon) var(--rayon); }
.bilan .fort span { color: var(--encre); font-weight: 700; }
.bilan .fort strong { font-size: 1.5rem; color: var(--vert); }
.bilan .fort.perte { background: #FBE6E4; } .bilan .fort.perte strong { color: var(--rouge); }

/* script routeur */
.etapes { padding-left: 1.3rem; margin: 0 0 1rem; } .etapes li { margin-bottom: .35rem; }
.script { width: 100%; padding: .7rem; border: 1px solid #B9C1CE; border-radius: 8px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.45; white-space: pre; overflow: auto; margin: 0 0 .8rem; background: var(--fond); }
details.carte > summary { margin: 0; }
details.carte[open] > summary { margin-bottom: 1rem; }
.reglages { border: 1px solid var(--trait); border-radius: 10px; padding: .8rem 1rem .2rem; margin: 0 0 1rem; }
.reglages legend { font-weight: 700; padding: 0 .3rem; }
@media (min-width: 900px) { .grille-forfaits { grid-template-columns: repeat(4, 1fr); } }

/* arrière-plan : motif wifi discret */
body { background-color: var(--fond); background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23172340%22%20stroke-opacity%3D%22.06%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M14%2034a22%2022%200%200%201%2032%200M20%2040a13%2013%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2246%22%20r%3D%222%22%20fill%3D%22%23172340%22%20fill-opacity%3D%22.06%22%20stroke%3D%22none%22/%3E%3Cpath%20d%3D%22M74%2094a22%2022%200%200%201%2032%200M80%20100a13%2013%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2290%22%20cy%3D%22106%22%20r%3D%222%22%20fill%3D%22%23172340%22%20fill-opacity%3D%22.06%22%20stroke%3D%22none%22/%3E%3C/g%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23D9540B%22%20stroke-opacity%3D%22.08%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M76%2030a14%2014%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2286%22%20cy%3D%2236%22%20r%3D%221.8%22%20fill%3D%22%23D9540B%22%20fill-opacity%3D%22.08%22%20stroke%3D%22none%22/%3E%3Cpath%20d%3D%22M18%2090a14%2014%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2228%22%20cy%3D%2296%22%20r%3D%221.8%22%20fill%3D%22%23D9540B%22%20fill-opacity%3D%22.08%22%20stroke%3D%22none%22/%3E%3C/g%3E%3C/svg%3E"); background-size: 120px 120px; background-attachment: fixed; }
.sans-menu { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23172340%22%20stroke-opacity%3D%22.06%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M14%2034a22%2022%200%200%201%2032%200M20%2040a13%2013%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2246%22%20r%3D%222%22%20fill%3D%22%23172340%22%20fill-opacity%3D%22.06%22%20stroke%3D%22none%22/%3E%3Cpath%20d%3D%22M74%2094a22%2022%200%200%201%2032%200M80%20100a13%2013%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2290%22%20cy%3D%22106%22%20r%3D%222%22%20fill%3D%22%23172340%22%20fill-opacity%3D%22.06%22%20stroke%3D%22none%22/%3E%3C/g%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23D9540B%22%20stroke-opacity%3D%22.08%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M76%2030a14%2014%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2286%22%20cy%3D%2236%22%20r%3D%221.8%22%20fill%3D%22%23D9540B%22%20fill-opacity%3D%22.08%22%20stroke%3D%22none%22/%3E%3Cpath%20d%3D%22M18%2090a14%2014%200%200%201%2020%200%22/%3E%3Ccircle%20cx%3D%2228%22%20cy%3D%2296%22%20r%3D%221.8%22%20fill%3D%22%23D9540B%22%20fill-opacity%3D%22.08%22%20stroke%3D%22none%22/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(circle at 20% 0%, rgba(217,84,11,.10), transparent 45%), radial-gradient(circle at 100% 100%, rgba(23,35,64,.10), transparent 50%); background-size: 120px 120px, auto, auto; }
@media print { body { background: #fff !important; } }
html, body { min-height: 100vh; }
.sans-menu .page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.sans-menu .carte.etroite { box-shadow: 0 20px 50px -24px rgba(23,35,64,.35); }

/* alerte routeur hors ligne */
.alerte-routeur { margin: 0; padding: .65rem 1.25rem; background: #FBE6E4; color: var(--rouge); font-size: .92rem; border-bottom: 1px solid #F1C7C3; }
.alerte-routeur a { color: var(--rouge); font-weight: 700; }

/* graphique 30 jours */
.graphe { padding-bottom: .9rem; }
.graphe-tete { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.graphe-tete h2 { margin: 0; font-size: 1rem; color: var(--doux); font-weight: 700; }
.graphe-tete strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.graphe svg { width: 100%; height: 140px; display: block; }
.graphe rect { fill: #F0B48F; } .graphe rect.auj { fill: var(--orange); } .graphe rect:hover { fill: var(--orange-fonce); }
.graphe .axe { stroke: var(--trait); stroke-width: 1; }
.graphe-pied { display: flex; justify-content: space-between; font-size: .78rem; color: var(--doux); margin-top: .35rem; }
.sous-titre { font-size: .9rem; margin: 1.1rem 0 .4rem; color: var(--doux); text-transform: uppercase; letter-spacing: .04em; }
.zone-danger { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--trait); }
.zone-danger summary { color: var(--rouge); }
.oubli { margin: 1rem 0 0; text-align: center; }

/* feuille A4 : 7 × 19 tickets */
.page-a4 { background: #fff; color: #111; width: 100%; max-width: 210mm; margin: 1rem 0; padding: 6mm; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.page-a4-tete { display: flex; justify-content: space-between; gap: 1rem; font-size: 9px; margin-bottom: 2mm; }
.grille-a4 { display: grid; grid-template-columns: repeat(var(--cols, 7), 1fr); gap: 1.6mm; }
.v { border: 1px solid var(--tc, #E59AC5); border-radius: 3px; padding: 1mm 1mm 0.6mm; text-align: center; display: flex; flex-direction: column; align-items: center; line-height: 1.15; break-inside: avoid; }
.v-prix { font-weight: 700; font-size: 10px; }
.v-code { display: block; width: 88%; margin: .6mm 0; border: 1px solid var(--tc, #E59AC5); border-radius: 4px; font-weight: 700; font-size: var(--taille, 11.5px); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.v-val { font-size: 6.5px; font-weight: 700; color: #333; }
@media print {
  @page { size: A4; margin: 6mm; }
  .page-a4 { box-shadow: none; margin: 0; padding: 0; max-width: none; page-break-after: always; break-after: page; }
  .page-a4:last-child { page-break-after: auto; break-after: auto; }
  .v, .v-code { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 600px) { .grille-a4 { grid-template-columns: repeat(4, 1fr); } }
.zone-rouge { border-color: #F1C7C3; }
.zone-rouge h2 { color: var(--rouge); }

/* état du routeur */
.etat-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: 1rem; }
.etat-tete b { font-size: 1.1rem; }
.jauges { display: grid; gap: .8rem; }
.jauge { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: .2rem .8rem; }
.jauge small { grid-column: 2; }
.barre-j { height: 10px; background: var(--fond); border-radius: 99px; overflow: hidden; }
.barre-j i { display: block; height: 100%; background: var(--vert); border-radius: 99px; }
.barre-j i.moyen { background: #C98A12; } .barre-j i.haut { background: var(--rouge); }
.haut-etat { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; align-items: center; }
.direct { font-size: .82rem; color: var(--vert); }
.direct.perdu { color: var(--rouge); }

/* rapports : exports */
.filtres { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.exports { display: inline-flex; gap: .4rem; margin-left: auto; }
@media print { .no-print, .filtres select ~ .exports, form.carte { display: none !important; } }

/* à surveiller (accueil gérant) */
.surveiller { border-left: 5px solid var(--orange); }
.surveiller ul { list-style: none; padding: 0; margin: .3rem 0 0; }
.surveiller li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--trait); }
.surveiller li:first-child { border-top: 0; }
.wa { background: #25D366 !important; color: #fff !important; border-color: #25D366 !important; }
.etiquette { display: inline-block; background: #FFF4EC; color: var(--orange-fonce); border: 1px solid #F5C9A6; border-radius: 99px; padding: 0 .5rem; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.inscription-lien { text-align: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--trait); }
.chiffres small { display: block; color: var(--doux); font-size: .8rem; }
.espace-assiste { margin: 0; padding: .6rem 1rem; background: #E7F0FF; border-bottom: 2px solid #3B6FD8; color: #16213A; font-size: .92rem; }
.espace-assiste a { font-weight: 700; margin-left: .3rem; }
.ouvrir-espace { margin: .5rem 0; }

.v-titre { font-size: 7px; font-weight: 700; color: var(--tc, #E59AC5); filter: brightness(.7); text-transform: uppercase; letter-spacing: .03em; }
.v-msg { font-size: 6px; color: #444; margin-top: .3mm; }
.apercu-tickets { background: #fff; padding: 4mm; border-radius: 8px; border: 1px solid var(--trait); }
.apercu-tickets .grille-a4 { grid-template-columns: repeat(3, 1fr); max-width: 330px; }
.apercu-tickets .v { font-size: 1.4em; }
.ligne-acces { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--trait); }
.ligne-acces:first-of-type { border-top: 0; }
.ligne-acces p { margin: 0; }
.a-copier { user-select: all; background: var(--fond); padding: .1rem .4rem; border-radius: 4px; font-weight: 700; }

/* impression de la feuille : seulement les tickets, rien d'autre */
@media print {
  body.impression-tickets .cote, body.impression-tickets .haut, body.impression-tickets .bas,
  body.impression-tickets .licence, body.impression-tickets .alerte-routeur, body.impression-tickets .espace-assiste,
  body.impression-tickets .message, body.impression-tickets .titre-page, body.impression-tickets .pas-imprime,
  body.impression-tickets .surveiller { display: none !important; }
  body.impression-tickets, body.impression-tickets .contenu, body.impression-tickets .page { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body.impression-tickets.avec-menu { padding: 0 !important; }
  body.impression-tickets::before, body.impression-tickets::after { display: none !important; }
}
details.options { margin: .4rem 0 1rem; border: 1px dashed var(--trait); border-radius: 10px; padding: .4rem .8rem; }
details.options summary { cursor: pointer; font-weight: 700; color: var(--doux); padding: .3rem 0; }
details.options[open] summary { margin-bottom: .5rem; }

/* =====================================================================
   THÈME « NUIT DU SAHEL » — interface sombre et technologique
   Indigo profond, onde wifi orange (la marque) et signal turquoise (en ligne).
   ===================================================================== */
:root {
  --encre: #EAF0FF; --fond: #050914; --surface: #0D1530; --surface-2: #121C3D; --trait: #1E2B55; --doux: #93A3CC;
  --orange: #1E8BFF; --orange-fonce: #4FB0FF; --signal: #22D3EE; --vert: #34D399; --rouge: #FF6B6B; --ambre: #22D3EE;
  --rayon: 12px;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, .titre-page, .marque, .chiffres strong, .bilan strong, .graphe-tete strong, .grille-forfaits .prix, .numero, .ticket-code, .numero-saisie, .tuile {
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif; letter-spacing: -.01em; }
body, .sans-menu {
  background: radial-gradient(1100px 600px at -10% -10%, rgba(30,139,255,.13), transparent 60%),
              radial-gradient(900px 600px at 110% 110%, rgba(34,211,238,.10), transparent 60%), var(--fond) !important;
  background-attachment: fixed !important; color: var(--encre); }
a { color: var(--orange-fonce); }
::selection { background: rgba(30,139,255,.35); }

/* logo : l'onde wifi qui émet (le seul mouvement de l'interface) */
.pastille { position: relative; width: 12px; height: 12px; background: var(--orange); box-shadow: 0 0 14px 2px rgba(30,139,255,.7); }
.pastille::before, .pastille::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(30,139,255,.55); animation: onde 2.8s ease-out 3; }
.pastille::after { animation-delay: .9s; }
@keyframes onde { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pastille::before, .pastille::after { animation: none; display: none; } }

/* barres de navigation */
@media (min-width: 900px) {
  .cote { background: rgba(10,15,40,.85); backdrop-filter: blur(14px); border-right: 1px solid var(--trait); }
  .menu a { color: var(--doux); border-radius: 12px; }
  .menu a:hover { background: var(--surface); color: var(--encre); }
  .menu a[aria-current] { background: linear-gradient(90deg, rgba(30,139,255,.20), rgba(30,139,255,.04)); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
  .moi { border-top-color: var(--trait); }
  .avatar { background: linear-gradient(135deg, var(--orange), #FF5E7E); }
}
.haut { background: rgba(10,15,40,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--trait); }
.bas { background: rgba(13,19,48,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--trait); box-shadow: 0 -10px 30px -12px rgba(0,0,0,.6); }
.bas a { color: var(--doux); }
.bas a[aria-current] { color: var(--orange); }
.bas a[aria-current] .ico { filter: drop-shadow(0 0 6px rgba(30,139,255,.7)); }

/* surfaces */
.carte, .liste, .tableau, .bilan, .chiffres, .tuile, .grille-forfaits button {
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--trait); box-shadow: 0 18px 40px -28px rgba(0,0,0,.8); }
.carte { border-radius: 20px; }
.liste, .tableau, .bilan, .chiffres { border-radius: 18px; }
.liste > li, .liste li { border-color: var(--trait); }
.chiffres > * { background: transparent; outline-color: var(--trait); }
.chiffres span { color: var(--doux); }
.chiffres strong { font-size: 1.9rem; }
.chiffres .alerte { background: rgba(255,107,107,.08); }
.tuile { border-radius: 18px; color: var(--encre); }
.tuile .ico { color: var(--orange); }
.tuile:hover, .grille-forfaits button:hover, .grille-forfaits button:active { border-color: var(--orange); background: linear-gradient(180deg, #16224A, var(--surface)); box-shadow: 0 0 0 1px var(--orange), 0 12px 30px -16px rgba(30,139,255,.6); }
.grille-forfaits button { border-width: 1px; color: var(--encre); border-radius: 18px; }
.grille-forfaits .prix { color: var(--orange); font-size: 1.75rem; }
.code-mini, .a-copier { background: rgba(34,211,238,.10); color: var(--signal); }
th { color: var(--doux); }

/* champs */
input, select, textarea { background: #0F1534 !important; color: var(--encre) !important; border: 1px solid var(--trait) !important; border-radius: 12px !important; }
input::placeholder { color: #5E6896; }
input:focus, select:focus, textarea:focus { border-color: var(--orange) !important; box-shadow: 0 0 0 3px rgba(30,139,255,.18); outline: none; }
input[type="checkbox"] { accent-color: var(--orange); }
.script { background: #0A0F28 !important; color: #BFF5EA !important; }
.numero-saisie { color: #fff !important; }

/* boutons */
button, .bouton, :where(a.petit) { background: linear-gradient(135deg, #22C8FF, #1E6BFF); color: #FFFFFF; font-weight: 800; border-radius: 12px; box-shadow: 0 8px 22px -12px rgba(255,120,60,.9); }
button:hover, .bouton:hover, :where(a.petit):hover { background: linear-gradient(135deg, #FFB070, #FF7A4D); }
a.petit { color: #FFFFFF; }
.secondaire, a.petit.secondaire { background: transparent !important; color: var(--encre) !important; border: 1px solid var(--trait) !important; box-shadow: none; }
.secondaire:hover { background: var(--surface-2) !important; border-color: var(--doux) !important; }
.danger, a.petit.danger { background: transparent !important; color: var(--rouge) !important; border: 1px solid rgba(255,107,107,.45) !important; box-shadow: none; }
.danger:hover { background: rgba(255,107,107,.10) !important; }
.wa { background: #25D366 !important; color: #062814 !important; box-shadow: 0 8px 22px -12px rgba(37,211,102,.9); }
summary { color: var(--orange); }
details.options { border-color: var(--trait); }
.bascule { display: inline-flex; border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.bascule a { padding: .65rem 1rem; color: var(--doux); text-decoration: none; font-weight: 700; }
.bascule a.choisi { background: var(--surface-2); color: var(--encre); box-shadow: inset 0 -2px 0 var(--orange); }

/* états et messages */
.etat { border-radius: 99px; }
.etat.actif { background: rgba(34,211,238,.12); color: var(--signal); box-shadow: 0 0 12px -4px rgba(34,211,238,.8); }
.etat.bientot { background: rgba(255,193,94,.12); color: var(--ambre); }
.etat.coupe { background: rgba(255,107,107,.12); color: var(--rouge); }
.etat.neuf { background: rgba(150,161,207,.12); color: var(--doux); }
.message { background: rgba(34,211,238,.08); border-left-color: var(--signal); border-radius: 14px; }
.message.erreur { background: rgba(255,107,107,.10); border-color: var(--rouge); }
.message.attention { background: rgba(255,193,94,.10); border-color: var(--ambre); }
.message.info { background: var(--surface); border-color: var(--doux); }
.alerte-routeur { background: rgba(255,107,107,.10); color: #FFB3B3; border-bottom-color: rgba(255,107,107,.3); }
.alerte-routeur a { color: #FFD0D0; }
.espace-assiste { background: rgba(34,211,238,.10); border-bottom-color: var(--signal); color: var(--encre); }
.surveiller { border-left: 3px solid var(--orange); }
.surveiller li { border-top-color: var(--trait); }
.etiquette { background: rgba(30,139,255,.12); color: var(--orange); border-color: rgba(30,139,255,.35); }
.paiement { background: #0F1534; border: 1px solid var(--trait); }
.reglages { border-color: var(--trait); }
.solde-bas { color: var(--rouge); }

/* bilan et graphique */
.bilan > div { border-top-color: var(--trait); }
.bilan .egal { border-top: 1px solid var(--doux); }
.bilan .moins strong { color: var(--rouge); }
.bilan .fort { background: linear-gradient(90deg, rgba(34,211,238,.16), rgba(34,211,238,.04)); }
.bilan .fort span { color: var(--encre); }
.bilan .fort strong { color: var(--signal); font-size: 1.7rem; }
.bilan .fort.perte { background: rgba(255,107,107,.12); }
.graphe rect { fill: #B8664A; } .graphe rect.auj { fill: var(--orange); } .graphe rect:hover { fill: #FFB070; }
.barre-j { background: #0F1534; }
.barre-j i { background: linear-gradient(90deg, #2BC7AA, var(--signal)); }

/* ticket du client (vente) : reste un vrai ticket papier, clair */
.ticket { background: #FDFBF7; color: #18203F; }
.ticket::before, .ticket::after { background: var(--fond); }
.ticket-haut span, .ticket-label, .ticket dt, .ticket-pied { color: #5A6478; }
.ticket-haut, .ticket dl { border-color: #D9DEE6; }

/* connexion et inscription */
.sans-menu .carte.etroite { background: linear-gradient(180deg, rgba(27,35,80,.92), rgba(21,28,63,.92)); backdrop-filter: blur(10px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px var(--trait); }
.sans-menu .carte.etroite h1 { font-size: 2.1rem; background: linear-gradient(90deg, #fff, #FFC9A3); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* les feuilles de tickets restent blanches (impression) */
.page-a4, .feuille, .apercu-tickets { color: #111; }
@media print {
  :root { --fond: #fff; --encre: #111; }
  body { background: #fff !important; color: #111; }
  .carte, .liste, .tableau, .bilan, .chiffres { background: #fff !important; box-shadow: none !important; border-color: #ccc !important; }
}
/* page d'un routeur */
.acces-distance .acces-tete { display: flex; align-items: center; gap: .8rem; }
.acces-distance .acces-tete b { flex: 1; font-family: "Space Grotesk", sans-serif; }
.acces-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(150,161,207,.12); color: var(--doux); font-size: 1.2rem; }
.acces-distance.ouvert .acces-ico { background: rgba(34,211,238,.14); color: var(--signal); box-shadow: 0 0 18px -6px rgba(34,211,238,.9); }
.acces-distance.ouvert .acces-tete b { color: var(--signal); }
.acces-ligne { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; padding: .7rem .9rem; background: #0F1534; border-radius: 12px; }
.acces-ligne span { color: var(--doux); } .acces-ligne code { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.infos-routeur dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .8rem 0 0; }
.infos-routeur dt { color: var(--doux); } .infos-routeur dd { margin: 0; font-weight: 700; }
.ressources { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: .5rem; }
.ressources span { display: block; color: var(--doux); font-size: .85rem; }
.ressources strong { font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; } .ressources .rouge { color: var(--rouge); }
.tuiles-routeur { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: 1rem 0; }
.tuiles-routeur > div { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1rem .5rem; border-radius: 18px;
  background: linear-gradient(180deg, rgba(34,211,238,.10), rgba(34,211,238,.02)); border: 1px solid rgba(34,211,238,.18); }
.tuiles-routeur .t-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(34,211,238,.12); }
.tuiles-routeur strong { font-family: "Space Grotesk", sans-serif; font-size: 1.9rem; color: var(--signal); line-height: 1.1; }
.tuiles-routeur small { color: var(--doux); }
.bouton.grand { display: flex; justify-content: center; width: 100%; padding: 1rem; font-size: 1.1rem; margin: .4rem 0 1.4rem; }
.acces-ligne code { white-space: nowrap; font-size: .9rem; background: none; padding: 0; }

/* ---- Rapports : filtres ---- */
.filtres-rapport { display: grid; gap: .6rem; margin-bottom: 1rem; }
.puces { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce { flex: 0 0 auto; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--trait); background: var(--surface);
  color: var(--doux); font-size: .88rem; text-decoration: none; white-space: nowrap; margin: 0; width: auto; }
select.puce { padding-right: 1.8rem; }
.puce.actif { background: var(--orange); border-color: var(--orange); color: #FFFFFF; font-weight: 600; }
.filtres-rapport .dates { display: none; gap: .4rem; align-items: center; }
.filtres-rapport.avec-dates .dates { display: flex; }
.filtres-rapport .dates input { margin: 0; flex: 1; min-width: 0; }
.plus-filtres { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: .55rem .9rem; }
.plus-filtres summary { cursor: pointer; color: var(--doux); font-size: .92rem; }
.plus-filtres summary b { background: var(--signal); color: #03202A; border-radius: 999px; padding: 0 .45rem; font-size: .78rem; margin-left: .3rem; }
.grille-filtres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; margin-top: .6rem; }
.grille-filtres label { margin: 0; font-size: .82rem; }
.grille-filtres select { margin: .25rem 0 0; }
.plus-filtres .effacer { display: inline-block; margin-top: .5rem; font-size: .85rem; color: var(--rouge); }
.filtres-rapport .exports { display: flex; gap: .4rem; justify-content: flex-end; }
.titre-periode { color: var(--doux); margin: 0 0 .8rem; }
.titre-periode b { color: inherit; color: #fff; }
.cherche-vente input { margin: 0 0 .6rem; }
.ventes-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.ventes-liste li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--surface);
  border: 1px solid var(--trait); border-radius: 12px; padding: .6rem .85rem; }
.ventes-liste li div { display: grid; min-width: 0; }
.ventes-liste li b { font-family: 'Space Grotesk', monospace; letter-spacing: .02em; }
.ventes-liste small { color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ventes-liste strong { color: var(--signal); white-space: nowrap; }
@media print { .ventes-liste, .titre-periode { display: none; } }
.icone-ticket { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; }
.icone-ticket svg { flex: 0 0 auto; }

/* ---- Bulle d'aide ---- */
.aide-bulle { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; width: 56px; height: 56px; padding: 0;
  border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(30,139,255,.35); }
@media (min-width: 900px) { .aide-bulle { bottom: 24px; right: 24px; } }
.aide-panneau { position: fixed; right: 12px; left: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 61; max-width: 380px; margin-left: auto;
  max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--trait);
  border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.5); overflow: hidden; }
.aide-panneau[hidden] { display: none; }
@media (min-width: 900px) { .aide-panneau { bottom: 92px; right: 24px; left: auto; width: 380px; } }
.aide-panneau header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--trait); }
.aide-fermer { background: none; box-shadow: none; color: var(--doux); padding: .2rem .5rem; min-height: 0; width: auto; }
.aide-fil { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.aide-msg { max-width: 88%; padding: .6rem .8rem; border-radius: 14px; font-size: .93rem; line-height: 1.45; }
.aide-msg.bot { background: var(--surface-2); border-bottom-left-radius: 4px; }
.aide-msg.bot a { color: var(--signal); }
.aide-msg.moi { align-self: flex-end; background: var(--orange); color: #FFFFFF; border-bottom-right-radius: 4px; }
.aide-sujets { display: flex; flex-wrap: wrap; gap: .35rem; }
.aide-sujets button { background: transparent; border: 1px solid var(--trait); color: var(--doux); box-shadow: none; font-size: .82rem;
  padding: .35rem .7rem; border-radius: 999px; min-height: 0; width: auto; font-weight: 500; }
.aide-saisie { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--trait); margin: 0; }
.aide-saisie input { margin: 0; flex: 1; min-width: 0; }
.aide-saisie button { width: auto; }
.aide-humain { display: block; text-align: center; padding: .6rem; font-size: .88rem; color: var(--signal); border-top: 1px solid var(--trait); text-decoration: none; }

/* ---- Accueil vivant ---- */
.accueil-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 1.3rem 1.2rem 1.1rem; margin-bottom: 1.4rem;
  background: radial-gradient(120% 90% at 100% 0%, rgba(30,139,255,.28), transparent 55%),
              radial-gradient(90% 80% at 0% 100%, rgba(34,211,238,.16), transparent 60%), var(--surface);
  border: 1px solid var(--trait); }
.salut { margin: 0 0 .7rem; color: var(--doux); font-size: 1.02rem; }
.salut b { color: #fff; }
.hero-montant strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.4rem, 11vw, 3.2rem); line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-montant span { display: block; margin-top: .35rem; color: var(--doux); font-size: .92rem; }
.tendance { display: inline-block; margin: .7rem 0 0; padding: .25rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.tendance.monte { background: rgba(34,211,238,.14); color: var(--signal); }
.tendance.baisse { background: rgba(255,107,107,.14); color: var(--rouge); }
.objectif { margin-top: 1rem; }
.objectif-tete { display: flex; justify-content: space-between; font-size: .9rem; color: var(--doux); margin-bottom: .4rem; }
.objectif-tete b { color: #fff; }
.objectif .barre { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.objectif .barre i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--orange), #22D3EE);
  animation: remplir 1.1s cubic-bezier(.2,.8,.2,1) both; }
.objectif.atteint .barre i { background: linear-gradient(90deg, var(--signal), #7CF5A9); }
.objectif.atteint .objectif-tete span { color: var(--signal); font-weight: 600; }
.objectif small { display: block; margin-top: .4rem; color: var(--doux); font-size: .82rem; }
@keyframes remplir { from { width: 0; } }
.hero-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.hero-badges > * { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px; font-size: .84rem;
  background: rgba(255,255,255,.06); border: 1px solid var(--trait); color: var(--doux); text-decoration: none; }
.hero-badges b { color: #fff; }
.hero-badges .alerte { border-color: var(--rouge); color: var(--rouge); }
.pouls { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(34,211,238,.6); animation: pouls 1.8s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 8px rgba(34,211,238,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); } }

/* ---- Vente réussie ---- */
.bravo { display: grid; justify-items: center; text-align: center; gap: .25rem; margin: .4rem 0 1.2rem; }
.bravo .coche { position: relative; width: 76px; height: 76px; margin-bottom: .4rem; }
.bravo svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bravo circle { stroke: var(--signal); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: trace .6s ease-out forwards; }
.bravo path { stroke: var(--signal); stroke-width: 4; stroke-dasharray: 40; stroke-dashoffset: 40; animation: trace .35s .5s ease-out forwards; }
.bravo .coche i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 2px; background: var(--c); opacity: 0;
  animation: eclat .9s .55s ease-out forwards; }
.bravo strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; }
.bravo em { font-style: normal; color: var(--signal); }
.bravo span { color: var(--doux); font-size: .92rem; }
.bravo span b { color: #fff; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes eclat { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-62px) scale(.6); } }
@media (prefers-reduced-motion: reduce) { .bravo circle, .bravo path { animation: none; stroke-dashoffset: 0; } .bravo .coche i, .objectif .barre i, .pouls { animation: none; } }

/* alerte routeur discrète */
a.alerte-routeur { display: flex; align-items: center; gap: .5rem; width: fit-content; max-width: calc(100% - 32px); margin: .8rem auto 0;
  padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; text-decoration: none; color: var(--rouge);
  background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3); }
a.alerte-routeur i { width: 7px; height: 7px; border-radius: 50%; background: var(--rouge); flex: 0 0 auto; }
a.alerte-routeur span { color: var(--doux); margin-left: .2rem; }
/* bulle d'aide plus petite */
.aide-bulle { width: 44px; height: 44px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); opacity: .92;
  box-shadow: 0 4px 14px rgba(30,139,255,.3); }
.aide-bulle svg { width: 20px; height: 20px; }
.aide-panneau { bottom: calc(132px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .aide-bulle { bottom: 20px; right: 20px; } .aide-panneau { bottom: 76px; } }
[hidden] { display: none !important; }
/* cartes revendeurs : boutons sur une ligne */
li.bloc .entete-ligne { flex-direction: column; align-items: stretch; gap: .55rem; }
li.bloc .entete-ligne .actions { display: flex; flex-direction: row; gap: .4rem; flex-wrap: nowrap; }
li.bloc .entete-ligne .actions > *, li.bloc .entete-ligne .actions form button { margin: 0; }
li.bloc .entete-ligne .actions form { margin: 0; }
.bilan .egal:last-child { background: linear-gradient(90deg, rgba(34,211,238,.12), transparent); }
.deconnexion { text-align: center; margin: 2rem 0 1rem; }
.deconnexion a { display: inline-flex; align-items: center; gap: .4rem; color: var(--doux); font-size: .9rem; text-decoration: none; }
.deconnexion .ico { width: 16px; height: 16px; }

/* ---- Effet "on appuie" sur tous les boutons (classe posée en JS, marche aussi sur iPhone) ---- */
html { -webkit-tap-highlight-color: transparent; }
button, .bouton, a.petit, .puce, .tuile, .hero-badges a, .hero-connectes, nav.bas a, .menu a, .aide-sujets button, .grille-forfaits button, .alerte-routeur {
  transition: transform .12s cubic-bezier(.3,.7,.4,1), filter .12s ease, box-shadow .12s ease !important; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; }
.appui { transform: scale(.93) translateY(2px) !important; filter: brightness(.82) saturate(1.1) !important; box-shadow: inset 0 3px 8px rgba(0,0,0,.35) !important; }
nav.bas a.appui, .menu a.appui { transform: scale(.88) !important; filter: brightness(1.3) !important; box-shadow: none !important; }
.grille-forfaits button.appui { transform: scale(.92) !important; border-color: var(--orange) !important; }

/* ---- Bannière « Installer l'app » ---- */
.installer { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 55; max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--trait); box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.installer[hidden] { display: none; }
.installer img { border-radius: 10px; flex: 0 0 auto; }
.installer div { flex: 1; min-width: 0; display: grid; }
.installer small { color: var(--doux); font-size: .8rem; line-height: 1.35; }
.installer .petit { width: auto; margin: 0; }
.installer-x { background: none; box-shadow: none; color: var(--doux); padding: .3rem; width: auto; min-height: 0; margin: 0; }
@media (min-width: 900px) { .installer { bottom: 20px; } }
body:has(.installer:not([hidden])) .aide-bulle { bottom: calc(152px + env(safe-area-inset-bottom)); }


/* ---- Logo WifiGest ---- */
.marque.logo { gap: .5rem; text-decoration: none; }
.marque.logo img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.mot { font-family: "Poppins", "Manrope", sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; color: #fff; }
.mot b { font-weight: 700; background: linear-gradient(180deg, #22C8FF, #1E6BFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.haut { justify-content: center !important; }
.logo-entree { display: grid; justify-items: center; gap: .3rem; padding: 2.2rem 1rem .4rem; }
.logo-entree img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(30,139,255,.35)); }
.logo-entree .mot { font-size: 2rem; }
.hero-connectes { display: flex; align-items: center; gap: .55rem; margin: -.1rem 0 1rem; padding: .7rem .9rem; border-radius: 14px;
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.28); color: var(--signal); text-decoration: none; }
.hero-connectes strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.7rem; line-height: 1; color: var(--signal); }
.hero-connectes span { color: var(--doux); font-size: .95rem; }
.hero-connectes .pouls { width: 10px; height: 10px; }

/* page de connexion : logo et carte rapprochés */
.sans-menu .page { min-height: 0 !important; justify-content: flex-start !important; padding-top: 0; }
.sans-menu .carte.etroite { margin: 1.2rem auto 2rem; }
.sans-menu .carte.etroite h1 { background: linear-gradient(90deg, #fff, #9FD8FF) !important; -webkit-background-clip: text !important; background-clip: text !important; font-size: 1.7rem; }
.logo-entree { padding-top: 2.4rem; }
.oubli { margin-top: 1rem; }
.langues { display: flex; justify-content: center; gap: .4rem; margin: .8rem 0 0; }
.langues a { padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--trait); color: var(--doux); font-size: .82rem; text-decoration: none; }
.langues a.actif { background: var(--orange); border-color: var(--orange); color: #fff; }
