/* =====================================================================
   THÈME PRIME — même DA que le site Prime Évent, déclinée en rose
   (fond noir profond, halo, panneaux en verre, dégradés métallisés,
   Montserrat épaisse). Chargé en dernier : il remplace l'ancien look.
   ===================================================================== */

:root {
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p-bg: #070507;
  --p-panel: rgba(22, 14, 20, 0.72);
  --p-panel2: #1a1118;
  --p-line: rgba(255, 255, 255, 0.07);
  --p-pline: rgba(255, 79, 163, 0.24);
  --p-text: #f6f1f4;
  --p-muted: #9a8a95;
  --p-pink: #ff4fa3;
  --p-pink2: #ffc2e1;
  --p-pinkg: linear-gradient(180deg, #ffe3f1 0%, #ff6cb5 45%, #c2177a 100%);
  --p-btn: linear-gradient(180deg, #ff7cc0 0%, #ff3d9a 48%, #c0166f 100%);
  --p-glow: 0 10px 30px rgba(255, 61, 154, 0.32);
  --p-r: 16px;
  --p-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- fond général ---------- */
html, body {
  font-family: var(--font);
  background-color: var(--p-bg);
  background-image:
    radial-gradient(900px 420px at 50% -120px, rgba(255, 79, 163, 0.18), transparent 70%),
    radial-gradient(600px 300px at 100% 0, rgba(255, 79, 163, 0.06), transparent 70%);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.035;
  background-image: var(--p-noise);
}
::selection { background: rgba(255, 79, 163, 0.35); color: #fff; }

/* =====================================================================
   PAGE DE CONNEXION / CANDIDATURE
   ===================================================================== */
.login-container {
  --l-card: var(--p-panel);
  --l-line: var(--p-line);
  --l-muted: var(--p-muted);
  font-family: var(--font);
  position: relative; overflow: hidden;
  padding-top: 56px;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(255, 79, 163, 0.2), transparent 70%),
    radial-gradient(600px 300px at 100% 0, rgba(255, 79, 163, 0.06), transparent 70%),
    var(--p-bg);
}
.login-container::before {
  content: ""; position: absolute; left: 50%; top: -40px; width: 600px; max-width: 100vw; height: 560px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle, rgba(255, 79, 163, 0.24), transparent 62%);
}
.login-wrap { position: relative; z-index: 1; }
.login-brand { gap: 10px; }
.login-logo {
  width: 150px;
  animation: p-float 4.5s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(255, 61, 154, 0.42));
}
.login-brand h1 {
  font-family: var(--font); font-weight: 900; font-size: clamp(30px, 7vw, 46px);
  letter-spacing: 0.08em; padding-left: 0.08em; line-height: 1;
  background: var(--p-pinkg); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 61, 154, 0.35));
}
.login-brand::after {
  content: "Prime RP"; display: inline-block; margin-top: 6px;
  font: 800 11px var(--font); letter-spacing: 0.32em; text-transform: uppercase; color: var(--p-pink2);
  padding: 6px 14px 6px 18px; border: 1px solid var(--p-pline); border-radius: 999px; background: rgba(255, 79, 163, 0.07);
}
.login-card {
  background: var(--p-panel); border: 1px solid var(--p-line); border-radius: var(--p-r);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-card-head { border-bottom-color: var(--p-line); }
.login-card-head b { font-weight: 800; font-size: 17px; }
.login-form label {
  font: 700 10.5px var(--font) !important; letter-spacing: 0.14em !important; text-transform: uppercase; color: var(--p-muted) !important;
}
/* texte des champs : blanc sur fond sombre (l'ancien style l'écrivait en noir → invisible) */
.login-form input, .login-form textarea, .login-form select, .login-container input, .login-container textarea, .login-container select {
  color: #fff !important; caret-color: var(--p-pink); -webkit-text-fill-color: #fff;
}
.login-container input::placeholder, .login-container textarea::placeholder { color: rgba(255, 255, 255, .38) !important; -webkit-text-fill-color: rgba(255, 255, 255, .38); }
.login-container select option { background: #1a1118; color: #fff; }
/* remplissage automatique du navigateur (Chrome met un fond clair) */
.login-container input:-webkit-autofill, .login-container input:-webkit-autofill:hover, .login-container input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important; -webkit-box-shadow: 0 0 0 40px #160e14 inset !important; transition: background-color 9999s;
}
.login-form input, .login-form textarea, input[type="date"] {
  font-family: var(--font) !important; border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.35) !important; border: 1px solid var(--p-line) !important;
}
.login-form input:focus, .login-form input:focus-visible, .login-form textarea:focus-visible {
  border-color: var(--p-pink) !important; box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.16) !important; outline: none;
}
.login-btn {
  font-family: var(--font); font-weight: 800; letter-spacing: 0.04em; border-radius: 12px; border: 0;
  background: var(--p-btn); color: #fff; box-shadow: var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.login-btn:hover { background: var(--p-btn); filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 14px 36px rgba(255, 61, 154, 0.45); }
.login-foot { font-family: var(--font); color: var(--p-muted); }
.login-foot::before, .login-foot::after {
  content: ""; display: inline-block; width: 16px; height: 11px; vertical-align: -1px; margin: 0 10px;
  background: url(/img/crown-sm.png) center / contain no-repeat; opacity: 0.6;
}
.dc-btn, .dcbtn { border-radius: 12px !important; font-family: var(--font) !important; font-weight: 700 !important; }
.dc-alt { font-family: var(--font); }
.kinds button, .login-form .opt { border-radius: 12px !important; font-family: var(--font) !important; background: rgba(0, 0, 0, 0.35) !important; border-color: var(--p-line) !important; }
.login-form .opt span { font-family: var(--font) !important; }
.kinds button.on, .login-form .opt:has(input:checked) { border-color: var(--p-pink) !important; background: rgba(255, 79, 163, 0.1) !important; color: #fff; }

/* =====================================================================
   APPLICATION
   ===================================================================== */
#shell {
  --bg: var(--p-bg);
  --side: rgba(9, 6, 9, 0.82);
  --panel: var(--p-panel);
  --panel-2: var(--p-panel2);
  --line: var(--p-line);
  --line-2: rgba(255, 255, 255, 0.11);
  --text: var(--p-text);
  --muted: var(--p-muted);
  --dim: #6c5d67;
  --accent: var(--p-pink);
  --accent-hi: #ff8cc6;
  --accent-soft: rgba(255, 79, 163, 0.13);
  --grad: var(--p-btn);
  --mono: var(--font);
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 60% -140px, rgba(255, 79, 163, 0.16), transparent 70%),
    radial-gradient(600px 300px at 100% 0, rgba(255, 79, 163, 0.05), transparent 70%),
    var(--p-bg);
}
#shell::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0.035; background-image: var(--p-noise);
}

/* toutes les polices forcées de l'ancien thème → Montserrat */
#shell .bt, #shell .tabs button, #shell .seg button, #shell input, #shell select, #shell textarea,
#shell .toast, .toast, #shell .ctx button, #shell .msg-c, #shell .pev, #shell button { font-family: var(--font); }

/* ---------- menu latéral ---------- */
.side { background: var(--side); border-right: 1px solid var(--p-pline); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.side-brand { padding: 20px; border-bottom-color: var(--p-line); }
.side-brand img { width: 34px; filter: drop-shadow(0 2px 10px rgba(255, 61, 154, 0.55)); }
.side-brand b {
  font-weight: 900; font-size: 13px; letter-spacing: 0.24em;
  background: var(--p-pinkg); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.side-label { font-weight: 800; font-size: 10px; letter-spacing: 0.28em; color: var(--dim); }
.nav a {
  font: 700 12px var(--font); letter-spacing: 0.06em; text-transform: none;
  padding: 10px 12px; border-radius: 10px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.04); }
.nav a.on {
  color: #fff; border-color: var(--p-pline);
  background: linear-gradient(90deg, rgba(255, 79, 163, 0.16), rgba(255, 79, 163, 0.03));
  box-shadow: inset 3px 0 0 var(--p-pink);
}
.nav a.on svg { color: var(--p-pink); filter: drop-shadow(0 0 6px rgba(255, 79, 163, 0.6)); }
.nav .count { font-weight: 800; border-radius: 999px; background: var(--p-btn); color: #fff; }
.side-foot { border-top-color: var(--p-line); }
.side-foot .who b { font-weight: 800; }
.avatar, .pfp { box-shadow: 0 0 0 2px rgba(255, 79, 163, 0.35); }

/* ---------- barre du haut ---------- */
.topbar { background: rgba(7, 5, 7, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--p-pline); padding: 18px 28px; }
.topbar .eyebrow { font-weight: 800; font-size: 10.5px; letter-spacing: 0.3em; color: var(--p-pink); }
.topbar h1 { font-weight: 900; font-size: 22px; letter-spacing: -0.01em; }

/* ---------- boutons ---------- */
.bt { height: 38px; border-radius: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); transition: transform .15s, filter .15s, border-color .15s, background .15s; }
.bt:hover { background: rgba(255, 79, 163, 0.08); border-color: var(--p-pline); }
.bt.primary { background: var(--p-btn); color: #fff; font-weight: 800; box-shadow: var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.bt.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bt.sm { height: 30px; border-radius: 9px; }
.bt.danger, .bt.ok { border-radius: 12px; }

/* ---------- KPI ---------- */
.kpis { border: 0; background: none; gap: 14px; overflow: visible; }
.kpi {
  background: var(--p-panel); border: 1px solid var(--p-line); border-radius: var(--p-r);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 18px 20px 16px; overflow: hidden;
}
.kpi:last-child { border-right: 1px solid var(--p-line); }
.kpi .l { font-weight: 800; font-size: 10px; letter-spacing: 0.2em; }
.kpi .v { font-weight: 900; font-size: 32px; }
.kpi::after { height: 3px; }
.kpi.hot { border-color: var(--p-pline); background: linear-gradient(160deg, rgba(255, 79, 163, 0.14), rgba(22, 14, 20, 0.72) 60%); }
.kpi.hot .v { background: var(--p-pinkg); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi.hot::after { background: var(--p-btn); }

/* ---------- panneaux ---------- */
.panel, .msg-list, .msg-main {
  background: var(--p-panel); border: 1px solid var(--p-line); border-radius: var(--p-r);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.panel-h { padding: 15px 18px; }
.panel-h h2 { font-weight: 800; font-size: 11px; letter-spacing: 0.2em; color: var(--p-text); }
.panel-h .n { font-weight: 800; border-radius: 999px; }
.empty { color: var(--p-muted); }
.empty::before {
  content: ""; display: block; margin: 0 auto 12px; width: 44px; height: 30px; opacity: 0.22; filter: grayscale(1);
  background: url(/img/crown-sm.png) center / contain no-repeat;
}
.rows > .row:hover, #shell tbody tr:hover { background: rgba(255, 79, 163, 0.05); }
.row .t { font-weight: 700; }
.row .mark { background: var(--p-btn); }

/* ---------- tableaux ---------- */
#shell th { font-weight: 800; font-size: 10.5px; letter-spacing: 0.14em; color: var(--p-muted); }
#shell td.num, #shell .mono { font-variant-numeric: tabular-nums; }

/* ---------- pastilles / onglets ---------- */
.pill, .tag, .dur, .rtag, .rchip { border-radius: 999px; font-weight: 800; }
.tabs { border-radius: 14px; padding: 4px; background: rgba(0, 0, 0, 0.3); }
.tabs button { border-radius: 10px; font-weight: 700; height: 32px; }
.tabs button.on { background: var(--p-btn); color: #fff; box-shadow: 0 6px 18px rgba(255, 61, 154, 0.3); }

/* ---------- formulaires ---------- */
#shell label { font-weight: 800; font-size: 10.5px; letter-spacing: 0.14em; }
#shell input[type=text], #shell input[type=password], #shell input[type=number], #shell input[type=datetime-local],
#shell input[type=search], #shell select, #shell textarea {
  border-radius: 12px; background: rgba(0, 0, 0, 0.35); border-color: var(--p-line); font-family: var(--font);
}
#shell input:focus, #shell select:focus, #shell textarea:focus { border-color: var(--p-pink); box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.16); }
.seg button { border-radius: 12px; font-weight: 700; background: rgba(0, 0, 0, 0.3); }
.seg button.on { border-color: var(--p-pink); background: rgba(255, 79, 163, 0.12); }
.secret { border-radius: 12px; background: rgba(0, 0, 0, 0.4); border-color: var(--p-pink); font-family: ui-monospace, Menlo, Consolas, monospace; }
.kv dt { font-weight: 800; letter-spacing: 0.14em; }
.toggle.on i { background: rgba(255, 79, 163, 0.2); }
.toggle.on i::after { background: var(--p-pink); box-shadow: 0 0 10px rgba(255, 79, 163, 0.7); }

/* ---------- annonces / notifications ---------- */
.announce {
  border-radius: var(--p-r); border-color: var(--p-pline);
  background: linear-gradient(135deg, rgba(255, 79, 163, 0.16), rgba(22, 14, 20, 0.6) 70%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.announce .ic { border-radius: 12px; background: var(--p-btn); box-shadow: var(--p-glow); }
.announce h3 { font-weight: 800; }
.note.unread { background: rgba(255, 79, 163, 0.06); box-shadow: inset 3px 0 0 var(--p-pink); }

/* ---------- graphiques / calendriers ---------- */
.bars i, .chart .bar { background: linear-gradient(180deg, #ff6cb5, #8a1250); }
.chart .bar.cur { background: var(--p-btn); box-shadow: 0 0 18px rgba(255, 61, 154, 0.45); }
.chart .val { font-weight: 900; }
.cal .d, .pcal-big .pd { border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.cal .d.ev, .plan .c.ev, .pcal-big .pev { background: linear-gradient(160deg, #c2177a, #5a0f38); }
.cal .d.ev2, .pcal-big .pev.mine { background: var(--p-btn); }
.cal .d.today, .pcal-big .pd.today { box-shadow: 0 0 0 2px var(--p-pink), 0 0 16px rgba(255, 79, 163, 0.35); }
.plan .c { border-radius: 6px; background: rgba(255, 255, 255, 0.04); }
#shell .plan th.name, #shell .plan td.name { background: #120c11; }
.tier, .qrow { border-radius: 14px; background: rgba(0, 0, 0, 0.3); border-color: var(--p-line); }
.tier.on { border-color: var(--p-pink); background: rgba(255, 79, 163, 0.1); }
.tier b { font-weight: 900; }

/* ---------- messagerie ---------- */
.mg-b { border-radius: 14px; background: rgba(255, 255, 255, 0.05); border-color: var(--p-line); }
.mg.me .mg-b { background: var(--p-btn); }
.dp-embed { border-left-color: var(--p-pink); }

/* ---------- fenêtres, toasts, menus ---------- */
.dlg { background: rgba(4, 2, 4, 0.7); backdrop-filter: blur(6px); }
.dlg-box {
  background: rgba(20, 13, 18, 0.92); border: 1px solid var(--p-pline); border-radius: 20px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 79, 163, 0.08);
}
.dlg-h h2 { font-weight: 900; font-size: 17px; }
.dlg-sub { font-weight: 800; letter-spacing: 0.2em; color: var(--p-pink); }
.toast { border-radius: 12px; border-left-color: var(--p-pink); background: rgba(22, 14, 20, 0.95); backdrop-filter: blur(14px); font-weight: 600; }
.ctx { border-radius: 14px; background: rgba(20, 13, 18, 0.96); backdrop-filter: blur(14px); }
.ctx button { border-radius: 9px; }

/* ---------- barres de défilement ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 79, 163, 0.35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 79, 163, 0.3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

@keyframes p-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .login-logo { animation: none; } }
/* bouton 👁 des mots de passe */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--p-muted); display: grid; place-items: center; }
.pw-eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
