/* =========================================================
   EVENT MANAGER — CSS COMPLET (menu corrigé)
   ========================================================= */

/* =========================================================
   1. VARIABLES
   ========================================================= */
:root {
  --primary: #0f766e;
  --primary-dark: #0d5c56;
  --primary-light: #14b8a6;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --danger: #dc2626;
  --success: #16a34a;
  --dark: #0f172a;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --transition: 0.25s ease;
}

/* =========================================================
   2. RESET + BASE
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =========================================================
   3. TOP BAR
   ========================================================= */
.topbar {
  background: var(--dark);
  color: #cbd5e1;
  font-size: 13px;
  padding: 8px 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.topbar-left { display: flex; gap: 20px; }
.topbar-right { display: flex; align-items: center; gap: 15px; }

.lang-dropdown { position: relative; }
.lang-btn {
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
  border: 0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.lang-btn:hover { background: rgba(255,255,255,0.15); }
.lang-list {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: var(--transition);
  z-index: 300;
  padding: 6px 0;
  border: 1px solid var(--gray-200);
}
.lang-dropdown.open .lang-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-list a {
  display: block;
  padding: 10px 15px;
  color: var(--gray-700);
  font-size: 14px;
}
.lang-list a:hover { background: var(--gray-100); color: var(--primary); }

/* =========================================================
   4. HEADER + NAVIGATION
   ========================================================= */
.main-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  min-height: 66px;
  width: 100%;
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--gray-900);
  white-space: nowrap;
}
.brand-tag {
  font-size: 10px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Burger */
.burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}
.burger:hover { background: var(--gray-100); }
.burger span {
  width: 24px;
  height: 3px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ NAVIGATION (PC) ============ */
.main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Chaque item */
.nav-list > li {
  position: relative;
  display: flex;
}

/* ============ MASQUER les items mobiles sur PC ============ */
.nav-list > li.mobile-only {
  display: none !important;
}

/* ============ LIENS ============ */
.nav-list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-700);
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
}
.nav-list > li > a .nav-ico {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
.nav-list > li > a .nav-chevron {
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.6;
  transition: var(--transition);
  display: inline-block;
}
.nav-list > li > a:hover {
  background: var(--gray-100);
  color: var(--primary);
}
.nav-list > li > a.active {
  background: var(--primary);
  color: #fff;
}

/* ============ DROPDOWN "Plus" ============ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown.open > .nav-dropdown-toggle {
  background: var(--gray-100);
  color: var(--primary);
}
.nav-dropdown.open > .nav-dropdown-toggle .nav-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: var(--transition);
  z-index: 210;
  border: 1px solid var(--gray-200);
  margin: 0;
  list-style: none;
}
.nav-dropdown.open > .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-submenu > li {
  display: block !important;
  width: 100%;
}
.nav-submenu > li > a {
  display: flex !important;
  width: 100%;
  padding: 11px 14px !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  justify-content: flex-start;
  white-space: nowrap;
  gap: 10px;
  transition: var(--transition);
}
.nav-submenu > li > a:hover {
  background: var(--gray-100);
  color: var(--primary);
}
.nav-submenu > li > a.active {
  background: var(--primary);
  color: #fff;
}

/* Éléments cachés sur PC */
.nav-header { display: none; }
.nav-footer { display: none; }

/* ============ ACTIONS DROITE ============ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-700);
  transition: var(--transition);
  white-space: nowrap;
}
.action-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Menu utilisateur */
.user-menu { position: relative; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 0;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.user-btn .avatar {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-list {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: 10px;
  min-width: 240px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: var(--transition);
  z-index: 200;
  border: 1px solid var(--gray-200);
}
.user-menu.open .user-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-list a {
  display: block;
  padding: 11px 18px;
  color: var(--gray-700);
  font-size: 14px;
  white-space: nowrap;
}
.user-list a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Boutons globaux */
.btn-primary-sm,
.btn-ghost,
.btn-ghost-full {
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: 0;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary-sm { background: var(--primary); color: #fff; }
.btn-primary-sm:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-ghost-full {
  display: block;
  background: var(--gray-100);
  color: var(--gray-700);
  width: 100%;
  padding: 12px;
}
.btn-ghost-full:hover { background: var(--gray-200); }

.btn-primary-full {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}
.btn-primary-full:hover { background: var(--primary-dark); }

.btn-mini {
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-block;
  transition: var(--transition);
}
.btn-mini:hover {
  background: var(--primary);
  color: #fff;
}

/* Overlay mobile */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 98;
}
body.menu-open .mobile-overlay {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   5. RESPONSIVE — TABLETTE
   ========================================================= */
@media (max-width: 1100px) {
  .action-link span { display: none; }
  .nav-list > li > a {
    padding: 8px 10px;
    font-size: 12.5px;
  }
  .nav-list > li > a .nav-ico { font-size: 14px; }
}

/* =========================================================
   6. RESPONSIVE — MOBILE (menu depuis la GAUCHE)
   ========================================================= */
@media (max-width: 900px) {
  .container { padding: 0 15px; }

  .header-inner {
    padding: 10px 0;
    min-height: 60px;
    gap: 10px;
  }
  .burger { display: flex; }
  .brand-logo { width: 36px; height: 36px; font-size: 14px; }
  .brand-name { font-size: 14px; }
  .header-actions .btn-primary-sm { display: none; }
  .header-actions .hide-sm { display: none; }
  .user-name { display: none; }
  .topbar-left .hide-sm { display: none; }

  /* ===== Menu latéral depuis la GAUCHE ===== */
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: 85%;
    max-width: 340px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    box-shadow: 4px 0 25px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    overflow-y: auto;
    z-index: 99;
    display: flex;
    flex-direction: column;
    border-radius: 0 16px 16px 0;
    flex: none;
    justify-content: flex-start;
  }
  .main-nav.open { transform: translateX(0); }

  /* En-tête du tiroir */
  .nav-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 0 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
  }
  .nav-header .brand-logo {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    font-size: 13px;
  }
  .nav-title {
    font-weight: 800;
    font-size: 15px;
    flex: 1;
    color: #fff;
  }
  .close-btn {
    background: rgba(255,255,255,0.15);
    border: 0;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }
  .close-btn:hover { background: rgba(255,255,255,0.25); }

  /* Liste des liens */
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 12px 0;
    flex-wrap: nowrap;
    flex: 1;
    width: 100%;
  }
  .nav-list > li {
    width: 100%;
    display: block;
    position: static;
  }

  /* Cacher le dropdown "Plus" sur mobile */
  .nav-list > li.nav-dropdown {
    display: none !important;
  }

  /* Afficher les items mobile */
  .nav-list > li.mobile-only {
    display: block !important;
  }

  .nav-list > li > a {
    display: flex;
    width: 100%;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    justify-content: flex-start;
    gap: 12px;
  }
  .nav-list > li > a .nav-ico {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
  }
  .nav-list > li > a .nav-label { flex: 1; }
  .nav-list > li > a:hover {
    background: var(--gray-100);
    color: var(--primary);
  }
  .nav-list > li > a.active {
    background: var(--primary);
    color: #fff;
  }

  /* Pied du tiroir */
  .nav-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 20px 20px;
    margin-top: auto;
    border-top: 1px solid var(--gray-100);
    flex-shrink: 0;
  }

  /* Hero */
  .hero { padding: 30px 0 35px; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 14px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item {
    padding: 16px 10px;
    border-bottom: 1px solid var(--gray-200);
  }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--gray-200); }

  /* Sections */
  .section { padding: 35px 0; }
  .section-header h2 { font-size: 19px; }

  /* Grilles */
  .events-grid { grid-template-columns: 1fr; gap: 14px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form { flex-direction: column; width: 100%; }
  .newsletter-form input { min-width: 100%; }
  .cta-inner { flex-direction: column; text-align: center; }
  .btn-white { width: 100%; text-align: center; }

  /* Tableaux → cartes */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr {
    margin-bottom: 15px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: #fff;
    padding: 8px 5px;
  }
  .data-table td {
    border: 0;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    text-align: right;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
  }

  /* Pages annexes */
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .orgs-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 20px; }
}

/* =========================================================
   7. RESPONSIVE — PETIT MOBILE
   ========================================================= */
@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .team-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .org-stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 18px; }
}

/* =========================================================
   8. HERO + RECHERCHE
   ========================================================= */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
  color: #fff;
  padding: 45px 0 55px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-content { max-width: 780px; }
.hero h1 {
  font-size: 38px;
  line-height: 1.15;
  margin-bottom: 12px;
  font-weight: 800;
}
.hero .accent { color: var(--accent); }
.hero-sub {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 22px;
  max-width: 600px;
}
.compact-search {
  display: flex;
  gap: 6px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  align-items: center;
  max-width: 700px;
}
.cs-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  min-width: 0;
}
.cs-icon { color: var(--gray-400); font-size: 16px; }
.cs-input input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 15px;
  background: transparent;
  min-width: 0;
}
.cs-filter-btn {
  background: var(--gray-100);
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}
.cs-submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.cs-submit:hover { background: var(--accent-dark); }
.adv-filters {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  margin-top: 8px;
}
.adv-filters.open {
  max-height: 300px;
  padding: 16px;
  margin-top: 12px;
}
.af-field { display: flex; flex-direction: column; gap: 4px; }
.af-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
}
.af-field select, .af-field input {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.hero-note { margin-top: 14px; font-size: 13px; opacity: 0.85; }
.hero-note strong { color: var(--accent); }

/* =========================================================
   9. STATS
   ========================================================= */
.stats-bar { background: #fff; border-bottom: 1px solid var(--gray-200); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item {
  padding: 22px 15px;
  text-align: center;
  border-right: 1px solid var(--gray-200);
}
.stat-item:last-child { border-right: 0; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 5px; }

/* =========================================================
   10. SECTIONS
   ========================================================= */
.section { padding: 50px 0; }
.section-alt { background: var(--white); }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}
.section-header.center { flex-direction: column; align-items: center; text-align: center; }
.section-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 3px; }
.section-header p { color: var(--gray-500); font-size: 14px; }
.link-more { color: var(--primary); font-weight: 700; font-size: 14px; }

/* =========================================================
   11. CATÉGORIES
   ========================================================= */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  transition: var(--transition);
}
.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cat-icon { font-size: 26px; margin-bottom: 6px; }
.cat-name { font-weight: 700; font-size: 13px; }
.cat-count { font-size: 11px; color: var(--gray-500); }

/* =========================================================
   12. EVENT CARDS
   ========================================================= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.event-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.event-image { position: relative; }
.event-image img { width: 100%; height: 175px; object-fit: cover; }
.event-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.event-urgent, .event-soldout {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.event-urgent { background: var(--accent); }
.event-soldout { background: var(--danger); }
.event-body { padding: 16px; display: flex; gap: 12px; }
.event-date-box {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  flex-shrink: 0;
}
.event-date-box .day { display: block; font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1; }
.event-date-box .month { font-size: 10px; color: var(--gray-500); font-weight: 700; }
.event-info { flex: 1; min-width: 0; }
.event-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-meta, .event-org { font-size: 12px; color: var(--gray-500); }
.event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.event-price { font-weight: 800; color: var(--primary); font-size: 14px; }

/* =========================================================
   13. CONTENT + SIDEBAR
   ========================================================= */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.sidebar-box {
  background: #fff;
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.sidebar-box h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.cities-list li a {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
}
.cities-list .count {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}
.cta-box h4 { color: #fff; }
.cta-box p { font-size: 13px; margin-bottom: 12px; }
.cta-box .btn-primary-sm { background: #fff; color: var(--primary); }

/* =========================================================
   14. ADS
   ========================================================= */
.ads-banner-strip {
  background: var(--gray-100);
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}
.ads-banner-strip .container { display: flex; gap: 15px; }
.ad-banner {
  position: relative;
  flex: 1;
  min-width: 280px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ad-banner img { width: 100%; height: 90px; object-fit: cover; }
.ad-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.ad-sidebar {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--gray-200);
}
.ad-sidebar img { width: 100%; height: 120px; object-fit: cover; }
.ad-sidebar-info { padding: 10px 12px; background: var(--gray-50); }

/* =========================================================
   15. EVENT DETAIL + BUY
   ========================================================= */
.event-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: start;
}
.event-banner img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
}
.event-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 20px;
}
.event-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.emg-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
}
.emg-icon { font-size: 22px; }
.emg-item strong {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.event-description {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  margin-bottom: 20px;
  line-height: 1.75;
}
.event-description h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }

.event-detail-buy { position: sticky; top: 90px; }
.buy-panel {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}
.buy-panel h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.buy-sub { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; }
.cat-selector { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
.cat-option {
  display: block;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  transition: var(--transition);
  background: #fff;
}
.cat-option:hover:not(.disabled) { border-color: var(--primary-light); }
.cat-option input[type="radio"] { display: none; }
.cat-option:has(input:checked) {
  border-color: var(--primary);
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(15,118,110,0.1);
}
.cat-option.disabled { opacity: 0.5; cursor: not-allowed; }
.cat-option-body { padding: 12px 14px; }
.cat-option-top { display: flex; justify-content: space-between; align-items: baseline; }
.cat-option-name { font-weight: 700; font-size: 14px; }
.cat-option-price { font-weight: 800; color: var(--primary); font-size: 15px; }
.cat-option-desc { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.cat-option-stock { display: flex; justify-content: space-between; font-size: 11px; margin-top: 6px; }
.stock-ok { color: var(--success); font-weight: 600; }
.stock-low { color: var(--accent-dark); font-weight: 700; }
.stock-out { color: var(--danger); font-weight: 700; }
.stock-max { color: var(--gray-500); }

.qty-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 10px;
  margin-bottom: 12px;
}
.qty-selector label { font-weight: 700; font-size: 13px; }
.qty-controls { display: flex; align-items: center; gap: 12px; }
.qty-controls button {
  width: 34px;
  height: 34px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.qty-controls button:hover {
  background: var(--primary);
  color: #fff;
}
.qty-controls span { font-weight: 800; font-size: 16px; min-width: 24px; text-align: center; }
.buy-total {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}
.total-row.final {
  border-top: 1px solid var(--gray-200);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 800;
}
.total-row.final span:last-child { color: var(--primary); font-size: 17px; }
.btn-buy-now {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.btn-buy-now:hover:not(:disabled) { background: var(--accent-dark); }
.btn-buy-now:disabled { background: var(--gray-300); cursor: not-allowed; }
.buy-note {
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

/* =========================================================
   16. CHECKOUT
   ========================================================= */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: start;
}
.checkout-header { margin-bottom: 25px; }
.step-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.checkout-header h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.checkout-header p { color: var(--gray-500); font-size: 14px; }
.checkout-form {
  background: #fff;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.form-group input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  background: var(--gray-50);
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.checkout-summary {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 90px;
}
.summary-event { display: flex; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-100); margin-bottom: 16px; }
.summary-event img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }
.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 2px solid var(--gray-200);
  font-weight: 800;
}
.summary-total strong { color: var(--primary); font-size: 20px; }
.summary-note {
  background: var(--gray-50);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 16px;
}

/* =========================================================
   17. TICKETS
   ========================================================= */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.ticket-card {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.ticket-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.ticket-header .code { font-family: monospace; font-weight: 700; color: var(--primary); font-size: 13px; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-valide { background: #dcfce7; color: #166534; }
.badge-utilise { background: #e5e7eb; color: #4b5563; }
.badge-annule { background: #fee2e2; color: #991b1b; }
.qr-container { text-align: center; margin: 14px 0; }
.qr-container img { max-width: 220px; margin: 0 auto; }

/* =========================================================
   18. AUTH
   ========================================================= */
.auth-container {
  max-width: 450px;
  margin: 30px auto;
  background: #fff;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.auth-container h1 { font-size: 24px; font-weight: 800; margin-bottom: 20px; text-align: center; }
.form-auth { display: flex; flex-direction: column; gap: 8px; }
.form-auth label { font-weight: 600; font-size: 13px; margin-top: 8px; }
.form-auth input {
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  background: var(--gray-50);
}
.form-auth button {
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  margin-top: 16px;
}

/* =========================================================
   19. ALERTS + EMPTY
   ========================================================= */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 15px 0;
  font-size: 14px;
}
.alert.error { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert.success { background: #dcfce7; color: #166534; border-left: 4px solid #16a34a; }
.alert.info { background: #dbeafe; color: #1e40af; border-left: 4px solid #2563eb; }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-300);
}
.empty-icon { font-size: 46px; margin-bottom: 12px; }

/* =========================================================
   20. CTA BAND
   ========================================================= */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  margin: 30px 0;
}
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; }
.cta-inner h2 { font-size: 22px; font-weight: 800; }
.btn-white {
  background: #fff;
  color: var(--primary);
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

/* =========================================================
   21. PAGE HEADER
   ========================================================= */
.page-header {
  background: linear-gradient(135deg, var(--dark), var(--primary-dark));
  color: #fff;
  padding: 40px 0;
  margin-bottom: 25px;
}
.page-header h1 { font-size: 28px; font-weight: 800; margin: 6px 0; }
.breadcrumb { font-size: 13px; opacity: 0.8; }
.breadcrumb a { color: #fff; }

/* =========================================================
   22. FOOTER
   ========================================================= */
.newsletter {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 40px 0;
}
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; gap: 25px; flex-wrap: wrap; }
.newsletter h3 { font-size: 20px; font-weight: 800; margin-bottom: 5px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input { padding: 13px 16px; border-radius: 10px; border: 0; min-width: 250px; }
.newsletter-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 50px 0 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 35px;
  margin-bottom: 35px;
}
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.footer-col p { font-size: 13px; line-height: 1.7; opacity: 0.8; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #cbd5e1; font-size: 13px; }
.footer-col a:hover { color: var(--accent); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payment-logos { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.payment-logos span {
  background: rgba(255,255,255,0.08);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  font-size: 12px;
  color: #94a3b8;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* =========================================================
   23. PRINT
   ========================================================= */
@media print {
  .topbar, .main-header, .ads-banner-strip,
  .newsletter, .site-footer, .no-print, .mobile-overlay {
    display: none !important;
  }
  body { background: #fff; }
  .ticket-card, .ticket { page-break-inside: avoid; }
}