/* Charte HS GLASS GROUPE : bleu nuit, turquoise, vert anis, corail, jaune, bleu ; police Outfit ; formes arrondies */
:root {
  --navy: #0E1B4D; --cyan: #19C3D6; --lime: #A6D64A; --lime-soft: #E3F4B8; --coral: #F2785C; --yellow: #F4C21B; --blue: #4A78EE;
  --cyan-soft: #DDF5F7; --coral-soft: #FDE4DA; --yellow-soft: #FDF3C8; --blue-soft: #DFE6FB; --navy-soft: #E7EAF3;
  --bg: #FBFCFD; --surface: #fff; --text: var(--navy); --muted: #5B6584; --line: #E4E8F0;
  --ok: #2E8B3E; --ok-soft: #E6F5DC; --bad: #C2412D; --bad-soft: #FDE4DA;
  --radius: 22px; --radius-sm: 14px;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1230; --surface: #111C42; --text: #EEF1FA; --muted: #A2ABC8; --line: #24305A;
    --cyan-soft: #0F3842; --coral-soft: #3F2420; --yellow-soft: #3A3115; --blue-soft: #1B2A5C; --navy-soft: #1A2550; --lime-soft: #2A3A16;
    --ok: #8BD46A; --ok-soft: #1D3317; --bad: #F59A84; --bad-soft: #3F2420;
  }
  .side a.on, .btn.primary, .round-btn:hover { background: var(--cyan) !important; color: var(--navy) !important; border-color: var(--cyan) !important; }
  .acc-navy { --accent: var(--lime); }
  .table td a, button.link { color: var(--cyan); }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; font-weight: 400; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cyan); }
h1, h2 { font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: 2rem; margin: 0; }
h2 { font-size: 1.25rem; margin: 0 0 .9rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 0 0 .3rem; }
.dot-end { color: var(--cyan); }

/* Mise en page */
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 1.25rem .9rem; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side a { padding: .5rem .8rem; border-radius: 999px; font-weight: 500; }
.side a:hover { background: var(--navy-soft); color: var(--text); }
.side a.on { background: var(--navy); color: #fff; }
.side a.co { display: flex; align-items: center; gap: .5rem; }
.side .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, var(--navy)); flex: none; margin: 0 .25rem; }
.nav-group { margin: 1.1rem .8rem .3rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.brand { display: flex; flex-direction: column; padding: .25rem .8rem 1rem !important; border-radius: 0 !important; background: none !important; }
.brand img { max-width: 170px; max-height: 56px; object-fit: contain; }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.brand-sub { font-size: .7rem; letter-spacing: .45em; color: var(--muted); margin-top: -.15rem; }
.who { margin-top: auto; padding: .9rem .8rem 0; border-top: 1px solid var(--line); font-size: .85rem; display: flex; flex-direction: column; gap: .25rem; }
.main { padding: 2rem 2.5rem 3rem; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

/* Couleurs par métier */
.acc-cyan { --accent: var(--cyan); --accent-soft: var(--cyan-soft); }
.acc-coral { --accent: var(--coral); --accent-soft: var(--coral-soft); }
.acc-yellow { --accent: var(--yellow); --accent-soft: var(--yellow-soft); }
.acc-blue { --accent: var(--blue); --accent-soft: var(--blue-soft); }
.acc-navy { --accent: var(--navy); --accent-soft: var(--lime-soft); }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.card-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.co-card { background: var(--accent-soft); border-color: transparent; position: relative; overflow: hidden; }
.co-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: .45; pointer-events: none; }
.co-card .kpi { background: var(--surface); border-color: transparent; }
.num-big { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.round-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: inline-grid; place-items: center;
  font-size: 1.2rem; font-weight: 600; position: relative; z-index: 1; box-shadow: 0 2px 8px rgba(14, 27, 77, .08); }
.round-btn:hover { background: var(--navy); color: #fff; }
.co-head-band { background: var(--accent-soft); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: var(--radius-sm); padding: .8rem 1.1rem; margin: 0 0 1.25rem; }
.alert { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius-sm); padding: .7rem .9rem; }
.success { background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-sm); padding: .7rem .9rem; }

.badge { font-size: .75rem; font-weight: 600; padding: .2rem .7rem; border-radius: 999px; background: var(--surface); color: var(--muted); }
.badge.hors_groupe { background: var(--coral-soft); color: var(--coral); }
.badge.holding { background: var(--lime-soft); color: var(--navy); }
.co-card .badge.hors_groupe, .co-head-band .badge.hors_groupe { background: var(--surface); }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; position: relative; z-index: 1; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1rem; background: var(--surface); }
.kpi-label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.kpi-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: .1rem 0; }
.kpi.empty .kpi-value { color: var(--line); }
.kpi-note { font-size: .74rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; }
.chip.have { background: var(--lime-soft); color: var(--navy); font-weight: 600; }
.chip.missing { color: var(--muted); border: 1px dashed var(--line); }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.table th.num, .table td.num { text-align: right; }
.table td a { color: var(--blue); }
.co-head { display: inline-flex; align-items: center; }

/* Boutons et formulaires */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1.3rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; }
.btn:hover { border-color: var(--navy); color: var(--text); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: #1A2B6B; color: #fff; }
.btn.accent { background: var(--cyan); color: var(--navy); border-color: var(--cyan); }
button.link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-align: left; }
button.link.danger { color: var(--bad); }
label.btn { cursor: pointer; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem 1.1rem; align-items: end; margin-bottom: 1.1rem; }
.grid-form label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 500; color: var(--muted); }
input, select { font: inherit; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
[hidden] { display: none !important; }
form.inline { margin: 0; }

/* Dépôt */
.dropzone { border: 2px dashed var(--cyan); background: var(--cyan-soft); border-radius: var(--radius); padding: 2.75rem 1rem; text-align: center;
  display: flex; flex-direction: column; gap: .35rem; cursor: pointer; transition: background .15s, transform .15s; }
.dropzone strong { font-size: 1.2rem; }
.dropzone:hover, .dropzone:focus { outline: none; transform: translateY(-1px); }
.dropzone.over { background: var(--lime-soft); border-color: var(--lime); }
.queue { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
.queue li { display: flex; gap: .75rem; padding: .55rem .9rem; border-radius: 999px; background: var(--navy-soft); font-size: .9rem; }
.queue li .st { margin-left: auto; }
.queue li.ok { background: var(--ok-soft); }
.queue li.ok .st { color: var(--ok); }
.queue li.err { background: var(--bad-soft); }
.queue li.err .st { color: var(--bad); }

/* Mini zone de dépôt (en haut à droite) */
.mini-depot { width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: .4rem; margin-left: auto; }
.head-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.mini-form { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.mini-form select, .mini-form input { flex: 1 1 140px; min-width: 0; padding: .35rem .6rem; font-size: .8rem; border-radius: 10px; }
.dropzone.mini { padding: .8rem .75rem; border-radius: var(--radius-sm); gap: .1rem; }
.dropzone.mini strong { font-size: .92rem; }
.dropzone.mini .small { font-size: .72rem; }
.mini-depot .queue { margin: 0; max-height: 140px; overflow-y: auto; }
.mini-depot .queue li { font-size: .78rem; padding: .35rem .7rem; border-radius: 10px; flex-wrap: wrap; gap: .3rem; }

/* Logos */
.logo { width: 44px; height: 44px; object-fit: contain; border-radius: 12px; flex: none; background: var(--surface); }
.logo.lg { width: 60px; height: 60px; }
.logo.initials { display: inline-grid; place-items: center; background: var(--surface); color: var(--accent, var(--navy)); font-weight: 800; font-size: .95rem; }
.logo.lg.initials { font-size: 1.15rem; }
.logo-xs { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; vertical-align: middle; margin-right: .4rem; flex: none; }
.side .logo-xs { margin-right: 0; }
.logo-xs.initials { display: none; }
.logo-list { display: flex; flex-direction: column; }
.logo-row { display: flex; align-items: center; gap: .9rem; padding: .65rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logo-row:last-child { border-bottom: 0; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 2px 10px rgba(14, 27, 77, .15); }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; position: relative; overflow: hidden; }
.curves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.curves path { fill: none; stroke-width: 2; opacity: .8; }
.login-card { position: relative; text-align: center; max-width: 640px; }
.login-card .btn { margin: 1rem 0 .5rem; font-size: 1.05rem; padding: .85rem 1.6rem; }
.hero { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: .6rem 0 1rem; }
.grad { background: linear-gradient(90deg, var(--cyan), #3BBF9A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl { background: var(--lime-soft); color: var(--navy); border-radius: 999px; padding: 0 .35em; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: .75rem; }
  .brand { width: 100%; padding-bottom: .5rem !important; }
  .nav-group { display: none; }
  .who { margin: 0; border: 0; padding: .5rem .8rem; flex-direction: row; gap: .75rem; }
  .main { padding: 1rem; }
  h1 { font-size: 1.6rem; }
  .num-big { font-size: 2rem; }
  .card, .co-head-band { padding: 1rem; border-radius: 18px; }
}
