/* ==========================================================================
   1. VARIABLES & RESET DE BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #007bff;
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --accent-color: #ffd700;
    --burgundy: #800020;
    --burgundy-hover: #600018;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f0f2f5;
    --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ==========================================================================
   2. TYPOGRAPHIE & ELEMENTS UTILITAIRES
   ========================================================================== */
h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Boutons d'action principaux */
.cta-button {
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

.cta-button.primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.3);
}

.cta-button.secondary {
    background: #ffffff;
    color: #2575fc;
    border: 2px solid #2575fc;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* ==========================================================================
   3. ECRAN DE CHARGEMENT
   ========================================================================== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading p {
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.85);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    width: 100%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.logo-wrapper {
    display: flex;
    align-items: center;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.logo-link:hover {
    transform: translateY(-1px);
}

.logo-img {
    height: 8rem;
    width: auto;
    object-fit: contain;
    border-radius: 20px;
    filter: none !important; 
    transition: transform 0.3s ease;
    background-color: #ffffff;
    padding: 4px;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-position {
    display: flex;
    flex-direction: column;
}
/* Bloc texte (Nom + Infos légales) */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Nom de la marque */
.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.company-text {
    color: var(--primary-color);
}

/* Infos légales (SIRET / SIREN) harmonisées */
.legal-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    font-weight: 500;
}




.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    background-color: #f0f2f5;
    padding: 5px;
    border-radius: 30px;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    transition: var(--transition);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.08);
}

.main-nav a.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(37, 117, 252, 0.3);
}

/* ==========================================================================
   5. SECTIONS GLOBALES & SPA
   ========================================================================== */
main {
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.section-content {
    display: none;
    margin: 2rem auto;
    padding: 3rem 2rem;
    border-radius: 20px;
    background-color: white;
    box-shadow: var(--shadow-md);
    max-width: 1200px;
    width: 90%;
    animation: fadeIn 0.4s ease-in-out;
}

.section-content.active {
    display: block !important;
}

/* ==========================================================================
   6. SECTION ACCUEIL (HERO)
   ========================================================================== */
.hero-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--shadow-subtle);
    padding: 3rem 2rem;
    max-width: 900px;
    margin: 0 auto 4rem auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
    transition: var(--transition);
}
/* Ligne supérieure en dégradé (identique aux cartes de services) */
.hero-card::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 5px;
    background: var(--primary-gradient);
}
.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}



.hero h1 {
    font-size: clamp(1.5rem, 5vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    white-space: normal; /* Permet au titre de passer à la ligne proprement sur mobile */
    word-break: break-word;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-dark);
    font-weight: 500;
    max-width: 750px;
    margin: 0 auto 2rem auto;
    line-height: 1.5;
}

.highlight-text {
    color: var(--burgundy);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Portfolio / Exemples */
.examples {
    max-width: 1100px;
    margin: 0 auto;
}

.examples h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.example-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
    text-align: left;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.example-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.example-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.example-card h4 {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.example-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   7. SECTION SERVICES
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(0,0,0,0.04);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: var(--primary-gradient);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-details-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.service-details-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ==========================================================================
   8. SECTION À PROPOS
   ========================================================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-list {
    list-style: none;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.about-list li {
    font-size: 1rem;
    color: var(--text-dark);
    background: #f8fafc;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.about-list li:hover {
    transform: translateX(5px);
    background: white;
    box-shadow: var(--shadow-subtle);
}

/* ==========================================================================
   9. SECTION CONTACT & NEWSLETTER
   ========================================================================== */
.newsletter {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 16px;
    margin: 2rem auto;
    max-width: 700px;
}

.newsletter h2 {
    color: white;
    background: none;
    -webkit-text-fill-color: initial;
    margin-bottom: 1.5rem;
}

.newsletter h2::after {
    display: none;
}

.newsletter form {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.newsletter input[type="email"] {
    padding: 0.85rem 1.2rem;
    border-radius: 50px;
    border: none;
    width: 100%;
    max-width: 350px;
    font-size: 1rem;
    outline: none;
}

.newsletter button {
    padding: 0.85rem 1.8rem;
    background-color: var(--burgundy);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter button:hover {
    background-color: var(--burgundy-hover);
    transform: translateY(-2px);
}

/* ==========================================================================
   10. CARTE DU GÉRANT (FIXE / PERMANENTE)
   ========================================================================== */
.director-section {
    display: block !important;
    padding: 3rem 1rem;
}

.director-photo {
    background: #ffffff;
    max-width: 650px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.director-photo img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.director-photo img:hover {
    transform: scale(1.05) rotate(2deg);
}

.director-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.director-phone, .director-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    background-color: #f4f6f9;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    margin: 0.5rem;
}

/* ==========================================================================
   11. MODALE BOÎTE DE DIALOGUE
   ========================================================================== */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(6px);
    z-index: 99999;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background-color: #ffffff;
    border: 2px solid var(--burgundy);
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    color: var(--burgundy);
    background: none;
    -webkit-text-fill-color: initial;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.modal-content h2::after {
    display: none;
}

.form-group {
    margin-bottom: 1.25rem;
}

.modal input, .modal textarea {
    width: 100%;
    background-color: #f8fafc;
    color: var(--text-dark);
    border: 1.5px solid #cbd5e1;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.modal input:focus, .modal textarea:focus {
    outline: none;
    border-color: var(--burgundy);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.15);
}

.modal textarea {
    min-height: 120px;
    resize: vertical;
}
.iti {
    width: 100%;
    display: block;
}
.iti input[type="tel"] {
    width: 100% !important;
    box-sizing: border-box !important;
}

.iti__country-list {
    color: var(--text-dark);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 99999 !important; /* Force le menu à passer devant la modale */
    overflow-y: auto !important;
    white-space: normal !important;
}

/* Le popup mobile gère lui-même sa hauteur et son défilement. */
.iti--fullscreen-popup .iti__country-list {
    max-height: none !important;
}
/* Autorise le menu déroulant à dépasser de la modale si nécessaire */
#modal-form-container,
.modal-content {
    overflow: visible !important;
}

.submit-btn {
    width: 100%;
    background-color: var(--burgundy);
    color: white;
    padding: 0.9rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: var(--burgundy-hover);
    transform: translateY(-2px);
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 26px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--burgundy);
}


/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLETTE)
   ========================================================================== */
@media (max-width: 768px) {
    /* Sécurité anti-débordement horizontal */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Header */
    .main-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .logo-wrapper {
        width: 100%;
        justify-content: center;
    }

    .brand-name {
        font-size: 1.3rem;
    }

    .legal-info {
        font-size: 0.65rem;
    }

    /* Navigation */
    .main-nav {
        width: 100%;
    }

    .main-nav ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 4px;
    }

    .main-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Hero & Cartes */
    .hero h1 {
        font-size: clamp(1.4rem, 5vw, 2rem);
        white-space: normal; /* Permet au titre de passer à la ligne sur mobile */
    }

    .hero-card, 
    .section-content {
        width: 95%;
        padding: 1.5rem 1rem;
        margin: 1rem auto;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-button {
        width: 100%;
    }
}
