/* ===================================
   VARIABLES & BASE STYLES
   =================================== */
:root {
    --primary-color: #283583;
    --secondary-color: #5C6975;
    --accent-color: #4F46E5;
    --text-dark: #1F2937;
    --text-medium: #6B7280;
    --text-light: #9CA3AF;
    --border-light: #E5E7EB;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   HEADER & SEARCH SECTION
   =================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e2870 100%);
    padding: 3rem 0 4rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    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");
    opacity: 0.4;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: -2rem;
    position: relative;
    z-index: 10;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.filter-separator {
    color: var(--border-light);
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
}

.filter-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.filter-tag-industry {
    background: white;
    border: 2px solid var(--border-light);
}

.filter-tag-industry:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.filter-tag-industry.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ===================================
   SPONSORS SECTIONS
   =================================== */
.sponsor-block {
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out;
}

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

.sponsor-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-dark);
}

.sponsor-title::before {
    content: '';
    width: 4px;
    height: 32px;
    border-radius: 2px;
}

.sponsor-title.sponsor-elite::before {
    background: linear-gradient(180deg, #FFD700, #FFA500);
}

.sponsor-title.sponsor-diamond::before {
    background: linear-gradient(180deg, #B9F2FF, #00BFFF);
}

.sponsor-title.sponsor-platinum::before {
    background: linear-gradient(180deg, #E5E4E2, #A8A9AD);
}

.sponsor-title.sponsor-gold::before {
    background: linear-gradient(180deg, #FFD700, #DAA520);
}

.sponsor-title.sponsor-silver::before {
    background: linear-gradient(180deg, #C0C0C0, #A8A9AD);
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.sponsor-card-wrapper {
    height: 100%;
}

.sponsor-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.sponsor-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.sponsor-card.clickable-card {
    cursor: pointer;
}

.sponsor-card.clickable-card::after {
    content: '👁️ View details';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(79, 70, 229, 0.95), rgba(79, 70, 229, 0));
    color: white;
    padding: 1.5rem 0.5rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0;
    transform: translateY(100%);
    transition: var(--transition);
}

.sponsor-card.clickable-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.sponsor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.sponsor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.sponsor-card:hover::before {
    transform: scaleX(1);
}

.sponsor-logo {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.sponsor-logo a {
    display: inline-block;
}

.sponsor-logo a.external-link {
    pointer-events: auto;
}

.sponsor-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    transition: var(--transition);
}

.sponsor-card:hover .sponsor-logo img {
    transform: scale(1.05);
}

.sponsor-card-link:hover .sponsor-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.sponsor-card-link:hover .sponsor-card::before {
    transform: scaleX(1);
}

.sponsor-logo span {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-dark);
}

.sponsor-booth {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
}

.sponsor-booth b {
    color: var(--primary-color);
    font-weight: 700;
}

.sponsor-booth img {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: var(--transition);
}

.sponsor-booth:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* ===================================
   EXHIBITORS LIST
   =================================== */
#exhibitors {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: 3rem;
}

#exhibitors .col-12.mb-3 {
    margin-bottom: 2rem !important;
}

#exhibitors .align-items-center {
    font-size: 2rem !important;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0 !important;
}

.exhibitor-letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    padding: 0.75rem 0;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
}

.exhibitor-name {
    display: block;
    padding: 0.625rem 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.exhibitor-name:hover {
    background: var(--bg-light);
    color: var(--accent-color);
    padding-left: 1rem;
}

/* ===================================
   COMPANY DETAIL PANEL (remplace le modal)
   =================================== */
.tag-filter-alert {
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow-md);
}

.tag-filter-alert .btn-outline-primary {
    border-radius: 2rem;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.company-detail-panel {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin-bottom: 3rem;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    position: relative;
}

.company-detail-container {
    position: relative;
}

.close-detail-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-light);
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    font-size: 1.25rem;
}

.close-detail-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: rotate(90deg);
}

.company-detail-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e2870 100%);
    padding: 3rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.company-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.company-logo-large {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    display: inline-block;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.company-logo-large img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.company-booth-info {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.booth-label {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.booth-number {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.company-detail-body {
    padding: 2.5rem;
}

.company-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 2rem;
    text-align: justify;
}

.company-website {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.company-website i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

.company-website a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.company-website a:hover {
    color: var(--accent-color);
}

.company-tags {
    margin-bottom: 1.5rem;
}

.company-tags strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-medium);
    transition: var(--transition);
    cursor: pointer;
}

.company-tag:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.company-socials {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.company-socials strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.socials-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    color: var(--text-medium);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.25rem;
}

.social-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px) scale(1.05);
}

.company-detail-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.company-detail-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    border-color: var(--accent-color);
    border-right-color: transparent;
}

/* ===================================
   LOADING SPINNER
   =================================== */
#loading-spinner {
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.9);
}

#loading-spinner .spinner-border {
    border-color: var(--accent-color);
    border-right-color: transparent;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .sponsor-grid {
        grid-template-columns: 1fr;
    }

    .search-filters {
        margin-top: -1rem;
    }

    .filter-tags {
        justify-content: center;
    }

    #exhibitors {
        padding: 2rem 1rem;
    }

    .company-detail-header {
        padding: 2rem 1rem 1.5rem;
    }

    .company-detail-body {
        padding: 1.5rem;
    }

    .company-logo-large {
        padding: 1.5rem;
        min-width: 150px;
        min-height: 100px;
    }

    .company-logo-large img {
        max-height: 80px;
    }

    .close-detail-btn {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Skeleton base */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e6e6e6 37%,
        #f0f0f0 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Skeleton layout */
.skeleton-card {
    height: 140px;
    margin-bottom: 20px;
}

.skeleton-title {
    height: 28px;
    width: 240px;
    margin-bottom: 30px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}


@media (min-width: 769px) and (max-width: 1024px) {
    .sponsor-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.sponsor-card:focus,
.exhibitor-name:focus,
.filter-tag:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


html.drawer-open,
body.drawer-open {
    overflow: hidden !important;
    height: 100%;
}

/* Overlay */
.drawer-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.drawer-overlay.active{
    opacity: 1;
    pointer-events: auto;
}

/* Drawer */
.drawer {
    position: fixed;

    left: 0;
    right: 0;
    top: 2vh;
    bottom: auto;

    margin: 0 auto;
    width: 100%;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 18px;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);

    display: flex;
    flex-direction: column;

    transform: translateY(120%);
    transition: transform .35s ease;
}


.drawer.active{
    transform: translateY(0);
}

/* Mobile full height */
@media (max-width: 768px) {
    .drawer {
        top: 0;
        height: 100vh;
        max-width: none;
        border-radius: 0;
    }
}

.drawer-handle{
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 10px auto;
}

.drawer-close{
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

#drawer-content{
    padding: 24px;
    overflow-y: auto;
    height: 100%;
}

.hidden{ display:none; }
