/*
 * Artaun · interface v2 (07/11/2026 soir) — espace client (refonte), panels jeux / VPS, messagerie.
 * Garde les couleurs d'origine (sombre #0c0c10 + violet ; clair = gris.css) et retravaille le reste :
 * barre latérale, barre du haut, pages, cartes, chiffres clés, tableaux, boutons, champs, pastilles, bandeaux.
 * Chargée APRÈS gris.css. Retour arrière : retirer les <link>/<script> ui-v2 (user-theme, auth, messagerie).
 */
:root {
  --v2-radius: 12px; --v2-radius-sm: 8px; --v2-gap: 20px;
  --v2-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- typographie ---------- */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.rf-num, .rf-kpi b, .rfh-meter b { font-variant-numeric: tabular-nums; }

/* ---------- barre latérale (espace client Aurora) ---------- */
.app-sidebar { border-right: 1px solid var(--border) !important; }
.app-sidebar .aurora-brand { height: 60px !important; border-bottom: 1px solid var(--border); }
.app-sidebar .rf-nav { gap: 2px; padding-top: 6px; }
.app-sidebar .app-sidebar-link {
  position: relative; min-height: 38px; height: auto !important; padding: 8px 10px !important; gap: 10px;
  border-radius: var(--v2-radius-sm) !important; font-size: 13.5px; font-weight: 500;
  transition: background-color .15s var(--v2-ease), color .15s var(--v2-ease);
}
.app-sidebar .app-sidebar-link > .bi:first-child { font-size: 16px; width: 18px; color: var(--muted); transition: color .15s; }
.app-sidebar .app-sidebar-link:hover > .bi:first-child { color: var(--text); }
.app-sidebar .app-sidebar-link.is-active { background: var(--surface-3) !important; color: var(--text) !important; font-weight: 600; }
.app-sidebar .app-sidebar-link.is-active > .bi:first-child { color: var(--brand) !important; }
.app-sidebar .app-sidebar-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.app-sidebar .rf-nav-badge { background: var(--surface-3); color: var(--text-2); border-radius: 99px; font-weight: 600; min-width: 22px; }
.app-sidebar .app-sidebar-link.is-active .rf-nav-badge { background: var(--brand-soft); color: var(--brand); }
.app-sidebar .rf-nav-sub { margin: 2px 0 4px 19px; padding-left: 10px; border-left: 1px solid var(--border); }
.app-sidebar .rf-nav-sub .app-sidebar-link { min-height: 32px; font-size: 13px; padding: 6px 10px !important; }
.app-sidebar .rf-nav-sub .app-sidebar-link.is-active::before { display: none; }
.app-sidebar .aurora-sb-foot { border-top: 1px solid var(--border); }
.app-sidebar .aurora-sb-btn { border-radius: var(--v2-radius-sm) !important; }

/* ---------- barre latérale (panels jeux / VPS) ---------- */
.sidebar { border-right: 1px solid var(--border); }
.sidebar .sidebar-brand { min-height: 60px; border-bottom: 1px solid var(--border); }
.sidebar .nav-link {
  position: relative; min-height: 38px; padding: 8px 10px; gap: 10px; border-radius: var(--v2-radius-sm);
  font-size: 13.5px; font-weight: 500; transition: background-color .15s var(--v2-ease), color .15s var(--v2-ease);
}
.sidebar .nav-link > .bi, .sidebar .nav-link > svg { color: var(--muted); }
.sidebar .nav-link:hover { background: var(--hover); color: var(--text); }
.sidebar .nav-link.is-active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.sidebar .nav-link.is-active > .bi, .sidebar .nav-link.is-active > svg { color: var(--accent, var(--brand)); }
.sidebar .nav-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent, var(--brand));
}
.sidebar .rf-svcnav-back { color: var(--muted); font-size: 13px; }
.sidebar .rf-svcnav-head { padding: 12px 12px 8px; }
.sidebar .rf-svcnav-head b { font-size: 14.5px; }
.sidebar .nav-count { border-radius: 99px; }

/* ---------- barre du haut ---------- */
.aurora-topbar, header.topbar, .app-topbar { border-bottom: 1px solid var(--border); }
header.topbar { min-height: 60px; }
.u-pal-btn, .search-trigger { border-radius: var(--v2-radius-sm) !important; }

/* ---------- pages ---------- */
.rf-page { gap: var(--v2-gap); }
.rf-page-head { align-items: flex-end; padding-bottom: 2px; }
.rf-page-head h1 { font-size: 24px; letter-spacing: -.025em; }
.rf-page-head p { font-size: 13.5px; }

/* ---------- cartes ---------- */
.rf-card, .card { border-radius: var(--v2-radius) !important; }
.rf-card { padding: 20px; box-shadow: none; }
.rf-card-head { margin-bottom: 14px; }
.rf-card-head h2 { font-size: 14.5px; letter-spacing: -.01em; }
.rf-card-head h2 .bi { color: var(--muted); }
.rf-table-card { padding: 4px 6px; }
.rf-card:has(> .rf-table:first-child), .rf-card.rf-table-card { padding-top: 4px; }

/* chiffres clés */
.rf-kpis { gap: 14px; }
.rf-kpi { border-radius: var(--v2-radius) !important; padding: 16px 18px; gap: 6px; box-shadow: none; transition: border-color .15s; }
.rf-kpi:hover { border-color: var(--border-2); }
.rf-kpi span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.rf-kpi b { font-size: 25px; line-height: 1.15; letter-spacing: -.02em; }
.rf-kpi.is-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.rf-kpi.is-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }

/* ---------- tableaux ---------- */
.rf-table { font-size: 13.5px; }
.rf-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 12px 10px; }
.rf-table td { padding: 12px; }
.rf-table tbody tr { transition: background-color .12s; }
.rf-table tbody tr:hover td { background: var(--hover); }
.rf-svc-row .rf-tile-icon { border-radius: 9px; }

/* ---------- boutons ---------- */
.rf-btn-primary, .rf-btn-ghost, .rf-iconbtn, .rf-btn-sm { border-radius: var(--v2-radius-sm) !important; transition: background-color .15s var(--v2-ease), border-color .15s, color .15s, transform .08s; }
.rf-btn-primary:active, .rf-btn-ghost:active, .rf-iconbtn:active, .btn:active { transform: translateY(1px); }
.rf-btn-ghost { background: var(--surface-2); }
.rf-btn-ghost:hover { background: var(--surface-3); border-color: var(--border-2); color: var(--text); }
.rf-iconbtn { background: var(--surface-2); }
.rf-iconbtn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }
.rf-btn-primary:focus-visible, .rf-btn-ghost:focus-visible, .rf-iconbtn:focus-visible, .btn:focus-visible,
.app-sidebar-link:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--brand-line, var(--brand)); outline-offset: 2px; }
.btn { border-radius: var(--v2-radius-sm); }

/* ---------- pastilles d'état ---------- */
.rf-pill { border-radius: 99px; font-weight: 600; padding: 3px 10px 3px 8px; }
.status-pill { border-radius: 99px; }

/* ---------- champs ---------- */
.rf-field input, .rf-field select, .rf-field textarea,
.rf-card input[type="text"], .rf-card input[type="email"], .rf-card input[type="password"], .rf-card input[type="search"], .rf-card input[type="number"], .rf-card input[type="tel"], .rf-card select, .rf-card textarea {
  border-radius: var(--v2-radius-sm) !important; transition: border-color .15s, box-shadow .15s;
}
.rf-field input:focus, .rf-field select:focus, .rf-field textarea:focus,
.rf-card input:focus, .rf-card select:focus, .rf-card textarea:focus {
  outline: none; border-color: var(--brand-line, var(--brand)) !important; box-shadow: 0 0 0 3px var(--brand-soft, rgba(139, 92, 246, .15));
}

/* ---------- bandeau Trustpilot : compact et refermable ---------- */
.tp-invite { padding: 12px 16px !important; gap: 12px !important; margin-bottom: 4px !important; }
.tp-invite p { font-size: 13px !important; }
.tp-invite .rf-btn-primary, .tp-invite .btn { white-space: nowrap; }
.tp-close { appearance: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; line-height: 0; }
.tp-close:hover { color: var(--text); background: var(--hover); }
.tp-invite[hidden] { display: none !important; }

/* ---------- divers ---------- */
::selection { background: var(--brand-soft, rgba(139, 92, 246, .25)); }
.custom-scroll::-webkit-scrollbar, .sidebar-nav::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-thumb, .sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 08/11/2026 — mobile : lignes de services du tableau de bord compactes (nom, puis état · échéance · boutons sur une ligne). */
@media (max-width: 760px) {
  .rf-svc-table tr.rf-svc-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 6px; align-items: stretch; }
  .rf-svc-table td[data-label] { display: flex !important; flex-direction: column; justify-content: space-between; gap: 4px; }
  .rf-svc-table td[data-label]::before { margin-bottom: 0 !important; }
  .rf-svc-table td.rf-actions-cell { align-self: end; }
  .rf-svc-table tr.rf-svc-row > td { padding: 0 !important; }
  .rf-svc-table td.rf-svc-name { grid-column: 1 / -1; padding-bottom: 2px !important; }
  .rf-svc-table td[data-label] { white-space: nowrap; min-width: 0; }
  .rf-svc-table td.rf-actions-cell { grid-column: auto !important; padding: 0; width: auto; }
  .rf-svc-table .rf-row-actions { justify-content: flex-end !important; width: auto; flex-wrap: nowrap; }
}
@media (max-width: 359px) {
  .rf-svc-table tr.rf-svc-row { grid-template-columns: 1fr 1fr; }
  .rf-svc-table td.rf-actions-cell { grid-column: 1 / -1 !important; }
}
