/* ═══════════════════════════════════════════════
   voyant-dashboard.css — Main wrapper (glassmorphism)
   Complements voyant-dashboard-home.css
   ═══════════════════════════════════════════════ */

/* ── 1. Variables (héritées de home.css, rappelées ici) ── */
:root {
  --vd-bg-deep:            #0f0a1e;
  --vd-bg-mid:             #1a1232;
  --vd-glass-bg:           rgba(255, 255, 255, 0.06);
  --vd-glass-bg-hover:     rgba(255, 255, 255, 0.10);
  --vd-glass-border:       rgba(255, 255, 255, 0.12);
  --vd-glass-border-hover: rgba(255, 255, 255, 0.22);
  --vd-accent-violet:      #a78bfa;
  --vd-accent-teal:        #5eead4;
  --vd-accent-rose:        #fb7185;
  --vd-accent-amber:       #fbbf24;
  --vd-text-primary:       #f1f0f5;
  --vd-text-secondary:     rgba(241, 240, 245, 0.55);
  --vd-status-available:   #34d399;
  --vd-status-pause:       #38bdf8;
  --vd-status-unavailable: #f87171;
  --vd-status-busy:        #fbbf24;
  --vd-radius:             20px;
  --vd-radius-sm:          12px;
  --vd-shadow-glow:        0 0 60px rgba(167, 139, 250, 0.15);
  --vd-sidebar-w:          260px;
}

/* ── 2. Google Fonts (Outfit + Playfair Display) ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;1,400&display=swap');


/* ── 3. Dashboard root ── */
.vd-dashboard {
  position: relative;
  background: var(--vd-bg-deep);
  color: var(--vd-text-primary);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 4. Animated background orbs ── */
.vd-bg-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.vd-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.30;
  animation: vd-orbFloat 18s ease-in-out infinite alternate;
}
.vd-orb--1 { width: 500px; height: 500px; background: #7c3aed; top: -10%; left: -5%; animation-delay: 0s; }
.vd-orb--2 { width: 400px; height: 400px; background: #0d9488; bottom: -10%; right: -5%; animation-delay: -6s; }
.vd-orb--3 { width: 350px; height: 350px; background: #be185d; top: 40%; left: 50%; animation-delay: -12s; }

@keyframes vd-orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}


/* ── 5. Shell grid ── */
.vd-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--vd-sidebar-w) 1fr;
  min-height: 100vh;
}


/* ── 6. Sidebar ── */
.vd-sidebar {
  grid-row: 1 / -1;
  background: rgba(15, 10, 30, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-right: 1px solid var(--vd-glass-border);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.35s ease, opacity 0.35s ease, width 0.35s ease;
  overflow-y: auto;
  overflow-x: hidden;
  animation: vd-slideInLeft 0.6s ease-out;
}

@keyframes vd-slideInLeft {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.vd-sidebar.closed {
  transform: translateX(-100%);
  width: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  border: none;
}

/* Brand */
.vd-sidebar__brand {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--vd-glass-border);
  flex-shrink: 0;
}
.vd-sidebar__brand h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--vd-accent-violet), var(--vd-accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}
.vd-sidebar__brand small {
  color: var(--vd-text-secondary);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Profile card in sidebar */
.vd-profile-card {
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.vd-profile-card__bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(94,234,212,0.1));
}
.vd-profile-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--vd-accent-violet);
  object-fit: cover;
  position: relative;
  z-index: 1;
  margin-top: 10px;
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}
.vd-profile-card__name {
  margin-top: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}
.vd-profile-card__status {
  color: var(--vd-text-secondary);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

/* Status dots */
.vd-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.vd-status-dot--available   { background: var(--vd-status-available); box-shadow: 0 0 8px var(--vd-status-available); }
.vd-status-dot--pause       { background: var(--vd-status-pause);     box-shadow: 0 0 8px var(--vd-status-pause); }
.vd-status-dot--unavailable { background: var(--vd-status-unavailable); box-shadow: 0 0 8px var(--vd-status-unavailable); }
.vd-status-dot--busy        { background: var(--vd-status-busy);      box-shadow: 0 0 8px var(--vd-status-busy); animation: vd-pulse 1.5s infinite; }


/* Nav items */
.vd-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.vd-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--vd-radius-sm);
  color: var(--vd-text-secondary) !important;
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.vd-nav-item:hover,
.vd-nav-item.active {
  background: var(--vd-glass-bg-hover);
  color: var(--vd-text-primary);
  border-color: var(--vd-glass-border);
}
.vd-nav-item.active {
  border-color: var(--vd-glass-border-hover);
  background: rgba(167, 139, 250, 0.1);
}
.vd-nav-item__icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.vd-nav-item__chevron {
  margin-left: auto;
  transition: transform 0.25s;
  font-size: 1.1rem;
}
.vd-nav-group .open ~ .vd-nav-item__chevron,
.vd-sub-menu.open + .vd-nav-item .vd-nav-item__chevron {
  transform: rotate(90deg);
}

/* Sub-menu */
.vd-sub-menu {
  display: none;
  padding-left: 20px;
}
.vd-sub-menu.open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vd-nav-item--sub {
  font-size: 0.78rem;
  padding: 8px 14px;
}
.vd-nav-item--logout {
  margin-top: auto;
  border-top: 1px solid var(--vd-glass-border);
  padding-top: 16px;
}


/* ── 7. Toggle sidebar button ── */
.vd-toggle-sidebar-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: none; /* shown on mobile or when needed */
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  transition: all 0.25s;
}
.vd-toggle-sidebar-btn:hover {
  background: var(--vd-glass-bg-hover);
  border-color: var(--vd-glass-border-hover);
}
.vd-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.vd-hamburger span {
  display: block;
  height: 2px;
  background: var(--vd-text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}


/* ── 8. Main content area ── */
.vd-main {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: vd-fadeInUp 0.7s ease-out;
  min-width: 0; /* prevent grid blowout */
}

@keyframes vd-fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}


/* ── 9. Alerts (success / error) ── */
.vd-alert {
  border-radius: var(--vd-radius-sm);
  padding: 14px 20px;
  backdrop-filter: blur(20px);
  animation: vd-fadeInUp 0.4s ease-out;
}
.vd-alert p {
  margin: 0;
  font-size: 0.88rem;
}
.vd-alert--success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
}
.vd-alert--error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}


/* ── 10. Glass card (shared component) ── */
.vd-glass-card {
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius);
  padding: 24px 28px;
  margin-top: 28px;
  margin-bottom: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.vd-glass-card__title {
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--vd-text-secondary) ! IMPORTANT;
    margin: 0 0 16px 0;
    font-weight: 500;
}


/* ── 11. Section cards (for sub-pages) ── */
.section-card,
.vd-section-card {
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius);
  padding: 24px;
  backdrop-filter: blur(20px);
  margin-bottom: 20px;
}
.section-card h3,
.vd-section-card h3 {
  color: var(--vd-text-primary);
  border-bottom: 1px solid var(--vd-glass-border);
  padding-bottom: 10px;
  margin-top: 0;
  font-size: 1rem;
}

/* Section header accent bar */
.section-header,
.vd-section-header {
  background: linear-gradient(135deg, var(--vd-accent-violet), var(--vd-accent-teal));
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--vd-radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
}


/* ── 12. Form elements (sub-pages) ── */
.section-card label,
.vd-section-card label {
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
  color: var(--vd-text-secondary);
  font-size: 0.85rem;
}
.section-card input,
.section-card textarea,
.section-card select,
.vd-section-card input,
.vd-section-card textarea,
.vd-section-card select {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius-sm);
  background: rgba(0, 0, 0, 0.25);
  color: var(--vd-text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.25s;
}
.section-card input:focus,
.section-card textarea:focus,
.section-card select:focus,
.vd-section-card input:focus,
.vd-section-card textarea:focus,
.vd-section-card select:focus {
  outline: none;
  border-color: var(--vd-accent-violet);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.personal-info-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}


/* ── 13. Buttons ── */
.section-card button,
.custom-button,
.vd-btn {
  background: linear-gradient(135deg, var(--vd-accent-violet), #8b5cf6);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-card button:hover,
.custom-button:hover,
.vd-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.35);
}

.vd-btn--primary {
  background: linear-gradient(135deg, var(--vd-accent-teal), #14b8a6);
}
.vd-btn--primary:hover {
  box-shadow: 0 4px 20px rgba(94, 234, 212, 0.35);
}


/* ── 14. Tables (consultation history, etc.) ── */
.consultation-history table,
.vd-dashboard table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.85rem;
}
.consultation-history th,
.vd-dashboard th {
  background: rgba(167, 139, 250, 0.15);
  color: var(--vd-text-primary);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.consultation-history td,
.vd-dashboard td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--vd-glass-border);
  color: var(--vd-text-secondary);
}
.consultation-history tr:hover td,
.vd-dashboard tr:hover td {
  background: var(--vd-glass-bg-hover);
  color: var(--vd-text-primary);
}


/* ── 15. Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.pagination a {
  padding: 8px 14px;
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius-sm);
  text-decoration: none;
  color: var(--vd-text-secondary);
  font-size: 0.85rem;
  transition: all 0.25s;
  background: var(--vd-glass-bg);
}
.pagination a:hover {
  background: var(--vd-glass-bg-hover);
  border-color: var(--vd-glass-border-hover);
  color: var(--vd-text-primary);
}
.pagination a.current {
  background: var(--vd-accent-violet);
  color: #fff;
  border-color: var(--vd-accent-violet);
}


/* ── 16. Solde wrapper ── */
.solde-wrapper {
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  padding: 14px 20px;
  border-radius: var(--vd-radius-sm);
  margin-bottom: 20px;
  backdrop-filter: blur(20px);
}
.solde-wrapper span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--vd-accent-teal);
}


/* ── 17. Message cards (admin messages, etc.) ── */
.message-card,
.admin-message {
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius);
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
}
.message-card:hover {
  background: var(--vd-glass-bg-hover);
  border-color: var(--vd-glass-border-hover);
  transform: translateY(-2px);
}
.message-card h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: var(--vd-accent-amber) !important;
}
.message-card p {
  margin: 8px 0;
  color: var(--vd-text-secondary);
  line-height: 1.6;
}
.message-card small {
  display: block;
  margin-top: 8px;
  color: var(--vd-text-secondary);
  font-size: 0.75rem;
}


/* ── 18. Stat cards (legacy compatibility) ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.stat-card {
  background: var(--vd-glass-bg);
  border: 1px solid var(--vd-glass-border);
  border-radius: var(--vd-radius);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}
.stat-card:hover {
  background: var(--vd-glass-bg-hover);
  transform: translateY(-2px);
}
.stat-card h3 { margin: 0; font-size: 1.5rem; color: #fff; }
.stat-card p { margin: 10px 0 0; color: var(--vd-text-secondary); }

.revenue-today { border-top: 3px solid var(--vd-accent-rose); }
.revenue-month { border-top: 3px solid var(--vd-accent-amber); }
.time-month    { border-top: 3px solid var(--vd-accent-teal); }
.calls-month   { border-top: 3px solid var(--vd-accent-violet); }


/* ── 19. FullCalendar overrides (glassmorphism) ── */
.fc {
  background: transparent !important;
  color: var(--vd-text-primary) !important;
}
.fc-toolbar {
  background: transparent !important;
  color: var(--vd-text-primary) !important;
  border: none !important;
}
.fc-button {
  background: var(--vd-glass-bg) !important;
  border: 1px solid var(--vd-glass-border) !important;
  color: var(--vd-text-primary) !important;
  border-radius: var(--vd-radius-sm) !important;
  transition: all 0.25s !important;
}
.fc-button:hover {
  background: var(--vd-glass-bg-hover) !important;
  border-color: var(--vd-accent-violet) !important;
}
.fc-button-active {
  background: var(--vd-accent-violet) !important;
  border-color: var(--vd-accent-violet) !important;
}
.fc-event {
  background-color: var(--vd-accent-violet) !important;
  border-color: var(--vd-accent-violet) !important;
  color: #fff !important;
  border-radius: 6px !important;
}
.fc-daygrid-day {
  background: transparent !important;
}
.fc-timegrid-slot-label {
  background: transparent !important;
  color: var(--vd-text-secondary) !important;
}
.fc th {
  color: var(--vd-text-secondary) !important;
  border-color: var(--vd-glass-border) !important;
}
.fc td {
  border-color: var(--vd-glass-border) !important;
}


/* ── 20. Incoming session alert (floating) ── */
.vd-incoming-alert {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  animation: vd-alertSlideIn 0.4s ease-out;
}
@keyframes vd-alertSlideIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.vd-incoming-alert__content {
  background: rgba(15, 10, 30, 0.9);
  backdrop-filter: blur(30px);
  border: 1px solid var(--vd-accent-teal);
  border-radius: var(--vd-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(94, 234, 212, 0.15);
  max-width: 420px;
}
.vd-incoming-alert__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  animation: vd-pulse 1.5s infinite;
}
.vd-incoming-alert__content p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--vd-text-primary);
  line-height: 1.4;
}
.vd-incoming-alert--expired .vd-incoming-alert__content {
  border-color: var(--vd-accent-rose);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(251, 113, 133, 0.15);
}

@keyframes vd-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}


/* ── 21. Voyant profile picture (legacy compat) ── */
.voyant-profile-picture img,
.voyant-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


/* ── 22. Dashboard header (legacy compat) ── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.dashboard-header h1 {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--vd-text-primary) !important;
}


/* ═══════════════════════════════════════════════
   23. Responsive
   ═══════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .personal-info-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .vd-toggle-sidebar-btn {
    display: flex;
  }
  .vd-shell {
    grid-template-columns: 1fr;
  }
  .vd-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--vd-sidebar-w);
    z-index: 90;
    transform: translateX(0);
  }
  .vd-sidebar.closed {
    transform: translateX(-100%);
  }
  .vd-main {
    padding: 70px 16px 32px;
  }
}

@media (max-width: 500px) {
  .vd-main {
    padding: 60px 12px 24px;
  }
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .vd-incoming-alert__content {
    flex-direction: column;
    text-align: center;
  }
}
