/* Style global du corps de la page */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #87CEEB, #fff);
    color: #333;
    overflow-x: hidden; /* Eviter le débordement horizontal */
}

/* Style de l'en-tête */
header {
    background-color: black;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    top: 0;
    width: 100%;
    z-index: 10;
}

header h1 {
    margin: 0;
    cursor: pointer;
}

header h1:hover {
    color: #FFD700;
}


#horloge {
    position: absolute;
    left: 10px;
    top: 10px;
    color: white;
    z-index: 10;
}
    
#statut {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    align-items: center;
    color: green;
}

#statut span {
    margin-left: 5px;
}

#statut .indicateur {
    width: 20px; /* Taille augmentée */
    height: 20px; /* Taille augmentée */
    background: black;
    border-radius: 50%;
    animation: clignoter 1s infinite;
}

@keyframes clignoter {
    0%, 50% { background: black; }
    100% { background: #68FF00; } /* Couleur vert fluo */
}

@keyframes clignoter-rouge {
    0%, 50% { background: red; }
    100% { background: white; }
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 20px; /* Ajuster le padding pour compenser l'en-tête fixe */
    margin-bottom: 70px; /* Espace en bas pour éviter le recouvrement par le pied de page */
}

#ville {
    font-size: 100px;
    position: relative;
}

#ville:hover::after {
    content: "Lyon, France, Rue de la République - Latitude: 45.75, Longitude: 4.85";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    font-size: 20px;
    width: max-content;
    text-align: center;
}

#temperature {
    font-size: 80px; /* Taille de police augmentée */
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

#conteneur-meteo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.bloc-meteo {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    flex: 1 1 200px;
    min-width: 150px;
    position: relative;
    transition: background-color 0.3s, border 0.3s, transform 0.3s; /* Transition pour les effets de survol */
}

.bloc-meteo:hover {
    background-color: #FFA500; /* Couleur orange clémentine */
    border: 1px solid white;
    transform: scale(2); /* Effet de grossissement */
    color: darkblue; /* Couleur du texte bleu foncé */
}

.alerte {
    display: none;
    background: linear-gradient(45deg, red, white);
    color: black;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    margin-top: 50px;
    animation: clignoter-lentement 2s infinite;
}

@keyframes clignoter-lentement {
    0%, 50% { background: red; }
    100% { background: white; }
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #333;
    color: white;
    width: 100%;
    bottom: 0;
    z-index: 1; /* Assurer que le pied de page est au-dessus du contenu */
    position: fixed; /* Rendre le pied de page fixe par défaut */
}

.footer-left,
.footer-center,
.footer-right {
    flex: 1;
    text-align: center;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-left p {
    margin: 0;
}

.footer-left a {
    color: #FFD700;
    text-decoration: none;
    margin-left: 5px; /* Ajouter un espacement entre le nom et le lien */
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

.btn-api-meteo {
    background-color: #333;
    color: #FFD700;
    border: 1px solid #FFD700;
    padding: 5px 10px;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-right: 30px; /* Ajouter une marge à droite pour éviter le débordement */
}

.btn-api-meteo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(104, 255, 0, 0.5);
    animation: pulse 1s infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.btn-api-meteo:hover {
    background-color: #FFD700;
    color: #333;
}

/* Media queries pour petits écrans */
@media (max-width: 768px) {
    header {
        text-align: center; /* Centrer le texte */
        padding: 10px;
    }



@media (max-width: 768px) {
    header {
        text-align: center; /* Centrer le texte */
            padding: 10px;
            }
        
    #horloge, #statut {
        position: static;
        display: block;
        margin: 5px auto; /* Centrer horizontalement */
        text-align: center; /* Centrer le texte à l'intérieur */
    }
}
        

    footer {
        position: relative; /* Rendre le pied de page non fixe sur petits écrans */
        flex-direction: column;
        align-items: center;
        padding: 20px;
        margin-top: 20px;
    }

    .footer-left, .footer-center, .footer-right {
        flex: none;
        text-align: center;
        margin: 5px 0;
    }

    .btn-api-meteo {
        margin-right: 0;
        margin-bottom: 10px;
    }

    #ville {
        font-size: 50px;
    }

    #temperature {
        font-size: 40px;
    }

    .bloc-meteo {
        font-size: 14px;
        flex: 1 1 100%;
    }

    main {
        margin-bottom: 150px; /* Augmenter l'espace en bas pour éviter le recouvrement par le pied de page */
    }
}

/* Style pour la section des mentions légales */
.mentions-legales-container-emile {
    display: flex;
    justify-content: space-between;
    background-color: #f1f1f1;
    padding: 15px 20px;
    border-top: 1px solid #ccc;
    margin-bottom: 10px; /* Pour éviter que le pied de page ne recouvre cette section */
    margin-top: 10px;
}

.mentions-legales-left-emile {
    text-align: left;
}

.mentions-legales-right-emile {
    text-align: right;
}

.mentions-legales-right-emile a {
    margin-left: 15px; /* Espacement entre les liens */
    color: #007bff;
    text-decoration: none;
}

.mentions-legales-right-emile a:hover {
    text-decoration: underline;
}

/* Adaptation pour les petits écrans */
@media only screen and (max-width: 600px) {
    .mentions-legales-container-emile {
        flex-direction: column;
        text-align: center;
    }

    .mentions-legales-right-emile {
        margin-top: 10px;
    }

    .mentions-legales-right-emile a {
        display: block;
        margin-left: 0;
        margin-bottom: 5px; /* Espacement entre les liens sur mobile */
    }
}
