/* Styles généraux */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #0abdba, #1c92d2); /* Dégradé animé */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px; /* Espace pour éviter que la barre de recherche ne cache les résultats */
    overflow-y: scroll; /* Autoriser le défilement */
}

/* Animation de fond */
@keyframes backgroundAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Conteneur général */
.container {
    text-align: center;
    width: 100%;
    padding: 20px;
    position: relative;
    overflow: hidden; /* Empêcher le débordement */
}

/* Logo */
.logo img {
    width: 200px;
    animation: bounce 2s infinite; /* Animation de rebond pour le logo */
}

/* Animation de rebond */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Barre de recherche sticky */
.search-form {
    position: fixed; /* La rendre fixe pour qu'elle reste visible en haut */
    top: 0;
    width: 100%; /* Prend toute la largeur */
    background: rgba(10, 189, 186, 0.9); /* Couleur de fond avec transparence */
    backdrop-filter: blur(15px); /* Flou en arrière-plan */
    padding: 10px;
    z-index: 1000; /* La rendre visible au-dessus des autres éléments */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5); /* Ombre plus douce */
    display: flex;
    justify-content: center; /* Centre la barre de recherche */
    transition: background 0.3s; /* Transition douce */
}

/* Input de la barre de recherche */
.search-form input[type="text"] {
    width: 80%;
    max-width: 400px;
    padding: 10px;
    font-size: 20px;
    border: 3px solid #dfe1e5;
    border-radius: 24px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Ombre sur l'input */
    backdrop-filter: blur(5px); /* Flou léger pour l'input */
}

.search-form input[type="text"]:focus {
    border-color: #4285f4;
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.5); /* Ombre bleue lors du focus */
}

/* Bouton de recherche */
.search-form button {
    margin-left: 10px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; /* Transition douce */
}

.search-form button:hover {
    background-color: #357ae8;
    transform: translateY(-2px); /* Légère translation vers le haut */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Ombre plus prononcée au survol */
}

/* Résultats de recherche */
#results {
    margin-top: 20px;
    text-align: left;
    width: 80%;
    max-width: 800px; /* Limite la largeur des résultats */
    overflow-y: auto; /* Permet le défilement si trop de résultats */
}

/* Style pour chaque résultat */
.result {
    padding: 15px;
    border: 1px solid #dfe1e5;
    border-radius: 8px; /* Coins arrondis */
    margin-bottom: 10px; /* Espacement entre les résultats */
    transition: transform 0.2s, box-shadow 0.2s; /* Transition douce */
    background: rgba(255, 255, 255, 0.9); /* Fond blanc avec transparence */
}

.result:hover {
    transform: scale(1.02); /* Légère augmentation de taille au survol */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3); /* Ombre plus prononcée au survol */
}

/* Liens des résultats */
.result a {
    text-decoration: none;
    color: #1a0dab;
    font-size: 18px;
    font-weight: bold; /* Mettre le titre en gras */
    transition: color 0.3s, text-shadow 0.3s; /* Transition douce pour la couleur */
}

.result a:hover {
    color: #d93025; /* Changer la couleur au survol */
    text-shadow: 0 0 10px rgba(66, 133, 244, 1); /* Ombre du texte au survol */
}

/* Indicateur de chargement */
#loading {
    margin-top: 20px;
    font-size: 18px;
    color: #4285f4;
    position: relative; /* Position relative pour centrer l'animation */
    animation: fadeIn 1s ease-in-out; /* Animation d'apparition */
}

/* Animation d'apparition */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Styles pour la pagination */
#pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center; /* Centrer la pagination */
    align-items: center;
}

#pagination button {
    padding: 10px 15px;
    margin: 0 5px;
    font-size: 16px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s; /* Transition douce */
}

#pagination button:hover {
    background-color: #357ae8;
    transform: scale(1.05); /* Légère augmentation de taille au survol */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Ombre au survol */
}

#pagination span {
    margin: 0 10px;
    font-size: 16px;
    color: #333;
}

/* Effets de transition douce pour tout le corps */
.container {
    transition: transform 0.2s; /* Transition douce pour le conteneur */
}

/* Animation de texte dynamique */
h1, h2, h3 {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8); /* Ombre légère */
}

/* Animation sur le texte lors du défilement */
body {
    animation: fadeIn 2s ease-in-out; /* Fade in sur tout le corps */
}

/* Éléments de transition supplémentaire */
.result {
    will-change: transform, opacity; /* Aide les performances d'animation */
}

/* Animation des boutons de pagination */
#pagination button {
    animation: pulse 1.5s infinite alternate; /* Pulsation continue */
}

/* Ombres sur le corps */
body {
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3); /* Ombre intérieure pour le corps */
}

/* Réglage des transitions de l'arrière-plan */
body {
    background: linear-gradient(135deg, #0abdba, #1c92d2);
    animation: backgroundAnimation 10s infinite; /* Animation de fond */
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
