/* ============================================================
   DASHBOARD — FCSM Design System v2
   Tokens, glassmorphisme, Bebas Neue + Inter
   ============================================================ */

:root {
  --fcsm-yellow:       #F5C800;
  --fcsm-yellow-hover: #F7D233;
  --fcsm-blue:         #133478;
  --fcsm-blue-mid:     #2249B3;
  --fcsm-blue-deep:    #0F2260;
  --fcsm-dark:         #08080A;
  --fcsm-light:        #F5F3EE;
  --bg-base:           #08080A;
  --bg-surface:        #111115;
  --text-primary:      #F5F3EE;
  --text-muted:        rgba(245, 243, 238, 0.60);
  --text-faint:        rgba(245, 243, 238, 0.35);
  --font-display:      'Bebas Neue', Impact, sans-serif;
  --font-body:         'Inter', 'Helvetica Neue', sans-serif;
  --font-script:       'Mr Dafoe', cursive;
  /* Legacy aliases for JS-generated HTML */
  --color-blue:        var(--fcsm-blue);
  --color-blue-dark:   var(--fcsm-blue-deep);
  --color-blue-light:  var(--fcsm-blue-mid);
  --color-yellow:      var(--fcsm-yellow);
  --color-yellow-hover:var(--fcsm-yellow-hover);
  --color-white:       #FFFFFF;
  --font-heading:      var(--font-display);
  --font-accent:       var(--font-body);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  width: 100%;
  background: var(--bg-base);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  background: transparent;
}

/* ── Background & overlays ──────────────────────────────── */
#fixed-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-base);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -10;
  will-change: transform;
  transform: translateZ(0);
}

/* Voile sombre pour lisibilité du contenu */
#fixed-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.52);
}

/* Grain de points subtil */
#fixed-pattern {
  position: fixed;
  inset: 0;
  z-index: -9;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Gradients mobile (cachés sur desktop) */
#gradient-top, #gradient-bottom { display: none; }

/* ── Barres diagonales FCSM — côté gauche ───────────────── */
#diagonal-bars {
  position: fixed;
  top: -10vh;
  left: 0;
  width: 55vw;
  height: 120vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.diag-bar {
  position: absolute;
  left: -10%;
  width: 140%;
  height: 72px;
  border-radius: 6px;
  transform: rotate(35deg);
  transform-origin: left top;
}

.diag-bar:nth-child(1) { top:  0%; background: linear-gradient(90deg, rgba(245,200,0,.68) 0%, rgba(245,200,0,.50) 50%, transparent 100%); }
.diag-bar:nth-child(2) { top: 12%; background: linear-gradient(90deg, rgba(245,200,0,.56) 0%, rgba(245,200,0,.38) 50%, transparent 100%); }
.diag-bar:nth-child(3) { top: 24%; background: linear-gradient(90deg, rgba(245,200,0,.44) 0%, rgba(245,200,0,.28) 50%, transparent 100%); }
.diag-bar:nth-child(4) { top: 36%; background: linear-gradient(90deg, rgba(245,200,0,.32) 0%, rgba(245,200,0,.18) 50%, transparent 100%); }
.diag-bar:nth-child(5) { top: 48%; background: linear-gradient(90deg, rgba(245,200,0,.22) 0%, rgba(245,200,0,.12) 50%, transparent 100%); }
.diag-bar:nth-child(6) { top: 60%; background: linear-gradient(90deg, rgba(245,200,0,.13) 0%, rgba(245,200,0,.07) 50%, transparent 100%); }
.diag-bar:nth-child(7) { top: 72%; background: linear-gradient(90deg, rgba(245,200,0,.07) 0%, rgba(245,200,0,.03) 50%, transparent 100%); }
.diag-bar:nth-child(8) { top: 84%; background: linear-gradient(90deg, rgba(245,200,0,.03) 0%, transparent 60%); }

/* ── Header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: rgba(19, 52, 120, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 2px solid var(--fcsm-yellow);
  padding: 0 28px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  gap: 20px;
}

/* Greeting */
.header-left {
  display: flex;
  align-items: center;
  min-width: 180px;
}

.welcome-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.welcome-time {
  font-family: var(--font-script);
  font-size: 19px;
  color: var(--fcsm-yellow);
  display: block;
  transform: rotate(-2deg);
}

#user-first-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

/* Logo centré */
.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo .logo-img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.45));
  object-fit: contain;
}

/* Right actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 180px;
  justify-content: flex-end;
}

/* ── Dropdowns ──────────────────────────────────────────── */
.dropdown { position: relative; }

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  border: 1px solid transparent;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
}

.dropdown-trigger:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}

.dropdown-arrow {
  font-size: 10px;
  opacity: 0.55;
  transition: transform 0.2s;
}
.dropdown.open .dropdown-arrow { transform: rotate(180deg); }

/* Bell */
.notification-bell {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  color: rgba(255,255,255,0.82);
}

.notification-bell:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--fcsm-yellow);
  color: var(--fcsm-blue-deep);
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* User avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fcsm-blue);
  border: 2px solid var(--fcsm-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 17px;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(8, 18, 42, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  padding: 8px;
  display: none;
  z-index: 200;
  overflow: hidden;
  animation: dropdownFade 0.15s ease-out;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 6px 0;
}

.icon-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Main content grid ──────────────────────────────────── */
.main-content {
  position: relative;
  z-index: 2;
  padding: 28px 28px 88px;
  max-width: 1440px;
  margin: 0 auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Glass cards ─────────────────────────────────────────── */
.glass-card {
  background: rgba(1, 22, 52, 0.60);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 20px;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.07);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.09);
}

.glass-card.large { grid-column: span 2; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 13px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.card-icon {
  color: var(--fcsm-yellow);
  display: flex;
  align-items: center;
}

.card-badge {
  background: rgba(245,200,0,0.14);
  color: var(--fcsm-yellow);
  border: 1px solid rgba(245,200,0,0.28);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  white-space: nowrap;
}

.card-content { padding: 16px 20px; }

/* ── XP / Jauge ─────────────────────────────────────────── */
.xp-gauge-container {
  position: relative;
  width: 200px;
  height: 120px;
  margin-bottom: 8px;
}

.gauge-center {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.gauge-xp {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--fcsm-yellow);
  text-shadow: 0 0 20px rgba(245,200,0,0.40);
}

.gauge-level-left, .gauge-level-right {
  position: absolute;
  bottom: -4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.gauge-level-left  { left:  0; }
.gauge-level-right { right: 0; }

.xp-message {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 16px;
}
.xp-message strong { color: var(--fcsm-yellow); font-weight: 700; }

.xp-milestones {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  padding: 0 4px;
}

.milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.milestone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.28);
  transition: all 0.3s;
}

.milestone-dot.active {
  background: var(--fcsm-yellow);
  border-color: var(--fcsm-yellow);
  box-shadow: 0 0 8px rgba(245,200,0,0.5);
}

.milestone-label {
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
}

.milestone-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.13);
  margin-bottom: 14px;
}
.milestone-line.active { background: var(--fcsm-yellow); }

.xp-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 20px;
  background: var(--fcsm-blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  transition: all 0.2s;
}

.xp-cta-button:hover {
  background: var(--fcsm-blue-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(19,52,120,0.5);
}

/* ── Item list (commandes / billets) ────────────────────── */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  transition: all 0.2s;
}
.item:hover { background: rgba(255,255,255,0.07); }

.item-details { flex: 1; }

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.item-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.item-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-success {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.28);
}
.status-info {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.status-warning {
  background: rgba(245,200,0,0.14);
  color: var(--fcsm-yellow);
  border: 1px solid rgba(245,200,0,0.28);
}

/* ── Loyalty actions ─────────────────────────────────────── */
.loyalty-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.loyalty-action:hover {
  background: rgba(245,200,0,0.06);
  border-color: rgba(245,200,0,0.20);
}
.loyalty-title { font-size: 14px; color: rgba(255,255,255,0.85); font-weight: 500; }
.loyalty-points {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--fcsm-yellow);
  letter-spacing: 0.03em;
}

/* ── Coupons ─────────────────────────────────────────────── */
.coupon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(245,200,0,0.06);
  border: 1px dashed rgba(245,200,0,0.32);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all 0.2s;
  gap: 12px;
}
.coupon:hover {
  background: rgba(245,200,0,0.10);
  border-color: rgba(245,200,0,0.50);
}
.coupon-details { flex: 1; }
.coupon-title   { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.coupon-desc    { font-size: 12px; color: var(--text-muted); }
.coupon-code {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.10em;
  color: var(--fcsm-yellow);
  background: rgba(245,200,0,0.10);
  border: 1px solid rgba(245,200,0,0.24);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--fcsm-yellow);
  color: var(--fcsm-blue-deep);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--fcsm-yellow-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,200,0,0.35);
}

.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.20);
}

.btn-block { width: 100%; margin-top: 12px; }

/* ── Modales ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: rgba(5, 14, 34, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-wrapper {
  display: flex;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: 1;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  transition: all 0.2s;
  order: -1;
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.modal-body { overflow-y: auto; flex: 1; }
.modal-content { padding: 20px 24px; }

/* ── Notifications modal ──────────────────────────────────── */
.notifications-modal { max-width: 480px; }
.notifications-modal-body { overflow-y: auto; flex: 1; display: flex; flex-direction: column; }

.notif-modal-stats {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.notif-stat {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.notif-stat.highlight { color: var(--fcsm-yellow); }
.notif-stat-value { font-family: var(--font-display); font-size: 24px; color: #fff; }
.notif-stat.highlight .notif-stat-value { color: var(--fcsm-yellow); }

.notif-modal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.notif-filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.68);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-filter-btn:hover,
.notif-filter-btn.active {
  background: rgba(245,200,0,0.12);
  border-color: rgba(245,200,0,0.30);
  color: var(--fcsm-yellow);
}

.notif-mark-all-btn {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(245,200,0,0.28);
  color: var(--fcsm-yellow);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.notif-mark-all-btn:hover { background: rgba(245,200,0,0.10); }

.notif-modal-list { overflow-y: auto; flex: 1; padding: 8px; }

.notif-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.notif-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(245,200,0,0.15);
  border-top-color: var(--fcsm-yellow);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Avatar Cropper ──────────────────────────────────────── */
.avatar-crop-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px);
  z-index: 1500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.avatar-crop-modal.active { display: flex; }

.avatar-crop-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,0.10);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.avatar-crop-close:hover { background: rgba(255,255,255,0.20); }

.cropper-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 6px;
  text-align: center;
}

.cropper-instructions {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

.cropper-container-wrapper {
  max-height: 300px;
  max-width: 300px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
}

.cropper-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.cropper-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  border: none;
}
.cropper-btn-primary   { background: var(--fcsm-yellow); color: var(--fcsm-blue-deep); }
.cropper-btn-secondary { background: rgba(255,255,255,0.10); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.cropper-btn-danger    { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.28); }

.cropper-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-direction: column;
  color: #fff;
  font-size: 14px;
}

.cropper-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(245,200,0,0.20);
  border-top-color: var(--fcsm-yellow);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(to top, rgba(8,8,10,0.65) 0%, transparent 100%);
}
footer a {
  pointer-events: auto;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover { color: var(--fcsm-yellow); }

/* ── Modale légale (CGU / Mentions légales) ──────────────── */
.legal-modal {
  width: 100%;
  overflow: hidden;
}
.legal-tabs {
  gap: 0;
  padding: 0 24px;
  margin-top: 4px;
}
.legal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-family: inherit;
  padding: 12px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.legal-tab:hover { color: rgba(255,255,255,0.75); }
.legal-tab.active {
  color: #fff;
  border-bottom-color: var(--fcsm-yellow, #FEE300);
  font-weight: 600;
}
.legal-content {
  color: rgba(255,255,255,0.8);
  font-size: 13.5px;
  line-height: 1.7;
}
.legal-content h2 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.legal-content h2:first-of-type { margin-top: 4px; }
.legal-content h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin: 18px 0 6px;
}
.legal-content p { margin: 0 0 10px; }
.legal-content ul {
  margin: 0 0 10px;
  padding-left: 20px;
}
.legal-content li { margin-bottom: 5px; }
.legal-content a {
  color: var(--fcsm-yellow, #FEE300);
  text-decoration: none;
}
.legal-content a:hover { text-decoration: underline; }
.legal-update {
  display: inline-block;
  font-size: 11.5px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px !important;
}
.legal-info-block {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0 16px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
}
.legal-info-block strong { color: #fff; }

/* ── Animations partagées ────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .glass-card.large { grid-column: span 2; }
}

@media (max-width: 768px) {
  .header { height: 60px; padding: 0 16px; }
  .welcome-time { font-size: 16px; }
  #user-first-name { font-size: 18px; }
  .header-logo .logo-img { height: 42px; }
  .main-content { padding: 16px 14px 88px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
  .glass-card.large { grid-column: span 1; }
  .dropdown-trigger span:not(.dropdown-arrow) { display: none; }
  #gradient-top, #gradient-bottom { display: block; }
  #gradient-top {
    position: fixed; top: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(to bottom, rgba(8,8,10,0.8) 0%, transparent 100%);
    z-index: 0; pointer-events: none;
  }
  #gradient-bottom {
    position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(to top, rgba(8,8,10,0.8) 0%, transparent 100%);
    z-index: 0; pointer-events: none;
  }
  #diagonal-bars { width: 80vw; opacity: 0.65; }
}

@media (max-width: 480px) {
  .header-left { display: none; }
  .header { padding: 0 12px; }
  .main-content { padding: 14px 10px 80px; }
}
