/* =========================================================
   LAM TRA SERVICES — interface (mobile d'abord)
   Conçu par Zanga Global Services
   ========================================================= */
:root {
    --primaire: #0040c1;
    --primaire-fonce: #00359e;
    --primaire-doux: #eaf0fd;
    --depot: #0e9f6e;
    --depot-doux: #e7f7f0;
    --depot-fonce: #057a55;
    --retrait: #e02d3c;
    --retrait-doux: #fdecee;
    --retrait-fonce: #b91c2a;
    --attente: #c27803;
    --attente-doux: #fdf6e3;
    --texte: #0f172a;
    --texte-2: #475569;
    --texte-3: #94a3b8;
    --bord: #e6e9f0;
    --bord-fort: #cfd5e1;
    --fond: #f5f7fb;
    --surface: #ffffff;
    --ombre: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
    --ombre-forte: 0 12px 40px rgba(15, 23, 42, .16);
    --r: 14px;
    --r-petit: 10px;
    --sidebar: 264px;
    --sidebar-reduite: 76px;
    --topbar: 64px;
    --police: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--police); font-size: 15px; line-height: 1.5; color: var(--texte); background: var(--fond); -webkit-font-smoothing: antialiased; }
a { color: var(--primaire); text-decoration: none; }
a:hover { color: var(--primaire-fonce); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.4rem; font-weight: 800; }
h2 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
.icon { flex-shrink: 0; display: block; }
.muet { color: var(--texte-2); }
.petit { font-size: .85rem; }
.nombre { font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(0, 64, 193, .35); outline-offset: 2px; }

/* ---------------- Structure ---------------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(var(--sidebar), 86vw);
    background: var(--surface); border-right: 1px solid var(--bord);
    display: flex; flex-direction: column;
    transform: translateX(-100%); transition: transform .25s ease, width .25s ease;
}
.sidebar-ouverte .sidebar { transform: none; box-shadow: var(--ombre-forte); }
.voile { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sidebar-ouverte .voile { opacity: 1; pointer-events: auto; }

.marque { height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--bord); flex-shrink: 0; }
.marque-logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--primaire), var(--primaire-fonce)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; letter-spacing: .5px; flex-shrink: 0; }
.marque-texte { overflow: hidden; white-space: nowrap; min-width: 0; }
.marque-texte strong, .marque-texte span { overflow: hidden; text-overflow: ellipsis; }
.marque-texte strong { display: block; font-size: .98rem; font-weight: 800; }
.marque-texte span { display: block; font-size: .75rem; color: var(--texte-2); }
.sidebar-fermer { margin-left: auto; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-titre { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--texte-3); padding: 16px 12px 6px; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-petit); color: var(--texte-2); font-weight: 600; font-size: .94rem; white-space: nowrap; position: relative; }
.nav a:hover { background: var(--fond); color: var(--texte); }
.nav a.actif { background: var(--primaire-doux); color: var(--primaire); }
.nav a.actif::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primaire); }
.nav .pastille { margin-left: auto; background: var(--attente); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.sidebar-pied { padding: 14px 18px; border-top: 1px solid var(--bord); font-size: .72rem; color: var(--texte-3); white-space: nowrap; overflow: hidden; }
.sidebar-pied strong { color: var(--texte-2); }

.principal { min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .25s ease; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--bord); display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.topbar-titre { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-droite { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.contenu { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px 16px 32px; }
.pied { text-align: center; font-size: .75rem; color: var(--texte-3); padding: 18px 16px 24px; }
.pied a { color: var(--texte-2); font-weight: 600; }

/* ---------------- Boutons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--r-petit); border: 1px solid transparent; background: var(--primaire); color: #fff; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; text-decoration: none; }
.btn:hover { background: var(--primaire-fonce); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-depot { background: var(--depot); } .btn-depot:hover { background: var(--depot-fonce); }
.btn-retrait { background: var(--retrait); } .btn-retrait:hover { background: var(--retrait-fonce); }
.btn-clair { background: var(--surface); color: var(--texte); border-color: var(--bord-fort); }
.btn-clair:hover { background: var(--fond); color: var(--texte); }
.btn-danger-clair { background: var(--surface); color: var(--retrait); border-color: #f5c2c7; }
.btn-danger-clair:hover { background: var(--retrait-doux); color: var(--retrait-fonce); }
.btn-fantome { background: transparent; color: var(--texte-2); }
.btn-fantome:hover { background: var(--fond); color: var(--texte); }
.btn-icone { width: 42px; padding: 0; }
.btn-petit { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-petit.btn-icone { width: 34px; }
.btn-grand { min-height: 52px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-bloc { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cache-sm { display: none; }

/* ---------------- Profil (menu déroulant) ---------------- */
.menu-deroulant { position: relative; }
.profil-bouton { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid transparent; background: none; cursor: pointer; font: inherit; color: var(--texte); }
.profil-bouton:hover, .menu-deroulant.ouvert .profil-bouton { background: var(--fond); border-color: var(--bord); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primaire-doux); color: var(--primaire); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.profil-texte { display: none; text-align: left; line-height: 1.2; }
.profil-texte strong { display: block; font-size: .88rem; }
.profil-texte span { font-size: .75rem; color: var(--texte-2); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre-forte); padding: 6px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 60; }
.menu-deroulant.ouvert .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu-entete { padding: 10px 12px 12px; border-bottom: 1px solid var(--bord); margin-bottom: 6px; }
.menu-entete strong { display: block; }
.menu-entete span { font-size: .8rem; color: var(--texte-2); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; border: 0; background: none; font: inherit; font-size: .92rem; font-weight: 600; color: var(--texte); cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--fond); }
.menu .danger { color: var(--retrait); }
.menu .danger:hover { background: var(--retrait-doux); }
.menu-op a { padding: 12px; }
.menu-op .rond { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.menu-op small { display: block; font-weight: 500; color: var(--texte-2); font-size: .78rem; }

/* ---------------- En-tête de page ---------------- */
.entete { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.entete-texte p { color: var(--texte-2); margin-top: 4px; }
.fil { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--texte-2); margin-bottom: 8px; }
.fil:hover { color: var(--primaire); }

/* ---------------- Cartes ---------------- */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre); margin-bottom: 16px; }
.carte-corps { padding: 18px; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--bord); }
.carte-tete h2 { display: flex; align-items: center; gap: 10px; }
.grille { display: grid; gap: 12px; }
.g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
.g-stats { grid-template-columns: repeat(2, 1fr); }

/* Indicateurs */
.stat { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); padding: 14px; box-shadow: var(--ombre); min-width: 0; }
.stat-tete { display: flex; align-items: center; gap: 10px; color: var(--texte-2); font-size: .8rem; font-weight: 600; }
.stat-icone { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.stat-valeur { font-size: 1.12rem; font-weight: 800; margin-top: 10px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-valeur small { font-size: .7em; font-weight: 700; color: var(--texte-2); }
.stat-detail { font-size: .78rem; color: var(--texte-3); margin-top: 2px; }
.ton-depot { background: var(--depot-doux); color: var(--depot); }
.ton-retrait { background: var(--retrait-doux); color: var(--retrait); }
.ton-primaire { background: var(--primaire-doux); color: var(--primaire); }
.ton-attente { background: var(--attente-doux); color: var(--attente); }
.negatif { color: var(--retrait); }

/* Grandes tuiles d'action */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tuile { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r); color: #fff; text-decoration: none; position: relative; overflow: hidden; box-shadow: var(--ombre); transition: transform .15s, box-shadow .15s; }
.tuile:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 42, .14); }
.tuile-depot { background: linear-gradient(135deg, #12b07c, var(--depot-fonce)); }
.tuile-retrait { background: linear-gradient(135deg, #f0444f, var(--retrait-fonce)); }
.tuile-icone { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.tuile strong { font-size: 1.05rem; display: block; }
.tuile small { font-size: .8rem; opacity: .9; display: none; }
.tuile::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .08); }

/* ---------------- Alertes ---------------- */
.alerte { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-petit); margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alerte .icon { margin-top: 1px; }
.alerte ul { margin: 0; padding-left: 18px; }
.alerte-succes { background: var(--depot-doux); color: var(--depot-fonce); border-color: #bfe8d6; }
.alerte-erreur { background: var(--retrait-doux); color: var(--retrait-fonce); border-color: #f7c7cc; }
.alerte-attente { background: var(--attente-doux); color: #8a5a00; border-color: #f3e1b0; }
.alerte-info { background: var(--primaire-doux); color: var(--primaire-fonce); border-color: #cddbfa; }

/* ---------------- Badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; white-space: nowrap; line-height: 1.4; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-depot, .badge-validee { background: var(--depot-doux); color: var(--depot-fonce); }
.badge-retrait, .badge-annulee { background: var(--retrait-doux); color: var(--retrait-fonce); }
.badge-en_attente { background: var(--attente-doux); color: #8a5a00; }
.badge-neutre { background: #eef1f6; color: var(--texte-2); }

/* ---------------- Listes d'opérations (cartes sur mobile, tableau sur grand écran) ---------------- */
.liste { list-style: none; margin: 0; padding: 0; }
.ligne-op { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--bord); color: inherit; text-decoration: none; }
.ligne-op:last-child { border-bottom: 0; }
.ligne-op:hover { background: #fafbfd; color: inherit; }
.ligne-op .rond { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.ligne-op .qui { min-width: 0; }
.ligne-op .qui strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-op .qui span { display: block; font-size: .8rem; color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-op .combien { text-align: right; }
.ligne-op .combien strong { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ligne-op .combien .badge { margin-top: 4px; }
.ligne-op.annulee .qui strong, .ligne-op.annulee .combien strong { text-decoration: line-through; color: var(--texte-3); }
.montant-depot { color: var(--depot-fonce); }
.montant-retrait { color: var(--retrait-fonce); }
.vide { padding: 40px 18px; text-align: center; color: var(--texte-2); }
.vide .icon { margin: 0 auto 10px; color: var(--texte-3); }

/* Tableau classique (utilisé à partir de la tablette) */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--bord); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); font-weight: 700; background: #fafbfd; white-space: nowrap; }
tbody tr:hover { background: #fafbfd; }
td.d, th.d { text-align: right; }
tfoot td { font-weight: 800; background: #fafbfd; }

/* Tableau → cartes sur mobile */
@media (max-width: 767px) {
    .tableau-cartes thead { display: none; }
    .tableau-cartes, .tableau-cartes tbody, .tableau-cartes tr, .tableau-cartes td { display: block; width: 100%; }
    .tableau-cartes tr { padding: 12px 16px; border-bottom: 1px solid var(--bord); }
    .tableau-cartes td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .tableau-cartes td::before { content: attr(data-label); color: var(--texte-2); font-size: .82rem; text-align: left; }
    .tableau-cartes td.titre { font-size: 1rem; text-align: left; }
    .tableau-cartes td.titre::before, .tableau-cartes td.actions-cell::before { display: none; }
    .tableau-cartes td.actions-cell { justify-content: flex-start; padding-top: 8px; }
    .tableau-cartes tfoot { display: block; }
    .tableau-cartes tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; }
    .tableau-cartes tfoot td:empty { display: none; }
}

/* ---------------- Formulaires ---------------- */
.champ { margin-bottom: 16px; }
.champ:last-child { margin-bottom: 0; }
.champ > label, .label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.champ .aide { font-size: .8rem; color: var(--texte-2); margin-top: 6px; }
.requis { color: var(--retrait); }
.saisie { position: relative; }
.saisie .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--texte-3); pointer-events: none; }
.saisie input[type] { padding-left: 42px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=search], select, textarea {
    width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--bord-fort); border-radius: var(--r-petit);
    font: inherit; font-size: 16px; color: var(--texte); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--texte-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primaire); box-shadow: 0 0 0 4px rgba(0, 64, 193, .12); }
.invalide { border-color: var(--retrait) !important; }
.erreur { color: var(--retrait); font-size: .82rem; margin-top: 6px; font-weight: 600; }
.case { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--primaire); }

/* Interrupteur à deux choix (segmenté) */
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #eef1f6; border-radius: 12px; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--texte-2); cursor: pointer; text-align: center; transition: background .15s, color .15s, box-shadow .15s; margin: 0; }
.segment input:checked + label { background: var(--surface); color: var(--texte); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.segment input:focus-visible + label { outline: 3px solid rgba(0, 64, 193, .35); }
.segment-type input:checked + label.l-depot { background: var(--depot); color: #fff; }
.segment-type input:checked + label.l-retrait { background: var(--retrait); color: #fff; }

/* Filtres repliables */
.filtres { display: grid; gap: 12px; grid-template-columns: 1fr; }
.filtres .champ { margin: 0; }
.barre-recherche { display: flex; gap: 8px; }
.barre-recherche .saisie { flex: 1; }

/* ---------------- Parcours d'opération ---------------- */
.parcours { max-width: 760px; margin: 0 auto; padding-bottom: 96px; }
.etape { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre); padding: 18px; margin-bottom: 14px; }
.etape-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.etape-num { width: 30px; height: 30px; border-radius: 50%; background: var(--primaire-doux); color: var(--primaire); display: grid; place-items: center; font-weight: 800; font-size: .88rem; flex-shrink: 0; }
.etape.faite .etape-num { background: var(--depot); color: #fff; }
.etape-tete h2 { font-size: 1rem; }
.etape-tete p { font-size: .82rem; color: var(--texte-2); }

.recherche-client { position: relative; }
.resultats { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre-forte); z-index: 20; max-height: 320px; overflow-y: auto; padding: 6px; }
.resultat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font: inherit; color: var(--texte); }
.resultat:hover, .resultat.focus { background: var(--fond); }
.resultat .avatar { width: 38px; height: 38px; }
.resultat .infos { flex: 1; min-width: 0; }
.resultat .infos strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resultat .infos span { font-size: .8rem; color: var(--texte-2); }
.resultat.creer { color: var(--primaire); font-weight: 700; border-top: 1px solid var(--bord); border-radius: 0 0 10px 10px; margin-top: 4px; }
.resultat.creer .avatar { background: var(--primaire); color: #fff; }
.resultats .info { padding: 12px; font-size: .85rem; color: var(--texte-2); }

.client-choisi { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #cddbfa; background: var(--primaire-doux); border-radius: 12px; }
.client-choisi .infos { flex: 1; min-width: 0; }
.client-choisi .infos strong { display: block; }
.client-choisi .infos span { font-size: .82rem; color: var(--texte-2); }
.nouveau-client { border: 1px dashed var(--primaire); border-radius: 12px; padding: 14px; background: #fbfcff; }
.nouveau-client-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-weight: 700; color: var(--primaire); }

.montant-zone { position: relative; }
.montant-saisie { font-size: 1.9rem !important; font-weight: 800; min-height: 68px !important; padding-right: 76px !important; text-align: right; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.montant-devise { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--texte-3); }
.en-lettres { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--fond); color: var(--texte-2); font-size: .9rem; font-style: italic; min-height: 42px; }
.lien-motif { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 700; font-size: .9rem; background: none; border: 0; padding: 0; color: var(--primaire); cursor: pointer; font-family: inherit; }

.barre-validation { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--bord); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); transition: left .25s ease; }
.barre-validation-int { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.recap { flex: 1; min-width: 0; line-height: 1.25; }
.recap span { display: block; font-size: .78rem; color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recap strong { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------- Détail d'une opération ---------------- */
.hero-op { padding: 22px 18px; text-align: center; }
.hero-op .rond { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; }
.hero-op .montant { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hero-op .lettres { color: var(--texte-2); font-style: italic; font-size: .9rem; margin-top: 4px; }
.hero-op .badges { display: flex; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.infos-liste { margin: 0; }
.infos-liste > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--bord); }
.infos-liste > div:last-child { border-bottom: 0; }
.infos-liste dt { color: var(--texte-2); font-size: .88rem; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.infos-liste dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.infos-liste dd small { display: block; font-weight: 500; color: var(--texte-2); }

/* Fil de validation */
.chronologie { list-style: none; margin: 0; padding: 18px; }
.chronologie li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.chronologie li:last-child { padding-bottom: 0; }
.chronologie li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--bord); }
.chronologie .point { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.chronologie strong { display: block; font-size: .92rem; }
.chronologie span { font-size: .82rem; color: var(--texte-2); }

/* ---------------- Fenêtre de confirmation ---------------- */
dialog.fenetre { border: 0; padding: 0; border-radius: 18px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--ombre-forte); color: var(--texte); }
dialog.fenetre::backdrop { background: rgba(15, 23, 42, .5); }
.fenetre-corps { padding: 22px; }
.fenetre-icone { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.fenetre-corps h2 { font-size: 1.1rem; margin-bottom: 6px; }
.fenetre-corps p { color: var(--texte-2); font-size: .92rem; }
.fenetre-pied { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; background: #fafbfd; border-top: 1px solid var(--bord); }

/* ---------------- Connexion ---------------- */
.page-connexion { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--surface); }
.connexion-visuel { display: none; position: relative; overflow: hidden; background: linear-gradient(150deg, var(--primaire) 0%, var(--primaire-fonce) 60%, #001f63 100%); color: #fff; padding: 48px; }
.connexion-visuel::before, .connexion-visuel::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.connexion-visuel::before { width: 420px; height: 420px; right: -120px; top: -100px; }
.connexion-visuel::after { width: 300px; height: 300px; left: -80px; bottom: -80px; }
.connexion-form { display: flex; flex-direction: column; justify-content: center; padding: 32px 20px; width: 100%; max-width: 440px; margin: 0 auto; }
.connexion-form .marque-logo { width: 52px; height: 52px; font-size: 1.15rem; border-radius: 14px; margin-bottom: 22px; }
.connexion-form h1 { font-size: 1.6rem; }
.connexion-form .sous-titre { color: var(--texte-2); margin: 6px 0 26px; }
.signature-zanga { margin-top: 32px; font-size: .78rem; color: var(--texte-3); text-align: center; }
.signature-zanga strong { color: var(--texte-2); }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 14px; border-top: 1px solid var(--bord); }

/* =========================================================
   Tablette (≥ 640px)
   ========================================================= */
@media (min-width: 640px) {
    .contenu { padding: 24px 24px 40px; }
    .topbar { padding: 0 20px; }
    .cache-sm { display: inline-flex; }
    .montre-sm-seul { display: none; }
    .entete { flex-direction: row; align-items: flex-end; justify-content: space-between; }
    .g-2 { grid-template-columns: repeat(2, 1fr); }
    .g-3 { grid-template-columns: repeat(3, 1fr); }
    .g-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stat { padding: 18px; }
    .stat-valeur { font-size: 1.35rem; }
    .tuile { flex-direction: row; align-items: center; padding: 20px; }
    .tuile small { display: block; }
    .filtres { grid-template-columns: repeat(2, 1fr); }
    .etape { padding: 22px; }
    .profil-texte { display: block; }
    h1 { font-size: 1.6rem; }
}

/* =========================================================
   Ordinateur (≥ 1024px) : menu fixe, réductible à gauche
   ========================================================= */
@media (min-width: 1024px) {
    .sidebar { transform: none; box-shadow: none; }
    .voile, .sidebar-fermer { display: none; }
    .principal { margin-left: var(--sidebar); }
    .barre-validation { left: var(--sidebar); }

    .menu-reduit .sidebar { width: var(--sidebar-reduite); }
    .menu-reduit .principal { margin-left: var(--sidebar-reduite); }
    .menu-reduit .barre-validation { left: var(--sidebar-reduite); }
    .menu-reduit .marque { padding: 0 19px; }
    .menu-reduit .marque-texte, .menu-reduit .nav-titre, .menu-reduit .nav span, .menu-reduit .nav .pastille, .menu-reduit .sidebar-pied { display: none; }
    .menu-reduit .nav a { justify-content: center; padding: 12px; }
    .menu-reduit .nav-sep { display: block; height: 1px; background: var(--bord); margin: 10px 8px; }

    .g-stats { grid-template-columns: repeat(4, 1fr); }
    .g-4 { grid-template-columns: repeat(4, 1fr); }
    .filtres { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; align-items: end; }
    .contenu { padding: 28px 32px 48px; }
}
.nav-sep { display: none; }

/* ---------------- Impression (journal) ---------------- */
@media print {
    .sidebar, .topbar, .voile, .ne-pas-imprimer, .pied, .barre-validation { display: none !important; }
    .principal { margin: 0 !important; }
    body { background: #fff; }
    .carte, .stat { box-shadow: none; }
    .contenu { padding: 0; max-width: none; }
}

/* Petits téléphones : montants plus compacts dans les listes */
@media (max-width: 420px) {
    .ligne-op { padding: 12px 14px; gap: 10px; grid-template-columns: 36px 1fr auto; }
    .ligne-op .rond { width: 36px; height: 36px; }
    .ligne-op .combien strong { font-size: .88rem; }
    .montant-saisie { font-size: 1.6rem !important; }
    .segment label { font-size: .84rem; gap: 6px; }
    .segment label .icon { width: 16px; height: 16px; }
}

/* ---------------- Logo ---------------- */
.marque-logo.avec-image { background: #fff; border: 1px solid var(--bord); padding: 3px; overflow: hidden; }
.marque-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.zone-logo { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
