/* ==========================================================================
   OG Optimizer — thème du site (v2)
   Surcouche au-dessus de Tailwind (CDN). Chargée après Tailwind.
   ========================================================================== */
:root {
  --og-bg: #07040e;
  --og-surface: #0f0a1a;
  --og-border: rgba(167, 139, 250, .14);
  --og-border-strong: rgba(167, 139, 250, .34);
  --og-accent: #8b5cf6;
  --og-accent-2: #6366f1;
  --og-accent-soft: #c4b5fd;
  --og-text: #ededf5;
  --og-muted: #a1a1b5;
  --og-radius: 18px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--og-bg) !important;
  background-image:
    radial-gradient(1100px 560px at 10% -12%, rgba(139, 92, 246, .24), transparent 62%),
    radial-gradient(900px 520px at 96% 2%, rgba(99, 102, 241, .16), transparent 62%),
    radial-gradient(760px 520px at 50% 112%, rgba(168, 85, 247, .14), transparent 62%);
  background-attachment: fixed;
  color: var(--og-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
::selection { background: rgba(139, 92, 246, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--og-accent-soft); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* ---------- En-tête ---------- */
header { backdrop-filter: blur(16px) saturate(140%) !important; }
.og-logo {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover;
  box-shadow: 0 8px 24px -6px rgba(139, 92, 246, .65);
}

/* ---------- Cartes & panneaux ---------- */
.glass, .glass-card, .glass-hover, .glass-panel, .card {
  background: linear-gradient(180deg, rgba(32, 22, 56, .74), rgba(14, 9, 27, .78)) !important;
  border: 1px solid var(--og-border) !important;
  border-radius: var(--og-radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -34px rgba(0, 0, 0, .9);
  backdrop-filter: blur(14px);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  animation: og-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.glass-hover:hover, .glass-card:hover {
  border-color: var(--og-border-strong) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 28px 70px -30px rgba(124, 58, 237, .45);
}
.tab-panel:not(.hidden) { animation: og-fade .35s ease both; }

/* ---------- Boutons ---------- */
button { transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease; }
button:not(:disabled) { cursor: pointer; }
button:disabled, button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.glow-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
  box-shadow: 0 10px 26px -10px rgba(139, 92, 246, .75), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .15s ease, box-shadow .25s ease, filter .25s ease;
}
.glow-btn:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 14px 34px -10px rgba(139, 92, 246, .9), inset 0 1px 0 rgba(255, 255, 255, .22); }
.glow-btn:active { transform: translateY(0) scale(.985); }
.glow-btn:disabled { filter: grayscale(.3); transform: none; }
.shine { position: relative; overflow: hidden; }
.shine::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .26) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s ease;
}
.shine:hover::after { transform: translateX(120%); }

/* ---------- Champs ---------- */
input:not([type=checkbox]):not([type=radio]), select, textarea {
  background-color: rgba(8, 5, 16, .72) !important;
  border: 1px solid rgba(167, 139, 250, .2) !important;
  border-radius: 12px !important;
  color: var(--og-text);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(167, 139, 250, .75) !important;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .18) !important;
}
input::placeholder, textarea::placeholder { color: #6b6b82; }
select option { background: #120c20; color: var(--og-text); }

/* ---------- Tableaux ---------- */
table { border-collapse: separate; border-spacing: 0; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: rgba(15, 10, 28, .96);
  backdrop-filter: blur(8px);
  text-transform: uppercase; letter-spacing: .07em; font-size: 10.5px;
  color: var(--og-muted);
}
tbody td { border-bottom: 1px solid rgba(255, 255, 255, .045); }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: rgba(139, 92, 246, .07); }

/* ---------- Divers ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .35); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, .55); background-clip: padding-box; }

@keyframes og-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes og-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .glass, .glass-card, .card { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
