/* Global Styles */
body {
    font-family: 'Cinzel Decorative', serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(131deg, #241029, #440F67, #A51760); /* Gradient subtil et raffiné */
    background-size: 400% 400%;
    color: #F6F1F5;
    overflow-x: hidden;
    position: relative;
    animation: gradientShift 12s ease-in-out infinite, fadeIn 4s ease-out;
    height: 100vh; /* Full viewport height */
    background-attachment: fixed; /* Keep the background fixed during scroll */
    overflow-y: scroll; /* Add scroll bar if content exceeds viewport height */
    box-sizing: border-box; /* Prevent padding from affecting layout */
}

/* Keyframes for background gradient shift */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* Header */
header {
    text-align: center;
    background-color: #241029; /* Fond plus sombre avec un effet de brume */
    background-image: radial-gradient(circle, #1C1C1C 20%, #FFFFFF1 80%); /* Gradient lumineux central */
    padding: 80px 0; /* Un padding encore plus grand pour un effet spacieux */
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); /* Ombre marquée pour la profondeur */
    font-family: 'Cinzel', serif; /* Police élégante et gothique */
    color: #F6F1F5; /* Texte presque blanc pour un meilleur contraste */
    overflow: hidden;
    animation: fadeInHeader 2s ease-out; /* Animation de fondu en entrée */
}

/* Animation de fondu du header */
@keyframes fadeInHeader {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Effet de particules autour du header */
header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 10%, rgba(255, 255, 255, 0) 70%);
    animation: sparkleEffect 4s infinite;
    z-index: -1;
    transform: translate(-50%, -50%);
}

/* Animation d'éclat lumineux */
@keyframes sparkleEffect {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}


/* Effet de texte clignotant et lumineux pour le titre */
header h1 {
    font-size: 4rem;
    font-weight: 700;
    background-image: linear-gradient(135deg, #F4B71B, #D75042);
    -webkit-background-clip: text; /* Applique le dégradé au texte */
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 0, 255, 0.5);
}

/* Animation du texte lumineux */
@keyframes glowText {
    0% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 0, 255, 0.5);
        color: transparent;
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.9), 0 0 50px rgba(255, 0, 255, 0.7);
        color: rgba(255, 255, 255, 0.9);
    }
    100% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 0, 255, 0.5);
        color: transparent;
    }
}


/* Ajout d'un ciel étoilé en arrière-plan */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    opacity: 0.4;
    z-index: -1;
}

/* Title Styling */
h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    background-image: linear-gradient(135deg, #2F0D7A, #F4B71B);
    -webkit-background-clip: text;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.6);
    animation: bounceIn 1.5s ease-out;
    position: relative;
}


/* Animation de rebond du titre */
@keyframes bounceIn {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Filters Section */
.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 50px auto;
    padding: 20px;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
}

/* Button, Select and Label Styles */
.filters button, .filters select, .filters label {
    font-size: 1.2rem;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    border-radius: 8px;
    color: #fff;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover effect for buttons and selects */
.filters button:hover, .filters select:hover, .filters label:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.6);
}

/* Results Section */
#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Filters Section */
.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 50px auto;
    padding: 20px;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
}

.filters select, .filters button {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    border-radius: 8px;
    color: #fff;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters select:hover, .filters button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.6);
}



/* Results Section */
#results {
    display: flex;                  /* Flexbox pour un affichage horizontal */
    flex-wrap: wrap;                /* Permet le retour à la ligne si les cartes dépassent */
    gap: 20px;                      /* Espace entre les cartes */
    justify-content: center;        /* Centre les cartes sur la page */
    padding: 20px;                  /* Espacement interne autour du conteneur */
    margin-top: 20px;               /* Espacement supérieur */
    width: 100%;                    /* Largeur complète */
    box-sizing: border-box;         /* Inclut le padding dans la largeur */
}

/* Dream Card */
.dream-card {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 300px;                   /* Largeur fixe pour chaque carte */
    display: flex;                  /* Flexbox interne pour organiser le contenu */
    flex-direction: column;         /* Aligne les éléments verticalement */
    align-items: center;            /* Centre le contenu horizontalement */
    text-align: center;             /* Centre le texte */
}

/* Images */
.dream-card img {
    width: 100%;                    /* Assure que l'image occupe toute la largeur de la carte */
    height: auto;                   /* Garde la hauteur proportionnelle */
    object-fit: cover;              /* S'assure que l'image remplit bien la zone */
    border-bottom: 2px solid #EAB591;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.dream-card:hover img {
    transform: scale(1.05);         /* Zoom sur l'image au survol */
    filter: brightness(1.2);        /* Augmente la luminosité */
}

/* Contenu de la carte */
.dream-card .content {
    margin-top: 10px;               /* Espacement entre l'image et le contenu */
}

.dream-card h3 {
    font-size: 1.3rem;
    color: #F4B71B;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.dream-card p {
    font-size: 1rem;
    line-height: 1.4;
    color: #F6F1F5;
    margin: 5px 0;
}

/* Bouton */
.read-more-btn {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #D75042;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: #F4B71B;
}


/* Text formatting */
.truncated-text, .full-text {
    font-size: 1rem;
    line-height: 1.4;
    color: #F6F1F5;
}

/* Final Gradient Animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}