/* ==========================================================================
   Publication Hub — Design moderne (v2)
   Palette : indigo/violet profond + accents cyan + doré
   ========================================================================== */

:root {
  --phub-bg: #0a0d1a;
  --phub-bg-2: #0f1324;
  --phub-card: rgba(255, 255, 255, .045);
  --phub-card-solid: #131730;
  --phub-border: rgba(255, 255, 255, .09);
  --phub-text: #eef0f8;
  --phub-muted: #8b91a8;
  --phub-primary: #7c6cff;
  --phub-primary-2: #4ea8ff;
  --phub-cyan: #22d3ee;
  --phub-gold: #f5c15c;
  --grad-main: linear-gradient(135deg, #7c6cff 0%, #4ea8ff 100%);
  --grad-hero: linear-gradient(135deg, #7c6cff 0%, #22d3ee 100%);
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--phub-bg);
  color: var(--phub-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

[v-cloak] { display: none !important; }

h1, h2, h3, h4, h5, .brand-name, .stat-value, .page-title {
  font-family: 'Outfit', 'Inter', sans-serif;
}

.text-gradient {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */
.landing { position: relative; min-height: 100vh; }

/* Fond animé */
.landing-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,108,255,.22), transparent),
    radial-gradient(ellipse 60% 40% at 90% 60%, rgba(34,211,238,.08), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(124,108,255,.08), transparent),
    var(--phub-bg);
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .5;
  animation: float 12s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: rgba(124,108,255,.25); top: -100px; left: -80px; }
.orb-2 { width: 320px; height: 320px; background: rgba(34,211,238,.15); bottom: 10%; right: -60px; animation-delay: -4s; }
.orb-3 { width: 240px; height: 240px; background: rgba(245,193,92,.1); top: 40%; left: 55%; animation-delay: -8s; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-30px) translateX(20px); }
  66% { transform: translateY(20px) translateX(-15px); }
}
.grid-overlay {
  position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

/* Navbar */
.landing-nav { padding: 1.1rem 0; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad-main);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.05rem;
  box-shadow: 0 4px 18px rgba(124,108,255,.45);
}
.btn-ghost { color: var(--phub-text); border: 1px solid var(--phub-border); border-radius: 12px; padding: .55rem 1.1rem; transition: all .2s; }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.btn-gradient {
  background: var(--grad-main); color: #fff; border: none; border-radius: 12px;
  font-weight: 600; box-shadow: 0 6px 22px rgba(124,108,255,.4);
  transition: all .25s;
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(124,108,255,.55); color: #fff; }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; position: relative; }
.badge-hero {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(124,108,255,.12); border: 1px solid rgba(124,108,255,.3);
  color: #b8adff; padding: .45rem 1.2rem; border-radius: 100px;
  font-size: .85rem; font-weight: 500;
}
.caret { animation: blink 1s steps(1) infinite; color: var(--phub-cyan); }
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -.02em;
}
.hero-subtitle {
  max-width: 640px; color: var(--phub-muted);
  font-size: 1.1rem; line-height: 1.65;
}
.hero-cta .btn-lg { border-radius: 14px; padding: .85rem 1.8rem; }
.hero-cta .btn-outline-light { border-radius: 14px; padding: .85rem 1.6rem; border-color: rgba(255,255,255,.25); }

.hero-stats { border-top: 1px solid var(--phub-border); }
.stat-pill {
  background: var(--phub-card); border: 1px solid var(--phub-border);
  border-radius: 16px; padding: 1.1rem; backdrop-filter: blur(12px);
  transition: transform .2s;
}
.stat-pill:hover { transform: translateY(-3px); }
.stat-num { font-size: 1.7rem; font-weight: 800; font-family: 'Outfit'; }
.stat-txt { font-size: .78rem; color: var(--phub-muted); }

/* Sections */
.section { padding: 4rem 0; position: relative; }
.section-alt { background: rgba(255,255,255,.02); border-top: 1px solid var(--phub-border); border-bottom: 1px solid var(--phub-border); }
.section-tag {
  display: inline-block; color: var(--phub-cyan);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
.section-sub { max-width: 560px; color: var(--phub-muted); }

/* Cartes features */
.feature-card {
  background: var(--phub-card); border: 1px solid var(--phub-border);
  border-radius: var(--radius); padding: 1.8rem;
  backdrop-filter: blur(12px);
  transition: all .25s;
  position: relative; overflow: hidden;
}
.feature-card:hover { transform: translateY(-5px); border-color: rgba(124,108,255,.4); box-shadow: var(--shadow); }
.feature-card.connected { border-color: rgba(34,197,94,.35); }
.feature-icon {
  width: 58px; height: 58px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.icon-youtube { background: linear-gradient(135deg, #ff2b4e, #ff0000); }
.icon-tiktok { background: linear-gradient(135deg, #25f4ee 0%, #121212 45%, #fe2c55 100%); }
.icon-x { background: linear-gradient(135deg, #1d1d1f, #000); border: 1px solid #333; }

.mini-card {
  background: var(--phub-card); border: 1px solid var(--phub-border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all .25s;
}
.mini-card:hover { transform: translateY(-4px); background: rgba(124,108,255,.07); }
.mini-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(124,108,255,.15); color: var(--phub-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* CTA banner */
.cta-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(124,108,255,.25), rgba(34,211,238,.12));
  border: 1px solid rgba(124,108,255,.35);
  border-radius: 24px; padding: 3.5rem 2rem;
}
.cta-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(124,108,255,.35), transparent);
  pointer-events: none;
}

/* Modale login */
.glass-modal {
  background: var(--phub-card-solid);
  border: 1px solid var(--phub-border);
  backdrop-filter: blur(20px);
  border-radius: 20px;
}
.login-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--grad-main);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  box-shadow: 0 8px 24px rgba(124,108,255,.4);
}
.input-group-text {
  background: var(--phub-bg-2); border-color: var(--phub-border); color: var(--phub-muted);
}
.input-group .form-control {
  background: var(--phub-bg-2); border-color: var(--phub-border); color: var(--phub-text);
}
.input-group .form-control:focus { box-shadow: none; border-color: var(--phub-primary); }

.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.dashboard { display: flex; min-height: 100vh; }

.sidebar {
  width: 258px; background: var(--phub-card-solid);
  border-right: 1px solid var(--phub-border);
  display: flex; flex-direction: column;
  padding: 1.3rem 1rem;
  position: sticky; top: 0; height: 100vh; z-index: 1000;
}
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 0 .4rem 1.2rem; border-bottom: 1px solid var(--phub-border); margin-bottom: 1.2rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: .2rem; flex-grow: 1; }
.nav-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem .9rem; border-radius: 12px;
  color: var(--phub-muted); cursor: pointer;
  font-size: .9rem; font-weight: 500;
  transition: all .18s; user-select: none;
  border: 1px solid transparent;
}
.nav-item i { width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--phub-text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(124,108,255,.18), rgba(78,168,255,.08));
  color: #b8adff; border-color: rgba(124,108,255,.3);
}
.ai-badge {
  font-size: .72rem; color: var(--phub-cyan);
  background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.25);
  border-radius: 100px; padding: .4rem .8rem; text-align: center;
}
.sidebar-footer { padding-top: 1rem; border-top: 1px solid var(--phub-border); }
.sidebar-backdrop { display: none; }

.content { flex: 1; padding: 2rem; max-width: 1240px; }

.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.6rem; gap: 1rem;
}
.page-title { font-size: 1.7rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.page-sub { color: var(--phub-muted); font-size: .9rem; margin: 0; }
.section-mini { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--phub-muted); margin: 1.6rem 0 .9rem; }

/* Stats */
.stat-card {
  background: var(--phub-card); border: 1px solid var(--phub-border);
  padding: 1.25rem; border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: all .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(124,108,255,.3); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--phub-muted); font-size: .8rem; margin-top: .2rem; }
.stat-trend { font-size: .75rem; margin-top: .6rem; color: var(--phub-muted); }
.stat-trend.up { color: #4ade80; }
.stat-trend.down { color: #f87171; }

/* Plateformes */
.platform-card { background: var(--phub-card); border: 1px solid var(--phub-border); border-radius: var(--radius); padding: 1.2rem; transition: all .2s; }
.platform-card:hover { transform: translateY(-2px); }
.platform-card.dimmed { opacity: .55; }
.platform-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
.status-dot.on { background: #4ade80; box-shadow: 0 0 10px rgba(74,222,128,.7); }
.status-dot.off { background: #565b70; }

/* Tables */
.card { background: var(--phub-card); border: 1px solid var(--phub-border); border-radius: var(--radius); backdrop-filter: blur(10px); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--phub-text); margin-bottom: 0; }
.table thead th {
  background: rgba(255,255,255,.03); color: var(--phub-muted);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--phub-border); padding: .9rem 1rem;
}
.table td { border-color: rgba(255,255,255,.05); padding: .8rem 1rem; vertical-align: middle; }
.table-hover > tbody > tr:hover { --bs-table-hover-bg: rgba(124,108,255,.05); }

.status-badge { font-size: .75rem; font-weight: 600; padding: .4rem .7rem; border-radius: 100px; }
.result-link { color: var(--phub-cyan); }
.result-link:hover { color: #7dd3fc; }

/* Drop zone */
.drop-zone {
  border: 2px dashed rgba(124,108,255,.4);
  border-radius: var(--radius); padding: 3rem 1.5rem;
  text-align: center; cursor: pointer;
  transition: all .25s;
  background: rgba(124,108,255,.03);
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--phub-primary);
  background: rgba(124,108,255,.08);
  box-shadow: inset 0 0 40px rgba(124,108,255,.08);
}
.drop-icon {
  width: 72px; height: 72px; margin: 0 auto;
  border-radius: 22px; background: rgba(124,108,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--phub-primary);
  animation: pulse-soft 2.5s ease infinite;
}
@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,108,255,.3); }
  50% { box-shadow: 0 0 0 12px rgba(124,108,255,0); }
}
.selected-file { display: flex; flex-direction: column; align-items: center; }

/* Formulaires */
.form-control, .form-select {
  background: var(--phub-bg-2); border-color: var(--phub-border);
  color: var(--phub-text); border-radius: 12px;
  padding: .65rem .9rem;
}
.form-control:focus, .form-select:focus {
  background: var(--phub-bg-2); color: var(--phub-text);
  border-color: var(--phub-primary);
  box-shadow: 0 0 0 .2rem rgba(124,108,255,.15);
}
.form-control::placeholder { color: #565b70; }
.form-check-input { background-color: var(--phub-bg-2); border-color: #4a4f66; }
.form-check-input:checked { background-color: var(--phub-primary); border-color: var(--phub-primary); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(124,108,255,.2); }

.platform-check {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .8rem 1rem; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--phub-border);
  margin-bottom: .55rem;
  transition: all .2s;
}
.platform-check:hover { border-color: rgba(124,108,255,.3); }
.platform-check.disabled { opacity: .5; }

.sticky-side { position: sticky; top: 1.5rem; }

/* Comptes */
.account-card { transition: all .2s; }
.account-card:hover { transform: translateY(-3px); border-color: rgba(124,108,255,.3); }

/* Toasts */
.toast-container .toast { background: var(--phub-card-solid); color: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.toast-success { border-left: 4px solid #4ade80; }
.toast-error { border-left: 4px solid #f87171; }
.toast-info { border-left: 4px solid var(--phub-cyan); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-105%);
    transition: transform .28s ease;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 990;
    backdrop-filter: blur(2px);
  }
  .content { padding: 1.25rem; }
  .sticky-side { position: static; }
  .hero { padding: 3rem 0 2.5rem; }
}
