/* ═══════════════════════════════════════════════════════════
   CONI v2 — socle visuel « À traiter × CONI »
   Chargé APRÈS style.css : ne redéfinit que ce qui change.
   Référence : design system « CONI v2 » (Claude Design) et
   maquette « CONI v2 — Maquette globale ».
   Règles : IBM Plex Sans + Mono · rayon 8 · plat (pas d'ombre)
   · sections en capitales · chiffres en mono · nav plate
   · zéro emoji · code couleur CONI conservé.
   ═══════════════════════════════════════════════════════════ */

:root{
  --font-sans:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
  /* un seul rayon d'interface */
  --radius:8px;--radius-sm:8px;--radius-lg:8px;--radius-xl:8px;
  --radius-badge:4px;--radius-sheet:16px;
  /* plat */
  --shadow-sm:none;--shadow-md:none;--shadow-lg:none;--shadow-xl:none;--shadow-2xl:none;
  --shadow-card:none;--shadow-card-hover:none;--shadow-teal:none;--shadow-teal-lg:none;
  --af-gradient:var(--af-teal);--af-gradient-subtle:var(--af-teal);
  --control-border:#D1D5DB;
  --bottomnav-h:54px;--input-h:44px;--card-pad:16px;
  --muted:#6B7280;
}

/* ── Typographie ── */
body{font-family:var(--font-sans);line-height:1.45}
.auth-logo,.sidebar-brand h2,.brand-sub,.header-greeting-name,.greeting-text h2{font-family:var(--font-sans)}
.sidebar-brand h2,.auth-logo{letter-spacing:.12em;font-weight:700;color:var(--af-teal-dark)}
h1,h2,h3{letter-spacing:-.01em}
.main-header h1{color:var(--ink);font-size:20px;font-weight:700}
.header-greeting-name{color:var(--ink)}

/* Chiffres qui comptent : mono tabulaire */
.v2-mono,.v2-font-mono,.sa-mono,.v2-login-badge,.sv-ticket,
.stat-value,.mini-stat-value,.mc-stat-value,.mc-line-count,
.sv-score,.sv-compact-num,.sv-pillar-val,.sv-compact-val,.sv-tk-score,
.site-select-score-value,.sa-row-score,.sa-kpi-val,.sa-briefing-stat-value,
.dlc-card-date,.list-sub strong,.list-title strong,
#tempChipVal{font-family:var(--font-mono);font-variant-numeric:tabular-nums;letter-spacing:0}

/* ── Cartes, sections, lignes ── */
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:none;margin-bottom:16px;transition:none}
.card:hover{box-shadow:none}
.card-header{padding:12px var(--card-pad) 10px;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink);border-bottom:1px solid var(--border-light);gap:8px}
.card-header svg{width:14px;height:14px;color:var(--ink-muted)}
.card-header::before{content:"";width:8px;height:8px;background:var(--ink);flex-shrink:0}
.card-header .badge{text-transform:none;letter-spacing:0}
.category-header{font-size:12px;letter-spacing:.08em;font-weight:700;color:var(--ink)}
.v2-section-heading,.v2-section-title,.help-section-heading,.sa-section-title{font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:700}
.list-item{min-height:60px;padding:12px 14px;gap:12px;transition:none}
.list-item:hover{background:transparent}
.list-title{font-size:15px;font-weight:600;letter-spacing:0}
.list-sub{font-size:13px;font-weight:400;margin-top:2px}
.list-icon{width:36px;height:36px;border-radius:var(--radius);background:var(--border-light);color:var(--ink-muted)}
.list-icon svg{width:18px;height:18px}
.card-accent,.card-accent--ok,.card-accent--warn,.card-accent--err,.card-accent--teal,.card-accent--info,
.v2-list-item--border-left-ok,.v2-list-item--border-left-nok,.v2-list-item--border-left-warning{border-left:none;box-shadow:none}
.stat-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:none}
.stat-value{font-size:20px;font-weight:600}
.stat-label{font-size:12px;color:var(--ink-muted)}
.dlc-card,.mc-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:none}
.dlc-card-icon,.mc-card-icon{border-radius:var(--radius)}

/* ── Emoji « icônes » produits / équipements : masqués, la tuile reste ── */
.list-icon,.dlc-card-icon,.mc-card-icon{color:var(--ink-muted)}
.chip-emoji:empty{display:none}

/* ── Boutons ── */
.btn{border-radius:var(--radius);min-height:40px;padding:0 14px;font-size:14px;font-weight:600;letter-spacing:0;transition:none;box-shadow:none;overflow:visible}
.btn:active{transform:none;opacity:.85}
.btn:hover{transform:none;box-shadow:none}
.btn-primary{background:var(--af-teal);border:1px solid var(--af-teal);color:#fff}
.btn-primary:hover{background:var(--af-teal-dark);border-color:var(--af-teal-dark)}
.btn-ghost{background:var(--bg-card);border:1px solid var(--control-border);color:var(--ink);backdrop-filter:none;-webkit-backdrop-filter:none}
.btn-ghost:hover{background:var(--bg-off);border-color:var(--control-border)}
.btn-outline{border:1px solid var(--control-border);color:var(--ink)}
.btn-outline:hover{background:var(--bg-off);border-color:var(--ink)}
.btn-success{border:1px solid var(--af-ok-dark);color:var(--af-ok-dark)}
.btn-danger{border:1px solid var(--af-err-dark);color:var(--af-err-dark)}
.btn-sm{min-height:36px;padding:0 12px;font-size:13px;border-radius:var(--radius)}
.btn-lg{min-height:48px;padding:0 20px;font-size:15px;font-weight:600;border-radius:var(--radius);letter-spacing:0}
.btn-fab{width:52px;height:52px;border-radius:50%;box-shadow:0 8px 24px rgba(17,24,39,.25)}
.v2-icon-btn{border-radius:var(--radius)}
.header-help-btn,.header-avatar-btn,.header-settings-btn{border-radius:var(--radius);border:1px solid var(--border);background:var(--bg-card);box-shadow:none}

/* ── Badges, puces, onglets ── */
.badge{border-radius:var(--radius-badge);padding:2px 7px;font-size:11px;font-weight:600;letter-spacing:.02em;background:transparent;border:1px solid currentColor;line-height:1.4}
.badge-green{color:var(--af-ok-dark)}.badge-yellow{color:var(--af-warn-dark)}.badge-red{color:var(--af-err-dark)}
.badge-blue{color:var(--af-info-dark)}.badge-gray{color:var(--ink-muted)}.badge-teal{color:var(--af-teal-dark)}
.consigne-urgent-badge{background:var(--af-err-dark);color:#fff;border-color:var(--af-err-dark);animation:none}
.v2-badge-lg{font-size:12px;padding:2px 8px;font-family:var(--font-mono);border:none;background:var(--border-light);color:var(--ink)}
.uni-subnav{background:var(--bg-card)}
.uni-subnav-inner{gap:6px;padding:8px 16px}
.uni-tab{height:36px;padding:0 12px;border-radius:var(--radius);border:1px solid var(--border);background:var(--bg-card);color:var(--ink-muted);font-size:13px;font-weight:500;transition:none}
.uni-tab:hover{background:var(--bg-off)}
.uni-tab.active{background:var(--af-teal-bg);border-color:var(--af-teal-light);color:var(--af-teal-dark);font-weight:600}
.tabs{gap:18px;border-bottom:1px solid var(--border)}
.tab{padding:10px 0 11px;font-size:14px;color:var(--ink-muted);border-radius:0;background:transparent;border-bottom:2px solid transparent;margin-bottom:-1px}
.tab.active{color:var(--ink);font-weight:600;border-bottom-color:var(--ink);background:transparent}
.filter-btn,.settings-tab,.chip,.pill-group label,.copilot-chip{border-radius:var(--radius);box-shadow:none}
.filter-btn.active,.settings-tab.active,.chip.active{background:var(--af-teal-bg);border-color:var(--af-teal-light);color:var(--af-teal-dark)}
.prio-dot--ok,.prio-dot--warn,.prio-dot--err,.prio-dot--info{width:8px;height:8px}

/* ── Formulaires ── */
.form-label{font-size:12px;letter-spacing:.06em}
.form-input,.form-select,.form-textarea{border:1px solid var(--border);border-radius:var(--radius);padding:10px 12px;font-size:15px;font-weight:400;transition:border-color .15s;min-height:var(--input-h)}
.form-input:hover,.form-select:hover,.form-textarea:hover{background:var(--bg);border-color:var(--control-border)}
.form-input:focus,.form-select:focus,.form-textarea:focus{border-color:var(--af-teal-dark);box-shadow:0 0 0 2px rgba(15,118,110,.2);transform:none;background:var(--bg)}
.toggle-slider{border-radius:11px}
.task-check{border-radius:var(--radius-badge)}

/* ── Modales → feuille du bas sur téléphone ── */
.modal-overlay{background:rgba(17,24,39,.45);backdrop-filter:none;-webkit-backdrop-filter:none}
.modal{border-radius:var(--radius);box-shadow:none;animation:none;border:1px solid var(--border)}
.modal-header{padding:14px var(--card-pad)}
.modal-title{font-size:18px;letter-spacing:0}
.modal-close{border-radius:var(--radius)}
.modal-footer{background:transparent;gap:8px}
.modal-footer .btn{min-height:48px;flex:1}
.modal-footer .btn-primary{flex:2}
@media(max-width:768px){
  .modal-overlay{align-items:flex-end;padding:0}
  .modal{max-width:none;margin:0;border-radius:var(--radius-sheet) var(--radius-sheet) 0 0;border:none;max-height:92vh;max-height:92dvh;padding-bottom:env(safe-area-inset-bottom,0)}
  .modal::before{content:"";display:block;width:40px;height:4px;border-radius:2px;background:var(--control-border);margin:10px auto 0}
}

/* ── Toasts ── */
.toast{border-radius:var(--radius);background:var(--ink);backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 8px 24px rgba(17,24,39,.25);padding:12px 16px;font-weight:500;letter-spacing:0;transition:transform .2s ease;text-align:left}
.toast-success,.toast-error,.toast-warning,.toast-info{background:var(--ink)}

/* ── Barre du bas : plate, 5 onglets, plus de bouton central ── */
.bottom-nav{box-shadow:none;border-top:1px solid var(--border);background:var(--bg-card);padding-top:6px}
.bottom-nav-inner{height:var(--bottomnav-h);max-width:none;align-items:flex-end}
.bnav-item{font-size:11px;font-weight:500;gap:4px;color:var(--ink-muted);padding:0 0 6px}
.bnav-item.active{color:var(--af-teal-dark);font-weight:700}
.bnav-item .bnav-icon svg{stroke-width:1.8}
.bnav-item.active .bnav-icon svg{stroke-width:2.1}
.bnav-item--center{color:var(--ink-muted)!important;font-weight:500;font-size:11px;transform:none}
.bnav-item--center.active{color:var(--af-teal-dark)!important;font-weight:700}
.bnav-item--center .bnav-icon{width:24px;height:24px;background:transparent;border-radius:0;padding:0;color:inherit}
.bnav-item--center.active .bnav-icon{background:transparent;box-shadow:none}
.bnav-badge{font-family:var(--font-mono);font-weight:600;border-radius:8px}

/* ── Sidebar ordinateur ── */
.sidebar{box-shadow:none}
.nav-item{border-radius:var(--radius);font-size:14px;font-weight:500;color:var(--ink-muted)}
.nav-item.active{background:var(--border-light);color:var(--ink);font-weight:600}
.nav-item.active::before{display:none}
.nav-section{font-size:10px;letter-spacing:.1em;font-weight:700;color:var(--muted)}
.avatar-glass{border-radius:var(--radius);background:var(--ink);color:#fff;box-shadow:none;backdrop-filter:none}
.desktop-consignes{border-radius:var(--radius);box-shadow:none;border:1px solid var(--border)}
.dc-item{border-radius:var(--radius)}

/* ── Tiroir réglages ── */
.rsidebar{box-shadow:none;border-left:1px solid var(--border);background:var(--bg-card)}
.rsidebar-section-title{font-size:12px;letter-spacing:.08em;text-transform:uppercase}

/* ── Score ── */
.sv-card{border:1px solid var(--border);border-radius:var(--radius);box-shadow:none}

/* ── Animations d'entrée retirées (outil, pas vitrine) ── */
.card,.list-item,.stat-card{animation:none!important}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ── Mode sombre : mêmes formes, couleurs de l'app ── */
[data-theme="dark"] .card-header::before{background:var(--ink)}
[data-theme="dark"] .uni-tab{background:var(--bg-card);border-color:var(--border)}
[data-theme="dark"] .uni-tab.active{background:rgba(45,212,191,.12);border-color:rgba(45,212,191,.4);color:var(--af-teal)}
[data-theme="dark"] .btn-ghost,[data-theme="dark"] .btn-outline{background:transparent;border-color:var(--border);color:var(--ink)}
[data-theme="dark"] .bnav-item.active,[data-theme="dark"] .bnav-item--center.active{color:var(--af-teal)!important}
[data-theme="dark"] .bnav-item--center{color:var(--ink-muted)!important}
[data-theme="dark"] .toast{background:#1C2333;border:1px solid var(--border)}
[data-theme="dark"] .main-header h1{color:#fff}

/* Empty states : la pastille reste, l'emoji résiduel disparaît */
.empty-icon{border-radius:var(--radius);font-size:0}
.empty-icon svg{font-size:initial}
.sa-tab-ic:empty{display:none}

/* ── Héros v2 : le chiffre du jour en tête de page (js/v2.js) ── */
.v2h{background:var(--ink);color:#fff;border-radius:var(--radius);padding:16px;margin-bottom:16px}
.v2h--link{cursor:pointer}
.v2h-top{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.v2h-main{min-width:0}
.v2h-caption{font-size:13px;color:#D1D5DB}
.v2h-title{font-size:22px;font-weight:700;line-height:1.25;margin-top:4px;letter-spacing:0}
.v2h-bar{display:flex;gap:3px;margin-top:14px}
.v2h-bar span{height:8px;display:block}
.v2h-sub{font-size:12px;color:#D1D5DB;margin-top:6px}
.v2h-sub b{color:#fff;font-weight:600}
.v2h-right{flex-shrink:0;text-align:right}
.v2h-big{font-family:var(--font-mono);font-size:40px;font-weight:600;line-height:1}
.v2h-big small{font-size:16px;color:#D1D5DB}
.v2h-biglabel{font-size:12px;color:#D1D5DB;margin-top:2px}
.v2h--light{background:var(--bg-card);color:var(--ink);border:1px solid var(--border);padding:14px 16px}
.v2h--light .v2h-caption,.v2h--light .v2h-sub,.v2h--light .v2h-big small,.v2h--light .v2h-biglabel{color:var(--ink-muted)}
.v2h--light .v2h-sub b{color:var(--af-teal-dark)}
.v2h--light .v2h-title{font-size:18px;margin-top:3px}
.v2h--light .v2h-bar{margin-top:12px}
.v2h--light .v2h-bar span{height:6px}
.v2h .v2-mono{font-family:var(--font-mono)}
[data-theme="dark"] .v2h{background:#1C2333;border:1px solid var(--border)}
[data-theme="dark"] .v2h--light{background:var(--bg-card)}

/* ── Sidebar v2 : univers + sous-pages ── */
.v2-nav-uni{font-weight:500}
.v2-nav-sub{display:block;position:relative;padding:7px 12px 7px 46px;font-size:13px;color:var(--ink-muted);cursor:pointer;border-radius:var(--radius);text-decoration:none}
.v2-nav-sub.active{color:var(--af-teal-dark);font-weight:600}
.v2-nav-sub.active::before{content:"";position:absolute;left:32px;top:50%;width:6px;height:6px;margin-top:-3px;background:var(--af-teal)}
.v2-nav-sub .nav-badge{margin-left:8px}
[data-theme="dark"] .v2-nav-sub.active{color:var(--af-teal)}
.card-header.v2-sec::before{background:var(--v2-sec,var(--ink))}
/* Deux actions sur une ligne de téléphone : elles passent dessous, la ligne garde son titre lisible */
@media(max-width:480px){
  .list-item{flex-wrap:wrap}
  .list-item .list-actions:has(> .btn + .btn){flex-basis:100%;justify-content:flex-end;padding-left:48px}
}

/* Tuile d'icône vidée de son emoji : retirée, la ligne reprend la place */
.v2-icon-empty{display:none!important}
