/* WiFi Business Manager v2 — style « Comptoir » (direction C validée le 04/12/2026).
   Polices embarquées : l'application fonctionne sans Internet. */
@font-face { font-family: 'Outfit'; src: url('fonts/outfit.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #18181B; --ink-2: #3F3F46; --muted: #52525B; --soft: #71717A; --line: #E4E4E7; --bg: #F4F4F5; --card: #FFFFFF;
  --yellow: #FACC15; --yellow-d: #EAB308; --green: #16A34A; --blue: #2563EB; --orange: #EA580C; --red: #DC2626;
  --radius: 20px; --shadow: 0 1px 2px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 Inter, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #4338CA; } a:hover { color: #3730A3; }
h1, h2, h3, .num-xl, .num-l, .num-m { font-family: Outfit, Inter, sans-serif; }
h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
h2 { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--muted); font-family: Inter, sans-serif; }
.sub { margin: 4px 0 0; color: var(--muted); }
svg.i { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Structure ---------- */
.layout { display: flex; flex-wrap: wrap; min-height: 100vh; }
nav.side { flex: 1 1 220px; max-width: 240px; background: var(--ink); display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; }
.logo { width: 46px; height: 46px; border-radius: 15px; background: var(--yellow); display: flex; align-items: center; justify-content: center; flex: none; color: var(--ink); }
.logo svg.i { width: 26px; height: 26px; stroke-width: 2.4; }
.brand b { display: block; font-family: Outfit, sans-serif; font-weight: 800; font-size: 17px; color: #fff; line-height: 1.1; }
.brand small { font-size: 12px; color: #A1A1AA; }
nav.side a.nav { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-size: 15px; font-weight: 600; color: #D4D4D8; }
nav.side a.nav:hover { background: #27272A; color: #fff; }
nav.side a.nav.on { background: var(--yellow); color: var(--ink); }
nav.side a.nav span { flex: 1; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #3F3F46; color: #E4E4E7; }
.badge.y { background: var(--yellow); color: var(--ink); }
nav.side a.nav.on .badge { background: var(--ink); color: #fff; }
.who { margin-top: auto; border-top: 1px solid #3F3F46; padding: 14px 6px 0; display: flex; align-items: center; gap: 10px; }
.who .av { width: 38px; height: 38px; border-radius: 12px; background: #3F3F46; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.who div { flex: 1; font-size: 13px; color: #E4E4E7; min-width: 0; } .who small { display: block; color: #A1A1AA; font-size: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #3F3F46; background: none; color: #E4E4E7; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #27272A; }
main { flex: 999 1 560px; min-width: 0; padding: 26px 30px 48px; display: flex; flex-direction: column; gap: 22px; }
header.top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }

/* ---------- Composants ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; } .row > * { flex: 1 1 320px; min-width: 0; }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #27272A; color: #fff; }
.btn.y { background: var(--yellow); color: var(--ink); } .btn.y:hover { background: var(--yellow-d); color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--ink); } .btn.ghost:hover { background: #FAFAFA; color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); border: 1px solid var(--line); } .btn.light:hover { background: #FAFAFA; color: var(--ink); }
.btn.danger { background: #fff; color: #B91C1C; border: 1px solid #FECACA; } .btn.danger:hover { background: #FEF2F2; color: #991B1B; }
.btn.small { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: wait; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select, textarea { height: 48px; padding: 0 14px; border: 1px solid #D4D4D8; border-radius: 12px; font: inherit; font-weight: 500; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 3px solid rgba(250, 204, 21, .5); border-color: var(--ink); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ink); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .form .full { grid-column: 1 / -1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill.ok { background: #DCFCE7; color: #166534; } .pill.off { background: #FEE2E2; color: #991B1B; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.alert { background: #FEF3C7; color: #78350F; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.info { background: #F4F4F5; color: var(--ink-2); padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.empty { color: var(--soft); padding: 18px 0; text-align: center; }

/* Tableaux */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--soft); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
td { padding: 12px 10px; border-bottom: 1px solid #F4F4F5; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td b.code { font-family: Outfit, sans-serif; letter-spacing: .05em; font-size: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.chip i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
.st { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.st.STOCK { background: #EDE9FE; color: #5B21B6; } .st.ASSIGNED { background: #DBEAFE; color: #1E40AF; } .st.ACTIVE { background: #DCFCE7; color: #166534; }
.st.VALID { background: #F4F4F5; color: #3F3F46; } .st.EXPIRED { background: #FFEDD5; color: #9A3412; } .st.DISABLED { background: #E4E4E7; color: #52525B; }

/* Tuiles de forfait */
.tile { border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 6px; color: #fff; }
.tile.light { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.tile .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .price { font-family: Outfit, sans-serif; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.tile .tag { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.22); }
.tile.light .tag { background: #F4F4F5; }
.tile .name { font-weight: 600; font-size: 15px; opacity: .95; }
.tile .cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.tile .cell { border-radius: 12px; padding: 8px 10px; background: rgba(0,0,0,.14); }
.tile.light .cell { background: #F4F4F5; }
.tile .cell small { display: block; font-size: 11px; opacity: .9; }
.tile .cell b { font-family: Outfit, sans-serif; font-size: 22px; font-weight: 700; }

/* Cartes agent */
.agent { background: #fff; border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; box-shadow: var(--shadow); }
.avatar { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-family: Outfit, sans-serif; font-weight: 800; font-size: 18px; color: #fff; flex: none; }
.agent .who-a { flex: 1 1 150px; } .agent .who-a b { font-size: 17px; } .agent .who-a div { font-size: 13px; color: var(--muted); }
.agent .due { text-align: right; } .agent .due b { font-family: Outfit, sans-serif; font-weight: 800; font-size: 26px; display: block; } .agent .due small { font-size: 12px; color: var(--muted); }

.num-xl { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.num-l { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.num-m { font-size: 22px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi small { display: block; color: var(--muted); font-size: 13px; } .kpi .num-l { margin-top: 4px; display: block; }
.progress { height: 14px; background: #F4F4F5; border-radius: 7px; overflow: hidden; } .progress div { height: 100%; border-radius: 7px; background: var(--green); }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.feed li span.w { color: var(--muted); flex: 1; } .feed li span.t { color: var(--soft); }
.seg { display: flex; background: #E4E4E7; border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
dl.sum { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 14px 0 0; } dl.sum dd { margin: 0; text-align: right; font-weight: 600; }
dl.sum .tot { font-family: Outfit, sans-serif; font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
dl.sum dd.tot { font-size: 30px; }
pre.code { background: var(--ink); color: #E4E4E7; padding: 14px; border-radius: 14px; overflow-x: auto; font-size: 13px; }

/* Connexion */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth .side-a { flex: 1 1 380px; background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.auth .side-a h1 { font-size: 44px; color: #fff; } .auth .side-a p { color: #A1A1AA; font-size: 16px; max-width: 420px; }
.auth .pts { display: flex; flex-direction: column; gap: 12px; }
.auth .pts div { display: flex; align-items: center; gap: 12px; color: #E4E4E7; } .auth .pts i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.auth .side-b { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; display: none; max-width: 90vw; z-index: 10; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
#toast.err { background: #B91C1C; }
dialog { border: 0; border-radius: 24px; padding: 0; width: min(580px, 94vw); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(24, 24, 27, .55); }
dialog form { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { font-size: 24px; margin: 0; }
dialog .actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Lot 2 (05/12) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grid-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-tiles.four { grid-template-columns: 1fr; } }
.grid-tiles.four .tile .price { font-size: 30px; }
.grid-tiles.four .tile .cell b { font-size: 20px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-h h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.logo.img { background: #fff; overflow: hidden; } .logo.img img { width: 100%; height: 100%; object-fit: contain; }
.btn.icon-only { width: 38px; padding: 0; }
.seg em { font-style: normal; font-size: 11px; background: rgba(0,0,0,.08); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.seg { flex-wrap: wrap; }
.tag-s { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #F4F4F5; color: #52525B; white-space: nowrap; }
.tag-s svg.i { width: 13px; height: 13px; }
.tag-s.ok { background: #DCFCE7; color: #166534; } .tag-s.warn { background: #FEF3C7; color: #92400E; } .tag-s.off { background: #FEE2E2; color: #991B1B; }

/* Graphiques */
.chart { min-height: 120px; }
.chart svg text { font-family: Inter, sans-serif; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.legend.col { flex-direction: column; gap: 10px; margin: 0; flex: 1; min-width: 0; }
.legend.col span { display: grid; grid-template-columns: 11px 1fr auto 42px; gap: 8px; align-items: center; }
.legend.col b { font-variant-numeric: tabular-nums; } .legend.col small { color: var(--soft); text-align: right; }
.chart-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 13px; min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: none; }
.chart-tip strong { display: block; margin-bottom: 6px; font-family: Outfit, sans-serif; text-transform: capitalize; }
.chart-tip div { display: flex; align-items: center; gap: 8px; } .chart-tip div b { margin-left: auto; padding-left: 14px; }
.chart-tip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-tip .tot { border-top: 1px solid #3F3F46; margin-top: 6px; padding-top: 6px; }
.donut { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rank { display: flex; flex-direction: column; gap: 12px; }
.rk { display: grid; grid-template-columns: minmax(130px, 1.1fr) 2fr auto; gap: 14px; align-items: center; }
.rk-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rk-t { min-width: 0; display: flex; flex-direction: column; }
.rk-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rk-t small { color: var(--soft); font-size: 12px; }
.rk-n { width: 24px; height: 24px; border-radius: 8px; background: #F4F4F5; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.rk:first-child .rk-n { background: var(--yellow); }
.rk-bar svg { width: 100%; height: 14px; display: block; border-radius: 0 4px 4px 0; }
.rk-v { font-family: Outfit, sans-serif; font-weight: 700; font-size: 16px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Lots */
.lots { display: flex; flex-direction: column; }
.lot { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(140px, 1fr) minmax(150px, 1fr) minmax(190px, 1.4fr) auto; gap: 16px; align-items: center; padding: 14px 4px; border-top: 1px solid #F4F4F5; }
.lot:first-child { border-top: 0; }
.lot-id b { font-family: Outfit, sans-serif; font-size: 18px; } .lot-id small { display: block; color: var(--soft); font-size: 12px; margin-bottom: 4px; }
.lot-agent select { height: 42px; width: 100%; }
.lot-prog .lp-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.lot-prog .lp-top b { color: var(--ink); font-family: Outfit, sans-serif; font-size: 16px; }
.bar { height: 8px; background: #F4F4F5; border-radius: 4px; overflow: hidden; } .bar div { height: 100%; border-radius: 4px; }
.lot-act { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 1100px) { .lot { grid-template-columns: 1fr 1fr; } .lot-act { justify-content: flex-start; } }

/* Défauts */
.defects { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.defect { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.defect:disabled { cursor: default; opacity: .65; }
.defect .d-ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 11px; background: #F4F4F5; display: flex; align-items: center; justify-content: center; color: var(--soft); }
.defect b { font-family: Outfit, sans-serif; font-size: 24px; line-height: 1.1; } .defect .d-l { font-weight: 700; font-size: 14px; }
.defect small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin-top: 6px; }
.defect.bad .d-ic { background: #FEF3C7; color: #B45309; } .defect.bad { border-color: #FDE68A; }
.defect.on { border: 2px solid var(--ink); background: #FFFBEB; }

/* Forfaits : actions sur la tuile */
.tile.off { opacity: .75; }
.tile-act { display: flex; gap: 6px; margin-top: 10px; }
.tile-act .tb { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 0; border-radius: 11px; background: rgba(255,255,255,.2); color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tile-act .tb:last-child { flex: 0 0 40px; }
.tile-act .tb:hover { background: rgba(255,255,255,.32); }
.tile.light .tile-act .tb { background: #F4F4F5; } .tile.light .tile-act .tb:hover { background: #E4E4E7; }
.tile-act svg.i { width: 16px; height: 16px; }

/* Agents */
.agent-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.agent-box .agent { box-shadow: none; }
.agent-box.off { opacity: .7; }
.ag-act { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; justify-content: flex-end; }
.ag-act svg.i { width: 17px; height: 17px; }
[aria-expanded="true"] svg.i { transform: rotate(90deg); }
.ag-detail { border-top: 1px solid var(--line); padding: 18px; }
.det-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; } .det-grid .full { grid-column: 1 / -1; }
@media (max-width: 1000px) { .det-grid { grid-template-columns: 1fr; } }
tr.tot td { font-weight: 700; border-top: 1px solid var(--line); }
.codes-h { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; } .codes-h small { color: var(--soft); }
.codes { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow-y: auto; }
.codes span { font-family: Outfit, sans-serif; font-weight: 600; letter-spacing: .04em; font-size: 13px; background: #F4F4F5; border-radius: 8px; padding: 4px 8px; }
.best { display: flex; gap: 16px; align-items: center; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; border-radius: 22px; }

/* Routeur, finances */
.tile-k { background: #F4F4F5; border-radius: 16px; padding: 14px 16px; } .tile-k small:last-child { color: var(--muted); }
.incidents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.incidents li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.month-nav { display: flex; align-items: center; gap: 10px; } .month-nav b { font-family: Outfit, sans-serif; font-size: 18px; text-transform: capitalize; min-width: 150px; text-align: center; }
.kpi.neg .num-l { color: #B91C1C; }

/* Connexion / inscription */
.auth2 { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--bg); }
.hero { flex: 1.15 1 480px; position: relative; overflow: hidden; background: #0C0C0E; color: #fff; padding: 36px 52px 32px; display: flex; flex-direction: column; justify-content: flex-start; gap: 28px; min-height: 100vh; }
.hero .glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none; }
.hero .g1 { width: 520px; height: 520px; background: #FACC15; top: -220px; right: -160px; opacity: .28; animation: drift 14s ease-in-out infinite alternate; }
.hero .g2 { width: 460px; height: 460px; background: #2563EB; bottom: -220px; left: -140px; opacity: .3; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
.hero > * { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #FDE68A; background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.3); padding: 6px 12px; border-radius: 999px; }
.eyebrow svg.i { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(36px, 3.8vw, 54px); line-height: 1.02; color: #fff; margin: 14px 0 12px; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: #FACC15; }
.hero-mid p { color: #A1A1AA; font-size: 17px; max-width: 520px; margin: 0; }
.hero-stage { position: relative; height: 215px; margin-top: 26px; max-width: 560px; }
.hero-ticket { position: absolute; width: 230px; background: #fff; color: #111; border-radius: 14px; padding: 10px 12px; box-shadow: 0 24px 50px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 7px; }
.hero-ticket.a { left: 0; top: 40px; transform: rotate(-8deg); animation: float 6s ease-in-out infinite; }
.hero-ticket.b { left: 170px; top: 0; transform: rotate(5deg); animation: float 7s ease-in-out -2s infinite; z-index: 2; }
.hero-ticket.c { left: 320px; top: 70px; transform: rotate(-3deg); animation: float 6.5s ease-in-out -4s infinite; }
@keyframes float { 50% { translate: 0 -10px; } }
.ht-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.ht-logo { width: 20px; height: 20px; border-radius: 6px; background: #0B1BD9; color: #fff; display: flex; align-items: center; justify-content: center; } .ht-logo svg.i { width: 13px; height: 13px; }
.ht-c { color: #fff; font-family: Outfit, sans-serif; font-weight: 800; font-size: 22px; letter-spacing: .08em; text-align: center; border-radius: 8px; padding: 4px; }
.ht-f { display: flex; justify-content: space-between; font-size: 12px; }
.hero-chip { position: absolute; display: flex; align-items: center; gap: 10px; background: rgba(39,39,42,.85); backdrop-filter: blur(10px); border: 1px solid #3F3F46; color: #fff; border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 600; z-index: 3; }
.hero-chip small { color: #A1A1AA; font-weight: 500; display: block; }
.hero-chip.c1 { left: 40px; bottom: -6px; flex-wrap: wrap; max-width: 250px; } .hero-chip.c1 small { width: 100%; padding-left: 19px; margin-top: -6px; }
.hero-chip.c2 { right: 0; top: -14px; flex-direction: column; align-items: flex-start; gap: 0; } .hero-chip.c2 b { font-family: Outfit, sans-serif; font-size: 22px; color: #FACC15; } .hero-chip.c2 svg.i { color: #4ADE80; }
.hero-pts { display: flex; gap: 34px; flex-wrap: wrap; border-top: 1px solid #27272A; padding-top: 20px; margin-top: 8px; }
.hero-pts b { font-family: Outfit, sans-serif; font-size: 28px; display: block; } .hero-pts small { color: #A1A1AA; }
.auth-side { flex: 1 1 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; gap: 18px; }
.auth-card { width: min(500px, 100%); background: #fff; border-radius: 28px; padding: 28px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 50px rgba(24,24,27,.08); display: flex; flex-direction: column; gap: 20px; }
.auth-form[hidden] { display: none; }
.auth-form { display: flex; flex-direction: column; gap: 16px; } .auth-form h2 { font-size: 26px; margin: 0; }
.seg.big { padding: 4px; } .seg.big button { flex: 1; font-size: 15px; padding: 12px; }
.btn.big { height: 58px; font-size: 16px; }
.sub.small, p.small { font-size: 13px; }
.pw { position: relative; display: block; } .pw input { width: 100%; padding-right: 74px; }
.pw-eye { position: absolute; right: 6px; top: 6px; height: 36px; border: 0; background: #F4F4F5; border-radius: 9px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.logo-pick { display: flex; gap: 16px; align-items: center; }
.logo-drop { width: 92px; height: 92px; border-radius: 22px; border: 2px dashed #D4D4D8; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; flex: none; background: #FAFAFA; }
.logo-drop:hover { border-color: var(--ink); } .logo-drop img { width: 100%; height: 100%; object-fit: contain; }
.logo-drop span { display: flex; flex-direction: column; align-items: center; color: var(--soft); gap: 2px; }
.auth-foot { color: var(--soft); font-size: 12px; margin: 0; }
@media (max-width: 900px) { .hero-stage { display: none; } .hero { padding: 30px; } }

@media (max-width: 760px) {
  nav.side { max-width: none; flex-basis: 100%; height: auto; position: static; }
  main { padding: 18px; } .form { grid-template-columns: 1fr; } h1 { font-size: 28px; }
  .auth .side-a { padding: 28px; }
}
/* Volet gauche fixe pendant que le formulaire d'inscription défile */
@media (min-width: 900px) { .auth2 .hero { position: sticky; top: 0; height: 100vh; align-self: flex-start; } }

/* Connexion : tout tient dans la hauteur d'un écran de portable (05/12) */
.auth2 .hero { padding: 26px 48px 24px; gap: 18px; }
.auth2 .hero h1 { font-size: min(3.7vw, 6.4vh); margin: 10px 0 10px; }
.auth2 .hero-mid p { font-size: min(16px, 2.1vh); }
.auth2 .hero-stage { margin-top: 18px; height: 205px; }
.auth2 .hero-pts b { font-size: 24px; } .auth2 .hero-pts { padding-top: 14px; margin-top: auto; }
@media (max-height: 860px) { .auth2 .hero-stage { transform: scale(.82); transform-origin: left top; height: 170px; margin-bottom: -6px; } }
@media (max-height: 720px) { .auth2 .hero-stage { transform: scale(.66); height: 138px; } }
.auth-side { padding: 20px 32px; gap: 10px; }
.auth-card { padding: 22px 26px; gap: 14px; }
.auth-form.compact { gap: 12px; }
.auth-form.compact .form { gap: 10px 14px; }
.auth-form.compact input { height: 42px; }
.auth-form.compact label { gap: 4px; }
.auth-form.compact h2 { font-size: 21px; }
.signup-h { display: flex; gap: 14px; align-items: center; }
.logo-drop.sm { width: 62px; height: 62px; border-radius: 16px; }
.logo-drop.sm small { font-size: 11px; }
label.link { display: inline; color: #4338CA; text-decoration: underline; cursor: pointer; font-size: inherit; font-weight: 600; }

/* Comptoir (05/12) : 4 forfaits par ligne même sur un portable, légende du cercle contenue */
.grid-tiles.four { gap: 14px; }
.grid-tiles.four .tile { padding: 16px; min-width: 0; }
.grid-tiles.four .tile .top { gap: 8px; flex-wrap: wrap; }
.grid-tiles.four .tile .price { font-size: clamp(22px, 1.9vw, 30px); }
.grid-tiles.four .tile .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-tiles.four .tile .cells { gap: 6px; }
.grid-tiles.four .tile .cell { min-width: 0; padding: 8px; }
.grid-tiles.four .tile .cell small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.grid-tiles.four .tile .cell b { font-size: clamp(16px, 1.3vw, 20px); }
.days-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.days-sum > div { background: #F7F7F8; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.days-sum small { color: var(--soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.days-sum b { font-family: Outfit, sans-serif; font-size: 20px; }
.days-sum .up { color: #15803D; font-weight: 600; } .days-sum .down { color: #B91C1C; font-weight: 600; }
.donut { justify-content: center; }
.donut svg { flex: none; }
.legend.col { min-width: 180px; }
.legend.col span { grid-template-columns: 11px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; }
.legend.col span > i { grid-row: 1 / 3; align-self: center; }
.legend.col span > b { grid-column: 3; grid-row: 1; text-align: right; white-space: nowrap; }
.legend.col span > small { grid-column: 3; grid-row: 2; text-align: right; }
.days-sum small.up, .days-sum small.down { white-space: normal; }

/* Choix de la couleur d'un forfait */
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.swatches legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.swatches label { flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatches span { width: 34px; height: 34px; border-radius: 10px; display: block; border: 3px solid #fff; box-shadow: 0 0 0 1px #D4D4D8; }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid rgba(250, 204, 21, .6); }
.swatches small { font-size: 11px; font-weight: 500; color: var(--soft); }
.tile-act .tb { min-width: 0; padding: 0 6px; white-space: nowrap; overflow: hidden; }
.tile-act .tb:last-child { flex: 0 0 36px; padding: 0; }
@media (max-width: 1400px) { .grid-tiles.four .tile-act .tb svg.i { display: none; } .grid-tiles.four .tile-act .tb:last-child svg.i { display: inline; } }

/* Ligne de lot : rien ne dépasse de la carte, quelle que soit la largeur */
.lot { grid-template-columns: minmax(120px, 1fr) minmax(110px, 1fr) minmax(120px, 1fr) minmax(150px, 1.4fr) auto; gap: 14px; }
.lot > * { min-width: 0; }
.lot-plan { overflow-wrap: anywhere; }
.lot-act .btn { padding: 0 14px; }
@media (max-width: 1100px) { .lot { grid-template-columns: 1fr 1fr; } }

/* Volume de données d'un forfait */
.data-field { display: flex; flex-direction: column; gap: 8px; }
.gb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gb-chips button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #D4D4D8; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.gb-chips button:hover { background: #F4F4F5; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 20px; height: 20px; flex: none; }
.lot-held { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid #F4F4F5; }
.lot-held:first-of-type { border-top: 0; } .lot-held .num { font-family: Outfit, sans-serif; font-size: 16px; min-width: 40px; text-align: right; }
.det-grid td.ok-t { color: #15803D; } .det-grid td.warn-t b { color: #B45309; } .det-grid td small { color: var(--soft); font-weight: 500; }
.scroll-x { overflow-x: auto; }
.det-grid .lot-held { max-width: 640px; }

.used-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 10px; margin-bottom: 10px; }
.used-sum > div { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.used-sum .warn { background: #FFFBEB; } .used-sum .ok { background: #F0FDF4; }
.used-sum b { font-family: Outfit, sans-serif; font-size: 20px; } .used-sum small { color: var(--soft); font-size: 12px; }

/* Ventes déclarées */
.decl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.decl-t { border: 1.5px solid var(--line, #E4E4E7); border-top: 5px solid var(--c); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; transition: box-shadow .15s, border-color .15s; }
.decl-t.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.decl-t .dt-h { display: flex; align-items: baseline; gap: 8px; } .decl-t .dt-h b { font-family: Outfit, sans-serif; font-size: 22px; } .decl-t .dt-h span { color: var(--muted); font-weight: 600; font-size: 13px; }
.decl-t small { color: var(--soft); font-size: 12px; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: #F4F4F5; border-radius: 12px; padding: 4px; margin-top: 4px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #fff; font-size: 22px; font-weight: 700; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.stepper button:disabled { opacity: .35; cursor: default; box-shadow: none; }
.stepper output { font-family: Outfit, sans-serif; font-size: 22px; font-weight: 700; min-width: 40px; text-align: center; }
.decl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed #E4E4E7; padding-top: 12px; }
.decl-foot #decl-sum { color: var(--muted); }
.decl-foot .btn { min-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tk { height: 12px; width: auto; vertical-align: -1px; } .tk1 { color: #A1A1AA; } .tk2 { color: #34B7F1; }
.legend-tk { display: flex; gap: 16px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.sold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sold-col { border-radius: 14px; background: #FAFAFA; border-left: 5px solid var(--c); padding: 10px 12px; min-width: 0; }
.sc-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; } .sc-h small { color: var(--soft); font-size: 12px; }
.sc-pend { background: #fff; border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.sc-pend b { color: var(--ink); }
.sc-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.sc-list li { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px solid #F0F0F0; font-size: 13px; }
.sc-list .code { font-family: Outfit, sans-serif; letter-spacing: .05em; } .sc-list .t { color: var(--soft); margin-left: auto; font-size: 12px; white-space: nowrap; }
.sc-list .tag-s { font-size: 11px; }
.code.pend { color: var(--muted); font-weight: 600; font-family: inherit !important; letter-spacing: 0 !important; }
.ag-alerts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .ag-alerts .tag-s { font-size: 11px; }
.sc-h { gap: 8px; } .sc-h b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sc-h small { white-space: nowrap; flex: none; }

/* Déclaration rapide dans les tuiles du comptoir (agent) */
.tile-decl { display: flex; gap: 8px; margin-top: 10px; }
.td-step { flex: 1; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.18); border-radius: 12px; padding: 3px; }
.td-step button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #fff; color: #18181B; font-size: 20px; font-weight: 800; cursor: pointer; }
.td-step button:disabled { opacity: .4; cursor: default; }
.td-step output { color: #fff; font-family: Outfit, sans-serif; font-size: 20px; font-weight: 700; min-width: 28px; text-align: center; }
.td-go { border: 0; border-radius: 12px; background: #18181B; color: #fff; font: inherit; font-weight: 700; font-size: 14px; padding: 0 14px; cursor: pointer; white-space: nowrap; }
.td-go:disabled { background: rgba(0,0,0,.25); color: rgba(255,255,255,.75); cursor: default; }

/* Portail client */
.pt-themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 6px 0 18px; }
.pt-theme { border: 2px solid #E4E4E7; background: #fff; border-radius: 18px; padding: 8px 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; align-items: stretch; font: inherit; color: var(--ink); }
.pt-theme.on { border-color: var(--ink); box-shadow: 0 0 0 3px #FACC15; }
.pt-theme b { display: flex; align-items: center; gap: 7px; font-size: 14px; justify-content: center; } .pt-theme b i { width: 12px; height: 12px; border-radius: 4px; }
.pt-mini { position: relative; width: 100%; aspect-ratio: 9 / 15; border-radius: 12px; overflow: hidden; background: #F4F4F5; }
.pt-mini iframe { position: absolute; left: 0; top: 0; width: 375px; height: 625px; border: 0; transform-origin: 0 0; transform: scale(var(--k, .4)); pointer-events: none; }
.pt-main { display: flex; gap: 22px; flex-wrap: wrap; }
.pt-prev { flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pt-prev select { height: 38px; border-radius: 11px; border: 1.5px solid #E4E4E7; padding: 0 10px; font: inherit; }
.pt-phone { width: 330px; height: 640px; border-radius: 40px; background: #0B0B0E; padding: 10px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); }
.pt-phone iframe { width: 100%; height: 100%; border: 0; border-radius: 31px; background: #fff; }
.pt-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.pt-side label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.pt-side input { height: 44px; border-radius: 12px; border: 1.5px solid #E4E4E7; padding: 0 12px; font: inherit; }
.pt-side h3 { margin: 0; } .pt-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; max-width: 360px; }
@media (max-width: 1100px) { .pt-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Bouton « Installer l'app » */
nav.side button.nav.inst { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; color: var(--yellow); background: none; border: 1.5px dashed #52525B; cursor: pointer; margin-top: 10px; }
nav.side button.nav.inst[hidden] { display: none; }
/* Téléphone : menu en barre fixe en bas de l'écran, comme une application */
@media (max-width: 760px) {
  nav.side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; height: auto; max-width: none; flex-direction: row; gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; border-top: 1px solid #27272A; }
  nav.side .brand { display: none; }
  nav.side a.nav, nav.side button.nav.inst { flex: 1 0 74px; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 4px 6px; font-size: 11px; text-align: center; border-radius: 12px; margin: 0; }
  nav.side a.nav span { flex: none; } nav.side a.nav .badge { position: absolute; transform: translate(14px, -16px); font-size: 10px; padding: 1px 6px; }
  nav.side a.nav { position: relative; }
  nav.side button.nav.inst { border-width: 1px; }
  .who { margin: 0; border: 0; padding: 0 4px; flex: 0 0 auto; } .who .av, .who div { display: none; }
  main { padding: 16px 14px 96px; width: 100%; }
  header.top h1 { font-size: 26px; }
}

/* ---------- Téléphone : cartes compactes et lisibles ---------- */
td.num { white-space: nowrap; }
.ag-stats { display: contents; }
@media (max-width: 760px) {
  .card { padding: 16px; border-radius: 18px; }
  h2 { font-size: 19px; }
  .row { gap: 14px; }
  /* Tuiles des forfaits */
  .tile { padding: 14px 14px 12px; border-radius: 20px; gap: 4px; }
  .tile .price { font-size: 28px; }
  .tile .name { font-size: 14px; }
  .tile .cells { gap: 6px; margin-top: 4px; }
  .tile .cell { padding: 6px 9px; } .tile .cell b { font-size: 18px; } .tile .cell small { font-size: 10.5px; }
  .tile-decl { margin-top: 8px; } .td-step button { width: 38px; height: 38px; }
  .grid-tiles.four { gap: 12px; }
  /* Chiffres clés : 3 petites cases côte à côte */
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpis .kpi { padding: 12px 10px; border-radius: 16px; }
  .kpis .kpi small { font-size: 11px; line-height: 1.25; }
  .kpis .kpi .num-l { font-size: 20px; }
  .kpis .kpi small:last-child:not(:first-child) { margin-top: 2px; }
  .days-sum { gap: 6px; } .days-sum > div { padding: 8px; } .days-sum b { font-size: 16px; } .days-sum small { font-size: 10.5px; }
  /* Fil des ventes */
  .feed li { font-size: 13px; gap: 8px; } .feed li span.w { font-size: 12px; } .feed li span.t { font-size: 12px; }
  .num-xl { font-size: 38px; }
  /* Fiches agents */
  .agent-box .agent { display: grid; grid-template-columns: 46px 1fr; gap: 10px 12px; padding: 14px; }
  .agent-box .agent .who-a { grid-column: 2; }
  .agent-box .agent .due { text-align: left; background: #F4F4F5; border-radius: 12px; padding: 8px 10px; }
  .agent-box .agent .due b { font-size: 20px; } .agent-box .agent .due small { font-size: 11px; }
  .ag-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ag-act { grid-column: 1 / -1; display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; }
  .ag-act .btn { width: 100%; justify-content: center; padding: 0 8px; }
  .ag-act .btn.y { grid-column: 1 / -1; }
  /* Lots */
  .lot { grid-template-columns: 1fr 1fr !important; gap: 10px; padding: 12px 0; }
  .lot-id, .lot-plan { grid-column: span 1; } .lot-agent { grid-column: 1 / -1; order: 4; } .lot-prog { grid-column: 1 / -1; order: 3; }
  .lot-act { grid-column: 1 / -1; order: 5; justify-content: stretch; } .lot-act .btn { flex: 1; justify-content: center; }
  /* Tableaux « stack » : une carte par ligne */
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px; margin-bottom: 10px; background: #FAFAFA; border-radius: 14px; }
  table.stack td { display: flex; flex-direction: column; gap: 1px; padding: 0; border: 0; text-align: left !important; font-size: 14px; }
  table.stack td[data-l]::before { content: attr(data-l); font-size: 11px; color: var(--soft); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  table.stack td.st-h { grid-column: 1 / -1; font-weight: 700; }
  table.stack td.st-act:empty { display: none; } table.stack td.st-act, table.stack td:last-child:not([data-l]) { grid-column: 1 / -1; align-items: flex-start; }
  table.stack td .chips { gap: 2px 10px; }
  .scroll:has(table.stack) { overflow: visible; }
  /* Tableaux ordinaires : plus serrés */
  th { padding: 8px 6px; font-size: 11px; } td { padding: 10px 6px; font-size: 14px; }
}
