/* Styles généraux */
body {
    font-family: 'Poppins', sans-serif; /* Police plus moderne et douce */
    margin: 0;
    padding: 0;
    line-height: 1.8; /* Légèrement plus d'espace pour la lecture */
    background: #f2f4f8;
    color: #222;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

.container {
    width: 85%; /* Légèrement plus large pour plus d'espace */
    max-width: 1200px; /* Limite la largeur sur les grands écrans */
    margin: auto;
    overflow: hidden;
    padding: 0 15px; /* Petit padding pour éviter que le contenu ne touche les bords sur mobile */
}

/* En-tête */
header {
    background: linear-gradient(to right, #001f3f, #0779e4); /* Dégradé de bleu profond */
    color: #fff;
    padding: 1.2rem 0; /* Plus d'espace vertical */
    border-bottom: #0779e4 5px solid; /* Bordure plus prononcée */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Ombre douce et élégante */
    position: sticky; /* L'en-tête reste visible en haut */
    top: 0;
    z-index: 100; /* Assure qu'il est au-dessus des autres éléments */
}

header h1 {
    float: left;
    margin: 0;
    font-size: 2.5em; /* Plus grand */
    letter-spacing: 1px; /* Espacement des lettres pour le style */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3); /* Ombre sur le titre */
}

header nav {
    float: right;
    margin-top: 15px; /* Aligner un peu mieux avec le titre */
}

header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header li {
    display: inline-block; /* Utilisation de inline-block pour plus de contrôle */
    padding: 0 20px;
    position: relative; /* Pour les effets au survol */
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 17px; /* Légèrement plus grand */
    font-weight: 500;
    transition: all 0.3s ease-in-out; /* Transition douce pour les effets */
}

header a:hover {
    color: #a7d9ff; /* Couleur plus claire au survol */
    transform: translateY(-2px); /* Léger mouvement vers le haut */
    text-shadow: 0 0 10px rgba(255,255,255,0.7); /* Lumière douce au survol */
}

header a.active-nav-link { /* Style pour le lien actif (utilisé par JS) */
    color: #a7d9ff !important;
    font-weight: bold;
    border-bottom: 3px solid #a7d9ff; /* Soulignement plus épais */
    padding-bottom: 5px; /* Espace sous le soulignement */
}

/* Section Héro */
#hero {
    min-height: 500px; /* Plus d'espace vertical */
    background: linear-gradient(rgba(0, 31, 63, 0.7), rgba(7, 121, 228, 0.7)), url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center/cover; /* Image de fond plus engageante + overlay */
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px; /* Padding pour les petits écrans */
    position: relative;
    overflow: hidden;
}

/* Effet de particules ou dégradé animé sur le héros (optionnel) */
/* Tu peux ajouter des pseudo-éléments pour des effets visuels */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
}


#hero h2 {
    font-size: 4em; /* Titre plus grand et impactant */
    margin-bottom: 20px;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.5); /* Ombre plus prononcée */
    animation: fadeInDown 1s ease-out; /* Animation à l'apparition */
}

#hero p {
    font-size: 1.4em; /* Texte plus grand */
    margin-bottom: 30px;
    max-width: 800px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s forwards; /* Animation après le titre */
    opacity: 0; /* Caché initialement pour l'animation */
}

.btn {
    display: inline-block;
    color: #fff;
    background: linear-gradient(to right, #0779e4, #055bb5); /* Dégradé sur le bouton */
    padding: 12px 28px; /* Plus grand */
    text-decoration: none;
    border-radius: 50px; /* Boutons plus arrondis (pill-shaped) */
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.4s ease; /* Transition plus longue pour les effets */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); /* Ombre plus profonde */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before { /* Effet de lumière au survol */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-30deg);
    transition: all 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(to right, #055bb5, #001f3f); /* Inversion du dégradé au survol */
    transform: translateY(-3px) scale(1.02); /* Léger mouvement et grossissement */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

/* Section Atouts (Features) */
#features {
    padding: 80px 0; /* Plus d'espace */
    background: #fff;
    text-align: center;
    position: relative;
    z-index: 2; /* Pour que les ombres et éléments flottent au-dessus du fond */
}

#features h3 {
    font-size: 3em; /* Plus grand */
    margin-bottom: 50px;
    color: #001f3f; /* Couleur foncée pour le contraste */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

#features h3::after { /* Soulignement animé */
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #0779e4;
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* Plus d'espace entre les cartes */
}

.feature-item {
    background: #ffffff;
    padding: 30px; /* Plus de padding */
    border: none;
    border-radius: 12px; /* Bords plus arrondis */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Ombre plus prononcée */
    transition: all 0.4s ease; /* Transition pour les effets de survol */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-item:hover {
    transform: translateY(-10px) scale(1.03); /* Soulève et grossit au survol */
    box-shadow: 0 18px 40px rgba(0,0,0,0.2); /* Ombre plus intense au survol */
    background: linear-gradient(to bottom right, #eff8ff, #d1e9ff); /* Dégradé au survol */
}

.feature-item h4 {
    color: #001f3f; /* Couleur plus sombre pour le titre de la carte */
    margin-top: 15px; /* Plus d'espace */
    margin-bottom: 15px;
    font-size: 1.7em;
    position: relative;
}

.feature-item p {
    font-size: 1.05em;
    line-height: 1.7;
    color: #555;
}

/* Optionnel: Icônes pour les feature-item (si tu les ajoutes dans le HTML) */
/*
.feature-item i {
    font-size: 3.5em;
    color: #0779e4;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.2) rotate(5deg);
}
*/

/* Pied de page */
footer {
    background: #222; /* Fond plus sombre pour le pied de page */
    color: #ccc;
    text-align: center;
    padding: 30px 0; /* Plus de padding */
    margin-top: 40px; /* Plus d'espace au-dessus */
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2); /* Ombre vers le haut */
}

footer p {
    margin: 5px 0;
    font-size: 0.95em;
}

footer a {
    color: #0779e4;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #a7d9ff;
    text-decoration: underline;
}

/* Sections Détail des Services (pages services.html) */
#services-intro,
.service-item-detail,
#contact-form {
  padding: 50px 0; /* Moins grand, plus lisible */
}


#services-intro h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #001f3f;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

#services-intro p {
    font-size: 1.2em;
    max-width: 800px;
    margin: auto;
    color: #555;
}

.service-item-detail {
    padding: 70px 0;
    text-align: center;
    border-bottom: 1px solid #eee; /* Ligne de séparation plus légère */
    background-color: #fff;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.service-item-detail:nth-child(even) { /* Alterner les couleurs de fond */
    background-color: #fcfdff;
}

.service-item-detail:last-of-type {
    border-bottom: none;
}

.service-item-detail:hover {
    background-color: #f0f8ff; /* Changement de fond au survol */
    box-shadow: 0 0 20px rgba(7, 121, 228, 0.1); /* Ombre subtile aux couleurs de la marque */
}

.service-item-detail h3 {
  font-size: 2.2em;
  color: #003366;
}

.service-item-detail h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #0779e4;
    border-radius: 2px;
}

.service-item-detail p {
  font-size: 1.05em;
  color: #444;
  line-height: 1.8;
}

.service-item-detail p strong {
    color: #0779e4;
    font-weight: 600;
}

/* Section Contact */
#contact-form {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0); /* Dégradé de gris */
    text-align: center;
}

#contact-form h2 {
    font-size: 3.5em;
    margin-bottom: 25px;
    color: #001f3f;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

#contact-form p {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555;
}

.contact-form {
    max-width: 700px; /* Formulaire plus large */
    margin: 0 auto 50px auto;
    padding: 40px;
    border: none;
    border-radius: 15px; /* Bords plus arrondis */
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); /* Ombre plus forte et complexe */
    text-align: left;
    transform: scale(0.95); /* Légère réduction pour effet initial */
    opacity: 0; /* Caché initialement pour animation JS */
    animation: scaleIn 0.8s ease-out forwards; /* Animation à l'apparition */
}

.form-group {
    margin-bottom: 25px; /* Plus d'espace entre les groupes */
}

.form-group label {
    display: block;
    margin-bottom: 10px; /* Plus d'espace sous le label */
    font-weight: 600; /* Plus gras */
    color: #333;
    font-size: 1.05em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%; /* Largeur pleine */
    padding: 12px 15px; /* Plus de padding */
    border: 1px solid #ccc;
    border-radius: 8px; /* Bords arrondis */
    font-size: 1.05em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Inclut padding et border dans la largeur */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: #0779e4; /* Bordure bleue au focus */
    box-shadow: 0 0 8px rgba(7, 121, 228, 0.3); /* Ombre bleue au focus */
    outline: none; /* Supprime l'outline par défaut */
}

.form-group textarea {
    resize: vertical;
    min-height: 120px; /* Hauteur minimale pour le textarea */
}

.contact-form .btn {
    width: 100%;
    margin-top: 20px; /* Espace au-dessus du bouton */
}

.contact-info {
    margin-top: 60px; /* Plus d'espace au-dessus */
    text-align: center;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-info h4 {
    font-size: 2.2em;
    color: #001f3f;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.15em;
    margin-bottom: 12px;
    color: #444;
}

.social-media {
    margin-top: 25px;
}

.social-media a {
    color: #0779e4;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.social-media a:hover {
    color: #001f3f; /* Couleur plus foncée au survol */
    transform: translateY(-2px);
    text-decoration: none;
}

/* Styles pour les animations (à coordonner avec JS) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px); /* Plus grand déplacement initial */
    transition: opacity 1s ease-out, transform 1s ease-out; /* Durée plus longue */
}

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Styles pour le bouton "Retour en haut" */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background: linear-gradient(to right, #0779e4, #001f3f); /* Dégradé sur le bouton */
    color: white;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 60px; /* Taille fixe */
    height: 60px;
    display: flex; /* Centrer le contenu */
    align-items: center;
    justify-content: center;
}

#backToTopBtn:hover {
    background: linear-gradient(to right, #001f3f, #0779e4); /* Inversion du dégradé au survol */
    transform: translateY(-5px) scale(1.1); /* Plus de mouvement au survol */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

#backToTopBtn.show {
    display: flex; /* Utilise flex pour le centrage */
}

/* Style pour le lien de navigation actif */
.active-nav-link {
    color: #a7d9ff !important;
    font-weight: bold;
    border-bottom: 3px solid #a7d9ff;
    padding-bottom: 5px;
}

/* Media Queries pour la réactivité accrue */
@media (max-width: 992px) {
    .container {
        width: 90%;
    }

    header h1 {
        font-size: 2.2em;
    }

    header nav {
        margin-top: 5px; /* Ajustement */
    }

    header li {
        padding: 0 15px;
    }

    #hero h2 {
        font-size: 3.2em;
    }

    #hero p {
        font-size: 1.2em;
    }

    #features h3, #services-intro h2, .service-item-detail h3, #contact-form h2 {
        font-size: 2.5em;
    }

    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .feature-item {
        padding: 25px;
    }

    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    header {
        text-align: center;
    }
    header h1,
    header nav {
        float: none;
        width: 100%;
    }

    header h1 {
        margin-bottom: 10px;
    }

    header nav ul {
        display: flex; /* Utilise flexbox pour centrer les liens sur une ligne */
        justify-content: center;
        flex-wrap: wrap; /* Permet aux liens de passer à la ligne si nécessaire */
        padding: 10px 0;
    }

    header li {
        padding: 5px 10px;
        display: block; /* Chaque lien sur sa propre ligne si trop d'éléments */
    }

    #hero {
        min-height: 350px;
        padding: 30px 15px;
    }

    #hero h2 {
        font-size: 2.5em;
    }

    #hero p {
        font-size: 1em;
    }

    #features, #services-intro, .service-item-detail, #contact-form {
        padding: 50px 0;
    }

    #features h3, #services-intro h2, .service-item-detail h3, #contact-form h2 {
        font-size: 2em;
    }

    .feature-item, .service-item-detail {
        padding: 20px;
    }

    .feature-item h4 {
        font-size: 1.5em;
    }

    .contact-form {
        padding: 25px;
    }

    .form-group input, .form-group textarea {
        padding: 10px;
        font-size: 1em;
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 12px 15px;
        font-size: 20px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    header li {
        padding: 5px 8px; /* Réduire encore le padding sur les liens */
        font-size: 15px;
    }

    #hero h2 {
        font-size: 2em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    #features h3, #services-intro h2, .service-item-detail h3, #contact-form h2 {
        font-size: 1.8em;
    }

    .feature-item p, .service-item-detail p, .contact-info p {
        font-size: 0.95em;
    }
}