  @import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Orbitron:wght@700;900&display=swap');

  :root {
    --bg: #0f0f1a;
    --card: #1a1a2e;
    --card2: #16213e;
    --green: #00e676;
    --green-dark: #00c853;
    --orange: #ff9100;
    --red: #ff1744;
    --yellow: #ffea00;
    --blue: #2979ff;
    --purple: #d500f9;
    --cyan: #00e5ff;
    --text: #f0f0f0;
    --text-dim: #8888aa;
    --radius: 20px;
    --radius-sm: 12px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ===== LOADING SCREEN ===== */
  #loading-screen {
    position: fixed; inset: 0;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a1a 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  #loading-screen.fade-out {
    opacity: 0; transform: scale(1.05);
    pointer-events: none;
  }

  .dashboard-anim {
    width: 300px; height: 200px;
    position: relative;
  }

  /* Carrosserie */
  .car-body {
    position: absolute;
    bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 220px; height: 80px;
    background: linear-gradient(135deg, #2a2a4e, #1a1a3e);
    border-radius: 40px 40px 10px 10px;
    border: 2px solid #3a3a6e;
    overflow: hidden;
  }
  .car-body::before {
    content: '';
    position: absolute; top: -30px; left: 20px;
    width: 160px; height: 60px;
    background: linear-gradient(135deg, #222244, #1a1a3a);
    border-radius: 30px 30px 0 0;
    border: 2px solid #3a3a6e;
    border-bottom: none;
  }

  /* Roues */
  .wheel {
    position: absolute; bottom: 10px;
    width: 50px; height: 50px;
    background: #111;
    border-radius: 50%;
    border: 4px solid #333;
    animation: spin 0.8s linear infinite;
  }
  .wheel::after {
    content: '';
    position: absolute; inset: 6px;
    background: radial-gradient(circle, #555 30%, #222 70%);
    border-radius: 50%;
  }
  .wheel.left { left: 20px; }
  .wheel.right { right: 20px; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* Tableau de bord */
  .dash-board {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 260px; height: 130px;
    background: #0a0a1a;
    border-radius: 16px;
    border: 2px solid #2a2a5e;
    display: flex; gap: 10px;
    align-items: center; justify-content: center;
    padding: 12px;
  }

  /* Speedometer */
  .speedo {
    position: relative; width: 90px; height: 90px;
  }
  .speedo svg {
    width: 100%; height: 100%;
    transform: rotate(-135deg);
  }
  .speedo-arc {
    fill: none; stroke: #222; stroke-width: 8;
    stroke-dasharray: 220; stroke-dashoffset: 0;
    stroke-linecap: round;
  }
  .speedo-fill {
    fill: none; stroke: var(--green); stroke-width: 8;
    stroke-dasharray: 220; stroke-dashoffset: 220;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px var(--green));
    transition: stroke-dashoffset 0.1s;
  }
  .speedo-needle {
    position: absolute; bottom: 50%; left: 50%;
    width: 2px; height: 38px;
    background: var(--orange);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-135deg);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--orange);
    transition: transform 0.1s;
  }
  .speedo-center {
    position: absolute; bottom: 42%; left: 50%;
    transform: translateX(-50%);
    width: 10px; height: 10px;
    background: var(--orange);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--orange);
  }

  /* Témoins lumineux */
  .indicators {
    display: flex; flex-direction: column; gap: 6px;
  }
  .ind-row { display: flex; gap: 6px; }
  .ind {
    width: 16px; height: 16px;
    border-radius: 4px;
    background: #1a1a2e;
    border: 1px solid #333;
    transition: background 0.3s, box-shadow 0.3s;
  }
  .ind.on-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
  .ind.on-orange { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
  .ind.on-blue { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
  .ind.on-purple { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
  .ind.on-red { background: var(--red); box-shadow: 0 0 8px var(--red); }
  .ind.on-yellow { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }

  /* Écran LCD */
  .lcd {
    flex: 1;
    background: #001a00;
    border-radius: 8px;
    padding: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    color: var(--green);
    text-shadow: 0 0 6px var(--green);
    line-height: 1.6;
    border: 1px solid #004400;
  }

  /* Road animation */
  .road {
    position: absolute; bottom: 0; left: 0; right: 0; height: 32px;
    background: #222;
    overflow: hidden;
  }
  .road::after {
    content: '';
    position: absolute; top: 50%; left: 0;
    width: 200%; height: 3px;
    background: repeating-linear-gradient(90deg, var(--yellow) 0 30px, transparent 30px 60px);
    transform: translateY(-50%);
    animation: road-scroll 2s linear infinite;
  }
  @keyframes road-scroll { to { transform: translateY(-50%) translateX(-50%); } }

  .loading-title {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan);
    margin-top: 24px;
    letter-spacing: 4px;
  }
  .loading-sub {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 2px;
  }
  .loading-bar-wrap {
    width: 280px; height: 8px;
    background: #222; border-radius: 10px;
    margin-top: 20px; overflow: hidden;
  }
  .loading-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    border-radius: 10px;
    box-shadow: 0 0 12px var(--cyan);
    transition: width 0.15s ease;
  }
  .loading-step {
    font-size: 12px; color: var(--text-dim);
    margin-top: 10px; font-weight: 600;
    letter-spacing: 1px; min-height: 18px;
  }

  /* ===== APP ===== */
  #app { display: none; }
  #app.visible { display: block; }

  /* Header */
  .app-header {
    background: linear-gradient(135deg, #1a1a3e, #16213e);
    padding: 12px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 2px solid #2a2a5e;
    position: sticky; top: 0; z-index: 100;
    gap: 8px;
  }
  .app-logo {
    font-family: 'Orbitron', monospace;
    font-size: 22px; font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    letter-spacing: 2px;
    line-height: 1.1;
    flex-shrink: 0;
  }
  .app-logo span { color: var(--orange); font-size: 28px; letter-spacing: 4px; }
  /* header-center masqué — heure/date/msg retirés du header */
  .header-center { display: none; }
  .header-date   { display: none; }
  .header-time   { display: none; }
  .header-msg    { display: none; }

  /* Nav tabs */
  .nav-tabs {
    display: flex; gap: 0;
    background: var(--card2);
    border-bottom: 2px solid #2a2a5e;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tab {
    flex: 1; min-width: 70px;
    padding: 14px 8px;
    text-align: center;
    font-size: 11px; font-weight: 800;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    letter-spacing: 0.5px;
  }
  .nav-tab .tab-icon { font-size: 20px; display: block; margin-bottom: 3px; }
  .nav-tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
  .nav-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

  /* Pages */
  .page { display: none; padding: 16px; animation: fadeIn 0.3s ease; }
  .page.active { display: block; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  /* ===== DASHBOARD ===== */
  .traffic-light-card {
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    position: relative; overflow: hidden;
    border: 2px solid;
    text-align: center;
  }
  .traffic-light-card.green {
    background: linear-gradient(135deg, #003320, #001a10);
    border-color: var(--green);
    box-shadow: 0 0 30px rgba(0,230,118,0.2);
  }
  .traffic-light-card.orange {
    background: linear-gradient(135deg, #3a1a00, #1a0d00);
    border-color: var(--orange);
    box-shadow: 0 0 30px rgba(255,145,0,0.2);
  }
  .traffic-light-card.red {
    background: linear-gradient(135deg, #3a0010, #1a0008);
    border-color: var(--red);
    box-shadow: 0 0 30px rgba(255,23,68,0.2);
  }
  .tl-emoji { font-size: 56px; display: block; margin-bottom: 8px; animation: pulse-emoji 2s ease-in-out infinite; }
  @keyframes pulse-emoji { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
  .tl-status {
    font-family: 'Orbitron', monospace;
    font-size: 18px; font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 6px;
  }
  .tl-msg {
    font-size: 15px; font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 16px;
  }

  /* Barre de progression objectif */
  /* Encart voiture */
  #car-widget { display:none; flex-direction:column; align-items:center; gap:6px; padding:10px 0 4px; }
  #car-widget.active { display:flex; }
  #traffic-light-card.car-mode .tl-emoji,
  #traffic-light-card.car-mode .tl-status,
  #traffic-light-card.car-mode .tl-msg,
  #traffic-light-card.car-mode .obj-pct { display:none !important; }
  .car-stage-name { font-family:'Orbitron',monospace; font-size:13px; font-weight:900; color:var(--text); letter-spacing:1px; }
  .car-stage-pct  { font-family:'Orbitron',monospace; font-size:28px; font-weight:900; color:var(--orange); }

  .obj-progress-wrap {
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    height: 18px; overflow: hidden;
    margin-bottom: 8px;
  }
  .obj-progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 1s cubic-bezier(.4,2,.6,1);
    position: relative;
  }
  .obj-progress-bar.green { background: linear-gradient(90deg, var(--green-dark), var(--green)); box-shadow: 0 0 12px var(--green); }
  .obj-progress-bar.orange { background: linear-gradient(90deg, #e65100, var(--orange)); box-shadow: 0 0 12px var(--orange); }
  .obj-progress-bar.red { background: linear-gradient(90deg, #b71c1c, var(--red)); box-shadow: 0 0 12px var(--red); }
  .obj-pct { font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 700; text-align: right; margin-bottom: 12px; letter-spacing: 0.5px; }

  /* ── Projection & Vacances Stats ── */
  .projection-scenarios {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
  }
  .proj-scenario {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px 10px;
    text-align: center;
    border: 2px solid transparent;
  }
  .proj-scenario.verdict-ok { border-color: var(--green); }
  .proj-scenario.verdict-ko { border-color: var(--red); }
  .proj-scenario .ps-label  { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 6px; }
  .proj-scenario .ps-ca     { font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 900; }
  .proj-scenario .ps-remun  { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
  .proj-scenario .ps-is     { font-size: 11px; color: var(--text-dim); }
  .proj-scenario .ps-verdict{ font-size: 11px; font-weight: 800; margin-top: 6px; }
  .proj-verdict-bar {
    display: flex; align-items: center; gap: 8px; margin-top: 14px;
    background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px 14px;
  }
  .proj-verdict-bar .pv-icon { font-size: 20px; }
  .proj-verdict-bar .pv-text { font-size: 12px; font-weight: 700; color: var(--text); }
  .vacances-item {
    background: rgba(41,121,255,0.1); border: 1px solid var(--blue);
    border-radius: 10px; padding: 12px; margin-bottom: 10px;
  }
  .vacances-item .vi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .vacances-item .vi-dates  { font-size: 12px; font-weight: 800; color: var(--blue); }
  .vacances-item .vi-budget-wrap { display: flex; align-items: center; gap: 8px; }
  .vacances-item .vi-impact { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
  .proj-baseline {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
  }
  .proj-baseline-item { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px; text-align: center; }
  .proj-baseline-item .pbi-label { font-size: 10px; color: var(--text-dim); font-weight: 700; margin-bottom: 4px; }
  .proj-baseline-item .pbi-val   { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 900; }

  .stats-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 16px;
  }
  .stat-card {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid #2a2a4e;
    text-align: center;
  }
  .stat-label { font-size: 11px; color: var(--text-dim); font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; text-transform: uppercase; }
  .stat-value { font-family: 'Orbitron', monospace; font-size: 20px; font-weight: 700; }
  .stat-value.green { color: var(--green); text-shadow: 0 0 8px var(--green); }
  .stat-value.orange { color: var(--orange); text-shadow: 0 0 8px var(--orange); }
  .stat-value.cyan { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
  .stat-value.purple { color: var(--purple); text-shadow: 0 0 8px var(--purple); }

  /* Bouton saisie rapide */
  .btn-saisie {
    width: 100%; padding: 18px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border: none; border-radius: var(--radius);
    color: white; font-family: 'Nunito', sans-serif;
    font-size: 18px; font-weight: 900;
    cursor: pointer; letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(41,121,255,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
    margin-bottom: 16px;
  }
  .btn-saisie:active { transform: scale(0.97); box-shadow: 0 2px 10px rgba(41,121,255,0.3); }

  /* Vue semaine / mois */
  .view-toggle {
    display: flex; gap: 8px; margin-bottom: 16px;
  }
  .view-btn {
    flex: 1; padding: 10px;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: var(--radius-sm); color: var(--text-dim);
    font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
    cursor: pointer; transition: all 0.2s;
  }
  .view-btn.active {
    background: var(--blue); border-color: var(--blue);
    color: white; box-shadow: 0 0 12px rgba(41,121,255,0.4);
  }

  /* Projection */
  .projection-card {
    background: var(--card2);
    border-radius: var(--radius-sm);
    padding: 16px; border: 1px solid #2a2a5e;
    margin-bottom: 16px;
  }
  .proj-title { font-size: 12px; color: var(--text-dim); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
  .proj-value { font-family: 'Orbitron', monospace; font-size: 26px; font-weight: 700; color: var(--cyan); }
  .proj-sub { font-size: 13px; color: var(--text-dim); font-weight: 600; margin-top: 4px; }

  /* ===== SAISIE ===== */
  /* ── Accordéons Réglages ── */
  .prm-cat {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px; margin-bottom: 12px; overflow: visible;
  }
  .prm-cat-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; cursor: pointer; user-select: none;
    transition: background .15s; border-radius: 16px;
  }
  .prm-cat-header:hover { background: rgba(255,255,255,.04); }
  .prm-cat-icon  { font-size: 20px; flex-shrink: 0; }
  .prm-cat-title { font-size: 14px; font-weight: 900; color: var(--text); letter-spacing: .5px; }
  .prm-cat-sub   { font-size: 11px; color: var(--text-dim); font-weight: 600; flex: 1; }
  .prm-cat-chevron {
    font-size: 13px; color: var(--text-dim);
    transition: transform .25s; flex-shrink: 0;
  }
  .prm-cat-body  { padding: 0 10px 10px; }

  .prm-group { background: var(--card); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
  .prm-group-title { font-size: 13px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
  .prm-group-sub { font-size: 11px; color: var(--text-dim); font-weight: 600; line-height: 1.5; }
  .prm-horaire-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
  .prm-horaire-toggle { display: flex; align-items: center; gap: 6px; min-width: 70px; cursor: pointer; }
  .prm-horaire-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer; }
  .prm-horaire-label { font-size: 12px; font-weight: 800; color: var(--text); }
  .prm-horaire-time { background: var(--card2); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 5px 8px; font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 700; color: var(--text); width: 90px; }
  .prm-horaire-time:disabled { opacity: 0.3; }

  .form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px;
    border: 1px solid #2a2a5e;
  }
  .form-title {
    font-size: 16px; font-weight: 800; margin-bottom: 16px;
    color: var(--cyan); letter-spacing: 1px;
  }
  .form-group { margin-bottom: 14px; }
  label { display: block; font-size: 12px; font-weight: 800; color: var(--text-dim); margin-bottom: 6px; letter-spacing: 1px; text-transform: uppercase; }
  input[type=text], input[type=number], input[type=date], textarea, select {
    width: 100%; padding: 12px 14px;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: var(--radius-sm); color: var(--text);
    font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 600;
    transition: border-color 0.2s;
    outline: none;
  }
  input:focus, textarea:focus, select:focus { border-color: var(--cyan); }
  textarea { resize: vertical; min-height: 70px; }

  .amount-input-wrap { position: relative; }
  .amount-input-wrap input { padding-left: 36px; font-family: 'Orbitron', monospace; font-size: 22px; font-weight: 700; color: var(--green); }
  .amount-euro {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    font-family: 'Orbitron', monospace; font-size: 18px;
    color: var(--green); font-weight: 700;
  }

  .btn-primary {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    border: none; border-radius: var(--radius);
    color: #001a00; font-family: 'Nunito', sans-serif;
    font-size: 17px; font-weight: 900;
    cursor: pointer; letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(0,230,118,0.3);
    transition: transform 0.15s;
  }
  .btn-primary:active { transform: scale(0.97); }

  .day-toggle-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
  .day-chip {
    padding: 8px 14px;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: 20px; font-size: 13px; font-weight: 800;
    cursor: pointer; color: var(--text-dim); transition: all 0.2s;
    user-select: none;
  }
  .day-chip.selected {
    background: var(--red); border-color: var(--red);
    color: white; box-shadow: 0 0 10px rgba(255,23,68,0.4);
  }

  /* Historique saisies */
  .history-list { display: flex; flex-direction: column; gap: 10px; }
  .history-item {
    background: var(--card2); border-radius: var(--radius-sm);
    padding: 12px 16px; border: 1px solid #2a2a5e;
    display: flex; align-items: center; justify-content: space-between;
  }
  .hi-date { font-size: 13px; font-weight: 700; color: var(--text-dim); }
  .hi-amount { font-family: 'Orbitron', monospace; font-size: 18px; font-weight: 700; color: var(--green); }
  .hi-note { font-size: 12px; color: var(--text-dim); font-weight: 600; margin-top: 2px; }
  .hi-del { background: none; border: none; color: var(--red); cursor: pointer; font-size: 18px; padding: 4px 8px; border-radius: 8px; transition: background 0.2s; }
  .hi-del:hover { background: rgba(255,23,68,0.1); }

  /* ===== CHARGES ===== */
  .charges-total {
    background: linear-gradient(135deg, #1a0a3a, #0f0720);
    border: 2px solid var(--purple);
    border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; text-align: center;
    box-shadow: 0 0 20px rgba(213,0,249,0.15);
  }
  .ct-label { font-size: 12px; font-weight: 800; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
  .ct-value { font-family: 'Orbitron', monospace; font-size: 32px; font-weight: 700; color: var(--purple); text-shadow: 0 0 16px var(--purple); }
  .ct-sub { font-size: 13px; color: var(--text-dim); font-weight: 600; margin-top: 6px; }

  .charge-item {
    background: var(--card2); border-radius: var(--radius-sm);
    padding: 14px 16px; border: 1px solid #2a2a5e;
    margin-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
  }
  .charge-info { flex: 1; }
  .charge-name { font-size: 14px; font-weight: 800; }
  .charge-freq { font-size: 11px; color: var(--text-dim); font-weight: 700; margin-top: 2px; text-transform: uppercase; letter-spacing: 1px; }
  .charge-amount { font-family: 'Orbitron', monospace; font-size: 16px; font-weight: 700; color: var(--purple); }
  .charge-monthly { font-size: 11px; color: var(--text-dim); font-weight: 700; text-align: right; }
  .charge-del { background: none; border: none; color: var(--red); cursor: pointer; font-size: 18px; padding: 4px 8px; border-radius: 8px; transition: background 0.2s; }
  .charge-del:hover { background: rgba(255,23,68,0.1); }

  .freq-select-group { display: flex; gap: 8px; flex-wrap: wrap; }
  .freq-chip {
    padding: 8px 14px;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: 20px; font-size: 12px; font-weight: 800;
    cursor: pointer; color: var(--text-dim); transition: all 0.2s;
    user-select: none;
  }
  .freq-chip.selected {
    background: var(--purple); border-color: var(--purple);
    color: white; box-shadow: 0 0 10px rgba(213,0,249,0.4);
  }



  /* ===== FACTURES ===== */
  .fac-section-title {
    font-size: 12px; font-weight: 900; color: var(--text-dim);
    letter-spacing: 2px; text-transform: uppercase;
    margin: 24px 0 12px; display: flex; align-items: center;
    justify-content: space-between;
  }
  .fac-item {
    background: var(--card2); border-radius: var(--radius-sm);
    border: 1px solid #2a2a5e; margin-bottom: 10px;
    padding: 14px 16px; display: flex; align-items: center; gap: 12px;
    cursor: pointer; transition: border-color .15s;
  }
  .fac-item:hover { border-color: var(--cyan); }
  .fac-item-body { flex: 1; min-width: 0; }
  .fac-item-num { font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 900; color: var(--cyan); }
  .fac-item-client { font-size: 13px; font-weight: 800; color: var(--text); margin-top: 2px; }
  .fac-item-meta { font-size: 11px; color: var(--text-dim); font-weight: 700; margin-top: 2px; }
  .fac-item-amount { font-family: 'Orbitron', monospace; font-size: 15px; font-weight: 900; color: var(--green); flex-shrink: 0; }
  .fac-badge {
    padding: 3px 10px; border-radius: 10px; font-size: 10px;
    font-weight: 900; letter-spacing: .5px; flex-shrink: 0;
  }
  .fac-badge-attente  { background: rgba(255,145,0,.15); color: var(--orange); border: 1px solid var(--orange); }
  .fac-badge-payee    { background: rgba(0,200,100,.15); color: var(--green);  border: 1px solid var(--green); }
  .fac-badge-avoir    { background: rgba(255,23,68,.15); color: var(--red); border: 1px solid var(--red); }
  .fac-badge-annulee  { background: rgba(255,255,255,.05); color: var(--text-dim); border: 1px solid rgba(255,255,255,.1); text-decoration: line-through; }
  .fac-item.fac-annulee { opacity: 0.5; }
  .fac-del { background: none; border: none; color: var(--red); cursor: pointer; font-size: 16px; padding: 4px 6px; border-radius: 8px; }

  /* Modal facture */
  .fac-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.85); z-index: 300;
    align-items: flex-end; justify-content: center;
  }
  .fac-modal-overlay.open { display: flex; }
  .fac-modal-box {
    background: var(--card); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 600px; max-height: 92vh;
    overflow-y: auto; padding: 24px 20px 32px;
    border-top: 2px solid var(--cyan);
  }
  .fac-modal-title {
    font-family: 'Orbitron', monospace; font-size: 14px;
    font-weight: 900; color: var(--cyan); letter-spacing: 1px;
    margin-bottom: 6px; text-align: center;
  }
  .fac-modal-num {
    text-align: center; font-size: 11px; color: var(--text-dim);
    font-weight: 700; margin-bottom: 20px;
  }
  .fac-paiement-chips { display: flex; gap: 8px; flex-wrap: wrap; }
  .fac-pay-chip {
    padding: 8px 14px; border-radius: 20px;
    background: var(--card2); border: 2px solid #2a2a5e;
    font-size: 12px; font-weight: 800; color: var(--text-dim);
    cursor: pointer; transition: all .15s; user-select: none;
  }
  .fac-pay-chip.active { background: var(--cyan); border-color: var(--cyan); color: #000; }

  /* PDF facture (impression) */
  @media print {
    body > *:not(.fac-print-overlay) { display: none !important; }
    .fac-print-overlay { position: static !important; background: none !important; display: block !important; }
    .fac-print-actions { display: none !important; }
  }
  .fac-pdf { font-family: Arial, sans-serif; color: #111; }
  .fac-pdf-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; border-bottom: 3px solid #1a1a3e; padding-bottom: 16px; }
  .fac-pdf-logo { font-size: 22px; font-weight: 900; color: #1a1a3e; letter-spacing: 1px; }
  .fac-pdf-logo span { color: #e67e00; }
  .fac-pdf-num { font-size: 13px; color: #555; text-align: right; }
  .fac-pdf-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
  .fac-pdf-party h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #888; margin: 0 0 8px; }
  .fac-pdf-party p { margin: 2px 0; font-size: 13px; }
  .fac-pdf-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
  .fac-pdf-table th { background: #1a1a3e; color: white; padding: 8px 12px; font-size: 12px; text-align: left; }
  .fac-pdf-table td { padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 13px; }
  .fac-pdf-table tr:nth-child(even) td { background: #f8f8f8; }
  .fac-pdf-total { text-align: right; margin-bottom: 24px; }
  .fac-pdf-total-line { font-size: 18px; font-weight: 900; color: #1a1a3e; }
  .fac-pdf-mentions { font-size: 10px; color: #888; border-top: 1px solid #ddd; padding-top: 12px; line-height: 1.6; }


  /* ===== FRAIS ANNULATION ===== */
  .annul-banner {
    display: none; margin: 12px 0;
    background: linear-gradient(135deg,rgba(255,80,80,.12),rgba(255,80,80,.06));
    border: 1.5px solid var(--red); border-radius: 12px;
    padding: 14px 16px;
  }
  .annul-banner.visible { display: block; }
  .annul-banner-title {
    font-size: 12px; font-weight: 900; color: var(--red);
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px;
  }
  .annul-banner-montant {
    font-family: 'Orbitron', monospace; font-size: 22px;
    font-weight: 900; color: var(--red); margin-bottom: 4px;
  }
  .annul-banner-detail {
    font-size: 11px; color: var(--text-dim); font-weight: 700; line-height: 1.6;
  }
  .annul-rule-row {
    display: grid; grid-template-columns: 1fr 80px 1fr;
    gap: 8px; align-items: center; margin-bottom: 10px;
  }
  .annul-rule-sep {
    text-align: center; font-size: 11px; font-weight: 900;
    color: var(--text-dim);
  }

  /* ===== DÉPENSES & JUSTIFICATIFS ===== */
  .dep-section-title {
    font-size: 12px; font-weight: 900; color: var(--text-dim);
    letter-spacing: 2px; text-transform: uppercase;
    margin: 24px 0 12px; display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
  }
  .dep-filters {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
  }
  .dep-filter-chip {
    padding: 5px 12px; border-radius: 14px;
    background: var(--card2); border: 1.5px solid #2a2a5e;
    font-size: 11px; font-weight: 800; color: var(--text-dim);
    cursor: pointer; transition: all .15s; user-select: none;
  }
  .dep-filter-chip.active {
    background: var(--cyan); border-color: var(--cyan); color: #000;
  }
  .dep-item {
    background: var(--card2); border-radius: var(--radius-sm);
    border: 1px solid #2a2a5e; margin-bottom: 10px;
    padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  }
  .dep-item-icon { font-size: 22px; flex-shrink: 0; }
  .dep-item-body { flex: 1; min-width: 0; }
  .dep-item-label {
    font-size: 13px; font-weight: 800; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .dep-item-meta {
    font-size: 11px; color: var(--text-dim); font-weight: 700;
    margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap;
  }
  .dep-item-amount {
    font-family: 'Orbitron', monospace; font-size: 15px;
    font-weight: 900; color: var(--orange); flex-shrink: 0;
  }
  .dep-item-actions {
    display: flex; gap: 6px; align-items: center; flex-shrink: 0;
  }
  .dep-thumb {
    width: 40px; height: 40px; border-radius: 8px;
    object-fit: cover; cursor: pointer; border: 1.5px solid #2a2a5e;
    flex-shrink: 0;
  }
  .dep-thumb-pdf {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(255,80,80,.15); border: 1.5px solid var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; flex-shrink: 0;
  }
  .dep-del {
    background: none; border: none; color: var(--red);
    cursor: pointer; font-size: 16px; padding: 4px 6px;
    border-radius: 8px; transition: background .2s;
  }
  .dep-del:hover { background: rgba(255,23,68,.1); }
  .dep-attach-btn {
    background: none; border: none; color: var(--cyan);
    cursor: pointer; font-size: 16px; padding: 4px 6px;
    border-radius: 8px; transition: background .2s;
  }
  .dep-attach-btn:hover { background: rgba(0,200,255,.1); }
  .dep-total-bar {
    background: rgba(255,145,0,.08); border: 1px solid rgba(255,145,0,.2);
    border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .dep-total-label { font-size: 12px; font-weight: 800; color: var(--text-dim); }
  .dep-total-val { font-family: 'Orbitron', monospace; font-size: 16px; font-weight: 900; color: var(--orange); }
  .dep-export-row {
    display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
  }
  .dep-export-btn {
    flex: 1; min-width: 120px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 900; font-family: 'Orbitron', monospace;
    cursor: pointer; border: 2px solid; transition: all .2s; letter-spacing: .5px;
  }
  .dep-export-csv {
    background: transparent; border-color: var(--green); color: var(--green);
  }
  .dep-export-csv:hover { background: rgba(0,200,100,.1); }
  .dep-export-pdf {
    background: transparent; border-color: var(--cyan); color: var(--cyan);
  }
  .dep-export-pdf:hover { background: rgba(0,200,255,.1); }

  /* Modal dépense */
  .dep-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.8); z-index: 300;
    align-items: flex-end; justify-content: center;
  }
  .dep-modal-overlay.open { display: flex; }
  .dep-modal-box {
    background: var(--card); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 600px; max-height: 90vh;
    overflow-y: auto; padding: 24px 20px 32px;
    border-top: 2px solid var(--orange);
  }
  .dep-modal-title {
    font-family: 'Orbitron', monospace; font-size: 14px;
    font-weight: 900; color: var(--orange); letter-spacing: 1px;
    margin-bottom: 20px; text-align: center;
  }
  .dep-cat-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin-bottom: 16px;
  }
  .dep-cat-chip {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 10px 6px; border-radius: 12px;
    background: var(--card2); border: 2px solid #2a2a5e;
    cursor: pointer; transition: all .15s; user-select: none;
  }
  .dep-cat-chip span:first-child { font-size: 22px; }
  .dep-cat-chip span:last-child { font-size: 10px; font-weight: 800; color: var(--text-dim); }
  .dep-cat-chip.active {
    border-color: var(--orange); background: rgba(255,145,0,.12);
  }
  .dep-cat-chip.active span:last-child { color: var(--orange); }
  .dep-upload-zone {
    border: 2px dashed #2a2a5e; border-radius: 12px;
    padding: 20px; text-align: center; cursor: pointer;
    transition: border-color .2s; margin-top: 8px;
  }
  .dep-upload-zone:hover { border-color: var(--cyan); }
  .dep-upload-zone p { font-size: 12px; color: var(--text-dim); font-weight: 700; margin: 6px 0 0; }
  .dep-preview { max-width: 100%; border-radius: 10px; margin-top: 10px; }

  /* Lightbox justificatif */
  .dep-lightbox {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92);
    z-index: 500; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px;
  }
  .dep-lightbox.open { display: flex; }
  .dep-lightbox img { max-width: 95vw; max-height: 80vh; border-radius: 10px; }
  .dep-lightbox iframe { width: 95vw; height: 80vh; border: none; border-radius: 10px; }
  .dep-lightbox-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(255,255,255,.15); border: none; color: white;
    font-size: 24px; width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
  }

  /* ===== PLANNING ===== */
  .calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 4px; margin-bottom: 16px;
  }
  .cal-header {
    text-align: center; font-size: 11px; font-weight: 800;
    color: var(--text-dim); padding: 6px 0; letter-spacing: 1px;
  }
  .cal-day {
    aspect-ratio: 1; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
    background: var(--card2); border: 1px solid #2a2a5e;
    cursor: pointer; transition: all 0.15s;
    position: relative;
  }
  .cal-day.empty { background: transparent; border-color: transparent; cursor: default; }
  .cal-day.off { background: rgba(255,23,68,0.15); border-color: var(--red); color: var(--red); }
  .cal-day.worked { background: rgba(0,230,118,0.1); border-color: var(--green); color: var(--green); }
  .cal-day.missed { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.15); color: var(--text-dim); }
  .cal-day.future-off { background: rgba(255,145,0,0.1); border-color: var(--orange); color: var(--orange); }
  .cal-day.vacation { background: rgba(41,121,255,0.15); border-color: var(--blue); color: var(--blue); }
  .cal-day.today { border-color: var(--cyan) !important; box-shadow: 0 0 0 1px var(--cyan), 0 0 8px rgba(0,229,255,.3); }
  .cal-day:not(.empty):hover { transform: scale(1.1); z-index: 2; }
  .cal-day-res-dot {
    position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--cyan); box-shadow: 0 0 4px var(--cyan);
  }
  .cal-day-res-count {
    position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    font-size: 8px; font-weight: 900; color: var(--cyan);
    line-height: 1;
  }

  .cal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
  .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
  .legend-dot { width: 12px; height: 12px; border-radius: 4px; }

  .nav-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .month-title { font-family: 'Orbitron', monospace; font-size: 16px; font-weight: 700; color: var(--cyan); }
  .month-btn { background: var(--card2); border: 2px solid #2a2a5e; color: var(--text); border-radius: 10px; padding: 6px 14px; cursor: pointer; font-size: 18px; font-weight: 700; transition: all 0.2s; }
  .month-btn:hover { border-color: var(--cyan); color: var(--cyan); }

  /* ===== PARAMETRES ===== */
  .section-title {
    font-size: 14px; font-weight: 900; color: var(--orange);
    letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 12px; margin-top: 4px;
  }

  /* ===== GRAPHIQUE ===== */
  .chart-wrap {
    background: var(--card); border-radius: var(--radius);
    padding: 16px; margin-bottom: 16px; border: 1px solid #2a2a5e;
  }
  .chart-title { font-size: 13px; font-weight: 800; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
  .bars-chart {
    display: flex; align-items: flex-end; gap: 8px;
    height: 120px; position: relative;
  }
  .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
  .bar {
    width: 100%; border-radius: 6px 6px 0 0;
    transition: height 1s cubic-bezier(.4,2,.6,1);
    position: relative; min-height: 4px;
  }
  .bar.green { background: linear-gradient(180deg, var(--green), var(--green-dark)); box-shadow: 0 0 8px rgba(0,230,118,0.4); }
  .bar.orange { background: linear-gradient(180deg, var(--orange), #e65100); box-shadow: 0 0 8px rgba(255,145,0,0.4); }
  .bar.red { background: linear-gradient(180deg, var(--red), #b71c1c); box-shadow: 0 0 8px rgba(255,23,68,0.4); }
  .bar.blue { background: linear-gradient(180deg, var(--cyan), var(--blue)); box-shadow: 0 0 8px rgba(0,229,255,0.4); opacity: 0.5; }
  .bar-label { font-size: 10px; font-weight: 800; color: var(--text-dim); }
  .bar-wrap { position: relative; }
  .bar-obj-mark { position: absolute; left: 10%; right: 10%; height: 2px; background: var(--orange); opacity: 0.5; pointer-events: none; }
  .objective-line {
    position: absolute; left: 0; right: 0;
    border-top: 2px dashed var(--orange);
    pointer-events: none;
  }
  .obj-line-label { position: absolute; right: 0; top: -18px; font-size: 10px; color: var(--orange); font-weight: 800; }

  /* Toast */
  .toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--card); border-radius: 20px; padding: 12px 24px;
    font-size: 14px; font-weight: 800; color: var(--text);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); border: 1px solid #2a2a5e;
    opacity: 0; transition: all 0.3s; z-index: 1000; white-space: nowrap;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  /* Alerte nouvelle course */
  .new-course-alert {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    padding: 0; cursor: pointer;
    animation: alertPulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 24px rgba(255,0,0,0.5);
  }
  .new-course-alert-inner {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; max-width: 600px; margin: 0 auto;
  }
  .new-course-alert-icon {
    width: 36px; height: 36px; border-radius: 50%; background: #fff;
    color: #cc0000; font-size: 22px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .new-course-alert-text {
    flex: 1; color: #fff; line-height: 1.3;
  }
  .new-course-alert-text strong { display: block; font-size: 15px; }
  .new-course-alert-text span { font-size: 12px; opacity: 0.9; }
  .new-course-alert-action {
    background: #fff; color: #cc0000; font-weight: 900; font-size: 13px;
    padding: 8px 16px; border-radius: 20px; flex-shrink: 0;
  }
  @keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
  }

  /* Alerte depart course */
  .departure-alert {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
    background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
    padding: 0; cursor: pointer;
    animation: depAlertPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 24px rgba(255,152,0,0.5);
  }
  .departure-alert-inner {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; max-width: 600px; margin: 0 auto;
  }
  .departure-alert-icon {
    width: 40px; height: 40px; border-radius: 50%; background: #fff;
    color: #e65100; font-size: 20px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .departure-alert-text {
    flex: 1; color: #fff; line-height: 1.3;
  }
  .departure-alert-text strong { display: block; font-size: 15px; }
  .departure-alert-text span { font-size: 12px; opacity: 0.95; }
  .departure-alert-action {
    background: #fff; color: #e65100; font-weight: 900; font-size: 12px;
    padding: 8px 14px; border-radius: 20px; flex-shrink: 0;
    border: none; cursor: pointer;
  }
  .departure-alert-close {
    color: rgba(255,255,255,0.7); font-size: 22px; font-weight: 700;
    padding: 0 4px; cursor: pointer; flex-shrink: 0; line-height: 1;
  }
  .departure-alert-close:hover { color: #fff; }
  @keyframes depAlertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
  }

  /* Modal */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    display: none; align-items: flex-end; justify-content: center;
    z-index: 500;
  }
  .modal-overlay.open { display: flex; }
  .modal-box {
    background: var(--card); border-radius: 24px 24px 0 0;
    padding: 24px; width: 100%; max-width: 480px;
    border-top: 2px solid #2a2a5e;
    animation: slideUp 0.3s ease;
  }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .modal-title { font-size: 18px; font-weight: 900; margin-bottom: 16px; color: var(--cyan); }
  .modal-close { float: right; background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; }

  /* Navigateur de date tactile */
  .date-nav {
    display: flex; align-items: center; gap: 10px;
  }
  .date-nav-btn {
    width: 48px; height: 48px; flex-shrink: 0;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 20px; font-weight: 900; cursor: pointer;
    transition: all 0.15s; display: flex; align-items: center; justify-content: center;
  }
  .date-nav-btn:active { transform: scale(0.9); background: var(--blue); border-color: var(--blue); }
  .date-nav-btn:disabled { opacity: 0.3; cursor: default; }
  .date-nav-display {
    flex: 1; padding: 12px; text-align: center;
    background: var(--card2); border: 2px solid var(--cyan);
    border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 800; color: var(--cyan);
    line-height: 1.3;
  }
  .date-nav-display .date-day { font-size: 11px; color: var(--text-dim); display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 1px; }
  .date-nav-display.today { border-color: var(--green); color: var(--green); }
  .date-nav-display.already { border-color: var(--orange); color: var(--orange); }

  /* Grille catégories (remplace select) */
  .cat-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .cat-chip {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 10px 6px;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: var(--radius-sm); font-size: 20px;
    cursor: pointer; transition: all 0.2s; user-select: none;
  }
  .cat-chip span { font-size: 11px; font-weight: 800; color: var(--text-dim); letter-spacing: 0.5px; }
  .cat-chip.selected {
    background: rgba(0,229,255,0.1); border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0,229,255,0.25);
  }
  .cat-chip.selected span { color: var(--cyan); }
  .cat-chip:active { transform: scale(0.95); }

  /* ===== JOUR PRELEVEMENT ===== */
  .jour-prelev-grid {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px;
  }
  .jour-chip {
    padding: 7px 0; text-align: center;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: 10px; font-size: 12px; font-weight: 800;
    cursor: pointer; color: var(--text-dim); transition: all 0.2s;
    user-select: none;
  }
  .jour-chip.selected {
    background: var(--cyan); border-color: var(--cyan);
    color: #0a0a23; box-shadow: 0 0 10px rgba(0,229,255,0.3);
  }
  .jour-chip:active { transform: scale(0.93); }

  /* ===== TRÉSO ===== */
  .treso-line {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid #1a1a3e;
  }
  .treso-line:last-child { border-bottom: none; }
  .tl-label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
  .tl-val { font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 700; }
  .tl-val.cyan { color: var(--cyan); }
  .tl-val.red { color: var(--red); }
  .tl-val.orange { color: var(--orange); }
  .tl-val.purple { color: var(--purple); }
  .tl-val.green { color: var(--green); font-size: 16px; }
  .treso-sep { height: 1px; background: #2a2a5e; margin: 8px 0; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: #2a2a5e; border-radius: 4px; }

  /* Responsive */

  /* ===== CARTE CONSEIL ===== */
  .conseil-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: border-color .3s;
    cursor: pointer;
  }
  .conseil-card.boost { border-color: var(--green); }
  .conseil-card.alerte { border-color: var(--orange); }
  .conseil-card.relax { border-color: var(--cyan); }

  .conseil-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    user-select: none;
  }
  .conseil-icon { font-size: 44px; flex-shrink: 0; }
  .conseil-main { flex: 1; min-width: 0; }
  .conseil-titre {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 3px;
  }
  .conseil-accroche {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .conseil-chevron {
    font-size: 24px;
    color: var(--text-dim);
    transition: transform .3s;
    flex-shrink: 0;
  }
  .conseil-chevron.open { transform: rotate(180deg); }

  .conseil-detail {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid var(--border);
  }
  .conseil-detail.open { display: block; }

  .conseil-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dim);
    line-height: 1.6;
  }
  .conseil-detail-item:last-child { border-bottom: none; }
  .cdl { font-size: 24px; flex-shrink: 0; margin-top: 1px; }
  .cdt strong { color: var(--text); }

  /* ===== DÉPENSES ===== */
  .depense-cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 4px; }
  .dep-cat-chip {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-dim);
    cursor: pointer;
    transition: .2s;
  }
  .dep-cat-chip.selected { border-color: var(--orange); color: var(--orange); background: rgba(251,146,60,.1); }

  .depense-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .dep-line-left { display: flex; flex-direction: column; gap: 2px; }
  .dep-line-cat { font-size: 13px; font-weight: 800; color: var(--text); }
  .dep-line-meta { font-size: 11px; color: var(--text-dim); font-weight: 700; }
  .dep-line-right { text-align: right; flex-shrink: 0; }
  .dep-line-montant { font-size: 16px; font-weight: 900; color: var(--red); font-family: 'Orbitron', monospace; }
  .dep-line-tva { font-size: 11px; color: var(--green); font-weight: 800; }

  .dash-depenses-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  .dash-dep-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }


  /* ===== INFOBULLES ⓘ ===== */
  .info-tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(0,229,255,0.15); border: 1.5px solid var(--cyan);
    color: var(--cyan); font-size: 12px; font-weight: 900;
    font-family: 'Times New Roman', Georgia, serif; font-style: italic;
    cursor: pointer; margin-left: 7px; flex-shrink: 0;
    vertical-align: middle; user-select: none; text-transform: none;
    transition: background .2s;
  }
  .info-tip:hover { background: rgba(0,229,255,0.3); }
  .info-bubble {
    position: fixed; z-index: 99999;
    background: #1e2a4a; border: 1.5px solid var(--cyan);
    border-radius: 14px; padding: 14px 16px;
    font-size: 13px; font-weight: 600; color: var(--text);
    line-height: 1.6; max-width: 300px; box-shadow: 0 8px 32px rgba(0,0,0,.6);
    animation: bubbleIn .15s ease;
  }
  @keyframes bubbleIn { from { opacity:0; transform:scale(.92); } to { opacity:1; transform:scale(1); } }

  /* ===== SÉLECTEUR STATUT JURIDIQUE ===== */
  .statut-chips { display: flex; gap: 8px; flex-wrap: wrap; }
  .statut-chip {
    flex: 1; min-width: 80px;
    padding: 12px 8px; text-align: center;
    background: var(--card2); border: 2px solid #2a2a5e;
    border-radius: 14px; cursor: pointer; transition: all .2s;
    user-select: none;
  }
  .statut-chip .sc-emoji { font-size: 22px; display: block; margin-bottom: 4px; }
  .statut-chip .sc-label { font-size: 11px; font-weight: 900; color: var(--text-dim); letter-spacing: .5px; display: block; }
  .statut-chip .sc-sub { font-size: 10px; font-weight: 700; color: #555588; display: block; margin-top: 2px; }
  .statut-chip.selected { border-color: var(--orange); background: rgba(255,145,0,.12); }
  .statut-chip.selected .sc-label { color: var(--orange); }

  /* ===== BARRE PLAFOND MICRO ===== */
  .plafond-bar-wrap {
    background: var(--card); border: 1px solid #2a2a5e;
    border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
  }
  .plafond-bar-track {
    height: 10px; background: #1a1a3e; border-radius: 6px;
    overflow: hidden; margin: 8px 0 6px;
  }
  .plafond-bar-fill {
    height: 100%; border-radius: 6px;
    transition: width .5s ease, background .3s;
  }

  /* ===== MAGIC LINK / AUTH ===== */
  #auth-screen {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--bg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 20px; padding: 32px;
  }
  #auth-screen.hidden { display: none; }
  .auth-logo { font-size: 60px; }
  .auth-title { font-family: 'Orbitron', monospace; font-size: 24px; font-weight: 900; color: var(--cyan); letter-spacing: 2px; text-align: center; }
  .auth-subtitle { font-size: 15px; color: var(--text-dim); font-weight: 700; text-align: center; line-height: 1.6; max-width: 340px; }
  .auth-input {
    width: 100%; max-width: 340px;
    background: var(--card); border: 2px solid var(--border);
    border-radius: 14px; padding: 18px 20px;
    font-size: 18px; font-weight: 700; color: var(--text);
    font-family: 'Nunito', sans-serif;
    text-align: center; outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
  }
  .auth-input:focus { border-color: var(--cyan); }
  .auth-input::placeholder { color: var(--text-dim); font-weight: 600; }
  .auth-btn {
    width: 100%; max-width: 340px;
    background: var(--cyan); border: none; border-radius: 14px;
    padding: 20px; font-size: 18px; font-weight: 900;
    color: #000; cursor: pointer; font-family: 'Orbitron', monospace;
    letter-spacing: 1px; transition: opacity .2s;
  }
  .auth-btn:active { opacity: 0.8; }
  .auth-btn:disabled { opacity: 0.4; cursor: default; }
  .auth-btn.secondary {
    background: transparent; color: var(--text-dim);
    border: 2px solid var(--border); font-size: 15px;
    padding: 14px;
  }
  .auth-error { font-size: 14px; color: var(--red); font-weight: 800; text-align: center; min-height: 20px; }
  .auth-success { font-size: 14px; color: var(--green); font-weight: 800; text-align: center; }
  .otp-input {
    letter-spacing: 12px; font-size: 28px;
    font-family: 'Orbitron', monospace;
  }

  /* ===== ÉCRAN PIN ===== */
  #pin-screen {
    position: relative;
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 24px; padding: 32px;
  }
  #pin-screen.hidden { display: none; }
  .pin-logo { font-size: 56px; }
  .pin-title { font-family: 'Orbitron', monospace; font-size: 22px; font-weight: 900; color: var(--cyan); letter-spacing: 2px; text-align: center; }
  .pin-subtitle { font-size: 15px; color: var(--text-dim); font-weight: 700; text-align: center; line-height: 1.5; }
  .pin-dots { display: flex; gap: 16px; justify-content: center; margin: 8px 0; }
  .pin-dot {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    transition: background .2s, border-color .2s;
  }
  .pin-dot.filled { background: var(--cyan); border-color: var(--cyan); }
  .pin-dot.error  { background: var(--red);  border-color: var(--red); }
  .pin-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 12px; width: 100%; max-width: 320px;
  }
  .pin-btn {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px 0;
    font-size: 26px; font-weight: 900;
    color: var(--text);
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }
  .pin-btn:active { background: var(--cyan); border-color: var(--cyan); color: #000; transform: scale(0.95); }
  .pin-btn.del { font-size: 22px; color: var(--orange); }
  .pin-btn.zero { grid-column: 2; }
  .pin-error { font-size: 14px; color: var(--red); font-weight: 800; min-height: 20px; text-align: center; }
  .pin-new-label { font-size: 13px; color: var(--text-dim); font-weight: 700; text-align: center; }

  /* ===== MODALE CONFIRMATION SUPPRESSION ===== */
  .confirm-overlay {
    display: none; position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
  }
  .confirm-overlay.open { display: flex; }
  .confirm-box {
    background: var(--card); border: 2px solid var(--red);
    border-radius: 20px; padding: 32px 28px; max-width: 340px; width: 90%;
    text-align: center; box-shadow: 0 0 40px rgba(255,80,80,0.3);
  }
  .confirm-icon { font-size: 44px; margin-bottom: 12px; }
  .confirm-title { font-size: 17px; font-weight: 900; color: var(--text); margin-bottom: 8px; }
  .confirm-msg { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; line-height: 1.5; }
  .confirm-btns { display: flex; gap: 12px; }
  .confirm-btn-cancel {
    flex: 1; padding: 16px; border-radius: 12px; border: 2px solid var(--text-dim);
    background: transparent; color: var(--text); font-size: 15px; font-weight: 800;
    cursor: pointer; font-family: inherit;
  }
  .confirm-btn-delete {
    flex: 1; padding: 16px; border-radius: 12px; border: none;
    background: var(--red); color: #fff; font-size: 15px; font-weight: 900;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 4px 15px rgba(255,80,80,0.4);
  }

  @media (min-width: 480px) {
    /* ── Projection & Vacances Stats ── */
  .projection-scenarios {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
  }
  .proj-scenario {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px 10px;
    text-align: center;
    border: 2px solid transparent;
  }
  .proj-scenario.verdict-ok { border-color: var(--green); }
  .proj-scenario.verdict-ko { border-color: var(--red); }
  .proj-scenario .ps-label  { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 6px; }
  .proj-scenario .ps-ca     { font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 900; }
  .proj-scenario .ps-remun  { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
  .proj-scenario .ps-is     { font-size: 11px; color: var(--text-dim); }
  .proj-scenario .ps-verdict{ font-size: 11px; font-weight: 800; margin-top: 6px; }
  .proj-verdict-bar {
    display: flex; align-items: center; gap: 8px; margin-top: 14px;
    background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px 14px;
  }
  .proj-verdict-bar .pv-icon { font-size: 20px; }
  .proj-verdict-bar .pv-text { font-size: 12px; font-weight: 700; color: var(--text); }
  .vacances-item {
    background: rgba(41,121,255,0.1); border: 1px solid var(--blue);
    border-radius: 10px; padding: 12px; margin-bottom: 10px;
  }
  .vacances-item .vi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .vacances-item .vi-dates  { font-size: 12px; font-weight: 800; color: var(--blue); }
  .vacances-item .vi-budget-wrap { display: flex; align-items: center; gap: 8px; }
  .vacances-item .vi-impact { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
  .proj-baseline {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
  }
  .proj-baseline-item { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px; text-align: center; }
  .proj-baseline-item .pbi-label { font-size: 10px; color: var(--text-dim); font-weight: 700; margin-bottom: 4px; }
  .proj-baseline-item .pbi-val   { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 900; }

  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  }

  /* ===== SAISIE RAPIDE COURSE (TPE) ===== */
  .tpe-btn {
    position: relative;
    background: var(--orange);
    border: none; border-radius: 12px;
    width: 52px; height: 52px;
    font-size: 30px; line-height: 52px; text-align: center;
    z-index: 10;
    cursor: pointer; flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(249,115,22,0.5);
    transition: transform 0.1s;
    margin-left: 8px;
  }
  .tpe-btn:active { transform: scale(0.92); }

  .tpe-overlay {
    display: none; position: fixed; inset: 0; z-index: 9500;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(5px);
    align-items: flex-end; justify-content: center;
  }
  .tpe-overlay.open { display: flex; }
  .tpe-panel {
    background: #1a1a3e;
    border: 2px solid var(--orange);
    border-radius: 24px 24px 0 0;
    padding: 20px 16px 32px;
    width: 100%; max-width: 420px;
    box-shadow: 0 -8px 40px rgba(249,115,22,0.25);
  }
  .tpe-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
  }
  .tpe-title {
    font-size: 13px; font-weight: 900; color: var(--orange);
    letter-spacing: 1px; text-transform: uppercase;
  }
  .tpe-close {
    background: none; border: none; color: var(--text-dim);
    font-size: 22px; cursor: pointer; padding: 4px 8px;
  }
  .tpe-display {
    background: #0d0d2b;
    border: 2px solid #2a2a5e;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
    text-align: right;
  }
  .tpe-course-label {
    font-size: 11px; color: var(--text-dim); font-weight: 800;
    letter-spacing: 0.5px; margin-bottom: 4px;
  }
  .tpe-amount {
    font-family: 'Orbitron', monospace;
    font-size: 36px; font-weight: 900; color: var(--text);
    min-height: 44px; letter-spacing: 2px;
  }
  .tpe-total-line {
    font-size: 12px; color: var(--text-dim); font-weight: 700;
    margin-top: 6px;
  }
  .tpe-total-line strong { color: var(--green); }
  .tpe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  .tpe-key {
    background: #2a2a5e;
    border: none; border-radius: 14px;
    padding: 18px 0;
    font-size: 24px; font-weight: 900;
    color: var(--text); cursor: pointer;
    font-family: 'Orbitron', monospace;
    text-align: center;
    transition: background 0.1s, transform 0.08s;
    -webkit-tap-highlight-color: transparent;
  }
  .tpe-key:active { background: #3a3a7e; transform: scale(0.94); }
  .tpe-key.tpe-del { background: #3a1a1a; color: var(--red); font-size: 20px; }
  .tpe-key.tpe-del:active { background: #5a2a2a; }
  .tpe-validate {
    width: 100%; padding: 18px;
    background: var(--green); border: none; border-radius: 14px;
    font-size: 18px; font-weight: 900; color: #0d1b0d;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 4px 20px rgba(34,197,94,0.4);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.1s;
  }
  .tpe-validate:active { transform: scale(0.97); }
  .tpe-validate:disabled { background: #2a4a2a; color: #4a7a4a; box-shadow: none; cursor: not-allowed; }
  .tpe-field-display {
    background: #0d0d2b; border: 2px solid var(--orange);
    border-radius: 14px; padding: 14px 20px; margin-bottom: 16px; text-align: right;
  }
  .tpe-field-label { font-size: 11px; color: var(--orange); font-weight: 800; letter-spacing: 0.5px; margin-bottom: 4px; }
  .tpe-field-amount {
    font-family: 'Orbitron', monospace; font-size: 32px; font-weight: 900;
    color: var(--text); min-height: 40px; letter-spacing: 2px;
  }

  /* ── Landing page ── */
  #landing-screen {
    position: fixed; inset: 0; z-index: 9990;
    background: #0a0a1e;
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-start;
    overflow-y: auto; padding: 0 0 32px 0;
  }
  #landing-screen.hidden { display: none; }

  .landing-hero {
    width: 100%; padding: 48px 24px 32px;
    display: flex; flex-direction: column; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .landing-icon { font-size: 56px; margin-bottom: 12px; }
  .landing-title {
    font-family: 'Orbitron', monospace; font-size: 28px; font-weight: 900;
    color: #fff; letter-spacing: 3px; margin-bottom: 6px; text-align: center;
  }
  .landing-title span { color: #f97316; }
  .landing-sub {
    font-size: 14px; color: rgba(255,255,255,0.55); font-weight: 600;
    text-align: center; line-height: 1.5; max-width: 320px; margin-bottom: 28px;
  }
  .landing-cta {
    width: 100%; max-width: 320px; padding: 16px;
    background: #f97316; border: none; border-radius: 14px;
    color: #000; font-family: 'Orbitron', monospace; font-size: 13px;
    font-weight: 900; cursor: pointer; letter-spacing: 1px;
    transition: transform 0.1s, opacity 0.2s;
  }
  .landing-cta:active { transform: scale(0.97); }
  .landing-cta-secondary {
    margin-top: 12px; background: transparent; border: none;
    color: rgba(255,255,255,0.4); font-size: 12px; font-weight: 700;
    cursor: pointer; text-decoration: underline;
  }

  .landing-features {
    width: 100%; max-width: 480px; padding: 28px 24px 0;
    display: flex; flex-direction: column; gap: 12px;
  }
  .landing-feat {
    display: flex; align-items: flex-start; gap: 14px;
    background: rgba(255,255,255,0.04); border-radius: 12px;
    padding: 14px 16px;
  }
  .landing-feat-icon { font-size: 24px; line-height: 1; min-width: 32px; text-align: center; }
  .landing-feat-text { flex: 1; }
  .landing-feat-title { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 2px; }
  .landing-feat-desc  { font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.5; }

  .landing-free-badge {
    margin: 24px auto 0; max-width: 320px; width: calc(100% - 48px);
    background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.3);
    border-radius: 12px; padding: 14px 16px; text-align: center;
    font-size: 12px; font-weight: 700; color: #f97316; line-height: 1.6;
  }
  .landing-free-badge strong { font-size: 14px; display: block; margin-bottom: 4px; }
  /* ── PRICING (index landing) ── */
  .landing-pricing { max-width: 900px; margin: 24px auto 0; padding: 0 24px; width: 100%; }
  .landing-pricing-title { text-align: center; font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 900; letter-spacing: 2px; color: #fff; margin-bottom: 4px; }
  .landing-pricing-sub { text-align: center; font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 600; margin-bottom: 14px; }
  .landing-pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
  .lp-pack { background: rgba(255,255,255,0.03); border: 1.5px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px 12px; display: flex; flex-direction: column; }
  .lp-pack-hl { border-color: #f97316; background: rgba(249,115,22,0.05); }
  .lp-badge { display: inline-block; padding: 2px 8px; border-radius: 16px; font-size: 8px; font-weight: 900; letter-spacing: 1px; margin-bottom: 8px; width: fit-content; }
  .lp-badge-free { background: rgba(0,230,118,0.15); color: #00e676; }
  .lp-badge-pro { background: rgba(0,229,255,0.15); color: #00e5ff; }
  .lp-badge-cli { background: rgba(249,115,22,0.15); color: #f97316; }
  .lp-name { font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 900; color: #fff; margin-bottom: 3px; }
  .lp-price { font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
  .lp-price strong { font-family: 'Orbitron', monospace; font-size: 18px; color: #fff; }
  .lp-list { list-style: none; padding: 0; margin: 0 0 12px; flex: 1; }
  .lp-list li { font-size: 10px; color: rgba(255,255,255,0.45); font-weight: 600; line-height: 1.4; padding: 3px 0; display: flex; align-items: flex-start; gap: 5px; }
  .lp-list li::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
  .lp-free li::before { background: #00e676; }
  .lp-pro li::before { background: #00e5ff; }
  .lp-cli li::before { background: #f97316; }
  .lp-note { text-align: center; margin-top: 10px; font-size: 10px; color: rgba(255,255,255,0.3); font-weight: 600; line-height: 1.5; }
  .lp-note strong { color: rgba(255,255,255,0.6); }
  @media (max-width: 600px) { .landing-pricing-grid { grid-template-columns: 1fr; } }
  .landing-footer {
    margin-top: 28px; text-align: center;
    font-size: 10px; color: rgba(255,255,255,0.2);
    font-weight: 600; padding: 0 24px;
  }

  /* ── Écran CGU ── */
  #cgu-screen {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-start; padding: 32px 24px 24px;
    overflow-y: auto;
  }
  #cgu-screen.hidden { display: none; }
  .cgu-logo { font-size: 48px; margin-bottom: 8px; }
  .cgu-title { font-family: 'Orbitron', monospace; font-size: 20px; font-weight: 900;
    color: var(--orange); letter-spacing: 2px; margin-bottom: 4px; text-align: center; }
  .cgu-subtitle { font-size: 13px; color: var(--text-dim); font-weight: 700;
    margin-bottom: 24px; text-align: center; }
  .cgu-box {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 20px; width: 100%; max-width: 480px;
    margin-bottom: 24px; font-size: 13px; line-height: 1.7; color: var(--text);
  }
  .cgu-box strong { color: var(--orange); }
  .cgu-box .cgu-section { margin-bottom: 14px; }
  .cgu-box .cgu-section:last-child { margin-bottom: 0; }
  .cgu-check-wrap {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(255,165,0,0.08); border: 2px solid var(--orange);
    border-radius: 12px; padding: 16px; width: 100%; max-width: 480px;
    margin-bottom: 20px; cursor: pointer;
    -webkit-tap-highlight-color: rgba(255,165,0,0.2);
  }
  .cgu-check-box {
    width: 26px; height: 26px; min-width: 26px; border-radius: 6px;
    border: 2.5px solid var(--orange); background: transparent;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0; margin-top: 1px;
  }
  .cgu-check-box.checked { background: var(--orange); border-color: var(--orange); }
  .cgu-check-label { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.5; }
  #cgu-accept-btn {
    width: 100%; max-width: 480px; padding: 16px;
    background: var(--orange); border: none; border-radius: var(--radius);
    color: #000; font-family: 'Orbitron', monospace; font-size: 13px;
    font-weight: 900; cursor: not-allowed; opacity: 0.3;
    transition: opacity 0.2s, transform 0.1s; letter-spacing: 1px;
  }
  #cgu-accept-btn.active { opacity: 1; cursor: pointer; }
  #cgu-accept-btn.active:active { transform: scale(0.98); }

  /* ===== OPPORTUNITÉS ===== */
  .oppo-section { margin-bottom: 18px; }
  .oppo-section-title {
    font-family: 'Orbitron', monospace;
    font-size: 11px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: var(--text-dim);
    padding: 8px 0 6px; border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 10px;
  }
  /* Indicateur (baromètre par site) */
  .oppo-baro {
    background: var(--card-bg);
    border-radius: 12px; padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color .3s, background .3s;
  }
  .oppo-baro.ob-go   { border-color: var(--green);  background: rgba(0,220,130,0.06); }
  .oppo-baro.ob-wait { border-color: var(--orange); background: rgba(255,145,0,0.06); }
  .oppo-baro.ob-no   { border-color: #e03050;       background: rgba(220,48,80,0.05); }
  .oppo-baro.ob-load { border-color: rgba(255,255,255,0.07); }

  .ob-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
  .ob-icon { font-size: 22px; flex-shrink: 0; }
  .ob-name { font-size: 13px; font-weight: 800; color: var(--text); flex: 1; }
  .ob-dist { font-family: 'Orbitron', monospace; font-size: 11px;
             color: var(--text-dim); text-align: right; line-height: 1.4; }

  .ob-verdict {
    font-family: 'Orbitron', monospace;
    font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  }
  .ob-go .ob-verdict   { color: var(--green); }
  .ob-wait .ob-verdict { color: var(--orange); }
  .ob-no .ob-verdict   { color: #e03050; }
  .ob-load .ob-verdict { color: var(--text-dim); }

  .ob-detail { font-size: 11px; font-weight: 700; color: var(--text-dim);
               margin-top: 3px; line-height: 1.5; }

  /* Mini liste vols/trains */
  .ob-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
  .ob-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; border-radius: 7px;
    background: rgba(255,255,255,0.03); font-size: 11px;
  }
  .ob-row.ob-row-arrived { opacity: .35; }
  .ob-time { font-family: 'Orbitron', monospace; font-weight: 800;
             font-size: 13px; color: var(--text); min-width: 40px; }
  .ob-badge {
    padding: 2px 6px; border-radius: 4px;
    font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    flex-shrink: 0;
  }
  .ob-badge-tgv  { background: rgba(0,200,255,0.15); color: #00c8ff; }
  .ob-badge-ter  { background: rgba(100,180,100,0.15); color: #64b464; }
  .ob-badge-ic   { background: rgba(255,200,0,0.15); color: #ffc800; }
  .ob-badge-vol  { background: rgba(180,130,255,0.15); color: #b482ff; }
  .ob-info { flex: 1; color: var(--text-dim); overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; }
  .ob-pax  { font-weight: 800; color: var(--text); font-family: 'Orbitron', monospace;
             font-size: 11px; flex-shrink: 0; }
  .ob-status-ok  { color: var(--green); }
  .ob-status-lat { color: var(--orange); }
  .ob-status-arr { color: var(--text-dim); }

  /* Message vide / chargement */
  .ob-empty { text-align: center; padding: 16px 8px;
              font-size: 12px; font-weight: 700; color: var(--text-dim); }

  /* Chip ville dans Réglages */
  .ville-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .ville-chip {
    padding: 8px 14px; border-radius: 20px; cursor: pointer;
    font-size: 12px; font-weight: 700;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim); transition: all .2s;
  }
  .ville-chip.selected {
    background: rgba(0,200,255,0.12);
    border-color: var(--cyan);
    color: var(--cyan);
  }
  .ville-chip:active { transform: scale(0.96); }


  /* ══ ONGLET COURSES ══════════════════════════════════════════ */
  .courses-next-banner {
    background: linear-gradient(135deg, rgba(0,200,255,0.10), rgba(0,200,255,0.04));
    border: 1px solid rgba(0,200,255,0.25);
    border-radius: 14px; padding: 12px 16px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 12px;
  }
  .courses-next-banner .cnb-time {
    font-family: 'Orbitron', monospace; font-size: 22px; font-weight: 900;
    color: var(--cyan); line-height: 1; white-space: nowrap;
  }
  .courses-next-banner .cnb-info { flex: 1; min-width: 0; }
  .courses-next-banner .cnb-label {
    font-size: 10px; font-weight: 800; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: .08em;
  }
  .courses-next-banner .cnb-client {
    font-size: 14px; font-weight: 800; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .courses-next-banner .cnb-lieu {
    font-size: 11px; color: var(--text-dim); font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cr-tabs {
    display: flex; gap: 8px; margin-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07); padding-bottom: 10px;
  }
  .cr-tab {
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 800;
    cursor: pointer; border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim); transition: all .2s;
  }
  .cr-tab.active { background: var(--cyan); color: #000; border-color: var(--cyan); }
  .cr-search {
    display: flex; gap: 8px; margin-bottom: 12px; align-items: center;
  }
  .cr-search input {
    flex: 1; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 8px 12px; color: var(--text);
    font-size: 13px; font-weight: 600; outline: none;
  }
  .cr-search input::placeholder { color: var(--text-dim); }
  .cr-add-btn {
    background: var(--cyan); color: #000; border: none;
    border-radius: 10px; padding: 8px 14px; font-size: 13px;
    font-weight: 900; cursor: pointer; white-space: nowrap;
    flex-shrink: 0;
  }
  /* Carte réservation */
  .res-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 13px; padding: 12px 14px; margin-bottom: 10px;
    cursor: pointer; transition: background .2s;
  }
  .res-card:hover { background: rgba(255,255,255,0.06); }
  .res-card-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  }
  .res-card-time {
    font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 900;
    color: var(--cyan); white-space: nowrap;
  }
  .res-card-client {
    flex: 1; font-size: 14px; font-weight: 800; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .res-status-badge {
    font-size: 10px; font-weight: 800; padding: 3px 8px;
    border-radius: 20px; white-space: nowrap; flex-shrink: 0;
  }
  .res-status-reservee  { background: rgba(41,121,255,.15); color: var(--blue); }
  .res-status-encours   { background: rgba(255,145,0,.15);  color: var(--orange); }
  .res-status-terminee  { background: rgba(0,230,118,.15);  color: var(--green); }
  .res-status-annulee   { background: rgba(255,23,68,.15);  color: var(--red); }
  .res-card-sub {
    font-size: 11px; color: var(--text-dim); font-weight: 600; line-height: 1.5;
  }
  /* Carte client */
  .cli-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 13px; padding: 12px 14px; margin-bottom: 10px;
    cursor: pointer; transition: background .2s;
    display: flex; align-items: center; gap: 12px;
  }
  .cli-card:hover { background: rgba(255,255,255,0.06); }
  .cli-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: rgba(0,200,255,.15); display: flex; align-items: center;
    justify-content: center; font-size: 16px; font-weight: 900; color: var(--cyan);
  }
  .cli-info { flex: 1; min-width: 0; }
  .cli-name { font-size: 14px; font-weight: 800; color: var(--text); }
  .cli-sub  { font-size: 11px; color: var(--text-dim); font-weight: 600; }
  .cli-count { font-size: 11px; font-weight: 800; color: var(--cyan); white-space: nowrap; }
  /* Badge remise client */
  .cli-remise-badge {
    display: inline-block;
    font-size: 10px; font-weight: 900;
    padding: 2px 7px; border-radius: 8px;
    background: rgba(0,230,118,.12); color: var(--green);
    margin-left: 4px; vertical-align: middle;
  }
  /* Récap remise dans modal réservation */
  .cr-discount-recap {
    background: rgba(0,230,118,.06); border: 1px solid rgba(0,230,118,.2);
    border-radius: 12px; padding: 10px 14px; margin-bottom: 10px;
  }
  .cr-discount-line {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; font-weight: 700; color: var(--text-dim); padding: 3px 0;
  }
  .cr-discount-line.remise { color: var(--green); }
  .cr-discount-line.total { color: var(--text); font-size: 15px; font-weight: 900;
    border-top: 1px solid rgba(255,255,255,.1); padding-top: 6px; margin-top: 4px; }
  /* Promo items dans réglages */
  .promo-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: rgba(255,255,255,.03);
    border-radius: 12px; margin-bottom: 8px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.06);
  }
  .promo-item:hover { background: rgba(255,255,255,.06); }
  .promo-code { font-size: 15px; font-weight: 900; color: var(--cyan); letter-spacing: 1px; }
  .promo-badge-active {
    font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 8px;
    background: rgba(0,230,118,.12); color: var(--green);
  }
  .promo-badge-expired {
    font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 8px;
    background: rgba(255,23,68,.1); color: var(--red);
  }
  /* ── Documents (BDC + Factures) ── */
  .doc-summary {
    background: rgba(255,255,255,.03); border-radius: 14px;
    padding: 12px 10px; margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,.06);
  }
  .doc-summary-row {
    display: flex; justify-content: space-around; text-align: center; gap: 4px;
  }
  .doc-stat { display: flex; flex-direction: column; }
  .doc-stat-val { font-size: 18px; font-weight: 900; color: var(--text); }
  .doc-stat-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
  .doc-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 10px; background: rgba(255,255,255,.03);
    border-radius: 14px; margin-bottom: 8px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.06);
  }
  .doc-item:hover { background: rgba(255,255,255,.06); }
  .doc-item-icon { font-size: 20px; flex-shrink: 0; }
  .doc-item-body { flex: 1; min-width: 0; }
  .doc-item-num { font-size: 13px; font-weight: 900; color: var(--cyan); }
  .doc-item-client { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .doc-item-meta { font-size: 11px; font-weight: 600; color: var(--text-dim); }
  .doc-item-amount { font-size: 14px; font-weight: 900; color: var(--text); white-space: nowrap; }
  .doc-badge {
    font-size: 10px; font-weight: 900; padding: 3px 8px;
    border-radius: 8px; white-space: nowrap; flex-shrink: 0;
  }
  .doc-badge-bdc { background: rgba(0,229,255,.1); color: var(--cyan); }
  .doc-badge-payee { background: rgba(0,230,118,.12); color: var(--green); }
  .doc-badge-attente { background: rgba(255,145,0,.12); color: var(--orange); }
  .doc-action-btn {
    background: none; border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px; padding: 4px 8px; font-size: 14px;
    cursor: pointer; flex-shrink: 0;
  }
  .doc-action-btn:hover { background: rgba(255,255,255,.06); }
  /* Modal */
  .cr-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.75); align-items: flex-end; justify-content: center;
  }
  .cr-modal-overlay.open { display: flex; }
  .cr-modal {
    background: #0d0d2b; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 520px; max-height: 92vh;
    overflow-y: auto; padding: 20px 18px 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .cr-modal-title {
    font-size: 16px; font-weight: 900; color: var(--text);
    margin-bottom: 16px; display: flex; align-items: center;
    justify-content: space-between;
  }
  .cr-modal-close {
    background: none; border: none; color: var(--text-dim);
    font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1;
  }
  .cr-field { margin-bottom: 13px; }
  .cr-field label {
    display: block; font-size: 11px; font-weight: 800;
    color: var(--text-dim); margin-bottom: 5px; text-transform: uppercase;
    letter-spacing: .06em;
  }
  .cr-field input, .cr-field textarea, .cr-field select {
    width: 100%; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
    padding: 9px 12px; color: var(--text); font-size: 13px;
    font-weight: 600; outline: none; box-sizing: border-box;
    font-family: inherit;
  }
  .cr-field textarea { resize: vertical; min-height: 64px; }
  .cr-field input:focus, .cr-field textarea:focus {
    border-color: var(--cyan);
  }
  .cr-status-chips { display: flex; gap: 8px; flex-wrap: wrap; }
  .cr-status-chip {
    padding: 5px 12px; border-radius: 20px; font-size: 11px;
    font-weight: 800; cursor: pointer; border: 1px solid rgba(255,255,255,.1);
    color: var(--text-dim); transition: all .15s;
  }
  .cr-status-chip.active { color: #000; }
  /* Chips filtre liste (data-f) */
  .cr-status-chip[data-f="all"].active       { background: var(--text); border-color: var(--text); color: #0a0a1e; }
  .cr-status-chip[data-f="demandes"].active  { background: var(--orange); border-color: var(--orange); }
  .cr-status-chip[data-f="reservee"].active  { background: var(--blue); border-color: var(--blue); }
  .cr-status-chip[data-f="encours"].active   { background: var(--orange); border-color: var(--orange); }
  .cr-status-chip[data-f="terminee"].active  { background: var(--green); border-color: var(--green); }
  .cr-status-chip[data-f="annulee"].active   { background: var(--red); border-color: var(--red); }
  /* Chips statut modal (data-s) */
  .cr-status-chip[data-s="reservee"].active  { background: var(--blue); border-color: var(--blue); }
  .cr-status-chip[data-s="encours"].active   { background: var(--orange); border-color: var(--orange); }
  .cr-status-chip[data-s="terminee"].active  { background: var(--green); border-color: var(--green); }
  .cr-status-chip[data-s="annulee"].active   { background: var(--red); border-color: var(--red); }
  .cr-btn-row { display: flex; gap: 8px; margin-top: 18px; }
  .cr-btn-primary {
    flex: 1; background: var(--cyan); color: #000; border: none;
    border-radius: 12px; padding: 12px; font-size: 14px;
    font-weight: 900; cursor: pointer;
  }
  .cr-btn-secondary {
    background: rgba(255,255,255,.07); color: var(--text); border: none;
    border-radius: 12px; padding: 12px 16px; font-size: 14px;
    font-weight: 700; cursor: pointer;
  }
  .cr-btn-danger {
    background: rgba(255,60,60,.12); color: var(--red); border: none;
    border-radius: 12px; padding: 12px 16px; font-size: 14px;
    font-weight: 700; cursor: pointer;
  }
  .cr-section-title {
    font-size: 11px; font-weight: 800; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: .08em;
    margin: 16px 0 8px; border-bottom: 1px solid rgba(255,255,255,.06);
    padding-bottom: 6px;
  }
  .cr-separator { border: none; border-top: 1px solid rgba(255,255,255,.06); margin: 6px 0 14px; }
  /* Bon de commande imprimable */
  .bdc-modal {
    background: #fff; color: #111; border-radius: 14px;
    padding: 24px; font-family: 'Arial', sans-serif; font-size: 13px;
    line-height: 1.5; max-width: 480px; width: 100%; margin: auto;
  }
  .bdc-header { border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 14px; }
  .bdc-title { font-size: 18px; font-weight: 900; text-align: center; margin-bottom: 4px; }
  .bdc-num { font-size: 11px; color: #666; text-align: center; }
  .bdc-section { margin-bottom: 12px; }
  .bdc-section h3 { font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: #666; border-bottom: 1px solid #ddd;
    padding-bottom: 4px; margin-bottom: 6px; }
  .bdc-row { display: flex; gap: 6px; margin-bottom: 3px; }
  .bdc-row .lbl { font-weight: 700; min-width: 160px; color: #555; }
  .bdc-footer { border-top: 1px solid #ddd; padding-top: 10px; margin-top: 14px;
    font-size: 11px; color: #888; text-align: center; }
  @media print {
    body > *:not(.cr-modal-overlay) { display: none !important; }
    .cr-modal-overlay { position: static !important; background: none !important; display: block !important; }
    .cr-modal { max-height: none !important; overflow: visible !important; border-radius: 0 !important; }
    .cr-btn-row, .cr-modal-close { display: none !important; }
  }


  /* Suggestions adresse Nominatim */
  .cr-addr-suggestions {
    background: #131332; border: 1px solid rgba(0,200,255,.2);
    border-radius: 10px; margin-top: 4px; overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
  }
  .cr-addr-suggestions { padding: 4px 0; }
  .cr-addr-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 12px; cursor: pointer; font-size: 12px;
    font-weight: 600; color: var(--text); border-bottom: 1px solid rgba(255,255,255,.05);
    line-height: 1.4; transition: background .15s;
  }
  .cr-addr-item:last-child { border-bottom: none; }
  .cr-addr-item:hover { background: rgba(0,200,255,.08); }
  .cr-addr-item .addr-icon {
    font-size: 20px; flex-shrink: 0; width: 28px; text-align: center;
    margin-top: 2px;
  }
  .cr-addr-item .addr-body { flex: 1; min-width: 0; }
  .cr-addr-item .addr-main {
    color: var(--text); font-weight: 800; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cr-addr-item .addr-sub  {
    color: var(--text-dim); font-size: 11px; margin-top: 2px;
    font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cr-addr-item .addr-badge {
    font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 6px;
    flex-shrink: 0; white-space: nowrap; margin-top: 2px;
    background: rgba(0,200,255,.15); color: var(--accent); letter-spacing: .3px;
    white-space: nowrap; flex-shrink: 0; margin-top: 2px; align-self: flex-start;
  }
  .cr-addr-loading {
    padding: 9px 12px; font-size: 12px; color: var(--text-dim);
    font-weight: 600; text-align: center;
  }


  /* ── Tarifs & calcul prix course ── */
  .tarif-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  }
  .tarif-field { display: flex; flex-direction: column; gap: 5px; }
  .tarif-field label {
    font-size: 10px; font-weight: 800; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: .06em;
  }
  .tarif-field input {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px; padding: 9px 12px; color: var(--text);
    font-size: 14px; font-weight: 700; outline: none;
    box-sizing: border-box; width: 100%;
  }
  .tarif-field input:focus { border-color: var(--cyan); }
  .tarif-legal-hint {
    font-size: 11px; color: var(--text-dim); font-weight: 600;
    margin-top: 8px; padding: 8px 12px;
    background: rgba(0,200,255,.06); border-radius: 8px;
    border-left: 3px solid var(--cyan);
  }
  /* Bloc estimation prix dans la modal réservation */
  .cr-price-estimate {
    background: rgba(0,200,255,.07);
    border: 1px solid rgba(0,200,255,.2);
    border-radius: 12px; padding: 12px 14px; margin-top: 10px;
    display: none;
  }
  .cr-price-estimate.visible { display: block; }
  .cr-price-row {
    display: flex; justify-content: space-between;
    font-size: 12px; font-weight: 600; color: var(--text-dim);
    margin-bottom: 4px;
  }
  .cr-price-row.total {
    font-size: 16px; font-weight: 900; color: var(--cyan);
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 8px; margin-top: 4px;
  }
  .cr-price-row.plancher {
    color: var(--orange); font-size: 11px; font-weight: 700;
  }
  .cr-price-loading {
    text-align: center; color: var(--text-dim);
    font-size: 12px; font-weight: 700; padding: 4px 0;
  }

  /* ===== TOGGLE SWITCH ===== */
  .toggle-switch {
    position: relative; display: inline-block; width: 44px; height: 24px;
  }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,.12); border-radius: 24px; transition: 0.3s;
  }
  .toggle-slider::before {
    content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.3s;
  }
  .toggle-switch input:checked + .toggle-slider { background: var(--cyan); }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

  /* ===== PROFIL CHAUFFEUR ===== */
  .profil-photo-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 8px;
  }
  .profil-photo-circle {
    width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
    background: rgba(255,255,255,.06); border: 3px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center; position: relative;
  }
  .profil-photo-circle span { font-size: 28px; }
  .profil-photo-circle img {
    width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0;
  }
  .profil-photo-btn {
    background: var(--card2); border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
    padding: 6px 16px; font-size: 11px; font-weight: 800; color: var(--cyan);
    cursor: pointer; transition: all 0.2s;
  }
  .profil-photo-btn:active { transform: scale(0.95); }

  /* ===== VÉHICULES ===== */
  .veh-card {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
    transition: border-color 0.2s;
  }
  .veh-card:active { border-color: var(--cyan); }
  .veh-card-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  }
  .veh-card-icon { font-size: 22px; }
  .veh-card-silhouette {
    flex-shrink: 0; width: 80px; height: 40px;
    display: flex; align-items: center; justify-content: center;
  }
  .veh-card-silhouette svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
  .veh-color-dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; vertical-align: middle; margin-right: 4px;
    border: 1px solid rgba(255,255,255,.2);
  }
  .veh-card-brand { display: inline-flex; align-items: center; margin-right: 4px; opacity: .7; }

  /* Color picker */
  .color-picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
  .color-swatch {
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    border: 3px solid transparent; transition: border-color .2s, transform .15s;
    position: relative; box-sizing: border-box;
  }
  .color-swatch:hover { transform: scale(1.15); }
  .color-swatch.selected {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(0,229,255,.3);
  }
  .color-swatch.selected::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.9);
  }
  .color-swatch[data-light="1"] { border-color: rgba(255,255,255,.15); }
  .color-swatch[data-light="1"].selected { border-color: var(--cyan); }
  .veh-card-info { flex: 1; min-width: 0; }
  .veh-card-nom {
    font-size: 13px; font-weight: 900; color: var(--text);
    display: flex; align-items: center; gap: 6px;
  }
  .veh-card-sub { font-size: 11px; color: var(--text-dim); font-weight: 600; }
  .veh-card-cat {
    font-size: 10px; font-weight: 800; color: var(--cyan);
    background: rgba(0,229,255,.1); border: 1px solid rgba(0,229,255,.25);
    border-radius: 12px; padding: 3px 10px; white-space: nowrap;
  }
  .veh-defaut-badge {
    font-size: 9px; font-weight: 800; color: var(--green);
    background: rgba(0,230,118,.12); border-radius: 8px; padding: 2px 7px;
  }
  .veh-card-tarifs {
    display: flex; gap: 8px; flex-wrap: wrap;
    font-size: 10px; font-weight: 700; color: var(--text-dim);
  }
  .veh-card-tarifs span {
    background: rgba(255,255,255,.05); border-radius: 6px; padding: 2px 8px;
  }
  .veh-add-btn {
    width: 100%; padding: 12px; border: 2px dashed rgba(0,229,255,.3);
    background: transparent; border-radius: 12px; color: var(--cyan);
    font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.2s;
  }
  .veh-add-btn:active { background: rgba(0,229,255,.08); }

  /* ===== PWA INSTALL BANNER ===== */
  .pwa-banner {
    position: fixed; bottom: 70px; left: 12px; right: 12px; z-index: 9999;
    background: var(--card); border: 1px solid rgba(0,229,255,.3);
    border-radius: 14px; padding: 10px 14px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
    animation: pwa-slide-up 0.4s ease;
  }
  @keyframes pwa-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* ===== SOURCE CHIPS (Plateforme / Direct) ===== */
  .source-chips {
    display: flex; flex-direction: row; gap: 6px;
  }
  .source-chip {
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 800;
    background: transparent; border: 2px solid var(--text-dim); color: var(--text-dim);
    cursor: pointer; transition: all 0.2s; user-select: none;
  }
  .source-chip.selected {
    border-color: var(--orange); color: var(--orange); background: rgba(255,145,0,.1);
  }
  .source-chips-tpe {
    justify-content: center; margin-bottom: 8px;
  }
  .source-chips-tpe .source-chip {
    font-size: 12px; padding: 4px 10px;
  }

  /* ===== F15 — REVENU NET ESTIMÉ ===== */
  .revenu-net-card {
    background: var(--card);
    border: 1px solid #2a2a5e;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .revenu-net-label {
    font-size: 11px; font-weight: 800; color: var(--text-dim);
    letter-spacing: 1px; text-transform: uppercase;
  }
  .revenu-net-sub {
    font-size: 10px; font-weight: 700; color: var(--text-dim); margin-top: 2px;
  }
  .revenu-net-value {
    font-family: 'Orbitron', monospace;
    font-size: 20px; font-weight: 900;
  }

  /* ===== F11 — BILAN HEBDOMADAIRE ===== */
  .bilan-hebdo-card {
    background: linear-gradient(135deg, rgba(0,229,255,.06), rgba(41,121,255,.08));
    border: 1.5px solid var(--cyan);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 12px;
  }
  .bilan-hebdo-title {
    font-size: 12px; font-weight: 900; color: var(--cyan);
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
  }
  .bilan-hebdo-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .bilan-hebdo-item {
    background: rgba(255,255,255,.04);
    border-radius: 10px; padding: 10px; text-align: center;
  }
  .bilan-hebdo-item .bh-label {
    font-size: 10px; color: var(--text-dim); font-weight: 700; margin-bottom: 4px;
  }
  .bilan-hebdo-item .bh-val {
    font-family: 'Orbitron', monospace; font-size: 15px; font-weight: 900; color: var(--text);
  }
  .bilan-hebdo-verdict {
    margin-top: 10px; text-align: center;
    font-size: 13px; font-weight: 800;
  }

  /* ===== F20 — MODE EN COURSE ===== */
  .en-course-toggle {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px; justify-content: flex-end;
  }
  .en-course-toggle label {
    font-size: 12px; font-weight: 800; color: var(--text-dim);
    letter-spacing: 0.5px; text-transform: uppercase; margin: 0;
  }
  .en-course-switch {
    position: relative; width: 42px; height: 24px;
    background: #2a2a5e; border-radius: 12px; cursor: pointer;
    transition: background .2s; flex-shrink: 0;
  }
  .en-course-switch::after {
    content: ''; position: absolute;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--text-dim); top: 3px; left: 3px;
    transition: transform .2s, background .2s;
  }
  .en-course-switch.active { background: var(--green); }
  .en-course-switch.active::after {
    transform: translateX(18px); background: white;
  }

  #page-dashboard.en-course-mode .view-toggle,
  #page-dashboard.en-course-mode .stats-grid,
  #page-dashboard.en-course-mode .projection-card,
  #page-dashboard.en-course-mode #virement-card,
  #page-dashboard.en-course-mode .dash-depenses-card,
  #page-dashboard.en-course-mode .revenu-net-card,
  #page-dashboard.en-course-mode #dash-plafond-wrap,
  #page-dashboard.en-course-mode #dash-bilan-hebdo {
    display: none !important;
  }

  /* ===== MODE COURSE V2 — CARTE ===== */
  #course-map-wrap {
    margin: 16px -16px 0; border-radius: 16px; overflow: hidden; position: relative;
  }
  #page-dashboard.en-course-mode .conseil-card { margin-bottom: 16px; }

  /* Bandeau rue actuelle */
  #course-street-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: rgba(0,0,0,.85);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: 14px; font-weight: 800; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .course-street-icon { font-size: 16px; }
  #course-current-street {
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .course-map-info {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 16px; background: var(--card);
    font-size: 13px; font-weight: 800; color: var(--text-dim);
    font-family: 'Orbitron', monospace;
  }
  #course-map-speed { color: var(--green); font-size: 16px; }
  .course-driver-icon { text-align: center; line-height: 1; filter: drop-shadow(0 0 10px rgba(0,230,118,.6)); }
  .course-poi-airport, .course-poi-station { font-size: 22px; text-align: center; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
  .course-style-control { z-index: 1000; }
  .course-style-control select { outline: none; }
  #page-dashboard:not(.en-course-mode) #course-map-wrap { display: none !important; }
  #page-dashboard.en-course-mode .traffic-light-card { display: none !important; }

  /* Marqueur destination */
  .course-dest-icon { text-align: center; }
  .course-dest-pin {
    width: 16px; height: 16px; border-radius: 50% 50% 50% 0;
    background: #ff5252; border: 3px solid #fff;
    transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0,0,0,.4);
    margin: 0 auto;
  }

  /* Route animee */
  .course-route-animated {
    animation: courseRouteDash 1.5s linear infinite;
  }
  @keyframes courseRouteDash {
    to { stroke-dashoffset: -30; }
  }

  /* ===== PANNEAU COURSE V2 ===== */
  .course-panel {
    background: var(--card); border-radius: 0 0 16px 16px;
    padding: 12px 16px; margin-bottom: 16px;
  }
  .cp-state { }
  .cp-header {
    font-family: 'Orbitron', monospace; font-size: 11px; font-weight: 900;
    letter-spacing: 1.5px; text-align: center; color: var(--orange);
    margin-bottom: 10px; text-transform: uppercase;
  }
  .cp-header-enroute { color: var(--orange); }
  .cp-header-incourse { color: var(--green); }

  /* Carte client avec avatar */
  .cp-client-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin-bottom: 10px;
    background: rgba(255,255,255,.04); border-radius: 12px;
    border: 1px solid rgba(255,255,255,.06);
  }
  .cp-client-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #ff6d00);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; color: #fff; flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
  }
  .cp-client-info { flex: 1; min-width: 0; }

  .cp-client {
    font-size: 15px; font-weight: 900; margin-bottom: 2px;
  }
  .cp-address {
    font-size: 12px; font-weight: 700; color: var(--text-dim);
    line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* Metriques en route (ETA + distance) */
  .cp-enroute-metrics {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 12px;
    background: rgba(0,229,255,.06); border-radius: 12px;
    padding: 12px 0;
  }
  .cp-metric { flex: 1; text-align: center; }
  .cp-metric-val {
    font-family: 'Orbitron', monospace; font-size: 22px; font-weight: 900;
    color: var(--cyan);
  }
  .cp-metric-lbl {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;
  }
  .cp-metric-sep {
    width: 1px; height: 32px; background: rgba(255,255,255,.1);
  }

  /* Barre de progression A → B */
  .cp-progress {
    margin-bottom: 12px; padding: 8px 0;
  }
  .cp-progress-labels {
    display: flex; justify-content: space-between; margin-bottom: 6px;
  }
  .cp-progress-origin, .cp-progress-dest {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cp-progress-dest { text-align: right; }
  .cp-progress-bar {
    position: relative; height: 6px; background: rgba(255,255,255,.08);
    border-radius: 3px; overflow: visible;
  }
  .cp-progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan));
    border-radius: 3px; width: 0%; transition: width 0.5s ease;
  }
  .cp-progress-car {
    position: absolute; top: -10px; font-size: 18px;
    transition: left 0.5s ease; left: 0%;
    transform: translateX(-50%);
  }

  /* Metriques en direct pendant la course */
  .cp-live-metrics {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    margin: 10px 0; padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .cp-live-metric { text-align: center; }
  .cp-live-val {
    font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 900;
    color: var(--text);
  }
  .cp-live-timer { color: var(--cyan); font-size: 16px; }
  .cp-live-price { color: var(--green); font-size: 16px; }
  .cp-live-lbl {
    font-size: 9px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
  }

  .cp-actions {
    display: flex; gap: 8px; margin-bottom: 8px;
  }
  .cp-btn {
    flex: 1; padding: 12px; border: none; border-radius: 12px;
    font-size: 12px; font-weight: 900; cursor: pointer;
    font-family: 'Nunito', sans-serif; transition: transform .1s, opacity .1s;
  }
  .cp-btn:active { transform: scale(0.97); opacity: 0.8; }
  .cp-btn-nav {
    background: rgba(0,229,255,.12); color: var(--cyan); border: 1px solid rgba(0,229,255,.3);
  }
  .cp-btn-call {
    background: rgba(0,230,118,.12); color: var(--green); border: 1px solid rgba(0,230,118,.3);
  }
  .cp-btn-main {
    width: 100%; padding: 14px; border-radius: 12px;
    background: var(--orange); color: #000;
    font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 900;
    letter-spacing: 1px; transition: transform .1s;
  }
  .cp-btn-main:active { transform: scale(0.98); }
  .cp-btn-finish { background: var(--green); }
  .cp-btn-cancel { display:block;width:100%;padding:10px;margin-top:8px;border:1px solid rgba(255,23,68,.3);border-radius:12px;background:transparent;color:var(--red);font-size:11px;font-weight:800;cursor:pointer;text-align:center;opacity:.7 }
  .cp-btn-cancel:active { opacity:1;background:rgba(255,23,68,.1) }

  /* Liste courses a venir */
  .cp-upcoming-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; margin-bottom: 6px;
    background: rgba(255,145,0,.06); border: 1px solid rgba(255,145,0,.15);
    border-radius: 12px; cursor: pointer; transition: transform .1s;
  }
  .cp-upcoming-item:active { transform: scale(0.98); }
  .cp-upcoming-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #ff6d00);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; color: #fff; flex-shrink: 0;
    margin-right: 10px;
  }
  .cp-upcoming-left { flex: 1; min-width: 0; }
  .cp-upcoming-time { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 900; color: var(--orange); }
  .cp-upcoming-client { font-size: 12px; font-weight: 800; margin-top: 2px; }
  .cp-upcoming-addr { font-size: 11px; color: var(--text-dim); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cp-upcoming-price { font-family: 'Orbitron', monospace; font-size: 11px; font-weight: 900; color: var(--green); margin-top: 2px; }
  .cp-upcoming-btn {
    padding: 8px 14px; border: none; border-radius: 10px;
    background: var(--orange); color: #000; font-size: 11px;
    font-weight: 900; cursor: pointer; white-space: nowrap;
  }

  /* Resume enrichi */
  #cp-summary-content {
    text-align: center; padding: 8px 0; font-size: 13px; font-weight: 700;
    line-height: 1.6; color: var(--text-dim);
  }
  #cp-summary-content strong { color: var(--text); }
  #cp-summary-content .cp-sum-big {
    font-family: 'Orbitron', monospace; font-size: 28px; font-weight: 900;
    color: var(--green); margin: 10px 0 4px;
  }
  .cp-sum-route {
    padding: 10px 0; margin-bottom: 8px;
  }
  .cp-sum-point {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; color: var(--text);
    padding: 4px 0;
  }
  .cp-sum-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  }
  .cp-sum-dot-green { background: var(--green); }
  .cp-sum-dot-red { background: #ff5252; }
  .cp-sum-line {
    width: 2px; height: 20px; background: rgba(255,255,255,.15);
    margin-left: 4px;
  }
  .cp-sum-stats {
    display: flex; gap: 8px; margin: 12px 0;
  }
  .cp-sum-stat {
    flex: 1; text-align: center; padding: 10px 4px;
    background: rgba(255,255,255,.04); border-radius: 10px;
  }
  .cp-sum-stat-val {
    font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 900;
    color: var(--cyan);
  }
  .cp-sum-stat-lbl {
    font-size: 9px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; margin-top: 4px;
  }
  .cp-sum-breakdown {
    text-align: left; font-size: 11px; color: var(--text-dim);
    padding: 8px 12px; background: rgba(255,255,255,.03); border-radius: 8px;
    margin: 8px 0; line-height: 1.8;
  }

  /* ===== WIZARD ONBOARDING ===== */
  #wizard-screen {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    overflow-y: auto; padding: 20px;
  }
  #wizard-screen.hidden { display: none; }
  .wizard-container {
    width: 100%; max-width: 420px;
  }
  .wizard-header { text-align: center; margin-bottom: 24px; }
  .wizard-logo { font-size: 48px; margin-bottom: 8px; }
  .wizard-title { font-family: 'Orbitron', monospace; font-size: 20px; font-weight: 900; color: var(--cyan); }
  .wizard-subtitle { font-size: 13px; color: var(--text-dim); font-weight: 700; margin-top: 6px; }
  .wizard-progress {
    width: 100%; height: 6px; background: rgba(255,255,255,.08);
    border-radius: 3px; overflow: hidden; margin-bottom: 6px;
  }
  .wizard-progress-bar {
    height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green));
    border-radius: 3px; transition: width .3s ease;
  }
  .wizard-step-label {
    font-size: 11px; font-weight: 800; color: var(--text-dim);
    text-align: center; margin-bottom: 20px; letter-spacing: 1px;
  }
  .wizard-step { display: none; }
  .wizard-step.active { display: block; animation: wizFadeIn .3s ease; }
  @keyframes wizFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .wizard-step-title {
    font-size: 18px; font-weight: 900; color: var(--text);
    margin-bottom: 6px; text-align: center;
  }
  .wizard-step-desc {
    font-size: 13px; color: var(--text-dim); font-weight: 600;
    text-align: center; margin-bottom: 20px; line-height: 1.5;
  }
  .wizard-chips {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  }
  .wizard-chip {
    padding: 12px 18px; background: var(--card); border: 2px solid transparent;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 800;
    color: var(--text); cursor: pointer; transition: all .2s;
  }
  .wizard-chip:hover { border-color: var(--cyan); }
  .wizard-chip.selected { border-color: var(--cyan); background: rgba(0,229,255,.1); color: var(--cyan); }
  .wizard-chip.day { min-width: 48px; text-align: center; }
  .wizard-fields { display: flex; flex-direction: column; gap: 12px; }
  .wizard-input {
    width: 100%; padding: 12px 16px; background: var(--card);
    border: 2px solid rgba(255,255,255,.08); border-radius: var(--radius-sm);
    color: var(--text); font-family: 'Nunito', sans-serif;
    font-size: 14px; font-weight: 700; outline: none; transition: border-color .2s;
  }
  .wizard-input:focus { border-color: var(--cyan); }
  .wizard-input::placeholder { color: var(--text-dim); }
  .wizard-field-label { font-size: 12px; font-weight: 800; color: var(--text-dim); letter-spacing: .5px; margin-bottom: -6px; }
  .wizard-hint { font-size: 12px; color: var(--text-dim); font-weight: 600; text-align: center; }
  .wizard-tarifs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .wizard-recap {
    background: var(--card); border-radius: var(--radius); padding: 16px;
  }
  .wizard-recap-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 13px;
  }
  .wizard-recap-item:last-child { border-bottom: none; }
  .wizard-recap-item span { color: var(--text-dim); font-weight: 700; }
  .wizard-recap-item strong { color: var(--cyan); font-weight: 900; }
  .wizard-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .wizard-btn-skip {
    background: none; border: none; color: var(--text-dim);
    font-size: 13px; font-weight: 700; cursor: pointer;
    text-decoration: underline;
  }
  .wizard-btn-prev, .wizard-btn-next {
    padding: 12px 24px; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 900; cursor: pointer; transition: all .2s;
  }
  .wizard-btn-prev {
    background: var(--card); color: var(--text);
    border: 1px solid rgba(255,255,255,.1);
  }
  .wizard-btn-next {
    background: var(--cyan); color: #000;
  }
  .wizard-btn-next:hover { filter: brightness(1.1); }

  /* ===== RAPPELS & ÉCHÉANCES ===== */
  .rappel-section-title {
    font-size: 11px; font-weight: 900; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-dim);
    margin: 16px 0 8px; padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .rappel-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04);
    cursor: pointer; transition: background .2s;
  }
  .rappel-item:hover { background: rgba(255,255,255,.02); }
  .rappel-item.overdue { background: rgba(255,23,68,.06); border-radius: 8px; padding: 10px 8px; }
  .rappel-item.done { opacity: .5; }
  .rappel-check { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
  .rappel-body { flex: 1; min-width: 0; }
  .rappel-label { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.4; }
  .rappel-meta { font-size: 11px; color: var(--text-dim); font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .rappel-type-badge {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 10px; font-weight: 900; letter-spacing: .5px;
  }
  .rappel-type-fiscal { background: rgba(41,121,255,.15); color: var(--blue); }
  .rappel-type-admin { background: rgba(255,145,0,.12); color: var(--orange); }
  .rappel-type-vtc { background: rgba(0,229,255,.12); color: var(--cyan); }
  .rappel-type-custom { background: rgba(213,0,249,.12); color: var(--purple); }

  /* ===== PREMIUM LOCK ===== */
  .premium-lock {
    position: fixed; inset: 0; z-index: 9980;
    background: rgba(15,15,26,.95);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
  }
  .premium-lock-content {
    text-align: center; max-width: 360px;
  }
  .premium-lock-icon { font-size: 56px; margin-bottom: 12px; }
  .premium-lock-title {
    font-family: 'Orbitron', monospace; font-size: 22px; font-weight: 900;
    color: var(--cyan); margin-bottom: 8px;
  }
  .premium-lock-desc {
    font-size: 14px; color: var(--text-dim); font-weight: 600;
    line-height: 1.6; margin-bottom: 16px;
  }
  .premium-lock-soon {
    font-size: 13px; color: var(--orange); font-weight: 800;
    margin-bottom: 20px; padding: 10px 16px;
    background: rgba(255,145,0,.08); border: 1px solid rgba(255,145,0,.2);
    border-radius: 10px;
  }
  .premium-lock-btn {
    padding: 14px 32px; background: var(--cyan); border: none;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 900;
    color: #000; cursor: pointer;
  }
  /* Mini badge premium sur les onglets verrouillés */
  .premium-badge {
    display: inline-block; font-size: 7px; font-weight: 900;
    background: var(--orange); color: #000; padding: 1px 4px;
    border-radius: 4px; vertical-align: top; margin-left: 2px;
    letter-spacing: .5px;
  }

  /* ===== CLÔTURE COURSE ===== */
  .cloture-pay-chip {
    flex: 1; padding: 10px; text-align: center;
    background: var(--card2); border: 2px solid transparent;
    border-radius: 10px; font-size: 13px; font-weight: 800;
    color: var(--text); cursor: pointer; transition: all .2s;
  }
  .cloture-pay-chip:hover { border-color: var(--cyan); }
  .cloture-pay-chip.selected { border-color: var(--cyan); background: rgba(0,229,255,.1); color: var(--cyan); }
  .cloture-money-btn {
    padding: 8px 14px; background: var(--card2); border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px; font-size: 14px; font-weight: 900; color: var(--text);
    cursor: pointer; transition: all .15s;
  }
  .cloture-money-btn:hover { background: rgba(255,145,0,.15); border-color: var(--orange); color: var(--orange); }
  .cloture-money-btn:active { transform: scale(.95); }

  /* ===== DISPONIBILITÉ CHAUFFEUR ===== */
  .cr-avail-banner {
    padding: 10px 14px; border-radius: 10px; margin: 8px 0;
    font-size: 13px; font-weight: 700; line-height: 1.5;
  }
  .cr-avail-ok {
    background: rgba(0,230,118,.08); border: 1px solid rgba(0,230,118,.2);
    color: var(--green);
  }
  .cr-avail-conflict {
    background: rgba(255,145,0,.08); border: 1px solid rgba(255,145,0,.2);
    color: var(--orange);
  }

  /* ===== WIZARD COURSE ===== */
  #course-wizard {
    position: fixed; inset: 0; z-index: 9998;
    background: var(--bg);
    overflow-y: auto; padding: 0;
  }
  #course-wizard.hidden { display: none; }
  .cwiz-container { width: 100%; max-width: 480px; margin: 0 auto; padding: 16px; min-height: 100vh; display: flex; flex-direction: column; }
  .cwiz-header { text-align: center; margin-bottom: 16px; position: relative; }
  .cwiz-close {
    position: absolute; top: 0; right: 0;
    background: none; border: none; color: var(--text-dim);
    font-size: 28px; cursor: pointer; line-height: 1; padding: 4px;
  }
  .cwiz-title { font-family: 'Orbitron', monospace; font-size: 18px; font-weight: 900; color: var(--cyan); }
  .cwiz-progress { width: 100%; height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; margin: 10px 0 4px; overflow: hidden; }
  .cwiz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); border-radius: 3px; transition: width .3s; }
  .cwiz-step-label { font-size: 11px; font-weight: 800; color: var(--text-dim); letter-spacing: 1px; }
  .cwiz-step { display: none; flex: 1; }
  .cwiz-step.active { display: flex; flex-direction: column; animation: wizFadeIn .25s ease; }
  .cwiz-step-icon { font-size: 40px; text-align: center; margin: 12px 0 6px; }
  .cwiz-step-title { font-size: 17px; font-weight: 900; color: var(--text); text-align: center; margin-bottom: 16px; }
  .cwiz-fields { display: flex; flex-direction: column; gap: 10px; }
  .cwiz-link { background: none; border: none; color: var(--cyan); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; }
  .cwiz-star-btn { background: none; border: none; cursor: pointer; font-size: 18px; padding: 4px; }

  /* Stops (étapes) */
  .cwiz-add-stop-btn {
    background: rgba(0,229,255,.08); border: 1px dashed var(--cyan);
    border-radius: 10px; padding: 8px 14px; color: var(--cyan);
    font-size: 12px; font-weight: 800; cursor: pointer; width: 100%;
    transition: background .15s;
  }
  .cwiz-add-stop-btn:hover { background: rgba(0,229,255,.15); }
  .stop-item {
    display: flex; align-items: center; gap: 6px;
    background: var(--card); border-radius: 10px; padding: 8px 10px;
    border-left: 3px solid var(--orange);
  }
  .stop-item input[type="text"],
  .stop-item .wizard-input[type="text"] {
    flex: 1 1 0; min-width: 0; width: auto;
  }
  .stop-duration {
    width: 50px; min-width: 50px; max-width: 50px; flex-shrink: 0;
    text-align: center; background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
    padding: 6px 2px; color: var(--text); font-size: 13px; font-weight: 900;
    -moz-appearance: textfield;
  }
  .stop-duration::-webkit-outer-spin-button,
  .stop-duration::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
  }
  .stop-del {
    background: none; border: none; cursor: pointer;
    font-size: 16px; padding: 2px; color: var(--red); flex-shrink: 0;
  }

  /* ===== BOUTONS D'ACTION UNIFIÉS (éditer / supprimer) ===== */
  .item-actions {
    display: flex; align-items: center; gap: 2px; flex-shrink: 0;
  }
  .item-edit-btn, .item-del-btn {
    background: none; border: none; cursor: pointer;
    font-size: 16px; padding: 6px; border-radius: 8px;
    transition: background .15s, color .15s; line-height: 1;
  }
  .item-edit-btn { color: var(--cyan, #00e5ff); }
  .item-del-btn { color: var(--red, #ff1744); }
  .item-edit-btn:hover { background: rgba(0,229,255,.12); color: #4ff8ff; }
  .item-del-btn:hover { background: rgba(255,23,68,.12); color: #ff5a7a; }
  .item-edit-btn:active, .item-del-btn:active { transform: scale(.9); }

  /* ===== EXPORT MONTH CHIPS ===== */
  .export-month-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
  }

  /* ══════════════════════════════════════════════════════════════════ */
  /* P2P — Boutons carte reservation                                 */
  /* ══════════════════════════════════════════════════════════════════ */
  .p2p-launch-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
    color: #000;
    cursor: pointer;
    letter-spacing: .5px;
    animation: p2p-pulse 2s ease-in-out infinite;
  }
  @keyframes p2p-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,230,118,.4); }
    50% { box-shadow: 0 0 12px 4px rgba(0,230,118,.2); }
  }
  .p2p-chat-btn {
    padding: 6px 10px;
    background: rgba(0,229,255,.15);
    border: 1px solid rgba(0,229,255,.2);
    border-radius: 8px;
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ══════════════════════════════════════════════════════════════════ */
  /* TRACKING — Overlay chauffeur                                     */
  /* ══════════════════════════════════════════════════════════════════ */
  .track-driver-overlay {
    position: fixed;
    bottom: 70px;
    left: 8px;
    right: 8px;
    background: var(--card);
    border: 1px solid rgba(0,229,255,.15);
    border-radius: 16px;
    padding: 14px;
    z-index: 8000;
    box-shadow: 0 -4px 20px rgba(0,0,0,.5);
    flex-direction: column;
    gap: 8px;
  }
  .track-driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .track-driver-p2p {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .track-p2p-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    display: inline-block;
  }
  .track-driver-gps {
    display: flex;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
  }
  .track-driver-status-bar {
    text-align: center;
    padding: 6px 0;
  }
  .track-driver-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .track-drv-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    flex: 1;
    min-width: 0;
  }

  /* ══════════════════════════════════════════════════════════════════ */
  /* CHAT — Modal messagerie                                          */
  /* ══════════════════════════════════════════════════════════════════ */
  .chat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9500;
    display: none;
    align-items: flex-end;
    justify-content: center;
  }
  .chat-modal-overlay.open { display: flex; }
  .chat-modal-box {
    width: 100%;
    max-width: 500px;
    max-height: 85dvh;
    background: var(--bg);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .chat-modal-header {
    padding: 14px 16px;
    background: var(--card);
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  .chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 200px;
    max-height: 50dvh;
  }
  .chat-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 700;
  }
  .chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }
  .chat-bubble-mine {
    background: rgba(0,229,255,.12);
    border: 1px solid rgba(0,229,255,.15);
    margin-left: auto;
    border-bottom-right-radius: 4px;
  }
  .chat-bubble-peer {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-bottom-left-radius: 4px;
  }
  .chat-bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 10px;
  }
  .chat-bubble-from {
    font-size: 10px;
    font-weight: 900;
    color: var(--cyan);
  }
  .chat-bubble-time {
    font-size: 9px;
    color: var(--text-dim);
    font-weight: 700;
  }
  .chat-bubble-text { color: var(--text); }
  .chat-delivered { color: var(--green); margin-left: 4px; }
  .chat-pending { color: var(--orange); margin-left: 4px; }
  .chat-input-bar {
    padding: 10px 12px;
    background: var(--card);
    border-top: 1px solid rgba(255,255,255,.06);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
  }
  .chat-input-bar input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    outline: none;
  }
  .chat-input-bar input::placeholder { color: var(--text-dim); }
  .chat-send-btn {
    padding: 10px 16px;
    background: var(--cyan);
    border: none;
    border-radius: 20px;
    color: #000;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
  }
  .chat-quick-bar {
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }
  .chat-quick-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
  }
  .chat-quick-btn:active { background: rgba(0,229,255,.15); color: var(--cyan); }

  /* ══════════════════════════════════════════════════════════════════ */
  /* TRACKING — Marqueurs carte                                       */
  /* ══════════════════════════════════════════════════════════════════ */
  .track-peer-icon { background: none !important; border: none !important; }
  .track-car-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 6px rgba(0,229,255,.4));
  }
  .track-my-icon { background: none !important; border: none !important; }
  .track-my-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue);
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(41,121,255,.5);
  }

  /* ══════════════════════════════════════════════════════════════════ */
  /* CHAT — Badge non-lu                                              */
  /* ══════════════════════════════════════════════════════════════════ */
  #chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
  }
