/* --- VARIABLES & THEMES --- */
:root {
  --bg-gradient: linear-gradient(135deg, #fffaf4 0%, #f3f4f6 100%);
  --card-bg: #ffffff;
  --text-main: #1f2937; 
  --text-muted: #6b7280;
  --border-color: #e2e8f0;
  --input-bg: #ffffff;
  
  --primary: #2563eb; 
  --accent: #f59e0b;
  --success: #15803d; 
  --danger: #ef4444;
  --radius: 28px;
  --font-stack: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* DARK MODE VARIABLES */
body.dark-mode {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --card-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --input-bg: #0f172a;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body{ overflow-x:hidden; }

body { 
  font-family: var(--font-stack); 
  background: var(--bg-gradient); 
  color: var(--text-main); 
  min-height: 100vh; 
  padding: 20px; 
  /* Padding top ajusté pour la barre fixe */
  padding-top: 90px; 
  padding-bottom: 120px;
  transition: background 0.3s ease, color 0.3s ease; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- ANIMATIONS (V61 RESTAURÉES) --- */
@keyframes floatMoney { 
    0% { transform: translateY(80px) scale(0) rotate(0deg); opacity: 0; } 
    20% { opacity: 1; transform: translateY(0px) scale(1) rotate(10deg); } 
    100% { transform: translateY(-300px) scale(1.3) rotate(360deg); opacity: 0; } 
}
@keyframes moveStripes { 0% { background-position: 0 0; } 100% { background-position: 50px 0; } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }
@keyframes borderRotate { 0% { background-position: 0% 0%; } 100% { background-position: 200% 0%; } }

/* ALERT TOP (NEWS) */
@keyframes slideDownUp {
    0% { transform: translate(-50%, -200%); opacity: 0; }
    5% { transform: translate(-50%, 20px); opacity: 1; }
    95% { transform: translate(-50%, 20px); opacity: 1; }
    100% { transform: translate(-50%, -200%); opacity: 0; }
}

#topAlert {
    position: fixed; top: 0; left: 50%; transform: translate(-50%, -200%);
    background: var(--card-bg); z-index: 4000;
    padding: 20px 30px; border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    display: flex; align-items: center; gap: 20px;
    border: 2px solid var(--primary);
    min-width: 340px;
    max-width: 90%;
}
#topAlert.trigger { animation: slideDownUp 10s forwards ease-in-out; }
.alert-icon { font-size: 30px; }
.alert-title { font-weight: 900; color: var(--text-main); font-size: 16px; text-transform: uppercase; margin-bottom:4px; }
.alert-desc { font-size: 13px; color: var(--text-muted); font-weight:600; }

/* TOAST */
#toast { visibility: hidden; min-width: 300px; background-color: var(--success); color: #fff; text-align: center; border-radius: 50px; padding: 14px 20px; position: fixed; z-index: 3000; left: 50%; top: 20px; font-weight: 700; font-size: 13px; box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4); display: flex; align-items: center; justify-content: center; gap: 10px; transform:translateX(-50%) translateY(-100%); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity:0; }
#toast.show { visibility: visible; transform:translateX(-50%) translateY(0); opacity:1; }

/* DARK MODE TOGGLE */
.theme-toggle {
    position: fixed; bottom: 20px; right: 20px; z-index: 9999;
    background: var(--card-bg); border: 2px solid var(--border-color);
    width: 70px; height: 32px; border-radius: 50px; cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: all 0.3s ease;
    display: flex; align-items: center; padding: 3px;
}
.theme-toggle-slider {
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
    position: absolute; left: 4px; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
body.dark-mode .theme-toggle-slider { left: calc(100% - 28px); background: #fbbf24; }
.theme-toggle:hover { transform: scale(1.05); }

/* MODALS */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2500; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-box { background: var(--card-bg); padding: 25px; border-radius: 20px; width: 100%; max-width: 500px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-height: 80vh; overflow-y: auto; border: 1px solid var(--border-color); }
.modal-title { font-size: 18px; font-weight: 900; margin-bottom: 15px; color: var(--text-main); display:flex; justify-content:space-between; align-items:center; }
textarea.fb-input { width: 100%; height: 120px; padding: 12px; border: 2px solid var(--border-color); background: var(--input-bg); color: var(--text-main); border-radius: 12px; resize: none; font-family: inherit; font-size: 14px; margin-bottom: 15px; outline: none; }
textarea.fb-input:focus { border-color: var(--primary); }

/* UPDATES STYLE */
.update-card { background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; margin-bottom: 10px; }
.update-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.update-tag { font-size: 10px; padding: 3px 8px; border-radius: 6px; font-weight: 800; text-transform: uppercase; }
.tag-new { background: #dcfce7; color: #166534; }
.tag-fix { background: #fee2e2; color: #991b1b; }
.tag-impr { background: #dbeafe; color: #1e40af; }
.update-date { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.update-body { font-size: 13px; color: var(--text-main); line-height: 1.5; white-space: pre-line; }
.update-title { font-weight: 800; font-size: 14px; color: var(--text-main); display: block; margin-bottom: 4px; }

/* LOGIN */
#loginOverlay { position: fixed; inset: 0; background: var(--bg-gradient); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
.login-box { background: var(--card-bg); padding: 40px; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; border: 1px solid var(--border-color); }
.login-title { font-size: 24px; font-weight: 900; color: var(--text-main); margin-bottom: 20px; }

.input-group { position: relative; margin-bottom: 10px; }
input, select { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--border-color); font-size: 13px; background: var(--input-bg); color: var(--text-main); outline: none; transition: 0.3s; }
input.error { border-color: var(--danger); animation: shake 0.3s; background-color: rgba(239, 68, 68, 0.05); }
.toggle-password { position: absolute; right: 12px; top: 12px; cursor: pointer; opacity: 0.5; font-size: 16px; }
.toggle-password:hover { opacity: 1; }

/* --- TOP BAR (DESIGN ÉPURÉ & CORRIGÉ) --- */
#appContent { display: none; }
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px; /* Hauteur fixe pour éviter les gros blocs */
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  z-index: 1000;
}
body.dark-mode .top-bar { background: rgba(15,23,42,0.85); }

.user-welcome { 
  font-size: 14px; 
  font-weight: 800; 
  color: var(--text-main); 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  white-space: nowrap; 
}
.user-badge { 
  background: #dbeafe; 
  color: var(--primary); 
  padding: 3px 10px; 
  border-radius: 20px; 
  font-size: 10px; 
  text-transform: uppercase; 
  font-weight: 900; 
  letter-spacing: 0.5px; 
}
body.dark-mode .user-badge { background: #1e40af; color: #dbeafe; }

.top-actions { 
  display:flex; 
  gap: 8px; 
  align-items:center; 
}

/* Bouton Admin : Petit badge cliquable */
.admin-btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: 4px; 
  height: 32px;
  padding: 0 12px; 
  font-size: 11px; 
  background: var(--primary); 
  color: white; 
  border: none; 
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s;
}
.admin-btn:hover { opacity: 0.9; }
.admin-text { display: inline; }

/* Bouton Déconnexion : Juste une icône carrée (porte) */
.logout-btn { 
  width: 36px; 
  height: 36px; 
  padding: 0; 
  border-radius: 10px; 
  background: transparent; 
  color: #ef4444; 
  border: 1px solid rgba(239, 68, 68, 0.3); 
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.1); }
.logout-text { display: none; } /* On cache le texte pour faire épuré */
.logout-icon { font-size: 16px; }

.icon-btn { 
  width: 36px; height: 36px; 
  border-radius: 10px; 
  border: 1px solid var(--border-color); 
  background: var(--card-bg); 
  color: var(--text-main); 
  font-weight: 900; 
  cursor: pointer; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 20px;
  transition: transform .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); }

/* --- HEADER & DASHBOARD --- */
.container { max-width: 1200px; margin: 0 auto; }
header { text-align: center; margin-bottom: 30px; position: relative; z-index: 10; }

.header-pill { display: inline-flex; align-items: center; gap: 8px; background: #eff6ff; padding: 6px 16px; border-radius: 50px; font-size: 11px; font-weight: 800; color: var(--primary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
body.dark-mode .header-pill { background: #1e3a8a; color: #93c5fd; }

h1 { font-size: 40px; font-weight: 900; color: var(--text-main); margin: 0 0 10px; letter-spacing: -1px; text-transform: uppercase; line-height: 1; }

/* MASQUER LA MISE A JOUR AU DESSUS DU ROND (DEMANDÉ) */
#lastUpdate { display: none !important; }

/* CERCLE CENTRAL (V61) */
.global-score-container {
  margin: 30px auto; width: 260px; height: 260px;
  border-radius: 50%; display:flex; align-items:center; justify-content:center; flex-direction:column;
  position: relative; overflow: visible;
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  border: 2px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* Mode Jour - Lisibilité */
body:not(.dark-mode) .global-score-container {
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  border: 2px solid rgba(255,255,255,.10);
}

.global-score-container::before {
  content:""; position:absolute; inset:-6px; border-radius:50%;
  background: conic-gradient(from 230deg, rgba(37,99,235,.55), rgba(245,158,11,.40), rgba(16,185,129,.45), rgba(37,99,235,.55));
  filter: blur(0.2px) saturate(1.35) brightness(1.12); z-index:-1; opacity:.70;
}
body.dark-mode .global-score-container::before {
  opacity: 1; inset: -10px;
  background: conic-gradient(from 230deg, rgba(59,130,246,1), rgba(236,72,153,0.98), rgba(245,158,11,0.98), rgba(16,185,129,0.96), rgba(59,130,246,1));
  filter: saturate(5.0) brightness(2.35) contrast(1.12);
  box-shadow: 0 0 0 14px rgba(59,130,246,0.20), 0 0 110px rgba(59,130,246,0.62);
}

.global-score-value { font-size: 62px; font-weight: 900; color:#ffffff; letter-spacing:-.02em; text-shadow: 0 8px 22px rgba(0,0,0,.55); line-height: 1; padding: 6px 14px; border-radius: 16px; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.10); }
.global-score-label { margin-top: 12px; font-size: 11px; font-weight: 800; color: rgba(255,255,255,.72); letter-spacing:.15em; text-align:center; text-transform: uppercase; line-height: 1.25; }
.global-score-pills { display:flex; align-items:center; justify-content:center; gap: 10px; margin-top: 10px; }
.global-score-pill { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.88); padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); backdrop-filter: blur(6px); white-space: nowrap; }
.global-score-micro { margin-top: 10px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.72); padding: 0 18px; text-align:center; line-height: 1.25; max-width: 240px; }

.global-score-container.milestone { animation: milestonePulse .6s ease-out 1; box-shadow: 0 18px 55px rgba(0,0,0,.35), 0 0 0 8px rgba(16,185,129,.12); }
.global-score-container.bump { transform: scale(1.02); }
@keyframes milestonePulse { 0%{ transform: scale(1); } 45%{ transform: scale(1.03); } 100%{ transform: scale(1); } }

/* COMPTEURS SOUS LE CERCLE */
.trajectory-indicator { margin: -8px auto 6px; max-width: 480px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: rgba(255,255,255,.92); text-shadow: 0 10px 28px rgba(0,0,0,.35); padding: 10px 14px; border-radius: 999px; background: rgba(15,23,42,.82); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 28px rgba(2,6,23,.18); }
.trajectory-indicator .ti-sub { font-weight: 600; color: rgba(255,255,255,.70); }

.daily-micro { margin: 0 auto 14px; max-width: 500px; text-align: center; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.78); padding: 10px 14px; border-radius: 999px; background: rgba(15,23,42,.82); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 28px rgba(2,6,23,.18); }
.daily-micro.time-remaining { margin-top: 6px; margin-bottom: 16px; padding: 14px 16px; border-radius: 18px; text-align: center; font-size: 16px; font-weight: 900; letter-spacing: .12em; white-space: nowrap; }

.month-countdown { width: min(560px, 94vw); margin: 14px auto 0; padding: 0; display: flex; justify-content: center; gap: 8px; }
.month-countdown .mc-box { width: 72px; padding: 10px 8px; border-radius: 14px; text-align: center; border: 1px solid rgba(255,255,255,.14); background: rgba(15,23,42,.82); backdrop-filter: blur(10px); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.month-countdown .mc-num { font-size: 20px; font-weight: 900; letter-spacing: .02em; color: rgba(255,255,255,.95); line-height: 1; }
.month-countdown .mc-unit { margin-top: 4px; font-size: 9px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; color: rgba(255,255,255,.70); }

/* MODE JOUR : textes lisibles sous le cercle */
body:not(.dark-mode) .trajectory-indicator { color: rgba(255,255,255,.95); text-shadow: none; background: rgba(15,23,42,.9); }
body:not(.dark-mode) .daily-micro { color: rgba(255,255,255,.9); background: rgba(15,23,42,.9); }

/* KPI STRIP */
.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px 0; }
@media (max-width: 900px){ .kpi-strip{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 14px; box-shadow: 0 14px 35px rgba(0,0,0,0.06); }
.kpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.kpi-value { margin-top: 6px; font-size: 22px; font-weight: 900; color: var(--text-main); letter-spacing: -0.02em; }
.kpi-sub { margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--text-muted); }

/* CARDS & OBJECTIVES (V61 Glassmorphism) */
.objectives-wrapper { display: flex; flex-direction: column; gap: 30px; }
.category-title { font-size: 22px; font-weight: 900; text-transform: uppercase; color: var(--text-main); margin: 0 0 25px; display: flex; align-items: center; gap: 15px; letter-spacing: 1px; }
.category-title::after { content: ''; flex: 1; height: 3px; background: var(--border-color); border-radius: 4px; opacity: 0.5; }

.card { 
  background: rgba(255,255,255,.75); 
  border-radius: var(--radius); 
  padding: 30px; 
  box-shadow: 0 15px 40px -5px rgba(0,0,0,0.06); 
  position: relative; overflow: hidden; 
  border: 1px solid rgba(255,255,255,.6); 
  margin-bottom: 0; transition: transform 0.2s; 
  backdrop-filter: blur(16px) saturate(140%); 
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
body.dark-mode .card { background: rgba(15,23,42,.6); border-color: rgba(148,163,184,.16); box-shadow: 0 18px 55px rgba(0,0,0,.40); }

.card.primary-card { border: 1px solid rgba(37,99,235,.22); box-shadow: 0 18px 52px rgba(37,99,235,.10); }
body.dark-mode .card.primary-card { border-color: rgba(96,165,250,.22); box-shadow: 0 18px 52px rgba(30,64,175,.20); }

.card.secondary-card { border-color: rgba(59,130,246,.18); box-shadow: 0 20px 60px rgba(37,99,235,.10); }
body.dark-mode .card.secondary-card { border-color: rgba(96,165,250,.18); box-shadow: 0 22px 70px rgba(37,99,235,.14); }

.card.is-locked { background: #f8fafc !important; border: 2px dashed #cbd5e1 !important; opacity: 0.9; }
body.dark-mode .card.is-locked { background: #0f172a !important; border-color: #334155 !important; }
.card.is-locked .obj-icon { filter: grayscale(1); opacity: 0.5; }

.card.is-winner { border-color: rgba(16,185,129,.22) !important; box-shadow: 0 22px 70px rgba(16,185,129,.10) !important; overflow: visible; }
.card.is-winner::before { content: ""; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px; z-index: -1; border-radius: calc(var(--radius) + 3px); background: linear-gradient(90deg, rgba(16,185,129,.35), rgba(16,185,129,.18), rgba(16,185,129,.35)); background-size: 200% 100%; animation: borderRotate 6s linear infinite; }
.card.is-winner::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; background: var(--card-bg); border-radius: var(--radius); }

.status-badge { position: absolute; top: 0; left: 0; right: 0; padding: 10px; text-align: center; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; border-radius: var(--radius) var(--radius) 0 0; }
.badge-locked { background: #fff7ed; color: #c2410c; border-bottom: 2px solid #ffedd5; }
.badge-winner { background: rgba(16,185,129,.14); color: #065f46; border: 1px solid rgba(16,185,129,.25); box-shadow: 0 12px 30px rgba(16,185,129,.10); backdrop-filter: blur(12px) saturate(140%); }
body.dark-mode .badge-winner { background: rgba(16,185,129,.12); color: rgba(236,253,245,.92); border-color: rgba(16,185,129,.20); }
.badge-ready { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.22); color: #1e40af; backdrop-filter: blur(10px) saturate(140%); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; margin-top: 25px; gap: 15px; }
.obj-info-group { display: flex; align-items: center; flex: 1; }
.obj-icon { width: 56px; height: 56px; border-radius: 16px; background: #eff6ff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-right: 15px; flex-shrink: 0; }
body.dark-mode .obj-icon { background: #1e3a8a; }

.obj-title-row { display:flex; align-items:center; justify-content:space-between; gap:10px; width: 100%; }
.obj-title { font-weight:800; font-size:18px; margin: 0 0 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obj-title-actions { display:flex; align-items:center; gap:8px; flex: 0 0 auto; }
.obj-graph-btn { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.02); color: var(--text-main); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; line-height: 1; flex: 0 0 auto; }
body.dark-mode .obj-graph-btn { background: rgba(255,255,255,0.04); }

.remaining-potential { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .02em; background: rgba(15,23,42,.06); border: 1px solid rgba(15,23,42,.10); color: rgba(15,23,42,.78); }
body.dark-mode .remaining-potential { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.85); }

.data-boxes-row { display: flex; gap: 10px; margin-bottom: 12px; }
.data-box { flex: 1; background: #f8fafc; border: 2px solid var(--border-color); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; align-items: flex-start; }
body.dark-mode .data-box { background: #0f172a; }
.data-box-label { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.5px; }
.data-box-value { font-size: 18px; font-weight: 900; color: var(--text-main); line-height: 1; }

.progress-track { height: 24px; background: rgba(148,163,184,.25); border-radius: 999px; overflow: hidden; margin-bottom: 30px; position: relative; display: flex; border: 1px solid rgba(148,163,184,.25); }
body.dark-mode .progress-track { background: rgba(148,163,184,.18); border-color: rgba(148,163,184,.18); }
.progress-fill { height: 100%; background: linear-gradient(90deg, rgba(37,99,235,.95), rgba(37,99,235,.65)); transition: width .85s cubic-bezier(.2,.8,.2,1); position: relative; will-change: width; }
.progress-fill::after { content:""; position:absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); transform: translateX(-60%); animation: progressShine 2.8s ease-in-out infinite; opacity: .55; pointer-events:none; }
@keyframes progressShine { 0%{ transform: translateX(-60%); } 60%{ transform: translateX(120%); } 100%{ transform: translateX(120%); } }
.card.is-winner .progress-fill { background: linear-gradient(90deg, rgba(16,185,129,.95), rgba(16,185,129,.65)); }
.progress-overdrive { height: 100%; width: 0; background: linear-gradient(90deg, rgba(239,68,68,.92), rgba(239,68,68,.55)); transition: width .85s cubic-bezier(.2,.8,.2,1); position: relative; }
.percent-float { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 900; color: white; z-index: 5; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.milestones { display: flex; justify-content: space-between; position: relative; padding: 0 10px; }
.milestones::before { content: ''; position: absolute; top: 18px; left: 30px; right: 30px; height: 6px; background: var(--border-color); z-index: 0; border-radius: 6px; }
.ms-item { z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 30%; position: relative; }
.ms-circle { width: 40px; height: 40px; background: var(--card-bg); border: 4px solid #cbd5e1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #94a3b8; transition: 0.3s; font-size: 16px; }
.ms-item.unlocked .ms-circle { background: rgba(16,185,129,.10) !important; border-color: rgba(16,185,129,.25) !important; color: rgba(16,185,129,.85) !important; transform: scale(1.05) !important; box-shadow: 0 10px 22px rgba(16,185,129,.10) !important; }
.ms-prize { font-size: 13px; background: #f8fafc; padding: 6px 10px; border-radius: 8px; border: 2px solid var(--border-color); font-weight: 900; color: var(--text-muted); }
body.dark-mode .ms-prize { background: #0f172a; }
.ms-item.unlocked .ms-prize { background: rgba(16,185,129,.12) !important; color: rgba(6,95,70,.92) !important; border: 1px solid rgba(16,185,129,.22) !important; backdrop-filter: blur(10px); }
.ms-threshold { position: absolute; top: -30px; font-size: 11px; font-weight: 900; color: var(--text-main); background: var(--card-bg); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border-color); }

.fixed-bonus-block { background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 12px; padding: 15px; text-align: center; color: #64748b; font-weight: 800; }
body.dark-mode .fixed-bonus-block { background: #0f172a; border-color: #334155; }
.fixed-bonus-block.unlocked { background: #dcfce7; border: 2px solid #22c55e; color: #15803d; animation: pulse-green 2s infinite; }
.earned-badge-container { margin-top: 30px; display: flex; justify-content: center; }
.earned-badge { background: rgba(22,163,74,.18); color: #14532d; padding: 12px 18px; border-radius: 999px; font-weight: 900; font-size: 13px; display:flex; align-items:center; gap: 10px; border: 1px solid rgba(22,163,74,.34); box-shadow: 0 10px 26px rgba(0,0,0,0.10); }
body.dark-mode .earned-badge { background: rgba(16,185,129,.20); color: #ecfdf5; border-color: rgba(16,185,129,.38); }

/* CAROUSEL */
.secondary-carousel { margin-top: 16px; position: relative; }
.carousel-track { display: flex; gap: 14px; overflow-x: auto; padding: 10px 6px 18px 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: rgba(17,24,39,.18); border-radius: 999px; }
.carousel-item { flex: 0 0 86%; scroll-snap-align: start; }
@media (min-width: 900px){ .carousel-item{ flex-basis: 48%; } }
.carousel-track.nudge { animation: nudgeRight 1.2s ease-in-out 2; }
@keyframes nudgeRight { 0%{ transform: translateX(0); } 60%{ transform: translateX(-10px); } 100%{ transform: translateX(0); } }
.carousel-item.peek { animation: peekBounce 900ms ease-in-out 2; }
@keyframes peekBounce { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-10px); } }
.carousel-btn { position:absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(17,24,39,.14); background: rgba(255,255,255,.92); box-shadow: 0 10px 26px rgba(0,0,0,.18); display:flex; align-items:center; justify-content:center; cursor:pointer; z-index: 5; user-select:none; }
.carousel-btn.prev { left: -6px; } .carousel-btn.next { right: -6px; }

/* CALENDAR */
.native-cal-container { margin-top: 60px; background: var(--card-bg); border-radius: 20px; padding: 20px; box-shadow: 0 15px 40px -5px rgba(0,0,0,0.06); border: 1px solid var(--border-color); }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cal-month-title { font-size: 16px; font-weight: 900; text-transform: uppercase; color: var(--text-main); }
.cal-nav-btn { background: #eff6ff; border: none; width: 30px; height: 30px; border-radius: 50%; color: var(--primary); font-weight: 900; cursor: pointer; }
body.dark-mode .cal-nav-btn { background: #1e3a8a; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-name { text-align: center; font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; padding-bottom: 5px; }
.cal-cell { background: #f8fafc; border-radius: 8px; min-height: 50px; padding: 4px; border: 1px solid #f1f5f9; position: relative; overflow: hidden; }
body.dark-mode .cal-cell { background: #0f172a; border-color: #334155; }
.cal-date { font-size: 11px; font-weight: 800; color: var(--text-main); margin-bottom: 2px; display: block; }
.cal-event-dot { display: block; font-size: 8px; padding: 2px 4px; border-radius: 3px; margin-bottom: 2px; color: white; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.evt-sturia { background-color: #f59e0b; } .evt-heiko { background-color: #3b82f6; } .evt-deliv { background-color: #ef4444; } .evt-uber { background-color: #10b981; } .evt-street { background-color: #8b5cf6; }

/* GLOBAL MENU SIDEBAR */
.global-menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.25); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 998; }
.global-menu { position: fixed; top: 0; right: 0; height: 100%; width: min(360px, 88vw); background: var(--card-bg); border-left: 1px solid var(--border-color); box-shadow: -20px 0 60px rgba(0,0,0,0.18); transform: translateX(102%); transition: transform .18s ease; z-index: 999; display: flex; flex-direction: column; }
.global-menu.open { transform: translateX(0); }
.global-menu-backdrop.open { opacity: 1; pointer-events: auto; }
.global-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 14px; }
.global-menu-title { font-weight: 900; font-size: 16px; color: var(--text-main); }
.global-menu-links { padding: 8px 14px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.global-menu-link { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px; border-radius: 14px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.02); font-weight: 800; color: var(--text-main); text-decoration: none; }
body.dark-mode .global-menu-link { background: rgba(255,255,255,0.04); }
.global-menu-sep { height:1px; background: var(--border-color); margin: 12px 2px 16px; opacity:0.7; }
.global-menu-sub { margin-top: -2px; margin-left: 10px; margin-right: 2px; padding: 10px; border-radius: 14px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.015); }
body.dark-mode .global-menu-sub { background: rgba(255,255,255,0.03); }
.menu-preview-chip { display: block; text-decoration: none; padding: 10px 10px; border-radius: 12px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.02); color: var(--text-main); margin-bottom: 8px; }
body.dark-mode .menu-preview-chip { background: rgba(255,255,255,0.04); }
.menu-preview-title { font-weight: 900; font-size: 13px; line-height: 1.1; }
.menu-preview-sub { margin-top: 4px; font-size: 11px; font-weight: 750; color: var(--text-muted); line-height: 1.2; }
.menu-sub-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 8px 0 8px 0; }
.menu-sub-title { font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.menu-sub-link { font-size: 12px; font-weight: 900; text-decoration: none; color: var(--primary); }
.menu-preview-icon { width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.02); display:flex; align-items:center; justify-content:center; overflow:hidden; flex: 0 0 auto; }
body.dark-mode .menu-preview-icon { background: rgba(255,255,255,0.04); }
.menu-preview-icon img { width:100%; height:100%; object-fit:cover; }
.global-menu-foot { margin-top: auto; padding: 12px 14px 16px 14px; border-top: 1px solid var(--border-color); }

/* ADMIN & COMMON */
.admin-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 600px; background: var(--bg-gradient); z-index: 2000; box-shadow: -10px 0 40px rgba(0,0,0,0.1); padding: 20px; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; border-left: 1px solid var(--border-color); }
.admin-panel.active { transform: translateX(0); }
.close-admin { position: absolute; top: 20px; right: 20px; font-size: 28px; background: none; border: none; cursor: pointer; color: #9ca3af; }
.admin-section { background: var(--card-bg); padding: 20px; border-radius: 16px; margin-bottom: 20px; border: 1px solid var(--border-color); box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.btn { width: 100%; padding: 12px; border-radius: 10px; border: none; font-weight: 800; cursor: pointer; text-transform: uppercase; background: var(--primary); color: white; font-size: 12px; letter-spacing: 0.5px; transition: 0.2s; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.tab-nav { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.btn-tab { flex:1; padding: 12px; font-size: 12px; font-weight: 700; color: var(--text-muted); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.btn-tab.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }
.section-header-large { font-size: 16px; color: var(--primary); font-weight: 900; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }

/* LISTS & ITEMS (CORRIGÉ : ÉPURÉ) */
.user-item { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 10px 12px; 
  background: var(--input-bg); 
  border-radius: 12px; 
  margin-bottom: 8px; 
  border: 1px solid var(--border-color); 
  flex-wrap: wrap; 
  gap:10px; 
}
.user-info { display: flex; flex-direction: column; gap: 2px; }
.user-name { font-weight: 800; font-size: 13px; color: var(--text-main); }
/* Email petit et discret (demandé) */
.user-email-sub { font-size: 10px; color: var(--text-muted); opacity: 0.6; font-weight: 600; margin-top:0; }
.user-meta { font-size: 11px; color: var(--text-muted); font-weight: 600; }

.user-actions { margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.user-actions .btn-group { display:flex; align-items:center; gap:6px; padding:3px; border-radius: 12px; background: rgba(148,163,184,.12); border: 1px solid var(--border-color); }
body.dark-mode .user-actions .btn-group { background: rgba(148,163,184,.10); }
.action-btn { width: 32px; height: 32px; font-size: 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; transition: all 0.18s; display: inline-flex; align-items: center; justify-content: center; }
.action-btn:hover { background: rgba(148,163,184,.18); transform: translateY(-1px); }
.action-btn.delete:hover { background: #fee2e2; border-color: #fca5a5; }
.pub-state { font-size: 10px; font-weight: 900; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-color); color: var(--text-muted); background: rgba(148,163,184,.12); }
.pub-state.on { color: #065f46; border-color: rgba(22,163,74,.25); background: rgba(22,163,74,.16); }
body.dark-mode .pub-state.on { color: #ecfdf5; border-color: rgba(16,185,129,.38); background: rgba(16,185,129,.22); }
.pub-state.off { color: #991b1b; border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.12); }
body.dark-mode .pub-state.off { color: #fee2e2; border-color: rgba(248,113,113,.35); background: rgba(239,68,68,.18); }
.user-gain { font-weight: 900; font-size: 13px; color: #047857; background: #dcfce7; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(22,163,74,.22); }
body.dark-mode .user-gain { color: #ecfdf5; background: rgba(16,185,129,.22); border-color: rgba(16,185,129,.38); }
.total-row { background: #1e293b; color: white; padding: 15px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 900; margin-top: 15px; font-size: 14px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
body.dark-mode .total-row { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.active { background-color: #10b981; box-shadow: 0 0 0 2px #d1fae5; }
.status-dot.pending { background-color: #ef4444; box-shadow: 0 0 0 2px #fee2e2; }
.status-text { font-size: 9px; text-transform: uppercase; font-weight: 800; color: #94a3b8; margin-left: 4px; }
.admin-tag { background: #3b82f6; color: white; padding: 2px 6px; border-radius: 4px; font-size: 9px; font-weight: 800; margin-left: 5px; letter-spacing: 0.5px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--text-main); cursor: pointer; padding: 5px; border-radius: 6px; transition: background 0.2s; }
.check-label:hover { background: #dbeafe; }
.options-row { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; background: #eff6ff; padding: 15px; border-radius: 12px; }
body.dark-mode .options-row { background: #1e3a8a; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(20px); }


/* TEAM LIST – Ludique + épuré (sans perdre d'infos) */
.user-item.team-row{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap: 12px;
  padding: 12px 12px;
  flex-wrap: nowrap; /* override legacy */
}

.team-left{ min-width: 0; }
.team-name-row{ display:flex; align-items:center; gap:10px; min-width:0; }
.team-left .user-name{ font-size: 14px; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.team-meta{
  display:flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items:center;
  margin-top: 6px;
}
.team-status-chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(148,163,184,.10);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.team-email{
  font-size: 11px;
  font-weight: 750;
  color: var(--text-muted);
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.team-hours-chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(59,130,246,.10);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
}
.team-push-chip{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(148,163,184,.10);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.team-push-chip.on{ color:#065f46; border-color: rgba(22,163,74,.25); background: rgba(22,163,74,.14); }
.team-push-chip.off{ color:#991b1b; border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.10); }

.team-right{ display:flex; flex-direction:column; align-items:flex-end; gap: 8px; }
.team-right-top{ display:flex; align-items:center; justify-content:flex-end; gap: 8px; width: 100%; }
.team-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(59,130,246,.35);
  background: rgba(59,130,246,.14);
  color: #1d4ed8;
}
body.dark-mode .team-pill{ color:#dbeafe; border-color: rgba(59,130,246,.55); background: rgba(59,130,246,.22); }

.user-gain.muted{
  color: var(--text-muted);
  background: rgba(148,163,184,.10);
  border-color: var(--border-color);
}

.team-right-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
  width: 100%;
}

.team-prime-toggle{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(148,163,184,.10);
  font-size: 11px;
  font-weight: 950;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.team-prime-toggle input{ width:auto; height:auto; }
.team-btn-group{ background: rgba(148,163,184,.12); }

@media (max-width: 520px){
  .user-item.team-row{ grid-template-columns: 1fr; }
  .team-right{ align-items:stretch; }
  .team-right-top{ justify-content:space-between; }
  .team-right-actions{
    justify-content:flex-start;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .team-email{ max-width: 100%; }
}

/* USER EDIT MODAL */
.user-edit-grid{ display:flex; flex-direction:column; gap: 10px; }
.user-edit-meta{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }
.user-edit-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(148,163,184,.10);
  font-size: 11px;
  font-weight: 900;
  color: var(--text-muted);
}


/* LOGS & HISTORY */
.log-user-group { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.03); margin-bottom: 8px; }
.group-header { background: var(--input-bg); padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-bottom: 1px solid var(--border-color); transition:0.2s; }
.group-header:hover { background: #eff6ff; }
.group-info { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--text-main); }
.group-body { display: none; padding: 15px; background: var(--card-bg); gap: 20px; }
.group-body.open { display: grid; grid-template-columns: 1fr 1fr; }
.log-col-title { font-size: 11px; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin-bottom: 8px; border-bottom: 2px solid #f1f5f9; padding-bottom: 4px; }
.log-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.log-entry { font-size: 12px; display: flex; align-items: flex-start; gap: 6px; }
.log-dot { font-size: 8px; margin-top: 4px; }
.log-time-s { font-weight: 700; color: #64748b; font-size: 11px; min-width: 45px; }
.log-desc { color: var(--text-main); line-height: 1.3; }
.log-dur { color: #059669; font-weight: 700; background: #ecfdf5; padding: 0 4px; border-radius: 4px; font-size: 10px; display: inline-block; margin-left: 4px; }
.btn-clear-hist { border:none; background:#fee2e2; color:#ef4444; border-radius:4px; padding:2px 6px; font-size:10px; font-weight:700; cursor:pointer; }
.history-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.55); border: 1px solid rgba(15, 23, 42, 0.06); }
body.dark-mode .history-row { background: rgba(2, 6, 23, 0.30); border-color: rgba(148, 163, 184, 0.14); }
.history-month { font-weight: 800; }
.history-metrics { display:flex; gap:10px; font-size: 12px; opacity: 0.92; white-space:nowrap; }
.history-pill { padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.24); background: rgba(148, 163, 184, 0.10); }

/* --- COCKPIT & SIMULATOR (CORRIGÉ : TEXTES PLUS FINS) --- */
.cockpit-container { padding: 25px; border: 3px solid var(--border-color); border-radius: 20px; background: var(--input-bg); margin-bottom: 20px; }
.cockpit-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cockpit-gauge-container { 
  height: 28px; 
  background: var(--border-color); 
  border-radius: 99px; 
  overflow: hidden; 
  position: relative; 
  margin-bottom: 10px; 
  border:1px solid #cbd5e1;
  padding: 0; /* évite un "inset" visuel sur mobile */
}
.cockpit-gauge-fill { 
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #3b82f6; 
  transition: width 0.3s;
  will-change: width;
}
.cockpit-gauge-fill.danger { background: #ef4444; animation: pulse 1s infinite; }
.cockpit-info { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: #64748b; }

/* --- Progression du mois : pill-bars (style capture) --- */
.month-pills-wrap{
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
}
body.dark-mode .month-pills-wrap{ background: rgba(15,23,42,0.55); border-color: rgba(148,163,184,0.16); }
.month-pills-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 10px; }
.month-pills-bar{
  display:flex;
  align-items:flex-end;
  gap: 10px;
  width:100%;
  overflow-x:auto;
  padding: 6px 2px 2px;
}
.month-pill{
  position: relative;
  width: 22px;
  min-width: 22px;
  border-radius: 999px;
  background: rgba(148,163,184,0.22);
  box-shadow: inset 0 6px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}
body.dark-mode .month-pill{ background: rgba(148,163,184,0.18); box-shadow: inset 0 8px 18px rgba(0,0,0,0.35); }
.month-pill .fill{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:0%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248,113,113,0.95) 0%, rgba(139,92,246,0.95) 70%, rgba(59,130,246,0.95) 100%);
  transition: height .25s ease;
}
.month-pills-sub{ margin-top: 10px; font-size: 12px; font-weight: 850; color: var(--text-muted); }

/* --- Mise à jour rapide (Pilotage) --- */
#quickUpdateList{ display:flex; flex-direction:column; gap:10px; }
.quick-update-row{
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(255,255,255,0.60);
  border-radius: 16px;
  padding: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
body.dark-mode .quick-update-row{ background: rgba(15,23,42,0.55); border-color: rgba(148,163,184,0.16); }
.quick-update-left{ min-width: 0; }
.quick-update-name{ font-weight: 950; font-size: 13px; color: var(--text-main); }
.quick-update-sub{ margin-top: 4px; font-size: 11px; font-weight: 850; color: var(--text-muted); display:flex; flex-wrap:wrap; gap: 8px; }
.quick-update-pill{ padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(148,163,184,0.18); background: rgba(148,163,184,0.10); }
.quick-update-right{ display:flex; align-items:center; gap:8px; }
.quick-update-right input{ width: 110px; margin: 0; }
.quick-update-btn{ border:none; background: rgba(59,130,246,0.14); color: var(--primary); padding: 10px 12px; border-radius: 12px; font-weight: 950; cursor:pointer; }
.quick-update-btn:hover{ filter: brightness(1.02); }
@media (max-width: 560px){
  .quick-update-row{ flex-direction:column; align-items:stretch; }
  .quick-update-right{ justify-content:space-between; }
  .quick-update-right input{ width: 100%; }
  .quick-update-btn{ width: 100%; }
}

@media (max-width: 520px){
  .month-pill{ width: 20px; min-width: 20px; }
}
.sim-total-box { margin-top: 20px; padding: 15px; border: 2px solid #2563eb; border-radius: 12px; background: var(--card-bg); text-align: center; box-shadow:0 4px 15px rgba(37,99,235,0.1); margin-bottom: 10px; }
.sim-total-label { font-size: 13px; font-weight: 900; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.sim-total-value { font-size: 24px; font-weight: 900; color: var(--text-main); }
.cockpit-obj-row { background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border-color); margin-bottom: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); overflow: hidden; }
.cockpit-obj-head { width: 100%; display: flex; align-items: center; justify-content: space-between; background: transparent; border: none; padding: 18px 18px; cursor: pointer; text-align: left; }
.cockpit-obj-title { width: 100%; display:flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16px; font-weight: 900; color: var(--text-main); }
.cockpit-obj-title .cost { font-size: 12px; font-weight: 900; color: #1e40af; background: rgba(37,99,235,.10); border: 1px solid rgba(37,99,235,.18); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
body.dark-mode .cockpit-obj-title .cost { color: #e0f2fe; background: rgba(59,130,246,.22); border-color: rgba(147,197,253,.38); }
.cockpit-chevron { font-size: 18px; color: var(--text-muted); margin-left: 12px; transition: transform .18s ease; }
.cockpit-obj-body { display: none; padding: 0 18px 18px 18px; }
.cockpit-obj-row.open .cockpit-obj-body { display:block; }
.cockpit-obj-row.open .cockpit-chevron { transform: rotate(180deg); }
.slider-row { display: flex; flex-direction:column; align-items: flex-start; gap: 10px; margin-bottom: 15px; }
.slider-label-line { display:flex; justify-content:space-between; width:100%; margin-bottom:5px; }
.slider-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; } /* Texte affiné */
.slider-val { font-size: 14px; font-weight: 800; color: var(--primary); }
input[type=range] { width: 100%; -webkit-appearance: none; height: 14px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 14px; background: #e2e8f0; border-radius: 10px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 4px 12px rgba(37,99,235,0.4); border: 2px solid white; margin-top: -9px; }

/* DIRECTORY & CONTACTS */
.dir-tabs { display:flex; gap:10px; background: rgba(148,163,184,.18); border: 1px solid rgba(148,163,184,.22); padding: 8px; border-radius: 999px; width: fit-content; margin: 0 auto 18px; }
body.dark-mode .dir-tabs { background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.16); }
.dir-tab { border:none; background: transparent; color: var(--text-muted); font-weight: 900; font-size: 12px; padding: 10px 14px; border-radius: 999px; cursor:pointer; }
.dir-tab.active { background: var(--card-bg); color: var(--text-main); box-shadow: 0 10px 24px rgba(0,0,0,.08); border: 1px solid rgba(148,163,184,.22); }
.dir-panel { background: var(--card-bg); border-radius: 22px; padding: 18px; border: 1px solid var(--border-color); box-shadow: 0 15px 40px -5px rgba(0,0,0,0.06); }
.dir-head { display:flex; justify-content:space-between; align-items:flex-end; gap: 12px; margin-bottom: 14px; }
.dir-title { font-size: 18px; font-weight: 900; color: var(--text-main); }
.dir-sub { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-top: 2px; }
.dir-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px){ .dir-grid{ grid-template-columns: 1fr; } }
.dir-group-title { font-size: 14px; font-weight: 950; color: var(--text-main); padding: 2px 2px 8px 2px; margin-top: 14px; border-bottom: 1px solid var(--border-color); }
.dir-tile { position: relative; border-radius: 18px; border: 1px solid rgba(148,163,184,.22); background: rgba(255,255,255,.55); overflow:hidden; }
body.dark-mode .dir-tile { background: rgba(15,23,42,.55); border-color: rgba(148,163,184,.16); }
.dir-tile-link { display:block; padding: 16px; color: inherit; text-decoration:none; }
.dir-tile.has-actions .dir-tile-link { padding-bottom: 56px; }
.dir-tile-title { font-size: 15px; font-weight: 900; color: var(--text-main); }
.dir-tile-desc { margin-top: 8px; font-size: 13px; font-weight: 850; color: var(--text-main); opacity: .78; line-height: 1.25; }
.dir-tile-icon { width: 44px; height: 44px; border-radius: 16px; border: 1px solid rgba(148,163,184,.22); background: rgba(0,0,0,0.03); display:flex; align-items:center; justify-content:center; overflow:hidden; font-size: 20px; flex: 0 0 auto; }
body.dark-mode .dir-tile-icon { background: rgba(255,255,255,0.05); border-color: rgba(148,163,184,.16); }
.dir-tile-icon img { width:100%; height:100%; object-fit:cover; }
.dir-tile-actions { position:absolute; bottom:10px; right:10px; display:flex; gap:8px; }
.dir-item { display:flex; justify-content:space-between; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid rgba(148,163,184,.22); background: rgba(255,255,255,.55); }
body.dark-mode .dir-item { background: rgba(15,23,42,.55); border-color: rgba(148,163,184,.16); }
.dir-item-title { font-size: 13px; font-weight: 900; color: var(--text-main); text-transform: uppercase; letter-spacing: .08em; }
.dir-item-value { font-size: 15px; font-weight: 800; color: var(--text-main); margin-top: 4px; }
.dir-link { color: var(--primary); text-decoration: none; font-weight: 900; }
.dir-link:hover { text-decoration: underline; }
.dir-table-wrap { width:100%; overflow:auto; border-radius: 18px; }
.dir-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 780px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.55); border-radius: 18px; overflow: hidden; backdrop-filter: blur(14px); }
body.dark-mode .dir-table { background: rgba(15,23,42,.45); border-color: rgba(148,163,184,.16); }
.dir-table thead th { position: sticky; top: 0; background: rgba(255,255,255,.78); border-bottom: 1px solid rgba(148,163,184,.22); padding: 12px 12px; text-align: left; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; color: rgba(71,85,105,.90); z-index: 1; }
body.dark-mode .dir-table thead th { background: rgba(15,23,42,.75); border-bottom-color: rgba(148,163,184,.16); color: rgba(226,232,240,.82); }
.dir-table tbody td { padding: 12px 12px; border-bottom: 1px solid rgba(148,163,184,.14); vertical-align: top; font-size: 14px; }
.dir-mini-btn { border: 1px solid rgba(148,163,184,.22); background: rgba(255,255,255,.55); border-radius: 10px; padding: 6px 8px; cursor: pointer; font-weight: 800; margin-right: 6px; }
.weekday-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.weekday-chip { display:flex; align-items:center; justify-content:center; gap: 6px; padding: 10px 8px; border-radius: 14px; border: 1px solid rgba(148,163,184,.22); background: rgba(255,255,255,.55); font-weight: 900; font-size: 12px; cursor: pointer; user-select: none; }
body.dark-mode .weekday-chip { background: rgba(15,23,42,.55); border-color: rgba(148,163,184,.16); }
.weekday-chip:has(input:checked) { border-color: rgba(16,185,129,.28); background: rgba(16,185,129,.10); }

/* SECTIONS SITES DASHBOARD */
.sites-mini-panel { margin-top: 10px; padding: 12px 12px 10px; border-radius: 18px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.02); box-shadow: 0 14px 35px rgba(0,0,0,0.06); }
body.dark-mode .sites-mini-panel { background: rgba(255,255,255,0.04); }
.sites-mini-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.sites-mini-title { font-weight: 950; font-size: 13px; color: var(--text-main); }
.sites-mini-all { font-size: 12px; font-weight: 900; color: var(--primary); text-decoration: none; }
.sites-mini-row { display:flex; gap:10px; overflow-x:auto; padding-bottom: 6px; }
.site-chip { min-width: 180px; flex: 0 0 auto; border-radius: 16px; border: 1px solid var(--border-color); background: var(--card-bg); padding: 12px; text-decoration: none; color: var(--text-main); display:flex; gap: 10px; align-items:center; }
.site-chip-icon { width: 40px; height: 40px; border-radius: 14px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.03); display:flex; align-items:center; justify-content:center; font-size: 18px; overflow:hidden; }
body.dark-mode .site-chip-icon { background: rgba(255,255,255,0.05); }
.site-chip-main { flex:1; min-width: 0; }
.site-chip-name { font-weight: 950; font-size: 13px; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.site-chip-meta { margin-top: 2px; font-size: 11px; font-weight: 800; color: var(--text-muted); white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.sites-bottom-row { margin-top: 12px; display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px){ .sites-bottom-row{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-card-mini { border-radius: 18px; border: 1px solid var(--border-color); background: var(--card-bg); padding: 12px; text-decoration:none; color: var(--text-main); display:flex; gap: 10px; align-items:center; }
.site-card-mini .site-chip-icon { width: 38px; height: 38px; border-radius: 14px; }
.site-card-mini .site-chip-name { font-size: 12px; }
.section-block { margin-top: 26px; max-width: 1200px; margin-left:auto; margin-right:auto; padding: 0 16px; }
.section-title { font-size: 16px; font-weight: 900; color: var(--text-main); margin: 0 0 10px 0; }
.section-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 14px; box-shadow: 0 14px 35px rgba(0,0,0,0.06); }
.section-muted { color: var(--text-muted); font-weight: 700; font-size: 13px; }
.focus-pill { display:flex; align-items:center; gap:10px; margin: 0 0 22px 0; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.02); box-shadow: 0 14px 35px rgba(0,0,0,0.06); }
body.dark-mode .focus-pill { background: rgba(255,255,255,0.04); }
.focus-emoji { font-size: 20px; }
.focus-text { font-size: 13px; font-weight: 800; color: var(--text-main); }

/* OBJ GRAPH TOOLTIP */
.objprog-canvas-wrap { position: relative; }
.objprog-tooltip { position: absolute; left: 0; top: 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 900; line-height: 1.25; max-width: calc(100% - 12px); pointer-events: none; z-index: 50; background: rgba(17,24,39,0.92); color: rgba(255,255,255,0.96); border: 1px solid rgba(255,255,255,0.10); box-shadow: 0 10px 30px rgba(0,0,0,0.22); backdrop-filter: blur(8px); }
body.dark-mode .objprog-tooltip { background: rgba(2,6,23,0.92); border: 1px solid rgba(148,163,184,0.22); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }

/* --- MAIL & SMART BROADCAST (NEW) --- */
.channel-selector {
  display: flex;
  gap: 15px;
  background: rgba(148,163,184,0.1);
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.channel-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-main);
  user-select: none;
}

.channel-option input {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  margin: 0;
}

/* Indicateurs sur la carte utilisateur */
.user-badges {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.channel-icon {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid transparent;
}

/* Style Actif */
.channel-icon.has-email {
  background: rgba(59,130,246,0.1); 
  color: #2563eb; 
  border-color: rgba(59,130,246,0.2);
}
.channel-icon.has-push {
  background: rgba(245,158,11,0.1); 
  color: #d97706; 
  border-color: rgba(245,158,11,0.2);
}

/* Style Inactif / Manquant */
.channel-icon.missing {
  background: rgba(148,163,184,0.1);
  color: #94a3b8;
  text-decoration: line-through;
  opacity: 0.6;
}

.mail-label { font-size:11px; font-weight:900; color:#334155; text-transform:uppercase; letter-spacing:0.06em; display:block; margin-bottom:6px; }
.mail-hint { font-size:12px; color:#64748b; line-height:1.35; }
.mail-selected-count { margin-top:8px; font-size:12px; font-weight:800; color:#475569; }
.mail-settings-row { display:grid; grid-template-columns:1fr 1fr auto; gap:12px; align-items:end; }
.mail-settings-field input { margin-bottom:0; }
.mail-settings-actions .btn { height:42px; padding:10px 14px; }
.mail-quick-groups { display:flex; flex-wrap:wrap; gap:8px; }
.mail-chip { border:1px solid rgba(15,23,42,0.12); background:rgba(148,163,184,0.18); color:#0f172a; padding:8px 12px; border-radius:999px; cursor:pointer; font-size:12px; font-weight:900; user-select:none; }
.mail-chip.active { background:rgba(59,130,246,0.18); border-color:rgba(59,130,246,0.45); } 
.mail-users-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px; }
.mail-user-card { border:2px solid rgba(15,23,42,0.08); background:rgba(255,255,255,0.75); border-radius:14px; padding:12px; display:flex; gap:10px; align-items:center; cursor:pointer; transition:transform 0.12s ease, border-color 0.12s ease, background 0.12s ease; }
.mail-user-card:hover { transform:translateY(-1px); } 
.mail-user-card.selected { border-color:rgba(16,185,129,0.7); background:rgba(16,185,129,0.08); } 
.mail-user-check { width:18px; height:18px; border-radius:6px; border:2px solid rgba(71,85,105,0.6); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.mail-user-card.selected .mail-user-check { border-color:rgba(16,185,129,1); background:rgba(16,185,129,1); } 
.mail-user-name { font-size:13px; font-weight:900; color:#0f172a; line-height:1.2; }
.mail-user-email { font-size:12px; font-weight:700; color:#64748b; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mail-actions { display:flex; gap:10px; align-items:center; margin-top:12px; flex-wrap:wrap; }
@media (max-width: 720px){ .mail-settings-row{grid-template-columns:1fr;} .mail-settings-actions .btn{width:100%;} }

/* --- ALERTES : Équipes programmées (routing EatPilot) --- */
.alert-teams-list{ display:flex; flex-direction:column; gap:10px; }
.alert-team-card{
  border: 2px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.75);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}
body.dark-mode .alert-team-card{
  background: rgba(2,6,23,0.28);
  border-color: rgba(148,163,184,0.16);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
.alert-team-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.alert-team-name{ display:flex; align-items:center; gap:10px; font-weight: 950; font-size: 14px; }
.alert-team-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  position: relative;
  box-shadow: 0 0 0 4px rgba(148,163,184,0.12);
}
/* Halo doux (pas bling-bling). La couleur vient de --dot quand disponible. */
.alert-team-dot::after{
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  background: var(--dot, rgba(139,92,246,1));
  filter: blur(10px);
  opacity: 0.06;
  pointer-events: none;
}
body.dark-mode .alert-team-dot{ box-shadow: 0 0 0 4px rgba(148,163,184,0.16); }
body.dark-mode .alert-team-dot::after{ opacity: 0.18; }
.alert-team-live{ font-size: 10px; font-weight: 950; letter-spacing: .10em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(16,185,129,0.16); border: 1px solid rgba(16,185,129,0.28); color: #065f46; }
body.dark-mode .alert-team-live{ color: #ecfdf5; background: rgba(16,185,129,0.22); border-color: rgba(16,185,129,0.38); }

.alert-team-meta{ display:flex; flex-wrap:wrap; gap:8px 10px; margin-top: 6px; }
.alert-team-hours{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.14);
  color: #4c1d95;
  font-size: 11px; font-weight: 950;
}
body.dark-mode .alert-team-hours{
  color:#f5f3ff;
  border-color: rgba(139,92,246,0.55);
  background: rgba(139,92,246,0.22);
  box-shadow: 0 0 14px rgba(139,92,246,0.14);
}
.alert-team-days, .alert-team-members{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(148,163,184,0.10);
  color: var(--text-muted);
  font-size: 11px; font-weight: 900;
}
body.dark-mode .alert-team-days, body.dark-mode .alert-team-members{ border-color: rgba(148,163,184,0.16); background: rgba(148,163,184,0.10); }
.alert-team-actions{ display:flex; gap: 8px; align-items:center; }

/* Chips jours (modal équipe) */
.day-chip{
  display:flex;
  align-items:center;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(255,255,255,.60);
  font-weight: 950;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
body.dark-mode .day-chip{ background: rgba(2,6,23,.28); border-color: rgba(148,163,184,.16); }
.day-chip input{ width:auto; height:auto; }
.day-chip:has(input:checked){ border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.12); }
body.dark-mode .day-chip:has(input:checked){ background: rgba(16,185,129,.18); }

/* Liste membres (modal équipe) */
.mail-members-list{ display:flex; flex-direction:column; gap:8px; max-height: 260px; overflow:auto; padding-right: 4px; }
.mail-member-row{ display:flex; align-items:flex-start; gap:10px; padding:10px; border-radius:14px; border:1px solid rgba(148,163,184,.22); background: rgba(255,255,255,.60); cursor:pointer; }
body.dark-mode .mail-member-row{ background: rgba(2, 6, 23, 0.25); border-color: rgba(148,163,184,.16); }
.mail-member-row input{ margin-top:4px; }
.mail-member-name{ font-weight:950; }
.mail-member-sub{ font-size:11px; opacity:.8; }

/* --- BANNIÈRE PUSH (VERSION POP-UP CENTRALE) --- */
.push-banner {
  position: fixed;
  top: 15%; /* On la place haut, mais pas tout en haut */
  left: 50%;
  transform: translateX(-50%); /* On centre horizontalement */
  
  width: 90%;
  max-width: 420px; /* Plus large */
  
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  
  box-shadow: 0 30px 80px rgba(0,0,0,0.4); /* Grosse ombre pour l'effet flottant */
  border-radius: 24px; /* Coins très ronds */
  padding: 30px; /* Plus d'espace intérieur */
  
  display: flex;
  flex-direction: column; /* On empile les éléments */
  align-items: center;
  text-align: center;
  gap: 15px;
  
  z-index: 10000;
}

/* Mode sombre */
body.dark-mode .push-banner {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(255, 255, 255, 0.15);
}

.push-icon-box {
  font-size: 32px; /* Icône plus grosse */
  background: #eff6ff;
  color: var(--primary);
  width: 70px; height: 70px; /* Carré plus gros */
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
  margin-bottom: 5px;
}
body.dark-mode .push-icon-box { background: rgba(37,99,235,0.2); }

.push-content { width: 100%; }

.push-title {
  font-size: 18px; /* Titre plus gros */
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.push-desc {
  font-size: 14px; /* Texte plus lisible */
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 500;
  padding: 0 10px;
}

.push-btn {
  width: 100%; /* Bouton pleine largeur */
  padding: 16px;
  font-size: 14px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s;
}
.push-btn:active { transform: scale(0.98); }

/* Croix de fermeture (en haut à droite) */
.close-push {
  position: absolute;
  top: 15px; right: 15px;
  width: 32px; height: 32px;
  font-size: 22px;
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  border: none;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
body.dark-mode .close-push { background: rgba(255,255,255,0.1); }


/* ===========================
   UI POLISH (mobile friendly)
   =========================== */

/* Team actions: keep icons on the right on mobile */
.team-btn-group{ margin-left:auto; }
.action-btn.mp{
  /* MP = enveloppe */
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}
@media (max-width: 520px){
  .team-right-actions{
    /* Sur iPhone, on évite que les icônes "mangent" le texte :
       prime toggle à gauche, actions bien collées à droite */
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    justify-content: unset;
    overflow: visible;
    padding-bottom: 0;
  }
  .team-prime-toggle{ justify-self: start; }
  .team-btn-group{
    margin-left: 0;
    justify-content: flex-end;
    justify-self: end;
  }
  .team-btn-group .action-btn{
    width: 30px;
    height: 30px;
    font-size: 15px;
    border-radius: 10px;
  }
  .team-btn-group .action-btn.mp{ font-size: 15px; }
  .team-btn-group .action-btn.resend{ font-size: 15px; }
}

/* Pilotage: less bulky on mobile (no logic changes) */
@media (max-width: 520px){
  .section-header-large{ font-size: 13px; }
  .cockpit-container{
    padding: 14px;
    border-width: 2px;
    border-radius: 18px;
  }
  .cockpit-top{
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .cockpit-gauge-container{ height: 22px; }
  .cockpit-info{ font-size: 12px; }
  /* inputs/boutons plus compacts, sans toucher la logique */
  #superAdminBudget input,
  #superAdminBudget select{ padding: 10px; font-size: 12px; border-radius: 12px; }
  #btnSaveGlobalBudget,
  #btnSaveGuardrailPct{ padding: 7px 10px !important; font-size: 11px !important; border-radius: 12px !important; }

  .cockpit-obj-head{ padding: 12px 12px; border-radius: 16px; }
  .cockpit-obj-title{ gap: 10px; }
  .cockpit-obj-title span:first-child{ font-size: 12px; }
  .cockpit-obj-title .cost{ font-size: 11px; padding: 5px 10px; }
  .cockpit-obj-body{ padding: 10px 12px 12px; }
  .slider-row{ margin: 10px 0; }
  .slider-label{ font-size: 12px; }
  .slider-val{ font-size: 11px; padding: 4px 10px; }

  .month-pills-wrap{ padding: 10px; border-radius: 16px; }
  .month-pills-bar{ gap: 8px; }
  .month-pill{ width: 18px; min-width: 18px; }
  .month-pills-sub{ font-size: 11px; }
  .sim-total-box{ padding: 12px; border-radius: 16px; }
}

/* Page header row: titre parfaitement centré, quel que soit le bloc à gauche */
.page-head-row{
  display: grid;
  grid-template-columns: 104px 1fr 104px;
  align-items: center;
  gap: 12px;
}
.page-head-title{
  grid-column: 2;
  justify-self: center;
  text-align: center;
  margin: 0;
}
.page-head-spacer{ width: 104px; }
.page-head-row .btn-back{
  width: 104px;
  justify-self: start;
  text-align: center;
}
@media (max-width: 520px){
  .page-head-row{ grid-template-columns: 88px 1fr 88px; }
  .page-head-spacer{ width: 88px; }
  .page-head-row .btn-back{ width: 88px; padding-left: 0 !important; padding-right: 0 !important; }
}

/* Easy exit button (bottom-left) — avoids theme toggle (bottom-right) */
.fab-back{
  position: fixed;
  left: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 10002;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
}
.fab-back:active{ transform: translateY(1px); }

/* ============================================================
   UI polish v3 (mobile-first tweaks)
   - Pilotage: smaller, foldable sections, full-width gauges
   - Équipe: actions aligned right, reset icon envelope
   - Diffusion: title centered on mobile with back button
   ============================================================ */

/* Fold sections (Pilotage) */
.fold-section{
  border:1px solid rgba(148,163,184,0.14);
}
.fold-section .fold-head{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px;
  background:transparent;
  border:none;
  color:var(--text-main);
  font-weight:900;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
  cursor:pointer;
}
.fold-section .fold-chevron{
  font-size:14px;
  opacity:.85;
  transition:transform .18s ease;
}
.fold-section .fold-body{
  padding:0 14px 14px;
  display:none;
}
.fold-section.open .fold-body{ display:block; }
.fold-section.open .fold-chevron{ transform:rotate(180deg); }

/* Admin toggle in edit modal: keep centered + crown on right */
.check-label.admin-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,0.18);
  background:rgba(148,163,184,0.08);
}
.check-label.admin-toggle input{ margin:0; }
.check-label.admin-toggle .admin-toggle-text{ flex:1; font-weight:900; }
.check-label.admin-toggle .admin-toggle-icon{ opacity:.95; }

/* Diffusion: avoid overlap (Back on top line, title centered below on mobile) */
.page-head-row.diffusion-head{ align-items:start; }
@media (max-width: 650px){
  .page-head-row.diffusion-head{
    grid-template-rows:auto auto;
    row-gap:10px;
  }
  .page-head-row.diffusion-head .btn-back{ grid-row:1; grid-column:1 / 2; justify-self:start; }
  .page-head-row.diffusion-head .page-head-title{ grid-row:2; grid-column:1 / 4; justify-self:center; text-align:center; }
  .page-head-row.diffusion-head .page-head-spacer{ display:none; }
}
.diffusion-title{ font-size:clamp(28px, 8vw, 56px); letter-spacing:.04em; line-height:1.02; }

/* Pilotage gauge: use full width (no visible inner margins) */
.cockpit-gauge-container{
  border:none;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,0.25);
  background: rgba(148,163,184,0.10);
}

/* Options in "Ajouter un objectif" */
@media (max-width: 520px){
  .options-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:10px;
  }
  .options-row .check-label{
    justify-content:flex-start;
  }
}

/* Pilotage: make it smaller + less chunky on mobile */
@media (max-width: 520px){
  #tab-objs .admin-section{ padding:14px; border-radius:18px; }
  #tab-objs .section-header-large{ font-size:12px; }
  #tab-objs h3{ font-size:13px; }
  #tab-objs .cockpit-container{ padding:16px 14px; border-radius:18px; border-width:2px; }
  #tab-objs .cockpit-row{ gap:10px; }
  #tab-objs .cockpit-row label{ font-size:11px; letter-spacing:.10em; }
  #tab-objs .cockpit-row input{ padding:10px 12px; border-radius:12px; }
  #tab-objs .btn{ padding:10px 12px; font-size:13px; }
  #tab-objs .sim-total-box{ padding:12px; }
  #tab-objs .sim-total-label{ font-size:10px; }
  #tab-objs .sim-total-value{ font-size:20px; }
}

/* Équipe: keep action buttons to the far right on mobile */
.team-right-actions{ justify-content:space-between; overflow:visible; }
.team-btn-group{ margin-left:auto; display:flex; gap:6px; align-items:center; }
@media (max-width: 520px){
  .team-right-actions{ flex-wrap:nowrap; }
  .team-btn-group .action-btn{ width:34px; height:34px; font-size:15px; }
}

/* Total row: more elegant */
.total-row{ gap:10px; }
.total-row .total-label{ font-weight:900; letter-spacing:.08em; font-size:11px; opacity:.8; }


/* --- AUTH (Pulse-style) --- */
#loginOverlay.auth-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background:
    radial-gradient(1200px 700px at 10% 10%, rgba(217,70,239,0.18), transparent 55%),
    radial-gradient(900px 600px at 90% 20%, rgba(168,85,247,0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 95%, rgba(217,70,239,0.10), transparent 55%),
    var(--bg-gradient);
}

#loginOverlay.auth-overlay::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events:none;
}

body.dark-mode #loginOverlay.auth-overlay::before{
  opacity: 0.20;
}

#loginOverlay .auth-wrap{
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

@media (max-width: 920px){
  #loginOverlay .auth-wrap{
    grid-template-columns: 1fr;
  }
}

#loginOverlay .auth-hero{
  border-radius: 26px;
  padding: 28px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.60);
  box-shadow: 0 24px 70px rgba(0,0,0,0.10);
  backdrop-filter: blur(10px);
}

body.dark-mode #loginOverlay .auth-hero{
  background: rgba(2,6,23,0.55);
  border-color: rgba(148,163,184,0.18);
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
}

#loginOverlay .auth-logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.45);
}

body.dark-mode #loginOverlay .auth-logo{
  background: rgba(255,255,255,0.06);
}

#loginOverlay .pulse-mark{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d946ef 0%, #a855f7 100%);
  box-shadow: 0 0 0 6px rgba(217,70,239,0.16);
}

#loginOverlay .auth-logo-text{
  font-weight: 900;
  letter-spacing: 0.2px;
}

#loginOverlay .auth-title{
  margin-top: 16px;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 950;
  color: var(--text-main);
}

#loginOverlay .auth-sub{
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 46ch;
}

#loginOverlay .auth-mini-grid{
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#loginOverlay .auth-mini-card{
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(148,163,184,0.16);
  background: rgba(255,255,255,0.55);
}

body.dark-mode #loginOverlay .auth-mini-card{
  background: rgba(255,255,255,0.05);
}

#loginOverlay .auth-mini-card .k{
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

#loginOverlay .auth-mini-card .v{
  margin-top: 6px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
}

#loginOverlay .auth-card{
  border-radius: 26px;
  padding: 18px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
  backdrop-filter: blur(12px);
}

body.dark-mode #loginOverlay .auth-card{
  background: rgba(2,6,23,0.62);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}

#loginOverlay .auth-tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

#loginOverlay .auth-tab{
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.40);
  color: var(--text-main);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

body.dark-mode #loginOverlay .auth-tab{
  background: rgba(255,255,255,0.05);
}

#loginOverlay .auth-tab:hover{
  transform: translateY(-1px);
}

#loginOverlay .auth-tab.is-active{
  border-color: rgba(217,70,239,0.35);
  background: linear-gradient(135deg, rgba(217,70,239,0.18) 0%, rgba(168,85,247,0.12) 100%);
}

#loginOverlay .auth-pane{
  display: none;
  padding: 6px 4px 2px;
}

#loginOverlay .auth-pane.is-active{
  display: block;
}

#loginOverlay .auth-field{
  margin-top: 12px;
}

#loginOverlay .auth-field label{
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-muted);
  margin-bottom: 6px;
}

#loginOverlay .auth-field input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.20);
  background: rgba(255,255,255,0.55);
  color: var(--text-main);
  outline: none;
}

body.dark-mode #loginOverlay .auth-field input{
  background: rgba(255,255,255,0.05);
  border-color: rgba(148,163,184,0.22);
}

#loginOverlay .auth-field input:focus{
  border-color: rgba(217,70,239,0.45);
  box-shadow: 0 0 0 4px rgba(217,70,239,0.14);
}

#loginOverlay .auth-pass{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

#loginOverlay .auth-eye{
  border: 1px solid rgba(148,163,184,0.20);
  background: rgba(255,255,255,0.45);
  color: var(--text-main);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

body.dark-mode #loginOverlay .auth-eye{
  background: rgba(255,255,255,0.05);
}

#loginOverlay .auth-primary{
  width: 100%;
  margin-top: 14px;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #d946ef 0%, #a855f7 100%) !important;
  border: none !important;
  font-weight: 950 !important;
}

#loginOverlay .auth-link{
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 900;
  padding: 10px 12px;
}

#loginOverlay .auth-link:hover{
  color: var(--text-main);
}

#loginOverlay .auth-hint{
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  min-height: 18px;
}

#loginOverlay .auth-footer{
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.16);
  background: rgba(255,255,255,0.30);
  backdrop-filter: blur(10px);
}

body.dark-mode #loginOverlay .auth-footer{
  background: rgba(255,255,255,0.05);
}
