/* L7sab — mobile d'abord, compact, RTL en arabe ; les montants restent toujours de gauche à droite. */
:root {
  --marque: #0f766e; --marque-f: #0b5c56; --marque-d: #ccfbf1;
  --fond: #f3f5f7; --carte: #fff; --texte: #0f172a; --doux: #64748b; --ligne: #e5e9ef;
  --ok: #15803d; --ok-d: #dcfce7; --att: #b45309; --att-d: #fef3c7; --ko: #b91c1c; --ko-d: #fee2e2;
  --retrait: #b45309; --depot: #0369a1;
  --r: 14px; --ombre: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 15px/1.5 "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif; overflow-x: hidden; }
a { color: var(--marque); text-decoration: none; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.3; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14.5px; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doux { color: var(--doux); } .petit { font-size: 12.5px; }
.ok-t { color: var(--ok); } .ko-t { color: var(--ko); } .att-t { color: var(--att); }

/* En-tête et navigation */
.entete { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--marque); color: #fff; }
.entete .logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--marque); font-weight: 900; }
.entete .titre { flex: 1; min-width: 0; line-height: 1.2; }
.entete .titre strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete .titre small { opacity: .85; font-size: 12px; }
.entete form { margin: 0; }
.entete .mini { all: unset; cursor: pointer; padding: 5px 9px; border-radius: 9px; background: rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 700; }
.page { max-width: 760px; margin: 0 auto; padding: 14px 14px 96px; }
.nav-bas { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--carte); border-top: 1px solid var(--ligne); padding-bottom: env(safe-area-inset-bottom); }
.nav-bas a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--doux); font-size: 11.5px; font-weight: 700; }
.nav-bas a svg { width: 22px; height: 22px; }
.nav-bas a.actif { color: var(--marque); }
@media (min-width: 900px) {
  .nav-bas { position: sticky; top: 54px; bottom: auto; max-width: 760px; margin: 0 auto; border: 1px solid var(--ligne); border-radius: 0 0 var(--r) var(--r); }
  .page { padding-bottom: 30px; }
}

/* Cartes, listes, pastilles */
.carte { background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: 14px; margin-bottom: 12px; }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grille3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chiffre { background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: 12px; min-width: 0; color: inherit; }
.grille3 .chiffre { padding: 10px 8px; }
.grille3 .chiffre strong { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.chiffre span { display: block; font-size: 12.5px; color: var(--doux); font-weight: 700; }
.chiffre strong { display: block; font-size: 20px; font-weight: 900; }
.pastille { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pastille.ok { background: var(--ok-d); color: var(--ok); } .pastille.attention { background: var(--att-d); color: var(--att); } .pastille.ko { background: var(--ko-d); color: var(--ko); }
.pastille.neutre { background: #eef2f7; color: var(--doux); }
.ligne { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.ligne:last-child { border-bottom: 0; }
.ligne .corps { flex: 1; min-width: 0; display: grid; }
.ligne .corps small { color: var(--doux); font-size: 12.5px; }
.ligne.annulee { opacity: .55; } .ligne.annulee strong { text-decoration: line-through; }
.titre-section { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 2px 8px; }
.titre-section h2 { margin: 0; }
.vide { text-align: center; color: var(--doux); padding: 22px 10px; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: #fff; font-weight: 900; background: var(--marque); }

/* Héros de la caisse */
.heros { background: linear-gradient(135deg, var(--marque), var(--marque-f)); color: #fff; border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--ombre); }
.heros span { opacity: .85; font-size: 13px; }
.heros strong { display: block; font-size: 28px; font-weight: 900; line-height: 1.2; }
.heros .pied { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 13px; }
.portefeuilles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.portefeuille { background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: 12px; border-top: 4px solid var(--c, var(--marque)); }
.portefeuille span { font-size: 12.5px; font-weight: 800; color: var(--c, var(--marque)); }
.portefeuille strong { display: block; font-size: 18px; font-weight: 900; }
.gros-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.gros-boutons a { display: grid; justify-items: center; gap: 4px; padding: 18px 8px; border-radius: 18px; color: #fff; font-size: 18px; font-weight: 900; box-shadow: var(--ombre); }
.gros-boutons a small { font-size: 12px; font-weight: 600; opacity: .9; }
.gros-boutons .retrait { background: var(--retrait); } .gros-boutons .depot { background: var(--depot); }

/* Formulaires */
label.champ { display: grid; gap: 5px; margin-bottom: 12px; font-size: 13.5px; font-weight: 700; color: #334155; }
input, select, textarea { width: 100%; font: inherit; color: var(--texte); background: #fff; border: 1.5px solid var(--ligne); border-radius: 12px; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--marque); box-shadow: 0 0 0 3px var(--marque-d); }
input[type=number], input[inputmode=numeric], input[inputmode=decimal], input[inputmode=tel] { direction: ltr; text-align: center; }
.montant-grand { font-size: 28px; font-weight: 900; padding: 12px; }
.case { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; }
.case input { width: 20px; height: 20px; accent-color: var(--marque); }
.erreur { color: var(--ko); font-size: 12.5px; font-weight: 700; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; background: var(--marque); color: #fff; }
.bouton.plein { width: 100%; }
.bouton.second { background: #eef2f7; color: var(--texte); }
.bouton.danger { background: var(--ko-d); color: var(--ko); }
.bouton.petit { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.puces label { margin: 0; cursor: pointer; }
.puces input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puces label > span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--ligne); background: #fff; font-weight: 800; }
.puces input:checked + span { border-color: var(--c, var(--marque)); background: color-mix(in srgb, var(--c, var(--marque)) 10%, white); color: var(--c, var(--marque)); }
.puces input:focus-visible + span { box-shadow: 0 0 0 3px var(--marque-d); }
.resume { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; margin-bottom: 12px; }
.resume div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.resume b { font-weight: 900; }
details > summary { cursor: pointer; font-weight: 800; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* Messages, rappels, fenêtres */
.alerte { border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.alerte.ok { background: var(--ok-d); color: var(--ok); } .alerte.ko { background: var(--ko-d); color: var(--ko); } .alerte.att { background: var(--att-d); color: var(--att); }
.rappel { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.fenetre { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .5); }
.fenetre .carte { width: 100%; max-width: 380px; text-align: center; }
.fenetre .grand { font-size: 44px; font-weight: 900; color: var(--att); line-height: 1.1; }
.recu { border: 2px dashed var(--ok); background: var(--ok-d); }
.secret { font-size: 22px; font-weight: 900; letter-spacing: 1px; direction: ltr; text-align: center; background: #fff; border-radius: 10px; padding: 8px; }

/* Connexion */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--marque), var(--marque-f)); }
.connexion .carte { width: 100%; max-width: 380px; }
.connexion .logo-grand { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 18px; background: var(--marque); color: #fff; font-size: 28px; font-weight: 900; }

/* Tableaux (ordinateur) devenus listes sur téléphone */
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th, .tableau td { padding: 8px 6px; border-bottom: 1px solid var(--ligne); text-align: start; }
.tableau th { color: var(--doux); font-size: 12px; }
.grille-tranches { display: grid; gap: 6px; }
.grille-tranches .ligne-tranche { display: grid; grid-template-columns: 1fr 1fr 1fr 1.1fr; gap: 6px; }
.grille-tranches input, .grille-tranches select { padding: 8px 6px; font-size: 14px; }
.onglets { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.onglets a { flex: none; padding: 7px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--ligne); font-weight: 800; font-size: 13px; color: var(--texte); }
.onglets a.actif { background: var(--marque); border-color: var(--marque); color: #fff; }
@media print { .entete, .nav-bas, .sans-impression { display: none !important; } .page { padding: 0; } }

/* ===== Style soigné : connexion et caisse de l'agent ===== */
body { font-family: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif; background: #eef2f4; }
.entete { background: linear-gradient(135deg, #0f766e, #0b5c56); box-shadow: 0 2px 10px rgba(11, 92, 86, .25); }
.entete .mini.icone { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; }
.entete .mini.icone svg { width: 18px; height: 18px; }

/* Connexion */
.ecran-accueil { min-height: 100vh; margin: 0; display: flex; flex-direction: column; align-items: center; background: #eef2f4; }
.accueil-haut { position: relative; width: 100%; padding: 46px 20px 86px; text-align: center; color: #fff;
  background: radial-gradient(circle at 20% 0%, #14b8a6 0, transparent 45%), linear-gradient(160deg, #0f766e, #064e48); border-radius: 0 0 34px 34px; }
.accueil-haut h1 { font-size: 26px; font-weight: 900; margin: 10px 0 2px; }
.accueil-haut p { margin: 0; opacity: .85; font-size: 14px; }
.accueil-logo { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; background: #fff; color: #0f766e; font-size: 36px; font-weight: 900; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.accueil-langue { position: absolute; top: 14px; inset-inline-end: 14px; margin: 0; }
.accueil-langue .mini { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-size: 13px; font-weight: 700; }
.accueil-operateurs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.accueil-operateurs span { padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); font-size: 12px; font-weight: 700; }
.accueil-carte { width: calc(100% - 32px); max-width: 400px; margin-top: -58px; background: #fff; border-radius: 24px; padding: 22px 18px; box-shadow: 0 16px 40px rgba(15, 23, 42, .12); }
.accueil-carte h2 { font-size: 20px; font-weight: 900; }
.accueil-carte h1 { font-size: 19px; text-align: center; }
.accueil-pied { color: var(--doux); font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 18px 0; }
.champ-icone { position: relative; display: block; }
.champ-icone > svg { position: absolute; top: 50%; inset-inline-start: 12px; width: 19px; height: 19px; transform: translateY(-50%); color: var(--doux); pointer-events: none; }
.champ-icone input { padding-inline-start: 40px; padding-block: 13px; text-align: start; border-radius: 14px; background: #f8fafc; }
.champ-icone input:focus { background: #fff; }
.voir-mdp { all: unset; cursor: pointer; position: absolute; top: 50%; inset-inline-end: 10px; transform: translateY(-50%); color: var(--doux); display: grid; }
.voir-mdp svg { width: 19px; height: 19px; }
.bouton.grand { padding: 14px 16px; font-size: 16px; border-radius: 14px; box-shadow: 0 8px 18px rgba(15, 118, 110, .3); }

/* Caisse de l'agent */
.salut { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 12px; }
.salut h1 { margin: 0; font-size: 21px; font-weight: 900; }
.salut p { margin: 0; }
.heros { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; background: radial-gradient(circle at 100% 0%, #14b8a6 0, transparent 50%), linear-gradient(135deg, #0f766e, #064e48); }
.heros strong { font-size: 32px; margin-top: 2px; }
.heros .pied { gap: 12px; }
.heros .pied span { display: grid; gap: 1px; }
.heros .pied b { font-size: 16px; font-weight: 800; opacity: 1; }
.gros-boutons a { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 16px 14px; border-radius: 20px; text-align: start; }
.gros-boutons a i { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: rgba(255, 255, 255, .2); }
.gros-boutons a i svg { width: 24px; height: 24px; }
.gros-boutons a span { display: grid; font-size: 18px; line-height: 1.25; }
.gros-boutons .retrait { background: linear-gradient(135deg, #d97706, #b45309); }
.gros-boutons .depot { background: linear-gradient(135deg, #0284c7, #0369a1); }
.portefeuilles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.portefeuille { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; border-top: 0; border-inline-start: 4px solid var(--c); }
.portefeuille i { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-style: normal; font-weight: 900; color: #fff; background: var(--c); }
.portefeuille strong { font-size: 17px; }
.carte.liste { padding: 4px 14px; }
.ligne.operation { gap: 10px; }
.type-op { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; }
.type-op svg { width: 20px; height: 20px; }
.type-op.retrait { background: #fef3c7; color: #b45309; }
.type-op.depot { background: #e0f2fe; color: #0369a1; }
.montant-op { display: grid; justify-items: end; text-align: end; }
.montant-op b { font-size: 15px; font-weight: 900; }
.montant-op small { font-size: 11.5px; font-weight: 700; }
.retrait-t { color: #b45309; } .depot-t { color: #0369a1; }
details.annuler { position: relative; }
details.annuler > summary { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #f1f5f9; color: var(--doux); font-size: 13px; }
details.annuler[open] > form { position: absolute; inset-inline-end: 0; top: 32px; z-index: 5; display: grid; gap: 6px; width: 210px; padding: 10px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.nav-bas { box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
.nav-bas a.actif svg { background: var(--marque-d); border-radius: 10px; padding: 3px; width: 30px; height: 26px; }

/* Police demandée : Cambria (l'arabe utilise la police arabe du système) */
body, input, select, textarea, button { font-family: Cambria, "Cambria Math", Georgia, "Times New Roman", "Traditional Arabic", serif; }
body { font-size: 16px; }
h1 { font-size: 22px; } h2 { font-size: 17px; }
.accueil-carte { position: relative; z-index: 2; }

/* Connexion sur un seul écran : en-tête et carte plus compacts */
.ecran-accueil { min-height: 100dvh; justify-content: flex-start; }
.accueil-haut { padding: 18px 16px 44px; border-radius: 0 0 26px 26px; }
.accueil-logo { width: 50px; height: 50px; border-radius: 16px; font-size: 26px; }
.accueil-haut h1 { font-size: 20px; margin: 6px 0 0; }
.accueil-haut p { font-size: 13px; }
.accueil-operateurs { margin-top: 8px; gap: 5px; }
.accueil-operateurs span { padding: 1px 8px; font-size: 11px; }
.accueil-langue { top: 10px; inset-inline-end: 10px; }
.accueil-carte { margin-top: -30px; padding: 16px 16px 14px; border-radius: 20px; }
.accueil-carte h2 { font-size: 18px; margin-bottom: 2px; }
.accueil-carte label.champ { margin-bottom: 9px; }
.accueil-carte .champ-icone input { padding-block: 10px; }
.accueil-carte .case { margin-bottom: 8px; }
.accueil-pied { margin: 10px 0; font-size: 11px; }

/* Mon abonnement */
.abo-heros { position: relative; overflow: hidden; border-radius: 18px; padding: 14px 16px 12px; margin-bottom: 12px; color: #fff; background: linear-gradient(135deg, var(--marque), #134e4a); box-shadow: var(--ombre); }
.abo-heros.etat-attention { background: linear-gradient(135deg, #d97706, #92400e); }
.abo-heros.etat-ko { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.abo-heros::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.abo-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.abo-haut small { display: block; opacity: .8; font-size: 12px; }
.abo-haut strong { font-size: 17px; }
.abo-heros .pastille { background: rgba(255, 255, 255, .2); color: #fff; }
.abo-jours { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; }
.abo-jours b { font-size: 40px; line-height: 1; font-weight: 900; }
.abo-jours span { font-weight: 700; opacity: .9; }
.abo-jauge { height: 7px; border-radius: 9px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.abo-jauge i { display: block; height: 100%; border-radius: 9px; background: #fff; }
.abo-fin { margin: 8px 0 0; font-size: 12.5px; opacity: .9; }
.abo-refus { border: 1.5px solid var(--ko); background: var(--ko-d); display: grid; gap: 2px; }
.abo-refus strong { color: var(--ko); }
.abo-refus p { margin: 2px 0; font-weight: 700; }
.abo-attente { display: flex; gap: 10px; align-items: center; border: 1.5px solid #fcd34d; background: var(--att-d); }
.abo-attente .sablier { font-size: 26px; }
.abo-attente small { display: block; }
.etape { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.etape i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--marque); color: #fff; font-style: normal; font-size: 13px; }
.formules-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.formule-choix { position: relative; display: grid; gap: 2px; padding: 12px; border: 1.5px solid var(--ligne); border-radius: 14px; cursor: pointer; background: #fff; }
.formule-choix input { position: absolute; opacity: 0; }
.formule-choix .nom { font-weight: 800; }
.formule-choix .prix { font-size: 17px; font-weight: 900; color: var(--marque); }
.formule-choix small { color: var(--doux); }
.formule-choix:has(input:checked) { border-color: var(--marque); background: var(--marque-d); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
.formule-choix:has(input:checked)::after { content: "✓"; position: absolute; top: 8px; inset-inline-end: 10px; color: var(--marque); font-weight: 900; }
.abo-numero { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border: 1.5px dashed var(--marque); border-radius: 12px; background: var(--marque-d); }
.abo-numero small { display: block; color: var(--doux); font-size: 12px; }
.abo-numero b { font-size: 20px; letter-spacing: 1px; }
.depot-fichier { display: grid; justify-items: center; gap: 4px; padding: 16px; margin-bottom: 12px; border: 1.5px dashed var(--ligne); border-radius: 14px; background: var(--fond); text-align: center; cursor: pointer; color: var(--marque); }
.depot-fichier input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.depot-fichier span { font-weight: 700; color: var(--texte); }
.depot-fichier.choisi { border-color: var(--ok); background: var(--ok-d); }
.puce-statut { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-weight: 900; }
.puce-statut.ok { background: var(--ok-d); color: var(--ok); } .puce-statut.ko { background: var(--ko-d); color: var(--ko); } .puce-statut.att { background: var(--att-d); color: var(--att); }

/* Administration : vérifier les captures */
.nav-bas a { position: relative; }
.badge { position: absolute; top: 3px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ko); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.preuve-infos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.preuve-infos div { padding: 7px 8px; border-radius: 10px; background: var(--fond); }
.preuve-infos span { display: block; font-size: 11.5px; color: var(--doux); }
.preuve-infos b { font-size: 13px; }
.preuve-apercu { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--ligne); background: #0f172a; }
.preuve-apercu img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.preuve-apercu span { position: absolute; bottom: 8px; inset-inline-start: 8px; padding: 3px 9px; border-radius: 9px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 12px; }
.refus summary { list-style: none; }
.refus summary::-webkit-details-marker { display: none; }
.refus-form { display: none; gap: 6px; margin-top: 10px; padding: 10px; border-radius: 12px; background: var(--ko-d); }
.preuve-carte:has(details.refus[open]) .refus-form { display: grid; }
.lien-wa { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; color: #15803d; }
.actions-ligne { display: grid; justify-items: end; gap: 4px; }
.mini-lien { font-size: 12px; font-weight: 700; }

/* Mes portefeuilles : une ligne par portefeuille (icône · nom · solde au bout). Le solde a toute la largeur restante
   et sa taille suit la largeur de la carte : un grand montant ne déborde jamais, avec 1, 2, 3 portefeuilles ou plus */
.portefeuilles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
.portefeuille { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 12px; container-type: inline-size; }
.portefeuille i { grid-row: auto; width: 34px; height: 34px; }
.portefeuille span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.portefeuille strong { text-align: end; font-size: clamp(13px, 6.2cqi, 18px); }
.credit { margin: 18px 0 6px; text-align: center; font-size: 12px; color: var(--doux); }

/* Logo d'opérateur : l'image officielle, sinon l'initiale sur la couleur de l'opérateur */
.logo-op { display: inline-grid; place-items: center; flex: none; width: var(--t); height: var(--t); border-radius: calc(var(--t) * .3); overflow: hidden; background: var(--c); color: #fff; font-weight: 900; font-style: normal; font-size: calc(var(--t) * .45); line-height: 1; vertical-align: middle; }
.logo-op:has(img) { background: #fff; box-shadow: 0 0 0 1px var(--ligne); }
.logo-op img { width: 100%; height: 100%; object-fit: contain; }
.puces label > span { display: inline-flex; align-items: center; gap: 6px; }
.op-nom { display: inline-flex; align-items: center; gap: 4px; }
.op-nom::before { content: "·"; }
.logo-envoi { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.portefeuille .logo-op { color: #fff; font-size: calc(var(--t) * .45); }
.depot-fichier.logo-envoi { display: flex; align-items: center; justify-items: initial; gap: 12px; padding: 10px 12px; text-align: start; position: relative; }
.logo-envoi .corps { display: grid; flex: 1; min-width: 0; }
.logo-envoi .corps span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Administration : banques d'un point (interrupteurs) */
.banques .banque { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ligne); cursor: pointer; }
.banques .banque:last-of-type { border-bottom: 0; }
.banques .banque .corps { display: grid; flex: 1; min-width: 0; }
.banques .banque small { color: var(--doux); font-size: 12px; }
.banques .banque.eteinte { opacity: .55; cursor: not-allowed; }
.interrupteur { appearance: none; flex: none; position: relative; width: 46px; height: 26px; margin: 0; border-radius: 26px; background: #cbd5e1; cursor: pointer; transition: background .15s; }
.interrupteur::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start .15s; }
.interrupteur:checked { background: var(--ok); }
.interrupteur:checked::after { inset-inline-start: 23px; }
.interrupteur:disabled { cursor: not-allowed; }
.interrupteur:focus-visible { outline: 3px solid var(--marque-d); }

/* Administration : formules (arrêter / reprendre une offre) */
.formule-admin .prix { font-size: 17px; color: var(--marque); }
.formule-admin.arretee { opacity: .8; background: repeating-linear-gradient(135deg, #fff 0 12px, #f8fafc 12px 24px); }
.formule-admin.arretee .prix { color: var(--doux); text-decoration: line-through; }
.formule-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.formule-actions form { margin: 0; }

/* Page « Plus » */
.profil { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--marque), #134e4a); box-shadow: var(--ombre); }
.profil-initiale { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .18); font-size: 20px; font-weight: 900; }
.profil .corps { display: grid; flex: 1; min-width: 0; }
.profil small { opacity: .85; }
.profil .pastille { background: rgba(255, 255, 255, .2); color: #fff; }
.carte-installer { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r); cursor: pointer; background: var(--marque-d); border: 1.5px dashed var(--marque); }
.carte-installer-icone { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--marque); color: #fff; }
.carte-installer-icone svg { width: 22px; height: 22px; }
.carte-installer .corps { display: grid; flex: 1; }
.carte-installer small { color: var(--doux); }
.fleche { color: var(--doux); font-size: 20px; }
.menu-plus { padding: 4px 14px; }
.menu-plus a { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--texte); border-bottom: 1px solid var(--ligne); }
.menu-plus a:last-child { border-bottom: 0; }
.menu-plus i { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; }
.menu-plus i svg { width: 20px; height: 20px; }
.menu-plus .corps { display: grid; flex: 1; min-width: 0; }
.menu-plus small { color: var(--doux); font-size: 12.5px; }
.m-equipe { background: #e0f2fe; color: #0369a1; } .m-abonnement { background: #fef3c7; color: #b45309; } .m-mdp { background: #ede9fe; color: #6d28d9; }

/* Télécharger l'application */
.installer .carte { position: relative; display: grid; gap: 8px; max-width: 400px; text-align: center; }
.installer h2 { margin: 0; }
.installer-icone { justify-self: center; border-radius: 16px; box-shadow: var(--ombre); }
.fermer-fenetre { all: unset; position: absolute; top: 10px; inset-inline-end: 12px; width: 30px; height: 30px; border-radius: 50%; text-align: center; line-height: 30px; cursor: pointer; color: var(--doux); background: var(--fond); }
.installer-etapes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; text-align: start; counter-reset: etape; }
.installer-etapes li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--fond); font-weight: 700; font-size: 14px; }
.installer-etapes li > :first-child { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #fff; color: var(--marque); }
.installer-pc { display: grid; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--ligne); }
.installer-sous-titre { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-weight: 800; }
.bouton-installer { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 28px); max-width: 420px; margin: 12px auto 0; padding: 11px; border-radius: 14px; cursor: pointer; font-weight: 800; color: var(--marque); background: #fff; border: 1.5px dashed var(--marque); }
@media (display-mode: standalone) { .installer-btn { display: none !important; } }

/* PC : menu sur le côté, page plus large, caisse en deux colonnes */
@media (min-width: 1000px) {
  .entete { padding-inline: 20px; }
  .nav-bas { position: fixed; top: 54px; bottom: 0; inset-inline-start: 0; inset-inline-end: auto; width: 230px; max-width: none; margin: 0; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border: 0; border-inline-end: 1px solid var(--ligne); border-radius: 0; box-shadow: none; }
  .nav-bas a { display: flex; align-items: center; justify-items: start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14.5px; }
  .nav-bas a:hover { background: var(--fond); color: var(--texte); }
  .nav-bas a.actif { background: var(--marque-d); color: var(--marque-f); }
  .nav-bas .badge { position: static; margin-inline-start: auto; }
  .page { max-width: 1120px; margin: 0; margin-inline-start: 230px; padding: 24px 32px 40px; }
  .colonnes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .colonnes > div > :first-child { margin-top: 0; }
  .heros strong { font-size: 40px; }
  .gros-boutons a { padding-block: 22px; }
  .formules-choix { grid-template-columns: repeat(3, 1fr); }
  .fenetre .carte { max-width: 440px; }
}
.installer .bouton.grand { color: #fff; font-size: 16px; font-weight: 800; line-height: 1.4; }

/* الأمانات والديون */
.tiers-totaux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tiers-totaux > div { display: grid; gap: 2px; padding: 12px; border-radius: 16px; color: #fff; box-shadow: var(--ombre); }
.tiers-totaux span { font-size: 12.5px; opacity: .9; font-weight: 700; }
.tiers-totaux strong { font-size: clamp(16px, 5.4vw, 22px); font-weight: 900; }
.tiers-totaux small { font-size: 11.5px; opacity: .8; }
.tiers-totaux .chez-nous { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.tiers-totaux .chez-eux { background: linear-gradient(135deg, #15803d, #14532d); }
.a-confirmer { display: grid; gap: 6px; border: 1.5px solid #fcd34d; background: var(--att-d); }
.ligne-confirmer { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.lien-refus { all: unset; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ko); }
a.alerte.rappel { color: var(--att); }
.liste-tiers .ligne { color: var(--texte); }
.avatar.collegue { background: #6d28d9; }
.soldes-tiers { display: grid; justify-items: end; gap: 3px; flex: none; }
.soldes-tiers > span { padding: 2px 8px; border-radius: 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.s-amana { background: #fef3c7; color: #92400e; } .s-dette { background: var(--ko-d); color: var(--ko); } .s-creance { background: var(--ok-d); color: var(--ok); }
.s-zero { color: var(--ok); }
.recherche { width: 100%; margin-bottom: 10px; padding: 11px 14px; border: 1.5px solid var(--ligne); border-radius: 12px; background: #fff; font: inherit; }
.retour { display: inline-block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.tiers-entete { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tiers-entete .corps { display: grid; flex: 1; min-width: 0; }
.tiers-entete strong { font-size: 18px; }
.tiers-entete small { color: var(--doux); }
.grand-avatar { width: 48px; height: 48px; font-size: 20px; border-radius: 15px; }
.mini-wa { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #dcfce7; color: #15803d; }
.tiers-soldes { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tiers-soldes > div { display: grid; gap: 2px; padding: 10px; border-radius: 14px; min-width: 0; }
.tiers-soldes span { font-size: 11.5px; font-weight: 800; }
.tiers-soldes strong { font-size: clamp(13px, 4.2vw, 17px); font-weight: 900; overflow: hidden; text-overflow: ellipsis; }
.actions-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.actions-tiers label { position: relative; margin: 0; cursor: pointer; }
.actions-tiers input { position: absolute; opacity: 0; }
.actions-tiers span { display: block; height: 100%; padding: 10px; border-radius: 12px; border: 1.5px solid var(--ligne); background: #fff; font-weight: 800; font-size: 13.5px; text-align: center; }
.actions-tiers .entre input:checked + span { border-color: var(--ok); background: var(--ok-d); color: var(--ok); }
.actions-tiers .sort input:checked + span { border-color: var(--ko); background: var(--ko-d); color: var(--ko); }
.actions-tiers input:disabled + span { opacity: .4; cursor: not-allowed; }
.actions-tiers input:focus-visible + span { box-shadow: 0 0 0 3px var(--marque-d); }
.apres-tiers { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: var(--fond); font-weight: 700; font-size: 13.5px; }
.apres-tiers.ko { background: var(--ko-d); color: var(--ko); }
.menu-plus .m-tiers { background: #fee2e2; color: #b91c1c; }
.menu-plus .compteur { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ko); color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }
.argent-autres { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px 0 12px; padding: 9px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 13px; font-weight: 700; }

/* Mon équipe : gérer un compte (nouveau mot de passe, bloquer) */
.menu-compte { position: relative; flex: none; }
.menu-compte > summary { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--fond); color: var(--doux); font-weight: 900; cursor: pointer; list-style: none; }
.menu-compte > summary::-webkit-details-marker { display: none; }
.menu-compte[open] > div { position: absolute; inset-inline-end: 0; top: 36px; z-index: 6; display: grid; width: 220px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.menu-compte form { margin: 0; }
.menu-compte button { all: unset; box-sizing: border-box; width: 100%; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 14px; }
.menu-compte button:hover { background: var(--fond); }
.compte-bloque .corps strong { color: var(--doux); }
/* Soldes d'une personne : une ligne par solde, le montant a toute la place (jamais coupé) */
.tiers-soldes { grid-template-columns: 1fr; gap: 6px; }
.tiers-soldes > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; }
.tiers-soldes span { font-size: 13px; }
.tiers-soldes strong { font-size: 17px; overflow: visible; }
@media (min-width: 700px) { .tiers-soldes { grid-template-columns: repeat(3, 1fr); } }
