
/* ====== VARIABLES & COULEURS ====== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light-gray: #f3f4f6;
    --text-primary: #1b4332;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
}

/* ====== RESET & TYPOGRAPHIE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #fefcf7 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background-color: #fefcf7 !important;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ====== NAVBAR ====== */
.navbar {
    background: #fefcf7 !important;
    background-color: #fefcf7 !important;
    border-bottom: 1px solid #7f22fe;
    padding: 0.25rem 0;
    margin: 0;
    width: 100%;
}

.navbar-light {
    background-color: #fefcf7 !important;
}

.bg-light {
    background-color: #fefcf7 !important;
}

nav.navbar {
    background: #fefcf7 !important;
    background-color: #fefcf7 !important;
}

.navbar .container-fluid {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.navbar-container {
    margin: 0;
    padding: 0 2rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #7f22fe !important;
    padding: 0.25rem 1rem !important;
    background-color: transparent;
}

.navbar-brand img {
    margin-right: 0.5rem;
    height: 35px;
    max-width: 100%;
    background-color: transparent;
}

.profile-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0.5rem 1.5rem !important;
    gap: 1rem;
    border-radius: 0.5rem;
    text-decoration: none !important;
    border: none;
    background: transparent;
    cursor: pointer;
}

.profile-link:hover {
    background-color: #f0f0f0;
}

.dropdown-menu {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.dropdown-item {
    color: #1b4332;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    color: #1b4332;
}

.dropdown-item i {
    width: 1.2rem;
    margin-right: 0.75rem;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #7f22fe;
    margin: 0;
    flex-shrink: 0;
}

.profile-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.3rem;
}

.profile-link i {
    font-size: 2rem;
    color: #ccc;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.profile-link .fa-chevron-down {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.profile-name {
    margin: 0;
    color: #1b4332;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.navbar-nav {
    display: flex;
    align-items: center !important;
    gap: 1rem;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    color: #1b4332 !important;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 0.5rem;
    padding: 0.25rem 0 !important;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    color: #7f22fe !important;
}

.navbar-toggler {
    border-color: #7f22fe;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%237f22fe' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ====== BOUTONS ====== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn {
    border-radius: 0.5rem;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Fond violet → transparent au hover */
.btn-violet {
    background-color: #7f22fe;
    color: white;
    border: 2px solid #7f22fe;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: inline-block;
}
.btn-violet:hover {
    background-color: transparent;
    color: #7f22fe;
    text-decoration: none;
}

/* Contour violet → fond violet au hover */
.btn-violet-outline {
    background-color: transparent;
    color: #7f22fe;
    border: 2px solid #7f22fe;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: inline-block;
}
.btn-violet-outline:hover {
    background-color: #7f22fe;
    color: white;
    text-decoration: none;
}



/* ====== FORMULAIRES ====== */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fefcf7 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ====== CARTES (CARDS) ====== */
.card {
    border: 0.5px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--light-gray);
    border-bottom: 0.5px solid var(--border-color);
    border-radius: 0.75rem 0.75rem 0 0;
    font-weight: 600;
}

/* ====== ALERTES ====== */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem;
}

.alert-success {
    background-color: #ede4ff;
    color: #4a0e8f;
    border-left: 4px solid #7f22fe;
}

.alert-danger {
    background-color: #fee2e2;
    color: #1b4332;
}

.alert-warning {
    background-color: #ede4ff;
    color: #4a0e8f;
    border-left: 4px solid #7f22fe;
}

.alert-info {
    background-color: #ede4ff;
    color: #4a0e8f;
    border-left: 4px solid #7f22fe;
}

/* ====== TABLES ====== */
.table {
    border-collapse: collapse;
}

.table thead th {
    background-color: var(--light-gray);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background-color: var(--light-gray);
}

/* ====== CONTENEUR ====== */
.container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl,
.container-fluid {
    padding: 0;
    margin: 0;
    width: 100%;
}

.container-fluid {
    padding: 0.5rem 1rem;
}

/* ====== FOOTER ====== */
footer {
    background-color: var(--light-gray);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* ====== BADGES ====== */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* ====== HERO SECTION ====== */
.hero-section {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d4c0 100%);
    padding: 4rem 0;
    margin: 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 3.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 50%;
}

.hero-content {
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #1b4332;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ====== BARRE DE RECHERCHE ====== */
.search-bar-container {
    background: #fefcf7;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-inputs {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
    align-items: center;
}

.search-field {
    flex: 1;
    min-width: 150px;
}

.search-field input,
.search-field select {
    width: 100%;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-search {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* ====== FORMULAIRE COMPLET DANS HERO ====== */
.search-form-complete {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.search-bar-container {
    background: #fefcf7;
    border-radius: 1rem;
    padding: 1.5rem 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: nowrap;
    width: fit-content;
}

.search-bar-container.advanced-filters-container {
    flex-wrap: wrap;
    align-items: center;
}

.search-inputs {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field input,
.search-field select {
    width: 100%;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.advanced-filters {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.form-check-input {
    cursor: pointer;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #fefcf7;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:hover {
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    color: #1b4332;
    font-weight: 500;
    margin-bottom: 0;
    white-space: nowrap;
}

.btn-search-large {
    background: #7f22fe !important;
    color: white !important;
    border: 2px solid #7f22fe !important;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin: 0 !important;
    height: auto;
    line-height: 1;
    align-self: center !important;
    vertical-align: middle !important;
}

.btn-search-large:hover {
    transform: none;
    box-shadow: none;
    background: #7f22fe !important;
}

/* ====== BOUTON LOGOUT ====== */
.btn-logout {
    background: #7f22fe !important;
    color: white !important;
    border: none !important;
    padding: 0.25rem 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none !important;
    align-self: center;
    margin-left: 0.5rem;
}

.btn-logout:hover {
    background: #7f22fe !important;
    text-decoration: none !important;
}
.advanced-filters-panel {
    animation: slideDown 0.3s ease-out forwards;
    max-height: 0;
    overflow: hidden;
}

.advanced-filters-panel.show {
    max-height: 500px;
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

.advanced-filters-panel.hide {
    animation: slideUp 0.3s ease-out forwards;
}

#toggleFilters {
    transition: all 0.3s ease;
}

#toggleFilters:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

#toggleFilters.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        max-width: 100%;
    }
    
    .search-form-complete {
        gap: 0.75rem;
    }
    
    .search-inputs {
        flex-direction: column;
    }
    
    .date-inputs {
        flex-direction: column;
    }
    
    .date-inputs .align-self-center {
        display: none;
    }
    
    .advanced-filters {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-check-inline {
        display: block !important;
        margin-bottom: 0.5rem;
    }
    
    .btn-search-large {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .search-bar-container {
        padding: 1rem;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .hero-section {
        min-height: auto !important;
        padding: 1.5rem 1rem;
    }

    .hero-content {
        padding: 0 0.5rem;
    }

    .navbar .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .notification-dropdown,
    #bell-dropdown-menu {
        min-width: auto !important;
        width: 90vw !important;
        max-width: 350px !important;
        right: -1rem !important;
    }

    .event-card {
        height: auto !important;
    }

    .event-image-wrapper {
        height: 180px !important;
    }

    .card-body {
        height: auto !important;
    }

    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 1rem 0.5rem !important;
    }
}

/* ====== NOTIFICATION STYLES ====== */
#notification-bell {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: #7f22fe;
}

#notification-bell:hover {
    color: #7f22fe !important;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.notification-header h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f3f4f6;
}

.notification-item.read {
    opacity: 0.5;
}

.notification-content {
    flex: 1;
    margin-right: 0.5rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-mark-read {
    background: none;
    border: none;
    color: #7f22fe;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.btn-mark-read:hover {
    color: #5b16d0;
}

#notification-badge {
    font-size: 0.65rem;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 5px;
    text-align: center;
}
