/* =====================================================================
   Wakanda IPTV — panneau revendeurs / admin
   Style de la famille XUI.one : menu latéral sombre, cartes de chiffres
   pleines et colorées, tableaux à bandes, badges d'état, modales.
   Deux thèmes : [data-theme="sombre"] (défaut) et [data-theme="clair"].
   Le MENU reste sombre dans les deux thèmes, comme dans XUI.
   ===================================================================== */

:root {
  --bleu: #3699ff;   --bleu-2: #1a6fe0;
  --vert: #1bc5bd;   --vert-2: #0f9a93;
  --orange: #ffa800; --orange-2: #e07b00;
  --rouge: #f64e60;  --rouge-2: #d3243a;
  --violet: #8950fc; --violet-2: #6327d6;
  --gris: #7e8299;

  --menu: #1e1e2d;
  --menu-2: #1a1a27;
  --menu-texte: #a2a3b7;
  --menu-actif: #2b2b40;

  --rayon: 12px;
  --rayon-p: 8px;
  --police: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ombre: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.06);
}

/* --- Thème clair ---------------------------------------------------- */
[data-theme="clair"] {
  --fond: #eef0f8;
  --carte: #ffffff;
  --carte-2: #f7f8fc;
  --bord: #e4e6ef;
  --texte: #181c32;
  --texte-2: #5e6278;
  --faible: #8d91a8;
  --bande: #f9fafd;
  --survol: #f1f4ff;
  --champ: #f5f8fa;
  --champ-bord: #e4e6ef;
  --entete: #ffffff;
  color-scheme: light;
}

/* --- Thème sombre --------------------------------------------------- */
[data-theme="sombre"] {
  --fond: #151521;
  --carte: #1e1e2d;
  --carte-2: #242436;
  --bord: #2b2b40;
  --texte: #e9e9f2;
  --texte-2: #a7a8bb;
  --faible: #7c7e97;
  --bande: #222233;
  --survol: #2a2a3f;
  --champ: #1b1b29;
  --champ-bord: #323248;
  --entete: #1e1e2d;
  --ombre: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 14px;
  line-height: 1.5;
  background: var(--fond);
  color: var(--texte);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
a { color: var(--bleu); }

/* =============================== PORTE ============================== */
.porte {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(54,153,255,.35), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(137,80,252,.35), transparent 60%),
              var(--menu-2);
}
.porte-fond { position: absolute; inset: 0; pointer-events: none; }
/* Ondes d'antenne : le métier, c'est la diffusion. */
.onde {
  position: absolute; left: 50%; top: 50%;
  width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.07);
  animation: onde 6s ease-out infinite;
}
.o2 { animation-delay: 2s; } .o3 { animation-delay: 4s; }
@keyframes onde { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.porte-carte {
  position: relative; width: 100%; max-width: 400px;
  background: var(--carte); color: var(--texte);
  border-radius: 16px; padding: 32px 28px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.porte-carte h1 { font-size: 22px; margin: 22px 0 4px; }
.porte-pied { text-align: center; margin-top: 14px; }

.marque { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; letter-spacing: .2px; }
.marque b { font-weight: 700; }
.marque small { display: block; font-size: 11px; color: var(--faible); font-weight: 500; letter-spacing: .6px; text-transform: uppercase; }
.marque.grande { color: var(--texte); font-size: 19px; }
.logo {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--bleu), var(--violet));
  box-shadow: 0 6px 16px rgba(54,153,255,.35);
}
.logo svg { width: 22px; height: 22px; }

/* =============================== APPLI ============================== */
.appli { display: flex; min-height: 100vh; }

.menu {
  width: 264px; flex: none;
  background: var(--menu); color: var(--menu-texte);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.menu-tete {
  height: 68px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--menu-2);
}
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: #5d5f7a; padding: 16px 12px 6px; font-weight: 600;
}
.nav-lien {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; margin: 2px 0;
  border: 0; border-radius: var(--rayon-p);
  background: transparent; color: var(--menu-texte);
  font-weight: 500; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-lien svg { width: 20px; height: 20px; flex: none; color: #565874; transition: color .15s; }
.nav-lien:hover { background: var(--menu-actif); color: #fff; }
.nav-lien:hover svg { color: var(--bleu); }
.nav-lien[aria-current="page"] { background: var(--menu-actif); color: #fff; }
.nav-lien[aria-current="page"] svg { color: var(--bleu); }
.nav-lien .compte {
  margin-left: auto; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 20px; background: var(--rouge); color: #fff;
}
.menu-pied { padding: 14px 16px 18px; border-top: 1px solid #2b2b40; }
.qui { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #fff; }
.qui .avatar {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700;
  background: rgba(54,153,255,.15); color: var(--bleu);
}
.qui small { display: block; color: var(--menu-texte); font-size: 12px; }

.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entete {
  position: sticky; top: 0; z-index: 30;
  height: 68px; padding: 0 28px;
  display: flex; align-items: center; gap: 14px;
  background: var(--entete);
  border-bottom: 1px solid var(--bord);
}
.entete-titre { flex: 1; min-width: 0; }
.entete h1 { font-size: 18px; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil { font-size: 12px; color: var(--faible); }
.entete-droite { display: flex; align-items: center; gap: 10px; }
.icone-btn.burger, .icone-btn.fermer-menu { display: none; }

.solde-puce {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 30px;
  background: rgba(27,197,189,.12); color: var(--vert);
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.solde-puce svg { width: 18px; height: 18px; }
.solde-puce.bas { background: rgba(246,78,96,.12); color: var(--rouge); }
.solde-puce.fournisseur { background: rgba(54,153,255,.12); color: var(--bleu); }
.solde-puce.fournisseur.perime { background: rgba(245,158,11,.14); color: var(--orange); }
.solde-puce .source { font-size: 11px; font-weight: 700; }
.solde-puce .etat { font-size: 10px; font-weight: 500; opacity: .8; }

.icone-btn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--carte-2); color: var(--texte-2);
}
.icone-btn:hover { color: var(--bleu); }
.icone-btn svg { width: 20px; height: 20px; }
.menu .icone-btn { background: transparent; color: var(--menu-texte); }

.vue { padding: 26px 28px 60px; outline: none; }

/* =========================== CARTES CHIFFRES ======================== */
.chiffres {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 24px;
}
.chiffre {
  position: relative; overflow: hidden;
  border-radius: var(--rayon); padding: 20px 20px 18px;
  color: #fff; min-height: 128px;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.35);
}
.chiffre::after {
  /* le grand cercle pâle derrière, signature des tableaux de bord XUI */
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.chiffre::before {
  content: ""; position: absolute; right: 30px; bottom: -60px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.chiffre .ic {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.2);
  position: relative; z-index: 1;
}
.chiffre .ic svg { width: 24px; height: 24px; }
.chiffre .v { font-size: 30px; font-weight: 700; line-height: 1.1; margin-top: 14px; position: relative; z-index: 1; }
.chiffre .l { font-size: 13px; opacity: .92; position: relative; z-index: 1; }
.chiffre.cliquable { cursor: pointer; transition: transform .15s; }
.chiffre.cliquable:hover { transform: translateY(-2px); }
.g-bleu   { background: linear-gradient(135deg, #4aa6ff 0%, var(--bleu-2) 100%); }
.g-vert   { background: linear-gradient(135deg, #2ad6ce 0%, var(--vert-2) 100%); }
.g-orange { background: linear-gradient(135deg, #ffb929 0%, var(--orange-2) 100%); }
.g-rouge  { background: linear-gradient(135deg, #ff6b7c 0%, var(--rouge-2) 100%); }
.g-violet { background: linear-gradient(135deg, #9d6bff 0%, var(--violet-2) 100%); }
.g-gris   { background: linear-gradient(135deg, #8e92ab 0%, #5c6078 100%); }

/* Pastille « en direct » : les connexions se passent maintenant. */
.direct {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  background: rgba(0,0,0,.22); padding: 3px 9px 3px 7px; border-radius: 20px;
}
.direct i {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.8);
  animation: pouls 1.6s infinite;
}
@keyframes pouls {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ============================== BLOCS =============================== */
.grille-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.grille-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.bloc {
  background: var(--carte); border-radius: var(--rayon);
  box-shadow: var(--ombre); margin-bottom: 24px;
  border: 1px solid var(--bord);
}
[data-theme="sombre"] .bloc { border-color: transparent; }
.bloc-tete {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 22px; border-bottom: 1px solid var(--bord);
}
.bloc-tete h2 { font-size: 16px; margin: 0; font-weight: 600; flex: 1; min-width: 160px; }
.bloc-tete h2 small { display: block; font-size: 12px; color: var(--faible); font-weight: 400; }
.bloc-corps { padding: 20px 22px; }
.bloc-corps.serre { padding: 0; }

.barre { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cherche {
  position: relative; flex: 1; min-width: 200px; max-width: 360px;
}
.cherche svg { position: absolute; left: 12px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--faible); }
.cherche input { padding-left: 38px; }

.puces-filtre { display: flex; gap: 6px; flex-wrap: wrap; }
.puce-f {
  border: 1px solid var(--bord); background: var(--carte); color: var(--texte-2);
  border-radius: 20px; padding: 6px 13px; font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.puce-f b { font-weight: 600; font-size: 11px; background: var(--carte-2); border-radius: 10px; padding: 0 7px; }
.puce-f[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.puce-f[aria-pressed="true"] b { background: rgba(255,255,255,.25); }

/* ============================= BOUTONS ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--rayon-p);
  padding: 10px 16px; font-weight: 500; font-size: 14px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: filter .15s, background .15s, transform .05s;
  min-height: 40px;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.large { width: 100%; }
.btn.petit { padding: 6px 11px; font-size: 13px; min-height: 34px; }
.btn.plein { color: #fff; }
.btn.plein:hover { filter: brightness(1.08); }
.btn.bleu { background: var(--bleu); }
.btn.vert { background: var(--vert); }
.btn.orange { background: var(--orange); }
.btn.rouge { background: var(--rouge); }
.btn.violet { background: var(--violet); }
.btn.whatsapp { background: #25d366; color: #fff; }
.btn.doux { background: var(--carte-2); color: var(--texte-2); }
.btn.doux:hover { color: var(--bleu); background: var(--survol); }
.btn.doux.bleu  { background: rgba(54,153,255,.12);  color: var(--bleu); }
.btn.doux.vert  { background: rgba(27,197,189,.13);  color: var(--vert-2); }
.btn.doux.orange{ background: rgba(255,168,0,.14);   color: var(--orange-2); }
.btn.doux.rouge { background: rgba(246,78,96,.12);   color: var(--rouge); }
.btn.doux.violet{ background: rgba(137,80,252,.12);  color: var(--violet); }
[data-theme="sombre"] .btn.doux.vert { color: var(--vert); }
[data-theme="sombre"] .btn.doux.orange { color: var(--orange); }
.btn.doux.sur-sombre { background: #2b2b40; color: #c5c6d8; }
.btn.doux.sur-sombre:hover { color: #fff; background: #35354f; }
.lien { background: none; border: 0; color: var(--faible); cursor: pointer; text-decoration: underline; font-size: 13px; }

/* ============================== CHAMPS ============================== */
input, select, textarea {
  width: 100%; min-height: 42px;
  padding: 9px 13px;
  background: var(--champ); border: 1px solid var(--champ-bord);
  border-radius: var(--rayon-p); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(54,153,255,.18); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--bleu); }
.champ-l { display: block; font-size: 13px; font-weight: 500; color: var(--texte-2); margin-top: 14px; }
.champ-l > input, .champ-l > select, .champ-l > textarea, .champ-l > .avec-oeil { margin-top: 6px; }
.champ-l .aide-champ { display: block; font-weight: 400; font-size: 12px; color: var(--faible); margin-top: 4px; }
.champ-l.requis > span.et::after { content: " *"; color: var(--rouge); }
.deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.avec-oeil { position: relative; display: block; }
.avec-oeil input { padding-right: 46px; }
.oeil {
  position: absolute; right: 4px; top: 50%; margin-top: -17px;
  width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer;
  color: var(--faible); display: grid; place-items: center;
}
.oeil svg { width: 18px; height: 18px; }
.sous { color: var(--texte-2); margin: 0 0 6px; font-size: 13px; }
.msg { min-height: 20px; font-size: 13px; color: var(--rouge); margin: 12px 0 4px; }
.msg.ok { color: var(--vert); }
.msg:empty { min-height: 0; margin: 6px 0 0; }

/* Choix de durée en tuiles : plus rapide au doigt qu'une liste déroulante. */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 8px; }
.tuile {
  position: relative; border: 2px solid var(--bord); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; background: var(--carte);
  text-align: left; transition: border-color .15s, background .15s;
}
.tuile input { position: absolute; opacity: 0; pointer-events: none; }
.tuile b { display: block; font-size: 15px; }
.tuile span { font-size: 12px; color: var(--faible); }
.tuile .eco { position: absolute; top: -9px; right: 8px; font-size: 10px; font-weight: 700; background: var(--vert); color: #fff; border-radius: 10px; padding: 1px 7px; }
.tuile.choisie { border-color: var(--bleu); background: rgba(54,153,255,.08); }
.tuile.trop { opacity: .45; cursor: not-allowed; }

.recap {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: var(--carte-2); font-size: 13px; color: var(--texte-2);
}
.recap b { color: var(--texte); }
.recap .rouge { color: var(--rouge); }

/* ============================== TABLEAUX ============================ */
.table-boite { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--faible);
  text-transform: uppercase; letter-spacing: .6px;
  padding: 12px 16px; border-bottom: 1px solid var(--bord); white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
tbody tr:nth-child(even) td { background: var(--bande); }
tbody tr:hover td { background: var(--survol); }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
.bloc-tete > .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.catalogue-gele { opacity: .52; }
button:disabled { cursor: not-allowed; opacity: .52; }
td.actions .btn + .btn { margin-left: 6px; }
.ident { font-family: var(--mono); font-weight: 700; letter-spacing: .3px; }
.discret { color: var(--faible); font-size: 12px; }
.plus { color: var(--vert); font-weight: 600; }
.moins { color: var(--rouge); font-weight: 600; }
[data-theme="clair"] .plus { color: var(--vert-2); }

.personne { display: flex; align-items: center; gap: 12px; min-width: 0; }
.personne .avatar {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
}
.personne b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Barre du temps restant : on voit d'un coup d'œil qui va expirer. */
.reste { min-width: 130px; }
.reste .jauge-l { height: 5px; border-radius: 4px; background: var(--carte-2); margin-top: 5px; overflow: hidden; }
.reste .jauge-l i { display: block; height: 100%; border-radius: 4px; }

/* ============================== BADGES ============================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.sans-point::before { display: none; }
.b-vert   { background: rgba(27,197,189,.14); color: var(--vert-2); }
.b-rouge  { background: rgba(246,78,96,.13);  color: var(--rouge); }
.b-orange { background: rgba(255,168,0,.16);  color: #c77700; }
.b-gris   { background: rgba(126,130,153,.16); color: var(--gris); }
.b-bleu   { background: rgba(54,153,255,.13); color: var(--bleu); }
.b-violet { background: rgba(137,80,252,.13); color: var(--violet); }
[data-theme="sombre"] .b-vert { color: var(--vert); }
[data-theme="sombre"] .b-orange { color: var(--orange); }
[data-theme="sombre"] .b-gris { color: #b5b7c8; }

/* ============================ ÉTATS VIDES =========================== */
.vide {
  text-align: center; padding: 48px 20px; color: var(--texte-2);
}
.vide .ic-vide {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; background: var(--carte-2); color: var(--faible);
}
.vide .ic-vide svg { width: 30px; height: 30px; }
.vide b { display: block; color: var(--texte); font-size: 15px; margin-bottom: 4px; }
.vide.erreur .ic-vide { background: rgba(246,78,96,.12); color: var(--rouge); }

.squelette { height: 120px; border-radius: var(--rayon); background: linear-gradient(90deg, var(--carte) 0%, var(--carte-2) 50%, var(--carte) 100%); background-size: 200% 100%; animation: luit 1.2s infinite linear; }
@keyframes luit { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ============================ JAUGE CRÉDITS ========================= */
.jauge-bloc { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.anneau { position: relative; width: 150px; height: 150px; flex: none; }
.anneau svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.anneau .piste { stroke: var(--carte-2); }
.anneau .arc { transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.anneau .centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.anneau .centre b { font-size: 32px; line-height: 1; }
.anneau .centre span { font-size: 12px; color: var(--faible); }
.jauge-detail { flex: 1; min-width: 180px; }
.jauge-detail p { margin: 0 0 8px; color: var(--texte-2); font-size: 13px; }
.peut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.peut span { background: var(--carte-2); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--texte-2); }
.peut b { color: var(--texte); font-size: 14px; }

/* ============================ LISTE SIMPLE ========================== */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--bord); }
.liste li:last-child { border-bottom: 0; }
.liste .milieu { flex: 1; min-width: 0; }
.liste .milieu b { display: block; }

/* ======================= SECRET AFFICHÉ UNE FOIS ==================== */
.secret {
  border-radius: 12px; padding: 16px;
  background: linear-gradient(135deg, rgba(54,153,255,.10), rgba(137,80,252,.10));
  border: 1px dashed rgba(54,153,255,.5);
}
.secret-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.secret-ligne + .secret-ligne { border-top: 1px solid var(--bord); }
.secret-ligne span { color: var(--faible); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.secret-ligne b { font-family: var(--mono); font-size: 17px; letter-spacing: .5px; word-break: break-all; text-align: right; }
.secret-ligne b.mdp { font-size: 22px; color: var(--violet); }
[data-theme="sombre"] .secret-ligne b.mdp { color: #b18cff; }
/* Une vente de plusieurs télés : un bloc d’accès par télé (montrerAcces). */
.tele { margin-top: 16px; }
.tele-titre { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--bleu); }
.avertir {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 14px 0 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,168,0,.12); color: var(--texte); font-size: 13px;
}
.avertir svg { width: 18px; height: 18px; color: var(--orange); flex: none; margin-top: 1px; }
.avertir.rouge { background: rgba(246,78,96,.1); }
.avertir.rouge svg { color: var(--rouge); }
.avertir.bleu { background: rgba(54,153,255,.1); }
.avertir.bleu svg { color: var(--bleu); }
.partage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tel { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.tel .indic { flex: none; padding: 9px 10px; border-radius: var(--rayon-p); background: var(--carte-2); font-weight: 600; font-size: 14px; }

/* ============================== MODALE ============================== */
.modale-fond {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10,10,20,.6);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fondu .15s ease-out;
}
.modale {
  width: 100%; max-width: 540px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: var(--carte); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: monte .2s cubic-bezier(.2,.8,.2,1);
}
.modale.large { max-width: 760px; }
.modale-tete { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--bord); }
.modale-tete h3 { margin: 0; font-size: 17px; flex: 1; }
.modale-corps { padding: 6px 22px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modale-pied { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--bord); flex-wrap: wrap; }
.modale-pied:empty { display: none; }
@keyframes fondu { from { opacity: 0; } }
@keyframes monte { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* =============================== TOAST ============================== */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translate(-50%, 140%); opacity: 0;
  max-width: calc(100vw - 32px);
  background: #1e1e2d; color: #fff; border-left: 4px solid var(--vert);
  padding: 12px 18px; border-radius: 10px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
.toast.vu { transform: translate(-50%, 0); opacity: 1; }
.toast.rate { border-left-color: var(--rouge); }

.bandeau-maquette {
  position: fixed; right: 12px; bottom: 12px; z-index: 70;
  background: var(--violet); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px; letter-spacing: .4px; opacity: .9;
  pointer-events: none;
}

/* ========================= SOURCES / BOUQUETS ======================= */
.cartes-bouquets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.carte-bouquet {
  border: 2px solid var(--bord); border-radius: var(--rayon); padding: 16px;
  background: var(--carte); cursor: pointer; text-align: left;
  transition: border-color .15s, transform .15s;
}
.carte-bouquet:hover { transform: translateY(-2px); }
.carte-bouquet.choisi { border-color: var(--bleu); }
.carte-bouquet h3 { margin: 10px 0 2px; font-size: 16px; }
.carte-bouquet .ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff;
}
.carte-bouquet .ic svg { width: 22px; height: 22px; }
.carte-bouquet .haut { display: flex; justify-content: space-between; align-items: flex-start; }

.logo-chaine {
  width: 40px; height: 40px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff;
  overflow: hidden;
}
.logo-chaine img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.choix-chaines { max-height: 340px; overflow-y: auto; border: 1px solid var(--bord); border-radius: 10px; margin-top: 8px; }
.choix-chaines label { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--bord); cursor: pointer; }
.choix-chaines label:last-child { border-bottom: 0; }
.choix-chaines label.interdit { opacity: .55; cursor: not-allowed; }
.choix-chaines .milieu { flex: 1; min-width: 0; }
.choix-chaines .milieu b { display: block; font-size: 13px; }
.choix-chaines input.rub { width: 130px; min-height: 34px; padding: 5px 9px; font-size: 13px; }

.tarifs-grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tarif {
  border-radius: var(--rayon); padding: 22px 20px; background: var(--carte);
  border: 1px solid var(--bord); box-shadow: var(--ombre); position: relative; overflow: hidden;
}
.tarif .bande-c { position: absolute; left: 0; top: 0; right: 0; height: 5px; }
.tarif .duree { font-size: 13px; color: var(--faible); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.tarif .prix { font-size: 36px; font-weight: 700; line-height: 1.1; margin: 8px 0 2px; }
.tarif .prix small { font-size: 14px; font-weight: 500; color: var(--faible); }
.tarif .par-mois { font-size: 13px; color: var(--texte-2); }
.tarif .eco { position: absolute; top: 16px; right: 14px; }
.tarif-actions { margin-top: 14px; }

.etapes { counter-reset: e; list-style: none; padding: 0; margin: 0; }
.etapes li { counter-increment: e; position: relative; padding: 0 0 14px 40px; color: var(--texte-2); font-size: 13px; }
.etapes li::before {
  content: counter(e); position: absolute; left: 0; top: -2px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(54,153,255,.14); color: var(--bleu); font-weight: 700; font-size: 12px;
}
.etapes li b { color: var(--texte); }

/* ============================== MOBILE ============================== */
@media (max-width: 1100px) {
  .grille-2, .grille-2-1 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .menu {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto;
    transform: translateX(-105%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
    box-shadow: 20px 0 60px rgba(0,0,0,.4);
    width: 280px; max-width: 86vw;
  }
  .menu.ouvert { transform: translateX(0); }
  .voile { position: fixed; inset: 0; z-index: 35; background: rgba(10,10,20,.55); }
  .icone-btn.burger, .icone-btn.fermer-menu { display: grid; }
  .entete { padding: 0 16px; height: 60px; }
  .entete h1 { font-size: 16px; }
  .vue { padding: 16px 16px 80px; }
  .chiffres { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
  .chiffre { padding: 14px; min-height: 0; }
  .chiffre .ic { width: 38px; height: 38px; border-radius: 10px; }
  .chiffre .ic svg { width: 20px; height: 20px; }
  .chiffre .v { font-size: 24px; margin-top: 10px; }
  .chiffre .l { font-size: 12px; line-height: 1.3; }
  .direct { top: 12px; right: 10px; font-size: 9px; padding: 2px 7px 2px 6px; }
  .bloc { margin-bottom: 16px; }
  .bloc-tete { padding: 14px 16px; }
  .bloc-corps { padding: 16px; }
  .liste li { padding: 12px 16px; }
  .cherche { max-width: none; min-width: 0; flex-basis: 100%; }
  .barre > .btn { flex: 1; }

  /* --- Les tableaux deviennent des cartes ------------------------- */
  .cartes-mobile thead { display: none; }
  .cartes-mobile, .cartes-mobile tbody, .cartes-mobile tr, .cartes-mobile td { display: block; width: 100%; }
  .cartes-mobile tr {
    margin: 0 12px 12px; width: auto;
    border: 1px solid var(--bord); border-radius: 12px; overflow: hidden;
    background: var(--carte);
  }
  .cartes-mobile tbody { padding-top: 12px; }
  .cartes-mobile tbody tr:nth-child(even) td, .cartes-mobile tbody tr:hover td { background: transparent; }
  .cartes-mobile td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 14px; border-bottom: 1px solid var(--bord); text-align: right;
  }
  .cartes-mobile td::before {
    content: attr(data-l); flex: none;
    color: var(--faible); font-size: 12px; font-weight: 500; text-align: left;
  }
  .cartes-mobile td.tete-carte { background: var(--carte-2) !important; padding: 12px 14px; text-align: left; }
  .cartes-mobile td.tete-carte::before { display: none; }
  .cartes-mobile td.n { text-align: right; }
  .cartes-mobile td.actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px;
    border-bottom: 0; padding: 12px 14px;
  }
  .cartes-mobile td.actions::before { display: none; }
  .cartes-mobile td.actions .btn { margin: 0 !important; width: 100%; }
  .cartes-mobile td:empty { display: none; }
  .cartes-mobile .reste { min-width: 0; width: 55%; }

  .modale-fond { align-items: flex-end; padding: 0; }
  .modale { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; animation: tiroir .25s cubic-bezier(.2,.8,.2,1); }
  .modale-pied .btn { flex: 1; }
  .deux-champs { grid-template-columns: 1fr; }
  .jauge-bloc { justify-content: center; }
}
@keyframes tiroir { from { transform: translateY(40%); opacity: .4; } }

@media (max-width: 420px) {
  .solde-puce span.mot, .solde-puce .etat { display: none; }
  .solde-puce.fournisseur.perime .etat { display: inline; font-size: 9px; }
  .tuiles { grid-template-columns: 1fr 1fr; }
  .partage { grid-template-columns: 1fr; }
  .choix-chaines input.rub { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 900px) {
  .masque-mobile { display: none; }
}
.liste-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.selection-essai { display: inline-flex; align-items: center; gap: 7px; color: var(--texte2); cursor: pointer; flex: none; }
.selection-essai input { cursor: pointer; }
.selection-essai.tout { font-size: 13px; padding: 8px 2px; }
@media (max-width: 900px) {
  .liste li { flex-wrap: wrap; }
  .liste li .milieu b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .liste-actions { width: 100%; padding-left: 50px; }
  .liste-actions .badge { margin-right: auto; }
}

/* Actions des lignes d'abonnés : icônes seules au bureau (la colonne
   « Abonné » était écrasée par trois boutons libellés), libellés sous
   l'icône sur la carte mobile. */
.ligne-abonnes td.actions .btn { width: 36px; padding: 0; }
.ligne-abonnes td.actions .btn .lib { display: none; }
.ligne-abonnes td.actions .btn svg { margin: 0; }
.ligne-abonnes .note-ab { display: block; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-abonnes td { white-space: nowrap; }
/* ⚠ Panne évitée : au bureau, la liste de l'ADMIN (colonne « Revendeur », noms comme
   « Kaboré Services — Ouaga 2000 ») faisait 1374 px dans un bloc de 1118 : les
   boutons d'action étaient cachés derrière un défilement horizontal. Mesuré par
   capturer-panneau.mjs dès que l'admin a eu un écran capturé ; le nom se tronque, le
   titre (survol) le donne en entier. La carte mobile garde le nom complet. */
/* Au bureau l'échéance passe sur deux lignes (date, puis « dans 26 j ») et le nom du
   client se tronque plus court : sans cela l'admin (colonne Revendeur en plus) restait à
   1277 px pour 1118. */
@media (min-width: 901px) {
  .ligne-abonnes.avec-rev td.rev-ab { max-width: 85px; overflow: hidden; text-overflow: ellipsis; }
  .ligne-abonnes.avec-rev .note-ab { max-width: 140px; }
  .ligne-abonnes.avec-rev th, .ligne-abonnes.avec-rev td { padding-left: 10px; padding-right: 10px; }
  .ligne-abonnes .reste .discret { display: block; }
  .ligne-abonnes .reste .pt { display: none; }
}
.reste .discret { white-space: nowrap; }
@media (max-width: 900px) {
  .ligne-abonnes .note-ab { max-width: 250px; }
  .ligne-abonnes td.actions .btn { width: 100%; height: auto; padding: 8px 4px; flex-direction: column; gap: 3px; font-size: 12px; }
  .ligne-abonnes td.actions .btn .lib { display: block; }
  /* ⚠ Six gestes par abonné (avec « Voir les accès ») sur UNE rangée de 390 px : les
     libellés se chevauchaient (vu sur capture). Trois par rangée. */
  .ligne-abonnes td.actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.table-sources .ref-j { display: inline-block; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-family: var(--mono); font-size: 12px; }
.table-sources td { white-space: nowrap; }
@media (max-width: 900px) { .table-sources .ref-j { max-width: 190px; } }
/* Plusieurs lignes dans une cellule : un seul bloc, pour que la carte
   mobile (td en flex) ne les mette pas côte à côte. */
.pile { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fil { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .pile { align-items: flex-end; }
  .table-sources td { white-space: normal; }
}

/* ===================== v1.3 : écrans revendeur et admin ============== */
.porte-liens { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.porte-liens .lien { color: var(--bleu); text-decoration: none; font-weight: 500; padding: 6px 0; }
/* Champ piège anti-robot : hors écran, jamais vu ni tabulé par un humain.
   (display:none serait ignoré par certains robots, d'où le décalage.) */
.piege { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.msg.attente { color: var(--orange-2); font-weight: 500; }
[data-theme="sombre"] .msg.attente { color: var(--orange); }

.tete-actions { display: flex; gap: 8px; flex-wrap: wrap; }
a.nav-lien { text-decoration: none; }
/* Cinq gestes par abonné : icônes serrées au bureau, sinon la colonne
   d'actions sortait du tableau (mesuré à 1440 px, le 2026-10-06). */
@media (min-width: 901px) {
  /* Tableaux larges (revendeurs, sources) : les noms longs passent à la
     ligne au lieu de pousser les boutons hors du bloc. */
  .table-large .personne > span:not(.avatar) { min-width: 150px; max-width: 220px; }
  .table-large .personne b, .table-large .personne .discret { display: block; white-space: normal; overflow-wrap: anywhere; }
  .table-large td, .table-large th { padding-left: 12px; padding-right: 12px; }
  .table-sources td.actions { white-space: normal; width: 1%; }
  .table-sources td.actions .btn { display: flex; width: 100%; margin: 0 0 6px !important; }
  .table-sources .msg-synchro { max-width: 150px; }
  .table-sources .ref-j { max-width: 150px; }
  .ligne-abonnes td.actions .btn { width: 32px; min-height: 32px; }
  .ligne-abonnes td.actions .btn + .btn { margin-left: 4px; }
  .ligne-abonnes .note-ab { max-width: 210px; }
  .ligne-abonnes td { padding-left: 12px; padding-right: 12px; }
}
.badge.mini { padding: 0 6px; font-size: 10px; margin-top: 3px; margin-right: 4px; }
.bloc-l { display: block; }
.msg-synchro { display: inline-block; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bandeaux : annonces de l'admin, solde bas */
.bandeaux { padding: 0 28px; }
.bandeaux:empty { display: none; }
.bandeau {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  padding: 12px 14px; border-radius: var(--rayon); border: 1px solid transparent;
  background: rgba(54,153,255,.1); border-color: rgba(54,153,255,.25);
}
.bandeau > svg { width: 22px; height: 22px; flex: none; color: var(--bleu); }
.bandeau.attention { background: rgba(255,168,0,.12); border-color: rgba(255,168,0,.35); }
.bandeau.attention > svg { color: var(--orange); }
.bandeau-texte { flex: 1; min-width: 0; font-size: 13px; color: var(--texte-2); }
.bandeau-texte b { display: block; color: var(--texte); font-size: 14px; }
.icone-btn.petit { width: 32px; height: 32px; background: transparent; }
.icone-btn.petit svg { width: 16px; height: 16px; }

/* Sélecteur trois états (thème) */
.segment { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--carte-2); border: 1px solid var(--bord); max-width: 100%; }
.segment button {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 9px 16px; border-radius: 9px; background: transparent; color: var(--texte-2); font-weight: 500;
}
.segment button svg { width: 18px; height: 18px; }
.segment button[aria-pressed="true"] { background: var(--carte); color: var(--bleu); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Liens M3U / EPG copiables */
.liens-acces { margin-top: 12px; display: grid; gap: 8px; }
.lien-ligne {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: var(--carte-2);
}
.lien-ligne span { font-size: 12px; color: var(--faible); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.lien-ligne code { font-family: var(--mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Historique d'un abonné */
.frise { list-style: none; margin: 14px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--bord); }
.frise li { position: relative; padding: 0 0 14px 6px; font-size: 13px; color: var(--texte-2); }
.frise li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--bleu); box-shadow: 0 0 0 3px var(--carte); }
.frise li b { color: var(--texte); }
.frise li small { display: block; color: var(--faible); font-size: 12px; }

/* Gestes sur un revendeur */
.gestes { display: grid; gap: 8px; margin-top: 14px; }
.geste {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--bord); background: var(--carte); cursor: pointer;
}
.geste:hover { background: var(--survol); }
.geste > svg { width: 20px; height: 20px; color: var(--bleu); flex: none; }
.geste b { display: block; font-size: 14px; }
.geste small { color: var(--faible); font-size: 12px; }

/* Barre de progression de la synchronisation */
.progression { height: 10px; border-radius: 6px; background: var(--carte-2); overflow: hidden; margin-top: 14px; }
.progression i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--bleu), var(--violet)); transition: width .3s; }
.progression.indefinie i { width: 35%; animation: va-vient 1.3s ease-in-out infinite; }
@keyframes va-vient { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

/* Annonces (liste admin) */
.ic-annonce { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: rgba(54,153,255,.13); color: var(--bleu); }
.ic-annonce.attention { background: rgba(255,168,0,.16); color: var(--orange); }
.ic-annonce svg { width: 20px; height: 20px; }
.liste .milieu .discret { display: block; }
.message-dem { display: inline-block; max-width: 260px; white-space: normal; }

/* Catalogue */
.cat-source { border-bottom: 1px solid var(--bord); }
.cat-source:last-child { border-bottom: 0; }
.cat-tete { display: flex; align-items: center; gap: 12px; padding: 14px 22px; background: var(--carte-2); cursor: pointer; }
.cat-tete .milieu, .cat-groupe .milieu { flex: 1; min-width: 0; }
.cat-tete .milieu b, .cat-tete .milieu .discret { display: block; }
.cat-groupes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 18px; padding: 6px 22px 12px; }
.cat-groupe { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--bord); cursor: pointer; }
.cat-groupe b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cat-groupe.interdit { opacity: .5; cursor: not-allowed; }
.choix-langues { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; }
.choix-langue { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; cursor: pointer; }
.choix-langue input { flex: none; accent-color: var(--bleu); }
.choix-langue small { margin-left: auto; color: var(--faible); font-size: 11px; }
.barre-action {
  position: sticky; bottom: 12px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--rayon); background: var(--carte); border: 1px solid var(--bord);
  box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; color: var(--texte-2);
}

@media (max-width: 900px) {
  .bandeaux { padding: 0 16px; }
  .bandeau { flex-wrap: wrap; margin-top: 12px; }
  .bandeau .btn { width: 100%; }
  .tete-actions { width: 100%; }
  .tete-actions .btn { flex: 1; }
  .tete-actions .btn .lib { display: none; }
  .segment { display: flex; width: 100%; }
  .segment button { flex: 1; justify-content: center; padding: 9px 6px; }
  .cat-tete { padding: 12px 16px; }
  .cat-groupes { padding: 4px 16px 10px; grid-template-columns: 1fr; }
  .barre-action .btn { width: 100%; }
  .lien-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .lien-ligne span { grid-column: 1 / -1; }
  .message-dem { max-width: 190px; text-align: right; }
  .liste-actions { flex-wrap: wrap; }
  .porte-liens { justify-content: center; }
}

/* Ligne du fournisseur : « écrans vendus » au-delà des connexions de la ligne. */
.alerte-ligne { color: var(--orange-2); font-weight: 600; }
/* Case « chaînes pour adultes » du dialogue de génération (décochée par défaut). */
.case-adultes { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--bord); border-radius: 8px; cursor: pointer; }
.case-adultes > span { min-width: 0; overflow-wrap: anywhere; }
.case-adultes b, .case-adultes .discret { display: block; }
/* Installation PWA. Panne payée : un simple raccourci web sans manifeste ni
   service worker n'est pas proposé comme application par Android/Chrome. */
.installer-app[hidden], .pwa-fond[hidden] { display: none !important; }
.pwa-fond { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(10,12,20,.72); backdrop-filter: blur(5px); }
.pwa-carte { width: min(460px, 100%); padding: 24px; border-radius: 18px; background: var(--carte, #fff); color: var(--texte, #202334); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.pwa-carte h2 { margin: 0 0 10px; font-size: 1.35rem; }
.pwa-carte p { margin: 0; line-height: 1.65; white-space: pre-line; }
.pwa-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (display-mode: standalone) { .installer-app { display: none !important; } }

