/* Styles de base pour le corps de la page */
body {
    position: relative;
    color: #2D2D2D; /* Texte principal */
    background-color: #F8F9FA; /* Arrière-plan neutre */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Effet de flou et d'obscurcissement pour le fond */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    backdrop-filter: blur(5px);
}

/* Styles pour la vidéo de fond */
#background-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto; 
    height: auto;
    z-index: -2;
    object-fit: cover;
    filter: blur(5px) brightness(0.7);
    transition: opacity 1s ease-in-out;
}

/* Styles pour l'en-tête */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #2C3E50; 
    color: white;
}

/* Styles pour le logo */
.logo img {
    max-height: 50px;
}

/* Styles pour la navigation */
nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: #27AE60;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
}

nav a i {
    color: #F5AA20; /* Changer la couleur des icônes en jaune moutarde */
}

nav a:hover {
    color: #2D2D2D;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #F5AA20;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease-in-out;
}

nav a:hover::after {
    width: 100%;
}

/* Styles pour le menu burger */
.burger {
    display: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    top: 10px;
    left: 10px;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.burger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active div:nth-child(2) {
    opacity: 0;
}

.burger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Styles pour le menu mobile */
.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: white;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-align: left;
    overflow-y: auto;
    box-sizing: border-box;
    transition: left 0.3s ease;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
}

/* Styles pour le contenu principal */
main {
    text-align: center;
    padding: 100px 20px;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

main h1,
main p,
main .btn,
main .incentive {
    opacity: 1;
    transform: none;
    animation: none;
}

.signup-banner h2,
.signup-banner p,
.signup-banner .btn {
    animation: none;
}

/* Animations */
@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Styles pour les écrans de petite taille */
@media screen and (max-width: 768px) {
    nav {
        display: none; /* Masquer le menu de navigation */
    }
    
    .burger {
        display: block; /* Afficher le menu burger */
    }

    .mobile-menu {
        display: none; /* Masquer le menu mobile par défaut */
    }

    .mobile-menu.active {
        display: block; /* Afficher le menu mobile lorsqu'il est actif */
    }

    .search-bar {
        position: absolute;
        top: 10px;
        right: 10px;
        width: calc(100% - 40px);
    }

    .banner-container {
        flex-direction: column;
    }
    .frosted-glass {
        order: 1;
    }
    .signup-banner {
        order: 2;
    }

    .annonces-container {
        grid-template-columns: 1fr; /* Affichage en grille d'une seule colonne */
    }
}

@media screen and (max-width: 480px) {
    .annonces-container {
        grid-template-columns: 1fr !important; /* Une seule colonne pour smartphone */
    }

    footer {
        position: relative;
        bottom: auto;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Styles pour les boutons */
.btn {
    padding: 10px 20px;
    color: white;
    background-color: #E67E22; /* Boutons d’action en orange vif */
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: #27AE60; /* Accent lors du survol (vert) */
    transform: translateY(-2px); /* Animation de survol discrète */
}

.btn-full-width {
    display: inline-block;
    width: 100%;
    max-width: 250px; /* Ajustez cette valeur selon vos besoins */
    text-align: center;
}

/* Styles pour le pied de page */
footer {
    background-color: #2C3E50; 
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    opacity: 0; /* Masqué par défaut */
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Classe pour rendre le footer visible après défilement */
footer.footer-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Styles pour les incitations */
.incentive {
    text-align: left;
    margin: 20px 0;
    color: #7B83C4;
    font-size: 1.2em;
}

.incentive strong {
    color: #F5AA20;
}

/* Styles pour les modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Ajout de la transition pour l'animation de lévitation */
}

.modal h1 {
    margin: 0;
    color: #4A4F75;
    text-align: center;
}

.modal button.close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.modal input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.modal button.submit {
    padding: 10px;
    background-color: #E67E22; /* Boutons d’action en orange vif */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal button.submit:hover {
    background-color: #27AE60; /* Accent lors du survol (vert) */
}

.modal .incentive {
    text-align: center;
}

/* Styles pour les éléments du carrousel */
.carousel-item {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: black; /* Ajout de cette ligne pour le texte noir */
}

.modal:hover {
    transform: translateY(-10px); /* Animation de lévitation */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); /* Ombre plus prononcée lors du survol */
}

/* Styles pour les formulaires */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form label {
    font-weight: bold;
}

form input[type="text"],
form input[type="number"],
form textarea {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form input[type="file"] {
    padding: 10px;
    font-size: 1em;
}

form button {
    padding: 10px;
    background-color: #E67E22; /* Boutons d’action en orange vif */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #27AE60; /* Accent lors du survol (vert) */
}

/* Styles pour les menus déroulants */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: transparent;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    width: 100%; /* Assure que la liste prend toute la largeur du parent */
    box-sizing: border-box; /* Inclut le padding et la bordure dans la largeur totale */
}

.dropdown-content a {
    color: #27AE60;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Styles pour les menus utilisateur */
.user-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #F5AA20;
    border-radius: 5px;
    text-align: center;
}

.user-menu li {
    padding: 10px;
    text-align: center;
    color: black;
}

.user-menu li a {
    color: #27AE60;
    text-decoration: none;
}

.user-menu li a:hover {
    color: #2D2D2D;
}

/* Styles pour le bouton de déconnexion */
.btn-logout {
    background-color: #F5AA20;
    color: white;
    border-radius: 5px;
    padding: 10px 20px;
    text-align: center;
    display: block;
    margin-top: 10px;
    transition: background-color 0.3s ease;
    width: 100%; /* Assure que le bouton prend toute la largeur du parent */
    box-sizing: border-box; /* Inclut le padding et la bordure dans la largeur totale */
}

.btn-logout:hover {
    background-color: #4A4F75;
}

/* Styles pour les prix cachés */
.price-hidden {
    color: #333;
    font-size: 1em;
    margin-top: 10px;
}

/* Styles pour le carrousel */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-items {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.carousel-item {
    min-width: 280px;
    scroll-snap-align: start;
    margin-right: 20px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Styles pour les conteneurs de listes */
.listings-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.listing {
    background-color: white; /* Ajouté pour un fond blanc */
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 20px);
    box-sizing: border-box;
}

.listing img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.listing h3 {
    margin: 10px 0 5px;
    font-size: 1.2em;
}

.listing p {
    margin: 0;
    color: #333;
}

/* Styles pour la barre de recherche */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 25px; /* Coins plus arrondis */
    overflow: hidden; /* Pour que le bouton soit à l'intérieur de la barre */
}

.search-bar input {
    padding: 10px;
    border: none;
    border-radius: 0; /* Supprimer les coins arrondis individuels */
    font-size: 1em;
    flex: 1; /* Prendre tout l'espace disponible */
}

.search-bar button {
    padding: 10px;
    background-color: #F5AA20;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* Supprimer les coins arrondis individuels */
}

.search-bar button:hover {
    background-color: #4A4F75;
}

/* Styles pour les formulaires de connexion et d'inscription */
.form-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
}

.form-container h1 {
    color: #4A4F75;
    text-align: center;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-container input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-container button {
    padding: 10px;
    background-color: #E67E22; /* Boutons d’action en orange vif */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-container button:hover {
    background-color: #27AE60; /* Accent lors du survol (vert) */
}

.form-container .register-option,
.form-container .login-option {
    text-align: center;
    margin-top: 10px;
}

.form-container .register-option a,
.form-container .login-option a {
    color: #27AE60;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.form-container .register-option a:hover,
.form-container .login-option a:hover {
    color: #2D2D2D;
}

.frosted-glass {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.frosted-glass .grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgAB/eblPAAAAABJRU5ErkJggg==') repeat;
    opacity: 0.2;
    pointer-events: none;
    border-radius: 15px;
}

.signup-banner {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    border-radius: 15px;
}

/* Styles pour la section d'annonces */
.annonces-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

/* Modification temporaire pour afficher les annonces dès le chargement */
.annonce-card {
    background-color: #fff !important; /* Fond forcé en blanc */
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1; /* anciennement: 0 */
    transform: none; /* anciennement: translateY(20px) */
    transition: none; /* supprimer la transition pour test */
    color: #333; /* Ajouté pour rendre le texte visible */
}

.annonce-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}