/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables pour les couleurs et dimensions courantes */
:root {
    --primary-color: #54c4b7;
    --text-color: #333;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-height: 90px;
    --logo-height: 70px;
}

/* Style principal du header */
.header-section {
    background-color: white;
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    height: var(--header-height);
}

/* Logo et son conteneur */
.header-section .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-section .logo img {
    height: var(--logo-height);
    width: auto;
}

.header-section .logo span {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 10px;
    color: var(--text-color);
}

/* Formulaire de recherche principal */
.header-section .search-form {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
    position: relative;
}

.header-section .search-form .search-wrapper {
    position: relative;
    width: 100%;
}

.header-section .search-form input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.header-section .search-form input[type="text"]:focus {
    border-color: var(--primary-color);
}

/* Résultats de recherche */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 4px 8px var(--shadow-color);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
}

.search-results a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.search-results a:last-child {
    border-bottom: none;
}

.search-results a:hover {
    background-color: #f5f5f5;
}

/* Menu hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* État actif du menu hamburger */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menu déroulant */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    background: white;
    box-shadow: 0 4px 8px var(--shadow-color);
    border-radius: 5px;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.menu-toggle.active + .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style du menu déroulant */
.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu ul li:last-child {
    border-bottom: none;
}

.dropdown-menu ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    display: block;
    transition: color 0.3s ease;
}

/* Formulaire de recherche dans le dropdown */
.dropdown-menu .dropdown-search-form {
    width: 100%;
    margin-bottom: 15px;
    display: block;  /* Important pour l'affichage mobile */
}

.dropdown-menu .search-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.dropdown-menu .search-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    outline: none;
}

/* Media Queries */
@media (min-width: 769px) {
    .menu-toggle,
    .dropdown-menu {
        display: none;
    }

    .header-section .search-form {
        display: flex;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-section .search-form {
        display: none;
    }

    .header-section .logo img {
        height: 50px;
    }

    .dropdown-menu {
        display: none;
    }

    .dropdown-menu.show {
        display: block;
    }

    /* Style spécifique pour le formulaire de recherche mobile */
    .dropdown-menu .dropdown-search-form {
        display: block !important;
        width: 100%;
    }

    .dropdown-menu .search-wrapper {
        display: block;
        width: 100%;
    }

    .dropdown-menu .search-wrapper input[type="text"] {
        display: block;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-section {
        padding: 10px;
    }

    .header-section .logo span {
        font-size: 1.2rem;
    }

    .dropdown-menu {
        padding: 15px;
    }
}

/* Général */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    color: #333;
    line-height: 1.6;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    background-color: white;
}

select::-webkit-select-arrow {
    color: #333;
}

/* Conteneur principal du formulaire */
.contact-form-container {
    max-width: 700px;
    margin: 50px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-form-container h1 {
    margin-bottom: 20px;
    color: #54c4b7;
    font-size: 2rem;
    font-weight: bold;
}

/* Formulaire */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.logo img {
    max-width: 100%;
    height: auto;
    width: 150px; /* Fixez une largeur spécifique */
    object-fit: contain; /* Assure que l'image garde ses proportions */
}

/* Groupe de champs */
.contact-form .form-group {
    text-align: left;
}

.contact-form label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    display: block;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #54c4b7;
    box-shadow: 0 0 5px rgba(23, 107, 97, 0.3);
    outline: none;
}

.contact-form textarea {
    resize: none;
    height: 120px;
}

/* Bouton d'envoi */
.contact-form button {
    padding: 12px 20px;
    background-color: #54c4b7;
    color: #ffffff;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto; /* Ajuste automatiquement la largeur au contenu */
    display: inline-block; /* Permet au bouton de s'adapter au texte */
    margin: 0 auto; /* Centre le bouton si nécessaire */
    text-align: center; /* Centre le texte à l'intérieur du bouton */
    white-space: nowrap; /* Empêche le texte de se casser */
}

.contact-form button:hover {
    background-color: #145b50;
}



/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries for Popup */
@media (max-width: 768px) {
    .popup {
        display: block !important; /* Force l'affichage du popup */
        max-width: 90%; /* Ajuste la largeur pour s'adapter aux petits écrans */
        padding: 15px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 2000; /* Assure qu'il est au-dessus des autres éléments */
    }

    .popup .close-btn {
        top: 5px; /* Ajuste la position du bouton de fermeture */
        right: 5px;
        font-size: 1.2rem;
    }
}

/* Message d'erreur */
.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
    display: block; /* Affiche le message d'erreur sous le champ */
}


.confirmation-message {
    background-color: #edfffd;
    color: #176b61;
    border: 1px solid #54c4b7;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    margin: 50px auto;
    font-size: 1.2rem;
    line-height: 1.5;
}

.confirmation-message .confirmation-button:hover {
    background-color: #176b61;
    color: #ffffff;
}


.confirmation-message .confirmation-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #ffffff;
    color: #176b61;
    border: 2px solid #176b61;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}