/* ═══════════════════════════════════════
   DESIGN SYSTEM OTOMA
   Minimaliste, professionnel, dense mais aéré.
   Interdits : jaune, orange, dégradés criards, ombres lourdes.
═══════════════════════════════════════ */

/* ── Typographie : Inter (auto-hébergée, PWA offline) ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ── Tokens Otoma (canoniques) ── */
  --bg-sidebar:    #1a2530;   /* sidebar de navigation, header sombre */
  --bg-page:       #f5f7f9;   /* fond de page */
  --bg-card:       #ffffff;   /* cartes, panneaux, modales */
  --border:        #e5e7eb;   /* bordures fines 1px */
  --accent:        #689cb5;   /* liens actifs, boutons primaires, sélection, graphiques */
  --accent-strong: #5a8da5;   /* hover boutons primaires */
  --accent-dark:   #344d59;   /* titres de section, éléments secondaires, états "attention" */
  --text:          #1a2530;   /* texte principal */
  --text-muted:    #7a8b96;   /* texte secondaire, labels, métadonnées */
  --text-on-dark:  #e5edf2;   /* texte sur la sidebar */
  --success:       #10b981;   /* statuts positifs, tendances à la hausse */
  --danger:        #ef4444;   /* anomalies, alertes, tendances à la baisse */

  /* Teintes dérivées (fonds subtils) */
  --accent-tint:   #e8f0f5;   /* fond léger accent (sélection, hover) */
  --accent-tint-2: #d9e7ee;   /* fond accent un peu plus marqué */
  --success-tint:  #d1fae5;
  --danger-tint:   #fee2e2;
  --shadow-card:   0 1px 2px rgba(0,0,0,0.04);

  /* ── Alias de compatibilité (ancien nommage — à résorber en phase 3) ── */
  --navy:    var(--bg-sidebar);
  --navy2:   var(--accent-dark);
  --orange:  var(--accent);         /* l'orange est banni : remappé sur l'accent */
  --orange2: var(--accent-strong);
  --green:   var(--success);
  --red:     var(--danger);
  --blue:    var(--accent);
  --purple:  var(--accent-dark);
  --bg:      var(--bg-page);
  --white:   var(--bg-card);
  --muted:   var(--text-muted);
  --light:   #eef2f5;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg-page); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── SCREENS ── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ── HEADER (barre sombre : écrans wizard + mobile) ── */
.header {
  background: var(--bg-sidebar);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.logo-badge {
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.logo-text {
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.logo-x { color: var(--accent); margin: 0 4px; }
.header-sep { width: 1px; height: 28px; background: rgba(255,255,255,0.10); flex-shrink: 0; }
.header-nav { display: flex; gap: 2px; flex: 1; }
.header-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(229,237,242,0.62);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: none;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  text-align: left;
}
.header-nav-item:hover { color: var(--text-on-dark); background: rgba(255,255,255,0.05); }
.header-nav-item.active { color: var(--text-on-dark); background: rgba(104,156,181,0.16); border-left-color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar.green  { background: var(--success); }
.avatar.blue   { background: var(--accent); }
.avatar.purple { background: var(--accent-dark); }
.avatar.red    { background: var(--danger); }
.header-username { color: var(--text-on-dark); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-role { color: var(--accent); font-size: 11px; }
.btn-logout {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(229,237,242,0.62);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.15s;
}
.btn-logout:hover { color: var(--text-on-dark); background: rgba(255,255,255,0.10); }

/* ── SIDEBAR DE NAVIGATION (desktop : les 4 écrans "home") ──
   Transformation CSS du .header horizontal en sidebar sombre fixe.
   Les écrans wizard (s-cs-form, s-cs-anomaly-report) gardent la barre haute. */
@media (min-width: 769px) {
  #s-cs-home.active, #s-admin-home.active, #s-dr-home.active, #s-teamlp-home.active {
    flex-direction: row;
  }
  #s-cs-home > .header, #s-admin-home > .header,
  #s-dr-home > .header, #s-teamlp-home > .header {
    flex-direction: column;
    align-items: stretch;
    width: 216px;
    min-width: 216px;
    height: 100vh;
    padding: 20px 12px 16px;
    gap: 4px;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.06);
  }
  #s-cs-home > .header .header-logo, #s-admin-home > .header .header-logo,
  #s-dr-home > .header .header-logo, #s-teamlp-home > .header .header-logo {
    padding: 0 8px 16px;
  }
  #s-cs-home > .header .header-sep, #s-admin-home > .header .header-sep,
  #s-dr-home > .header .header-sep, #s-teamlp-home > .header .header-sep {
    display: none;
  }
  #s-cs-home > .header .header-nav, #s-admin-home > .header .header-nav,
  #s-dr-home > .header .header-nav, #s-teamlp-home > .header .header-nav {
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
  }
  #s-cs-home > .header .header-nav-item, #s-admin-home > .header .header-nav-item,
  #s-dr-home > .header .header-nav-item, #s-teamlp-home > .header .header-nav-item {
    width: 100%;
    padding: 9px 12px;
    border-radius: 0 6px 6px 0;
  }
  #s-cs-home > .header .header-right, #s-admin-home > .header .header-right,
  #s-dr-home > .header .header-right, #s-teamlp-home > .header .header-right {
    margin-left: 0;
    margin-top: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  #s-cs-home > .header .btn-logout, #s-admin-home > .header .btn-logout,
  #s-dr-home > .header .btn-logout, #s-teamlp-home > .header .btn-logout {
    text-align: center;
  }
  /* Les panneaux de contenu prennent le reste et scrollent indépendamment */
  #s-cs-home > *:not(.header), #s-admin-home > *:not(.header),
  #s-dr-home > *:not(.header), #s-teamlp-home > *:not(.header) {
    flex: 1;
    min-width: 0;
    max-height: 100vh;
    overflow-y: auto;
  }
}

/* ── LAYOUT ── */
.page-body { flex: 1; display: flex; }
.main-content { flex: 1; padding: 28px 28px 40px; overflow-x: hidden; }
.sidebar { width: 300px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--white); padding: 24px 20px; overflow-y: auto; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: 6px; font-size: 13px; font-weight: 500;
  border: none; transition: all 0.15s; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
/* Primaire : plein accent (jamais plus d'un par vue). .btn-orange = alias historique. */
.btn-primary, .btn-orange { background: var(--accent); color: white; }
.btn-primary:hover, .btn-orange:hover { background: var(--accent-strong); }
.btn-navy { background: var(--accent-dark); color: white; }
.btn-navy:hover { background: var(--bg-sidebar); }
/* Secondaire : outline */
.btn-secondary, .btn-outline { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover, .btn-outline:hover { border-color: var(--accent); color: var(--accent); }
/* Destructeur : outline danger */
.btn-danger { background: var(--bg-card); color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.ge-cat-btn { padding:7px 14px;border:1.5px solid var(--border);border-radius:20px;background:white;font-size:12px;font-weight:700;cursor:pointer;transition:all .15s; }
.ge-cat-btn:hover { border-color:var(--orange);color:var(--orange); }
.ge-cat-btn.active { color:white;border-color:transparent; }
.btn-ghost { background: var(--light); color: var(--text); border: none; }
.btn-ghost:hover { background: var(--border); }
.btn-green { background: var(--green); color: white; }
.btn-red { background: var(--red); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; font-weight: 600; border-radius: 6px; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.card-sm { padding: 14px 16px; border-radius: 8px; }
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title-icon { font-size: 16px; margin-right: 6px; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-orange { background: #d9e7ee; color: #344d59; }
.badge-blue   { background: #d9e7ee; color: #344d59; }
.badge-purple { background: #e8f0f5; color: #344d59; }
.badge-gray   { background: #eef2f5; color: #4a5b66; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 7px;
}
.form-label-opt { font-weight: 400; color: var(--muted); font-size: 11px; }
.form-input {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); background: white;
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--orange); }
.form-select {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; background: white;
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}
.form-select:focus { outline: none; border-color: var(--orange); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── RADIO / CHECKBOX OPTIONS ── */
.options-grid { display: flex; flex-direction: column; gap: 8px; }
.option-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 9px; cursor: pointer; transition: all 0.15s;
}
.option-card:hover { border-color: var(--orange); background: #e8f0f5; }
.option-card.selected { border-color: var(--orange); background: #e8f0f5; }
.option-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.option-card.selected .option-dot { background: var(--orange); border-color: var(--orange); }
.option-card.selected .option-dot::after { content: ''; width: 6px; height: 6px; background: white; border-radius: 50%; }
.option-check {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-size: 11px;
}
.option-card.checked { border-color: var(--orange); background: #e8f0f5; }
.option-card.checked .option-check { background: var(--orange); border-color: var(--orange); color: white; }
.option-label { font-size: 14px; color: var(--navy); flex: 1; }

/* ── NUMBER INPUT ── */
.num-input { display: flex; align-items: center; gap: 14px; }
.num-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: white;
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  font-weight: 300; transition: all 0.15s; cursor: pointer;
}
.num-btn:hover { border-color: var(--orange); color: var(--orange); }
.num-val { font-size: 28px; font-weight: 700; min-width: 44px; text-align: center; }

/* ── PHOTO UPLOAD ── */
.photo-drop {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 28px; text-align: center; cursor: pointer;
  transition: all 0.15s; background: var(--light);
}
.photo-drop:hover { border-color: var(--orange); background: #e8f0f5; }
.photo-drop-icon { font-size: 36px; margin-bottom: 8px; }
.photo-drop-label { font-size: 13px; color: var(--muted); }
.photo-drop-sub { font-size: 11px; color: var(--border); margin-top: 4px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.photo-thumb {
  aspect-ratio: 1; border-radius: 8px; background: var(--light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.photo-thumb .remove-photo {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.5); color: white; border: none;
  width: 18px; height: 18px; border-radius: 50%; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ── STEP WIZARD ── */
.wizard-header {
  background: white; border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}
.wizard-steps { display: flex; gap: 6px; margin-bottom: 8px; }
.wizard-dot {
  height: 4px; flex: 1; border-radius: 2px;
  background: var(--border); transition: all 0.3s;
}
.wizard-dot.done { background: var(--green); }
.wizard-dot.active { background: var(--orange); }
.wizard-meta { display: flex; align-items: center; justify-content: space-between; }
.wizard-step-label { font-size: 12px; color: var(--muted); }
.wizard-step-title { font-size: 18px; font-weight: 700; margin-top: 2px; }
.wizard-body { flex: 1; padding: 28px 32px; max-width: 680px; }
.wizard-footer {
  background: white; border-top: 1px solid var(--border);
  padding: 14px 32px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; bottom: 0;
}
body.impersonating .wizard-footer { padding-bottom: 60px; }

/* ── ALERTS ── */
.alert { padding: 12px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; border-left: 3px solid; }
.alert-blue   { background: #e8f0f5; color: #344d59; border-color: var(--blue); }
.alert-orange { background: #e8f0f5; color: #344d59; border-color: var(--orange); }
.alert-green  { background: #ECFDF5; color: #065F46; border-color: var(--green); }
.alert-red    { background: #FEF2F2; color: #991B1B; border-color: var(--red); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ── VISIT CARD ── */
.cs-lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.cs-visit-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: white; transition: box-shadow .15s; }
.cs-visit-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.cs-visit-card-header { padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.cs-visit-card-body { padding: 16px 18px; background: white; border-top: none; }
.cs-enseigne-filter { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; color: var(--navy); }
.cs-enseigne-filter:hover { border-color: var(--orange); color: var(--orange); }
.cs-enseigne-filter.active { background: var(--navy); color: white; border-color: var(--navy); }
.cs-stat-chip { flex: 1; text-align: center; padding: 10px 8px; }
.cs-stat-chip-val { font-size: 22px; font-weight: 600; color: var(--navy); line-height: 1; }
.cs-stat-chip-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; }
.visit-group { margin-bottom: 24px; }
.visit-group-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.visit-group-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.visit-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: white;
  border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 6px; cursor: pointer; transition: all 0.15s;
}
.visit-item:hover { border-color: var(--orange); box-shadow: 0 2px 8px rgba(104,156,181,0.1); }
.visit-item-icon { font-size: 20px; flex-shrink: 0; }
.visit-item-body { flex: 1; }
.visit-item-name { font-weight: 600; font-size: 14px; }
.visit-item-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.visit-item-right { display: flex; align-items: center; gap: 8px; }

/* ── SIDEBAR BLOCKS ── */
.sidebar-block { margin-bottom: 22px; }
.sidebar-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.news-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.news-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: white; font-weight: 700; font-size: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.news-avatar.orange { background: var(--orange); }
.news-avatar.green  { background: var(--green); }
.news-author { font-weight: 600; font-size: 12px; }
.news-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.news-text { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,37,48,0.5);
  z-index: 500; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
/* Modals qui s'ouvrent par-dessus un autre modal */
#modal-question.open,
#modal-preview.open,
#modal-ratt-store.open,
#modal-lp-store.open,
#modal-visit-detail.open { z-index: 600; }
.modal {
  background: var(--bg-card); border-radius: 10px; padding: 28px;
  width: 100%; max-width: 520px;
  box-shadow: 0 8px 30px rgba(26,37,48,0.18);
  max-height: 90vh; overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 2px; }
.modal-close:hover { color: var(--text); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── CONTEXT INFO BOX ── */
.context-box {
  background: #ecfdf5; border: 1px solid #d1fae5; border-radius: 10px;
  padding: 14px; margin-bottom: 16px;
}
.context-box-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.context-box-label { font-size: 12px; color: #059669; font-weight: 600; }
.context-box-val { font-size: 15px; font-weight: 700; color: #065F46; }

/* ═══════════════════════════════════════
   ADMIN STYLES
═══════════════════════════════════════ */
.admin-tabbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 24px;
  gap: 2px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.admin-tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--orange); border-bottom-color: var(--orange); }

.admin-panel { display: none; flex: 1; }
.admin-panel.active { display: block; }
.admin-content { padding: 28px 32px 48px; max-width: 1100px; }

/* KPI row */
.admin-kpi-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; margin-bottom: 20px; }
.admin-kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-card);
}
.admin-kpi-card.clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.admin-kpi-card.clickable:hover { border-color: var(--orange); box-shadow: 0 2px 10px rgba(104,156,181,.15); }
.admin-kpi-card.clickable.active { border-color: var(--orange); background: #e8f0f5; }
.admin-kpi-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.admin-kpi-val { font-size: 28px; font-weight: 600; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.admin-kpi-label { font-size: 11px; color: var(--muted); }
.admin-kpi-hint { font-size: 10px; color: var(--orange); margin-top:2px; }
.admin-kpi-detail { background:#e8f0f5; border:1px solid #d9e7ee; border-radius:12px; padding:18px; margin-bottom:16px; }

/* LP list in dashboard */
.admin-lp-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.admin-lp-row:last-child { border-bottom: none; }
.admin-lp-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Activity */
.admin-activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.admin-activity-row:last-child { border-bottom: none; }
.admin-activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.admin-activity-dot.green  { background: var(--green); }
.admin-activity-dot.red    { background: var(--red); }
.admin-activity-dot.orange { background: var(--orange); }
.admin-activity-dot.blue   { background: var(--blue); }

/* Upload boxes */
.admin-upload-box {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; text-align: center;
}

/* Table */
.admin-table-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; overflow-x: auto; background: var(--bg-card); box-shadow: var(--shadow-card); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
.admin-table thead th {
  background: var(--bg-page); color: var(--text-muted);
  padding: 10px 14px; text-align: left; font-size: 11px;
  font-weight: 600; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.admin-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f5f7f9; }

.admin-table td.num, .admin-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Filter chips admin */
.filter-chip-admin {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border); background: white;
  color: var(--muted); transition: all 0.15s; white-space: nowrap;
}
.filter-chip-admin:hover { border-color: var(--orange); color: var(--orange); }
.filter-chip-admin.active { background: var(--navy); color: white; border-color: var(--navy); }

/* ── Question list (drag & drop) ── */
.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-page-block { border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.q-page-header { background: #f5f7f9; padding: 10px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.q-page-title { font-weight: 700; font-size: 13px; color: var(--navy); cursor: pointer; padding: 3px 6px; border-radius: 5px; border: 1.5px solid transparent; transition: border-color .15s; }
.q-page-title:hover { border-color: var(--border); background: white; }
.q-page-title-input { font-weight: 700; font-size: 13px; color: var(--navy); padding: 3px 6px; border-radius: 5px; border: 1.5px solid var(--orange); outline: none; background: white; width: 180px; }
.q-layout-preview { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }
.q-layout-bar { height: 12px; border-radius: 2px; background: #d5dce1; }
.q-page-list { padding: 8px; min-height: 52px; }
.q-page-list-empty { text-align: center; color: var(--muted); padding: 14px; font-size: 12px; font-style: italic; }
.q-width-toggle { display: flex; gap: 3px; flex-shrink: 0; }
.q-width-btn { font-size: 10px; padding: 3px 7px; border: 1.5px solid var(--border); border-radius: 5px; background: white; cursor: pointer; color: var(--muted); font-weight: 600; transition: all .12s; }
.q-width-btn.active { border-color: var(--orange); background: #e8f0f5; color: var(--orange); }
.q-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  cursor: grab; transition: all 0.15s; margin-bottom: 6px;
  user-select: none;
}
.q-item:hover { border-color: var(--orange); box-shadow: 0 2px 8px rgba(104,156,181,0.1); }
.q-item.dragging { opacity: 0.4; border-style: dashed; }
.q-item.drag-over { border-color: var(--orange); background: #e8f0f5; }
.q-drag-handle { font-size: 18px; color: #d5dce1; cursor: grab; flex-shrink: 0; }
.q-number { width: 24px; height: 24px; border-radius: 50%; background: var(--light); font-size: 11px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-type-badge { flex-shrink: 0; }
.q-label { flex: 1; font-size: 13px; font-weight: 600; }
.q-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.q-cond { font-size: 11px; }
.q-actions { display: flex; gap: 6px; flex-shrink: 0; }
.q-move-btns { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.q-move-btn { background: var(--light); border: none; border-radius: 4px; padding: 2px 6px; font-size: 11px; cursor: pointer; color: var(--muted); }
.q-move-btn:hover { background: var(--border); color: var(--text); }

/* ── CARTES LP ── */
.lp-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.lp-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.lp-card-header {
  padding: 12px 16px 12px 34px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}
.lp-card-settings {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.18); border: none; border-radius: 7px;
  width: 30px; height: 30px; cursor: pointer; font-size: 15px;
  color: white; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lp-card-settings:hover { background: rgba(255,255,255,0.32); }
.lp-drag-handle {
  position: absolute; top: 10px; left: 10px;
  color: rgba(255,255,255,0.55); font-size: 18px; cursor: grab; line-height: 1;
  width: 24px; height: 30px; display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.lp-drag-handle:active { cursor: grabbing; }
.lp-card-ghost { opacity: 0.4; }
.lp-progress-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 4px; }
.lp-progress-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.lp-card-name { color: white; font-size: 17px; font-weight: 600; line-height: 1.2; }
.lp-card-enseigne { color: rgba(255,255,255,0.75); font-size: 12px; font-weight: 600; letter-spacing: 0.3px; }
.lp-card-body { padding: 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.lp-card-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.lp-card-row-label { color: var(--muted); }
.lp-card-row-val { font-weight: 600; }
.lp-card-footer {
  padding: 8px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--light);
}

/* ── TOOLTIPS ── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2530;
  color: #eef2f5;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateX(-50%) translateY(4px);
  z-index: 9999;
}
[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 4px solid transparent;
  border-top-color: #1a2530;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 9999;
}
[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RATTACHEMENTS ── */
.ratt-sep { width: 1px; height: 28px; background: var(--border); margin: 0 4px; }

/* Hiérarchie DR → CS → Magasins */
.ratt-dr-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; margin-bottom: 18px; overflow: hidden;
}
.ratt-dr-header {
  background: var(--navy); color: white;
  padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.ratt-dr-name { font-weight: 700; font-size: 15px; flex: 1; }
.ratt-dr-meta { font-size: 12px; color: rgba(255,255,255,0.6); }
.ratt-dr-toggle { font-size: 16px; transition: transform 0.2s; }
.ratt-dr-body { padding: 16px 20px; }

.ratt-cs-card {
  border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 12px; overflow: hidden;
}
.ratt-cs-header {
  background: var(--light); padding: 11px 16px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.ratt-cs-name { font-weight: 700; font-size: 13px; flex: 1; }
.ratt-cs-meta { font-size: 11px; color: var(--muted); }
.ratt-cs-body { padding: 10px 16px; }

.ratt-store-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 7px;
  transition: background 0.1s; cursor: pointer;
}
.ratt-store-row:hover { background: #e8f0f5; }
.ratt-store-code { font-family: monospace; font-size: 11px; color: var(--muted); width: 44px; flex-shrink: 0; }
.ratt-store-name { flex: 1; font-size: 13px; font-weight: 500; }
.ratt-store-lp { font-size: 11px; }
.ratt-store-edit { opacity: 0; transition: opacity 0.15s; }
.ratt-store-row:hover .ratt-store-edit { opacity: 1; }

/* CS checklist in modal */
.ratt-cs-list { display: flex; flex-direction: column; gap: 7px; }
.ratt-cs-check {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.15s;
}
.ratt-cs-check:hover { border-color: var(--orange); }
.ratt-cs-check.checked { border-color: var(--orange); background: #e8f0f5; }
.ratt-cs-checkbox {
  width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 11px; font-weight: 700; transition: all 0.15s;
}
.ratt-cs-check.checked .ratt-cs-checkbox { background: var(--orange); border-color: var(--orange); color: white; }
.ratt-cs-info { flex: 1; }
.ratt-cs-info-name { font-size: 13px; font-weight: 600; }
.ratt-cs-info-region { font-size: 11px; color: var(--muted); }

/* Magasin table: rattachement badge pill */
.ratt-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--light); border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 8px; font-size: 11px; font-weight: 600;
  color: var(--text); white-space: nowrap;
}

/* Rattachements — barre sélecteur LP + stats */
.ratt-lp-selector-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.ratt-stats-bar {
  display: flex; gap: 20px; background: var(--white);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 24px; margin-bottom: 18px; flex-wrap: wrap;
}
.ratt-stat {
  display: flex; flex-direction: column; align-items: center;
  min-width: 70px; text-align: center;
}
.ratt-stat > span { font-size: 26px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.ratt-stat > small { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Inline editing in rattachement table */
.lratt-editable { cursor: pointer; transition: background 0.1s; }
.lratt-editable:hover { background: #e8f0f5 !important; }
.lratt-editable input, .lratt-editable select {
  width: 100%; min-width: 80px; border: 1.5px solid #344d59; border-radius: 4px;
  padding: 2px 5px; font-size: 13px; font-family: inherit; background: white;
}
/* Mapping bar */
#lratt-mapping-bar select { border: none; background: transparent; font-size: 12px; color: #344d59; cursor: pointer; padding: 0 2px; }

/* ── CONDITIONAL BANNER ── */
.cond-banner {
  background: #e8f0f5; border: 1px solid #d9e7ee; border-radius: 9px;
  padding: 10px 13px; font-size: 12px; color: #344d59;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}

/* ── MISC ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-title { font-size: 22px; font-weight: 600; color: var(--text); }
.page-subtitle { font-size: 14px; color: var(--muted); margin-top: 2px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ── NEWS FEED ── */
.news-feed-widget { margin-bottom: 24px; }
.news-feed-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.news-feed-title { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.news-feed-badge { background: var(--orange); color: white; border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.news-post { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.news-post.best-practice { border-left: 4px solid #10b981; }
.news-post.pending { opacity: 0.8; background: #e8f0f5; border-color: #d9e7ee; }
.news-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.news-post-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; flex-shrink: 0; }
.news-post-meta { flex: 1; min-width: 0; }
.news-post-author { font-size: 13px; font-weight: 700; color: var(--text); }
.news-post-date { font-size: 11px; color: var(--muted); margin-top: 1px; }
.news-post-type-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.news-post-content { font-size: 14px; color: var(--text); line-height: 1.55; white-space: pre-wrap; }
.news-post-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.news-post-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.news-post-photo { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); }
.news-post-file { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--blue); background: #e8f0f5; border-radius: 6px; padding: 4px 10px; text-decoration: none; }
.news-post-poll { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.news-poll-option { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.news-poll-bar-wrap { flex: 1; height: 28px; background: #eef2f5; border-radius: 6px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.news-poll-bar-fill { height: 100%; background: var(--orange); opacity: .25; transition: width .4s; }
.news-poll-bar-label { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.news-poll-pct { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 36px; text-align: right; }
.news-poll-bar-wrap.voted-this { border-color: var(--orange); }
.news-poll-bar-wrap.voted-this .news-poll-bar-fill { opacity: .5; }
.news-post-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.news-carousel { position:relative; display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; -webkit-overflow-scrolling:touch; border-radius:12px; }
.news-carousel::-webkit-scrollbar { display:none; }
.news-carousel .news-post { flex:0 0 100%; margin-bottom:0; scroll-snap-align:start; display:flex; flex-direction:column; box-sizing:border-box; }
.news-carousel-dots { display:flex; justify-content:center; gap:6px; margin-top:8px; }
.news-carousel-dot { width:7px; height:7px; border-radius:50%; background:var(--border); transition:background .3s; cursor:pointer; border:none; padding:0; }
.news-carousel-dot.active { background:var(--orange); }
.news-count-badge { background:#10b981; color:white; border-radius:10px; padding:1px 7px; font-size:11px; font-weight:700; cursor:default; }
.news-expires-tag { font-size:11px; color:#344d59; background:#e8f0f5; border-radius:6px; padding:2px 7px; display:inline-block; margin-top:6px; }
.news-expires-input-row { display:flex; align-items:center; gap:6px; margin-top:8px; padding-top:7px; border-top:1px dashed #d9e7ee; flex-wrap:wrap; }
.news-pending-banner { background: #e8f0f5; border: 1px solid #d9e7ee; border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #344d59; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.news-compose-btn { display: inline-flex; align-items: center; gap: 6px; background: white; border: 1px dashed var(--border); border-radius: 10px; padding: 10px 16px; color: var(--muted); font-size: 13px; cursor: pointer; width: 100%; text-align: left; transition: border-color .15s, color .15s; }
.news-compose-btn:hover { border-color: var(--orange); color: var(--orange); }
/* ── LP DOCUMENTS ── */
.doc-item { display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:10px; background:#fff; margin-bottom:8px; }
.doc-item-icon { font-size:24px; flex-shrink:0; margin-top:2px; }
.doc-item-body { flex:1; min-width:0; }
.doc-item-name { font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.doc-item-desc { font-size:12px; color:var(--muted); margin-top:2px; }
.doc-item-badge { display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:10px; margin-top:5px; }
.doc-item-badge.badge-all { background:#d1fae5; color:#065f46; }
.doc-item-badge.badge-specific { background:#e8f0f5; color:#713f12; }
.doc-item-actions { display:flex; gap:6px; flex-shrink:0; align-items:center; }
.doc-upload-zone { border:2px dashed var(--border); border-radius:10px; padding:18px; text-align:center; cursor:pointer; transition:.15s; }
.doc-upload-zone:hover { border-color:var(--orange); background:#e8f0f5; }

/* ── PLACEHOLDER screens (DR, TeamLP, Admin) ── */
.placeholder-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.placeholder-icon { font-size: 48px; }
.placeholder-text { font-size: 16px; font-weight: 600; }

/* ═══════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: var(--bg-sidebar);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-box {
  background: var(--bg-card); border-radius: 10px;
  width: 100%; max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  overflow: hidden;
}
.login-top {
  background: var(--bg-sidebar);
  padding: 28px 32px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.login-logo-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.login-logo-badge { background: var(--accent); color: white; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 5px; letter-spacing: 0.5px; }
.login-logo-name { color: var(--text-on-dark); font-weight: 600; font-size: 17px; }
.login-logo-x { color: var(--accent); }
.login-tagline { color: rgba(229,237,242,0.45); font-size: 12px; }
.login-body { padding: 28px 32px; }
.login-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.login-footer { padding: 14px 32px; background: var(--bg-page); border-top: 1px solid var(--border); text-align: center; }
.login-footer-text { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* ═══════════════════════════════════════
   CS — HOME VISIT CARD STATUS
═══════════════════════════════════════ */
.visit-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-red    { background: var(--red); }
.status-green  { background: var(--green); }
.status-orange { background: var(--orange); }
.status-gray   { background: #d5dce1; }

/* best practice card */
.bp-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.bp-card:last-child { border-bottom: none; }
.bp-emoji { font-size: 22px; flex-shrink: 0; }
.bp-body { flex: 1; }
.bp-title { font-size: 13px; font-weight: 600; }
.bp-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.bp-text { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* ═══════════════════════════════════════
   CONFIRMATION SCREEN
═══════════════════════════════════════ */
.confirm-icon { font-size: 72px; text-align: center; margin-bottom: 12px; }
.confirm-title { font-size: 24px; font-weight: 600; text-align: center; margin-bottom: 6px; }
.confirm-sub { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 28px; }
.confirm-recap { background: var(--light); border-radius: 12px; padding: 18px 20px; }
.confirm-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.confirm-row:last-child { border-bottom: none; }
.confirm-row-label { color: var(--muted); }
.confirm-row-val { font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE — CS uniquement, ≤ 480px
   Cible : formulaire de visite, photos, anomalies, modales
   Le dashboard reste en desktop, l'admin/DR/TeamLP aussi.
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Layout général CS (autres écrans gardent comportement desktop avec scroll horizontal) ─── */
  body { overflow-x: hidden; }

  /* Header CS uniquement : compact, scrollable horizontalement pour la nav */
  #s-cs-home .header {
    padding: 0 12px;
    height: 52px;
    gap: 8px;
  }
  #s-cs-home .header-logo .logo-text { font-size: 13px; }
  #s-cs-home .header-sep { display: none; }
  #s-cs-home .header-nav {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #s-cs-home .header-nav::-webkit-scrollbar { display: none; }
  #s-cs-home .header-nav-item {
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 10px;
    flex-shrink: 0;
  }
  #s-cs-home .header-user > div:last-child { display: none; }   /* cache "Nom + Rôle" */
  #s-cs-home .btn-logout { padding: 6px 10px; font-size: 11px; }

  /* ─── ÉCRAN FORMULAIRE DE VISITE (wizard) ─── */
  #s-cs-form .header { padding: 0 12px; height: 52px; }
  #s-cs-form .header-logo .logo-text { font-size: 13px; }

  #s-cs-form .wizard-header { padding: 10px 14px; }
  #s-cs-form .wizard-step-title { font-size: 15px; line-height: 1.2; }
  #s-cs-form .wizard-step-label { font-size: 11px; }
  #s-cs-form .wizard-steps { gap: 3px; margin-bottom: 6px; }
  #s-cs-form .wizard-dot { height: 3px; }

  #s-cs-form .wizard-body {
    padding: 16px 14px;
    max-width: 100%;
  }

  #s-cs-form .wizard-footer {
    padding: 10px 14px;
    gap: 8px;
  }
  #s-cs-form .wizard-footer .btn {
    min-width: 0 !important;
    flex: 1;
    height: 44px !important;
    font-size: 14px !important;
    padding: 0 12px;
  }

  /* Form-row : passe en colonne sur mobile */
  #s-cs-form .form-row,
  #s-cs-anomaly-report .form-row,
  .modal .form-row {
    flex-direction: column;
    gap: 0;
  }
  #s-cs-form .form-row .form-group,
  #s-cs-anomaly-report .form-row .form-group,
  .modal .form-row .form-group {
    flex: 1 1 100%;
    min-width: 0;
  }

  /* Inputs plus grands au toucher */
  #s-cs-form .form-input,
  #s-cs-form .form-select,
  #s-cs-form .form-textarea,
  #s-cs-anomaly-report .form-input,
  #s-cs-anomaly-report .form-textarea,
  .modal .form-input,
  .modal .form-select,
  .modal .form-textarea {
    font-size: 16px;          /* évite zoom auto iOS sur focus */
    padding: 12px 14px;
    min-height: 44px;
  }
  #s-cs-form .form-textarea,
  #s-cs-anomaly-report .form-textarea,
  .modal .form-textarea { min-height: 80px; }

  /* Form labels lisibles */
  #s-cs-form .form-label,
  #s-cs-anomaly-report .form-label,
  .modal .form-label { font-size: 13px; margin-bottom: 4px; }

  /* Boutons num-btn (Oui/Non, choix simples) : plus grands */
  #s-cs-form .num-btn {
    padding: 14px 16px !important;
    font-size: 15px !important;
    min-height: 48px;
    width: 100%;
  }

  /* ─── PHOTOS : grille 2 colonnes + zone d'upload plus généreuse ─── */
  #s-cs-form .photo-grid,
  .modal .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #s-cs-form .photo-drop,
  .modal .photo-drop {
    padding: 24px 16px;
    min-height: 100px;
  }
  #s-cs-form .photo-drop-label,
  .modal .photo-drop-label { font-size: 14px; }
  #s-cs-form .photo-thumb .remove-photo,
  .modal .photo-thumb .remove-photo {
    width: 26px;
    height: 26px;
    font-size: 14px;
    top: 6px;
    right: 6px;
  }

  /* ─── ÉCRAN ANOMALIES CS ─── */
  #cs-tab-anomalies > div {
    padding: 16px 14px 32px !important;
    max-width: 100% !important;
  }
  #cs-tab-anomalies .page-title { font-size: 18px; }
  /* Filtres + bouton "Signaler" : passent sous le titre, en pleine largeur */
  #cs-tab-anomalies > div > div:first-child {
    flex-direction: column;
    align-items: stretch !important;
  }
  #cs-tab-anomalies > div > div:first-child > div:last-child {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  #cs-tab-anomalies .form-select,
  #cs-tab-anomalies > div > div:first-child .btn {
    width: 100% !important;
    font-size: 14px !important;
    min-height: 44px;
  }

  /* Cards d'anomalie : padding et tailles ajustées */
  #cs-anomalies-list .badge { font-size: 10px; padding: 2px 6px; }

  /* ─── ÉCRAN RAPPORT ANOMALIE INTERMÉDIAIRE ─── */
  #s-cs-anomaly-report .header { padding: 0 12px; height: 52px; }
  #s-cs-anomaly-report .page-body > div {
    padding: 16px 14px 32px !important;
    max-width: 100% !important;
  }

  /* ─── ÉCRAN CONFIRMATION ─── */
  #s-cs-confirm .main-content { padding: 24px 16px; max-width: 100% !important; }
  #s-cs-confirm .confirm-title { font-size: 20px; }
  #s-cs-confirm .confirm-icon { font-size: 56px; }

  /* ─── ÉCRAN MES MAGASINS CS ─── */
  #cs-tab-stores > div { padding: 16px 14px 32px !important; max-width: 100% !important; }
  #cs-tab-stores .section-header { flex-direction: column; align-items: stretch; gap: 10px; }
  #cs-tab-stores .section-header > div:last-child .btn { width: 100%; }

  /* ─── MODALES (Mes visites, contact, signaler anomalie, rapport visite) ─── */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100% !important;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    margin: 0;
    padding: 16px 14px 14px;
  }
  .modal-header { margin-bottom: 14px; }
  .modal-title { font-size: 16px; }
  .modal-body { max-height: calc(90vh - 140px); overflow-y: auto; }
  .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
  }
  .modal-footer .btn {
    min-width: 0 !important;
    flex: 1 1 calc(50% - 4px);
    font-size: 13px;
    padding: 10px 12px;
    min-height: 44px;
  }

  /* Boutons globaux dans contextes mobile : taille de toucher minimale */
  #s-cs-home .btn,
  #s-cs-form .btn,
  #s-cs-anomaly-report .btn,
  #s-cs-confirm .btn,
  .modal .btn {
    min-height: 40px;
  }

  /* ─── MES VISITES (liste LP × magasins) ─── */
  #cs-tab-lp > div { padding: 14px 12px 32px !important; max-width: 100% !important; }
  .visit-group-header { padding: 10px 14px; font-size: 14px; }
  .cs-visit-card-header { padding: 12px 14px; gap: 10px; }
  .cs-visit-card-header > div:not(:last-child) { min-width: 0; }
  .cs-visit-card-header > div:not(:last-child) > div:first-child { font-size: 13px; }

  /* ─── BOTTOM NAV CS ─── */
  /* Masquer la nav horizontale du header */
  #s-cs-home .header-nav { display: none !important; }
  #s-cs-home .header-sep { display: none !important; }

  /* Header CS simplifié : logo + user compact */
  #s-cs-home > .header {
    justify-content: space-between;
  }

  /* Afficher la bottom nav uniquement sur l'écran CS home (et sur mobile) */
  body.on-cs-home .cs-bottom-nav {
    display: flex !important;
  }
  /* Bottom nav à 3 onglets : items plus larges */
  .cs-bnav-item { font-size: 11px; }
  .cs-bnav-icon { font-size: 22px; }

  /* Contenu des onglets : ajouter un padding-bottom pour ne pas être masqué par la bottom nav */
  #s-cs-home .page-body,
  #s-cs-home .admin-panel {
    padding-bottom: 80px !important;
  }

  /* ─── PLANNING / GANTT RESPONSIVE ─── */
  /* Le planning est naturellement large → on le rend scrollable avec de meilleurs affordances */
  #cs-tab-planning {
    padding: 12px 8px 80px !important;
  }
  #cs-tab-planning .page-title,
  #cs-planning-content .page-title { font-size: 18px; }

  /* Navigation Gantt : boutons et sélecteurs en colonne */
  #cs-planning-content > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  #cs-planning-content > div:first-child > div {
    flex-wrap: wrap;
    gap: 6px !important;
  }
  #cs-planning-content > div:first-child .btn {
    font-size: 12px !important;
    padding: 6px 10px !important;
    min-height: 36px;
  }

  /* Conteneur du tableau Gantt : scroll horizontal fluide avec indication visuelle */
  #cs-planning-content .admin-table-wrap,
  #cs-planning-content > div:last-child {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    border-radius: 10px;
  }
  /* Labels LP (première colonne) : plus étroits sur mobile */
  #cs-planning-content table th:first-child,
  #cs-planning-content table td:first-child {
    min-width: 120px !important;
    max-width: 140px !important;
    font-size: 11px !important;
    padding: 6px 8px !important;
    position: sticky;
    left: 0;
    z-index: 2;
    background: white;
    box-shadow: 2px 0 6px rgba(0,0,0,0.06);
  }
  #cs-planning-content table th:first-child {
    background: #f5f7f9;
  }
  /* Colonnes semaines : plus compactes */
  #cs-planning-content table th,
  #cs-planning-content table td {
    font-size: 10px !important;
  }

  /* Indicateur de scroll horizontal (gradient sur le bord droit) */
  #cs-planning-content > div:last-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.85));
    pointer-events: none;
    z-index: 3;
  }
  #cs-planning-content > div:last-child {
    position: relative;
  }
}

/* ═══ BOTTOM NAV CS — styles de base (masquée sur desktop) ═══ */
.cs-bottom-nav {
  display: none; /* masquée par défaut sur desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999; /* au-dessus de tout y compris les modales overlay */
  /* Verre dépoli (iOS-like) avec repli opaque si non supporté */
  background: rgba(255,255,255,0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(229,231,235,0.7);
  box-shadow: 0 -6px 24px rgba(26,37,48,0.07);
  padding: 8px 6px env(safe-area-inset-bottom, 10px) 6px; /* safe area pour iPhone notch */
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
  /* Garantir la persistance : ne jamais être masqué par un parent overflow/transform */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.cs-bnav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 14px;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: color .25s ease, transform .15s cubic-bezier(.34,1.56,.64,1);
}
/* Retour tactile : l'onglet « s'enfonce » légèrement à l'appui */
.cs-bnav-item:active { transform: scale(0.88); }
.cs-bnav-item.active { color: var(--accent-strong); }
/* Icône + pastille accent animée derrière l'onglet actif */
.cs-bnav-icon {
  font-size: 21px;
  line-height: 1;
  padding: 6px 20px;
  border-radius: 18px;
  background: transparent;
  transform: translateY(0) scale(1);
  transition: background .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.cs-bnav-item.active .cs-bnav-icon {
  background: var(--accent-tint-2);
  transform: translateY(-2px) scale(1.06);
}
.cs-bnav-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity .25s ease, font-weight .2s ease;
}
.cs-bnav-item.active .cs-bnav-label { opacity: 1; font-weight: 700; }

/* Transition douce d'apparition du contenu d'onglet (mobile) */
@keyframes csTabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
  #s-cs-home .cs-tab-enter { animation: csTabFadeIn .3s cubic-bezier(.22,.61,.36,1); }
}
/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .cs-bnav-item, .cs-bnav-icon, .cs-bnav-label { transition: none !important; }
  .cs-bnav-item:active { transform: none; }
  #s-cs-home .cs-tab-enter { animation: none !important; }
}

  .q-item-ghost { opacity: 0.4; background: #e8f0f5; border: 2px dashed var(--orange); }

/* ═══════════════════════════════════════
   V2 — COMPOSANTS DESIGN SYSTEM OTOMA
═══════════════════════════════════════ */

/* ── Icônes Lucide (sprite SVG inline + helper icon()) ── */
.ic {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 1.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; vertical-align: -3px;
}
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 20px; height: 20px; vertical-align: -4px; }
.ic-xl { width: 28px; height: 28px; }

/* ── Toasts ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-sidebar); color: var(--text-on-dark);
  padding: 11px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(26,37,48,0.22);
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s, transform .2s;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-error   { background: var(--danger); color: #fff; }
.toast.toast-warning { background: var(--accent-dark); color: #fff; }
.toast.toast-success .ic { color: var(--success); }

/* ── États vides ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 44px 24px; text-align: center;
  color: var(--text-muted);
}
.empty-state .ic { width: 34px; height: 34px; stroke-width: 1.25; color: #b6c2ca; }
.empty-state-title { font-size: 14px; font-weight: 500; color: var(--text); }
.empty-state-text { font-size: 13px; color: var(--text-muted); max-width: 360px; }

/* ── Skeletons (chargement) ── */
.skeleton {
  background: linear-gradient(90deg, #eef2f5 25%, #e5eaee 50%, #eef2f5 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.4s ease infinite;
  border-radius: 6px; min-height: 14px;
}
@keyframes skeleton-wave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Titres de section (hiérarchie stricte) ── */
.section-title { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; }
.section-subtitle { font-size: 12px; color: var(--text-muted); }

/* ── Branding Otoma (login + footer uniquement) ── */
.otoma-brand {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.2px;
}
.otoma-brand img { height: 16px; width: auto; display: block; }
.otoma-brand .otoma-fallback { font-weight: 600; color: var(--accent-dark); font-size: 11px; letter-spacing: 0.6px; }

/* ── F3 : panneau latéral de détail planning ── */
#planning-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 92vw;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(26,37,48,0.12);
  z-index: 550;
  transform: translateX(100%);
  transition: transform 0.15s ease;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
#planning-panel.open { transform: translateX(0); }
.pp-header {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 18px 18px 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.pp-kicker { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.pp-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.3; }
.pp-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.pp-close:hover { color: var(--text); }
.pp-body { padding: 14px 18px 24px; }
.pp-row { padding: 9px 0; border-bottom: 1px solid var(--light); }
.pp-row:last-child { border-bottom: none; }
.pp-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.pp-value { font-size: 13px; color: var(--text); line-height: 1.5; }
.pp-stores div { padding: 2px 0; }

/* ── F2/F7 : overlays plein écran (drill-down, fiche 360°) ── */
.v2-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg-page);
  display: none;
  overflow: hidden;
}
.v2-overlay.open { display: flex; flex-direction: column; }
#store-sheet-overlay { z-index: 450; }
.v2-overlay-inner { display: flex; flex-direction: column; height: 100%; width: 100%; }
.v2-overlay-header {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.v2-overlay-body { flex: 1; overflow-y: auto; padding: 24px 28px 48px; }
.drill-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; flex: 1; min-width: 0; flex-wrap: wrap; }
.drill-breadcrumb a { color: var(--accent-strong); cursor: pointer; font-weight: 500; }
.drill-breadcrumb a:hover { text-decoration: underline; }
.drill-breadcrumb .crumb-sep { color: var(--text-muted); }
.drill-breadcrumb .crumb-current { font-weight: 600; color: var(--text); }

.drill-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.drill-row:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(104,156,181,0.15); }
.drill-row-label { flex: 0 0 240px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drill-row-bar { flex: 1; height: 8px; background: var(--light); border-radius: 4px; overflow: hidden; }
.drill-row-bar > div { height: 100%; border-radius: 4px; background: var(--accent); }
.drill-row-value { flex: 0 0 130px; text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drill-row-weight { flex: 0 0 52px; text-align: right; font-size: 11px; color: var(--text-muted); }
.drill-row-sub { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

/* ── V3 lot B : composant recherche unifié + toolbar du drill-down ── */
.search-box { position: relative; flex: 1; min-width: 180px; }
.search-box .form-input { padding-left: 36px; width: 100%; }
.search-box .search-box-icon { position: absolute; left: 12px; top: 10px; color: var(--text-muted); pointer-events: none; }
.drill-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.drill-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.drill-filter-chip {
  display: inline-flex; align-items: center;
  background: var(--accent-tint); color: var(--accent-dark);
  border-radius: 12px; padding: 3px 10px; font-size: 11px; font-weight: 600;
}

/* ── F8 : carte de France ── */
.france-map-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-card); padding: 18px 20px; margin-bottom: 20px; }
.france-map-flex { display: flex; gap: 24px; align-items: stretch; flex-wrap: wrap; }
/* V3 lot D — les fills/strokes sont portés par les éléments (fusion visuelle des
   secteurs par <g>) : le CSS ne fixe plus de couleur, seulement les interactions. */
.france-map-svg-wrap { flex: 1 1 380px; max-width: 520px; position: relative; }
.france-map-svg-wrap svg { width: 100%; height: auto; display: block; }
.france-map-svg-wrap path { transition: opacity 0.15s; }
.france-map-svg-wrap g.map-sector:hover { opacity: 0.82; }
.france-map-svg-wrap circle.map-store-pt {
  fill: var(--accent-dark); stroke: var(--bg-card); stroke-width: 1;
  cursor: pointer; transition: opacity 0.15s;
}
.france-map-svg-wrap circle.map-store-pt:hover { opacity: 0.75; }
.france-map-side { flex: 1 1 220px; display: flex; flex-direction: column; gap: 12px; min-width: 220px; }
#france-map-tooltip {
  position: fixed; z-index: 9999; pointer-events: none; display: none;
  background: var(--bg-sidebar); color: var(--text-on-dark);
  border-radius: 8px; padding: 8px 12px; font-size: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.map-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.map-legend-scale { display: flex; height: 10px; border-radius: 5px; overflow: hidden; flex: 1; max-width: 140px; }
.map-legend-scale span { flex: 1; }

/* ── F7 : fiche magasin 360° ── */
.sheet-header { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.sheet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.sheet-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.sheet-tab {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.sheet-tab:hover { color: var(--text); }
.sheet-tab.active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; z-index: 1;
}
.tl-card { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; box-shadow: var(--shadow-card); min-width: 0; }
.tl-date { font-size: 11px; color: var(--text-muted); }
.tl-title { font-size: 13px; font-weight: 600; margin: 2px 0 4px; }
.tl-body { font-size: 12px; color: var(--text); line-height: 1.5; }
.sheet-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; background: var(--light); }
.store-link { color: var(--accent-strong); cursor: pointer; font-weight: 500; }
.store-link:hover { text-decoration: underline; }
#lightbox-overlay {
  position: fixed; inset: 0; z-index: 700; background: rgba(26,37,48,0.88);
  display: none; align-items: center; justify-content: center; cursor: zoom-out;
}
#lightbox-overlay.open { display: flex; }
#lightbox-overlay img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }
