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

html,
body {
    /* Ensure they can take up at least the viewport height if needed */
    /* but allow content to make them taller */
    min-height: 100%;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
    padding-bottom: 70px;
    /* Adjust this value based on the actual height of your sticky footer */
    /* If your footer's height is around 50px, add a bit extra for good measure */
}

.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
    /* This is already present, but ensure it's enough. */
    /* If your footer is, say, 60px tall, this 100px should be enough. */
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #fff;
    padding: 1rem 2rem;
    margin: 0 -20px;
    /* retire le padding du body */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
}

/* Logo */
.navbar__logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FF385C;
    text-decoration: none;
}

/* Liens - version desktop (affichés en ligne) */
.navbar__links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

/* Liens - style */
.navbar__links li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.navbar__links li a:hover {
    color: #FF385C;
}

/* ===== Ajout Mobile (Navbar) ===== */

/* Cacher les liens par défaut sur mobile */
@media (max-width: 767px) {
    .navbar__links {
        display: none;
        position: absolute;
        top: 100%;
        right: 2rem;
        background-color: #fff;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        width: 180px;
    }

    /* Afficher le menu quand .active sur navbar */
    .navbar.active .navbar__links {
        display: flex;
    }

    /* Burger visible */
    .navbar__toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1000;
    }

    .navbar__toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #FF385C;
        border-radius: 2px;
        transition: 0.3s;
    }

    /* Animation burger quand actif */
    .navbar.active .navbar__toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .navbar.active .navbar__toggle span:nth-child(2) {
        opacity: 0;
    }

    .navbar.active .navbar__toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Cacher burger sur desktop */
@media (min-width: 768px) {
    .navbar__toggle {
        display: none;
    }

    .navbar__links {
        position: static;
        display: flex !important;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
        width: auto;
    }
}


/* ===== HERO & SEARCH ===== */
.hero {
    background: linear-gradient(135deg, #ff5a5f, #fc642d);
    color: white;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(252, 100, 45, 0.4);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Formulaire recherche */
.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-form input[type="search"],
.search-form select {
    flex: 1 1 200px;
    padding: 12px 16px;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    outline-offset: 3px;
    outline-color: #ff5a5f;
    transition: box-shadow 0.3s ease;
}

.search-form input[type="search"]:focus,
.search-form select:focus {
    box-shadow: 0 0 6px 2px rgba(255, 90, 95, 0.6);
}

.search-form button {
    background-color: #fff;
    color: #ff5a5f;
    border: none;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.search-form button:hover {
    background-color: #ff5a5f;
    color: white;
}

/* ===== EVENT GRID (Default for Desktop) ===== */
.event-list-wrapper {
    /* No overflow-x by default, as we want grid on desktop */
    padding: 0 10px;
    /* Adjust padding as needed */
}

.event-slider {
    /* Default to grid for desktop */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    /* Remove slider specific properties for desktop */
    flex-wrap: wrap;
    /* Ensure items wrap in grid */
    overflow-x: visible;
    /* No horizontal scroll on desktop */
    scroll-snap-type: none;
}

/* ===== EVENT CARD ===== */
.event-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.event-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid #ff5a5f;
}

.event-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-info h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #222;
}

.event-info p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 8px;
}

/* Créateur dans la carte événement */
.creator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.creator img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff5a5f;
}

.creator span {
    font-size: 0.9rem;
    color: #777;
}

/* Bouton voir plus */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #ff5a5f;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #fc3f49;
}

/* Catégories d'événements dans le header */
.event-categories {
    margin-top: 20px;
    text-align: center;
}

.event-categories h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: white;
}

.event-categories ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.event-categories ul li a {
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.event-categories ul li a:hover {
    background: white;
    color: #ff5a5f;
}

/* Message pas de résultat */
.no-results {
    text-align: center;
    font-size: 1.2rem;
    color: #999;
    padding: 40px 0;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9rem;
    color: #999;
}

/* ===== Responsive small ===== */
@media (max-width: 480px) {
    .search-form {
        flex-direction: column;
    }

    .search-form input[type="search"],
    .search-form select,
    .search-form button {
        flex: 1 1 100%;
    }
}


/* Mobile slider */
@media (max-width: 768px) {
    .event-list-wrapper {
        overflow-x: auto;
        padding-left: 10px;
        padding-right: 10px;
    }

    .event-slider {
        display: flex;
        gap: 16px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .event-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }
}

/* ========== Footer Sticky ========== */
footer.footer-sticky {
    position: fixed;
    /* This is correct for sticking to the bottom */
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* Ensure it spans the full width */
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    text-align: center;
    padding: 12px 0;
    /* Adjust padding as needed */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.footer-sticky button {
    margin: 0 10px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    /* Example: add a default button style */
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.footer-sticky button:hover {
    background-color: #0056b3;
}

.footer-sticky p {
    margin-top: 10px;
    /* Space between buttons and copyright text */
    color: #666;
}