/* ============================================================
   THIÈS EVENT — Feuille de Style Principale
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --primary:      #7b2d8b;
    --primary-dark: #5c2069;
    --primary-light:#a04bb5;
    --secondary:    #f97316;
    --accent:       #f59e0b;
    --success:      #22c55e;
    --danger:       #ef4444;
    --dark:         #1e293b;
    --body-bg:      #f1f5f9;
    --card-bg:      #ffffff;
    --text-muted:   #64748b;
    --border:       #e2e8f0;
    --shadow:       0 4px 24px rgba(0,0,0,.07);
    --shadow-lg:    0 8px 40px rgba(0,0,0,.12);
    --radius:       12px;
    --radius-lg:    18px;
    --transition:   .25s ease;
    --font:         'Poppins', sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--body-bg);
    color: var(--dark);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; }
.x-small { font-size: .7rem; }

/* ---------- Navbar ---------- */
#mainNavbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 2px 20px rgba(123,45,139,.3);
    padding: .8rem 0;
}
.brand-icon {
    background: rgba(255,255,255,.15);
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: #fff;
}
.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
}
.navbar-nav .nav-link {
    font-size: .9rem;
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: 8px;
    transition: background var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { background: rgba(255,255,255,.15); color: #fff !important; }
.btn-primary-outline-nav {
    border: 2px solid rgba(255,255,255,.6);
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    color: #fff !important;
    transition: all var(--transition);
}
.btn-primary-outline-nav:hover {
    background: #fff;
    color: var(--primary) !important;
}
.avatar-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.avatar-circle.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.dropdown-menu {
    border-radius: var(--radius);
    font-size: .9rem;
    min-width: 230px;
}
.dropdown-item { padding: .5rem 1rem; border-radius: 6px; transition: background var(--transition); }
.dropdown-item:hover { background: #f8f5ff; color: var(--primary); }

/* ---------- Hero Section ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #9d4ede 100%);
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-title   { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; }
.hero-subtitle{ font-size: 1.1rem; opacity: .85; max-width: 540px; }
.hero-search  {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}
.hero-search .form-control {
    border: none; border-radius: 10px;
    padding: .75rem 1rem; font-family: var(--font);
    background: rgba(255,255,255,.92);
}
.hero-search .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,.3);
}
.hero-search .btn-search {
    background: var(--secondary);
    border: none; color: #fff;
    padding: .75rem 1.5rem; border-radius: 10px;
    font-weight: 600;
    transition: background var(--transition);
}
.hero-search .btn-search:hover { background: #ea6c0a; }
.hero-stats    { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat     { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; display: block; }
.hero-stat-lbl { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .8px; }

/* ---------- Section Titles ---------- */
.section-title {
    font-size: 1.75rem; font-weight: 700; color: var(--dark);
    position: relative; padding-bottom: .75rem; margin-bottom: 2rem;
}
.section-title::after {
    content: ''; position: absolute;
    bottom: 0; left: 0;
    width: 50px; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

/* ---------- Event Card ---------- */
.event-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
    display: flex; flex-direction: column;
    border: 1px solid var(--border);
}
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.event-card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}
.event-card-img-placeholder {
    height: 200px;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
}
.event-card-body   { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.event-card-cat    { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; margin-bottom: .5rem; }
.event-card-title  { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; color: var(--dark); line-height: 1.3; }
.event-card-title a:hover { color: var(--primary); }
.event-card-meta   { font-size: .82rem; color: var(--text-muted); margin-bottom: .25rem; }
.event-card-footer {
    padding: 1rem 1.25rem;
    background: #fafafa;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.event-price       { font-size: 1rem; font-weight: 700; color: var(--primary); }
.event-price.free  { color: var(--success); }
.badge { font-size: .72rem; font-weight: 600; padding: .35em .65em; border-radius: 6px; }

/* ---------- Category Pill ---------- */
.cat-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: .85rem; font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
    border-color: var(--primary);
    background: #f8f5ff; color: var(--primary);
}
.cat-pill i { font-size: 1rem; }

/* ---------- Featured Badge ---------- */
.featured-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--secondary);
    color: #fff;
    font-size: .7rem; font-weight: 700;
    padding: .3rem .7rem; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .8px;
}
.event-card-wrapper { position: relative; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none; color: #fff; font-weight: 600;
    border-radius: 10px; padding: .65rem 1.5rem;
    transition: all var(--transition);
    font-family: var(--font);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); border: none; color: #fff; font-weight: 600; border-radius: 10px; }
.btn-secondary:hover { background: #ea6c0a; color: #fff; }
.btn-outline-primary { border: 2px solid var(--primary); color: var(--primary); font-weight: 600; border-radius: 10px; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-link { color: var(--primary); font-weight: 500; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; border-radius: 8px; }

/* ---------- Page Header (breadcrumb area) ---------- */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; padding: 40px 0 35px;
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin: 0; }
.page-header .breadcrumb { background: none; padding: 0; margin: .5rem 0 0; }
.page-header .breadcrumb-item { color: rgba(255,255,255,.75); font-size: .85rem; }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,.55); }
.page-header .breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-header .breadcrumb-item a { color: rgba(255,255,255,.85); }

/* ---------- Form / Auth Cards ---------- */
.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    max-width: 480px;
    margin: 0 auto;
}
.form-control, .form-select {
    border-radius: 10px; border: 1.5px solid var(--border);
    font-family: var(--font); font-size: .9rem;
    padding: .65rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123,45,139,.12);
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: .4rem; }
.input-group-text { border-radius: 10px 0 0 10px; border: 1.5px solid var(--border); background: #f8f5ff; color: var(--primary); }

/* ---------- Ticket Booking ---------- */
.ticket-type-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--card-bg);
}
.ticket-type-card:hover, .ticket-type-card.selected {
    border-color: var(--primary);
    background: #f8f5ff;
}
.ticket-qty-input {
    width: 80px;
    text-align: center;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    padding: .4rem .5rem;
    font-size: .95rem;
    font-weight: 600;
}

/* ---------- Billet (Ticket) Display ---------- */
.billet-card {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.billet-card::after {
    content: '';
    position: absolute;
    right: 210px; top: 0; bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,.3) 0, rgba(255,255,255,.3) 10px, transparent 10px, transparent 20px);
}
.billet-main   { padding: 1.75rem; }
.billet-ticket { background: rgba(255,255,255,.08); padding: 1.1rem; width: 210px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; }
.billet-code   { font-family: 'Courier New', monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: .15em; background: rgba(255,255,255,.15); padding: .4rem .8rem; border-radius: 8px; }
.billet-card.used   { filter: grayscale(.6); opacity: .8; }
.billet-card.annule { filter: grayscale(1); opacity: .7; }

/* ---------- Admin Layout ---------- */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 76px);
}
.admin-sidebar {
    width: 260px;
    min-height: calc(100vh - 76px);
    background: var(--dark);
    display: flex; flex-direction: column;
    flex-shrink:0;
    position: sticky; top: 76px;
    height: calc(100vh - 76px);
    overflow-y: auto;
}
.sidebar-header {
    padding: 1.25rem 1.25rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand {
    display: flex; align-items: center; gap: .75rem;
    color: #fff; text-decoration: none;
    font-weight: 700; font-size: 1rem;
}
.sidebar-brand i { background: var(--primary); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.sidebar-nav { flex: 1; padding: .5rem; }
.sidebar-section-label { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.35); padding: .75rem 1rem .25rem; font-weight: 600; }
.sidebar-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1rem; border-radius: 8px;
    color: rgba(255,255,255,.7); font-size: .88rem; font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    margin-bottom: 2px;
}
.sidebar-item i { width: 18px; text-align: center; }
.sidebar-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-item.active { background: var(--primary); color: #fff; }
.sidebar-item.text-danger-soft { color: rgba(239,68,68,.8); }
.sidebar-item.text-danger-soft:hover { background: rgba(239,68,68,.12); color: #ef4444; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); }
.admin-main { flex: 1; padding: 2rem; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.admin-topbar h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }

/* ---------- Stat Cards ---------- */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 1.25rem;
}
.stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.stat-label { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat-change { font-size: .78rem; font-weight: 600; }

/* ---------- Table ---------- */
.table-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.table-card .card-header {
    background: #fafafa; border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600; font-size: .95rem;
    display: flex; align-items: center; justify-content: space-between;
}
.table { margin: 0; font-size: .875rem; }
.table thead th {
    background: #f8fafc; border-bottom: 2px solid var(--border);
    font-weight: 600; font-size: .78rem; text-transform: uppercase;
    letter-spacing: .6px; color: var(--text-muted); padding: .85rem 1rem;
    white-space: nowrap;
}
.table tbody td { padding: .85rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafbff; }

/* ---------- Misc Utilities ---------- */
.card { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-header { background: #fafafa; border-bottom: 1px solid var(--border); font-weight: 600; }
.alert { border-radius: var(--radius); border: none; font-size: .9rem; }
.alert-success { background: #f0fdf4; color: #15803d; }
.alert-danger   { background: #fef2f2; color: #b91c1c; }
.alert-warning  { background: #fffbeb; color: #92400e; }
.alert-info     { background: #eff6ff; color: #1e40af; }
.progress { border-radius: 50px; background: #e2e8f0; }
.progress-bar { border-radius: 50px; }
.section-pad { padding: 70px 0; }
.section-pad-sm { padding: 40px 0; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background: var(--primary) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

/* ---------- Footer ---------- */
.footer { margin-top: auto; }
.footer-top {
    background: #0f172a;
    color: rgba(255,255,255,.75);
    padding: 50px 0 40px;
}
.footer-brand { font-size: 1.25rem; font-weight: 700; color: #fff; }
.brand-icon-footer {
    background: var(--primary);
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .9rem;
}
.footer-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; font-size: .85rem; }
.footer-links a { color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.social-link {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.7); font-size: .85rem;
    transition: all var(--transition);
}
.social-link:hover { background: var(--primary); color: #fff; }
.footer-bottom {
    background: #0a0f1a;
    color: rgba(255,255,255,.5);
    padding: 1rem 0;
}

/* ---------- Page-specific ---------- */
.event-detail-hero {
    background: linear-gradient(to right, rgba(30,41,59,.95), rgba(30,41,59,.6));
    position: relative;
    min-height: 360px;
    display: flex; align-items: flex-end;
    padding: 2rem 0;
    color: #fff;
}
.event-detail-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    z-index: -1; filter: brightness(.45);
}
.info-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
}
.info-row { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .85rem; font-size: .9rem; }
.info-row i { width: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ---------- Skeleton Loader ---------- */
@keyframes shimmer { 0%{background-position:-1000px 0} 100%{background-position:1000px 0} }
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; min-height: auto; }
}
@media (max-width: 576px) {
    .hero { padding: 60px 0 50px; }
    .hero-title { font-size: 1.75rem; }
    .billet-card::after { display: none; }
    .billet-ticket { width: auto; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity:0; transform:translateY(20px); }
    to   { opacity:1; transform:translateY(0); }
}
.fade-in-up { animation: fadeInUp .4s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ---------- Print (billets) ---------- */
@media print {
    #mainNavbar, .footer, .no-print { display: none !important; }
    .billet-card { box-shadow: none; border: 2px solid #ccc; }
    body { background: #fff; }
}
