/* ========================
   FICHIER : custom.css
   AUTEUR : Dahoud
   VERSION : 2.0 - OPTIMISÉE PRO
   Description :
   Feuille de styles professionnelle avec animations avancées,
   effets visuels modernes et design responsive optimisé.
   ======================== */

/* ------------------------
   SYSTÈME DE DESIGN
------------------------ */
:root {
    /* Palette de couleurs sophistiquée */
    --primary-color: #3e71df;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #c8c0d6;
    --accent-color: #df7315;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --background-light: #f9fafb;
    --background-dark: #111827;

    --spacing-lg: 2rem;
    --radius-full: 9999px;

    /* Système d'ombres raffiné */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);

    /* Système d'espacement cohérent */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-xl: 3rem;

    /* Transitions fluides */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* ------------------------
   RESET MODERNE
------------------------ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-primary);
    background-color: var(--background-light);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ------------------------
   HEADER MODERNE AMELIORE
------------------------ */
.layout-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition-normal);
    will-change: backdrop-filter, box-shadow;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Animation de battement de coeur pour le logo */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: scale(1.02);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1);
    }
}

/* Logo avec effet heartbeat constant */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-primary);
    animation: heartbeat 3s ease-in-out infinite;
    transition: transform 0.3s ease, filter 0.3s ease;
    transform-origin: left center;
}

/* Au survol : le logo grossit plus que le battement normal et devient cliquable */
.logo:hover {
    transform: scale(1.1);
    cursor: pointer;
}

.logo img {
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

/* Navigation moderne et lisible */
.nav-list {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Soulignement progressif avec dégradé */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Survol : texte coloré, fond léger, soulignement visible */
.nav-link:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

/* Focus visible pour accessibilité */
.nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Bouton nav : lisible, dynamique, avec texte blanc sur dégradé contrasté */
.nav-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    will-change: transform, box-shadow;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nav-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

.nav-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.nav-button:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: var(--shadow-md);
}

/* Par défaut, on cache le bouton menu mobile */
.mobile-menu-button {
    display: none;
}

/* Sur les écrans de moins de 768px de large (exemple), on l’affiche */
@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
    }
}

/* ------------------------
   HERO SECTION MODERNISÉE
------------------------ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    perspective: 1000px;
}

/* Overlay et Particles */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Éléments de marque */
.brand-label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Titre amélioré */
.gradient-text {
    display: block;
    background: linear-gradient(45deg, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.6em;
}

.highlight-text {
    display: block;
    font-size: 0.2em;
    color: rgba(255, 255, 255, 0.9);
    margin-top: var(--spacing-xs);
}

/* Texte animé */
.typing-text {
    display: inline-block;
    position: relative;
    color: var(--accent-color);
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: 1px;
    top: -30px;
    animation: blink 0.8s infinite;
}

/* Boutons modernisés */
.animate-stagger {
    display: flex;
    gap: var(--spacing-md);
}

.button-icon {
    margin-right: var(--spacing-xs);
    transition: transform var(--transition-normal);
}

.primary-button:hover .button-icon {
    transform: translateX(5px);
}

.secondary-button:hover .button-icon {
    transform: scale(1.2);
}

/* Indicateur de défilement */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #ffffff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: mouseWheel 1.5s infinite;
}

.arrow-scroll {
    width: 20px;
    height: 20px;
    position: relative;
    margin: var(--spacing-sm) auto;
    animation: arrowBounce 1.5s infinite;
}

.arrow-scroll::before {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
    position: absolute;
    top: 0;
    left: 4px;
}

/* Formes géométriques */
.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 15s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 50%;
    right: 10%;
    animation-delay: -10s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    from, to {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes mouseWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes morphing {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    color: transparent;
    animation: titleAppear 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    animation: subtitleAppear 1s ease-out 0.3s backwards;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    animation: buttonsAppear 1s ease-out 0.6s backwards;
}

/* Bouton hero principal amélioré pour plus de fluidité */
.hero-button {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: #fff;
    background: transparent;
    font-size: 1rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
}

/* Arrière-plan dégradé */
.hero-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(45deg, var(--accent-color), #fb923c);
    z-index: -1;
    transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
}

/* Effet lumineux : bande traversant le bouton */
.hero-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    opacity: 0;
    z-index: 1;
    /* Transitions plus longues et fluides sur la lumière */
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

/* Survol : agrandissement léger, ombre douce, highlight fluide */
.hero-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: var(--radius-full);
}

.hero-button:hover::before {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(251,146,60,0.4);
}

/* Activation de l'effet lumineux au survol */
.hero-button:hover::after {
    transform: translateX(200%);
    opacity: 1;
}

/* Bouton outline amélioré pour plus de fluidité et cohérence */
.hero-button-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out, background 0.6s ease-in-out, border-color 0.6s ease-in-out;
}

.hero-button-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: linear-gradient(45deg, var(--accent-color), #3cc5fb, var(--accent-color));
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* Survol du bouton outline : plus de douceur et d'animation fluide */
.hero-button-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.hero-button-outline:hover::before {
    opacity: 1;
    animation: gradientMove 2s linear infinite;
}

/* Animation continue du gradient du bouton outline */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ----------------------------------------------------------------
Style pour la section Vision & Stratégie, inspiré de "Nos Services"
-------------------------------------------------------------------
*/

/* Fond et conteneur principal */
.vision-section {
    position: relative;
    padding: var(--spacing-xl) var(--spacing-lg);
    color: #fff;
    overflow: hidden;
    text-align: center;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-blend-mode: overlay;
}

.vision-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: #fff; /* Texte blanc sur fond dégradé */
}

.section-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    color: #fff; /* Sous-titre en blanc également */
}

.strategy-heading,
.integration-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: #fff;
    text-align: center;
}

/* Grille et cartes, similaires à .services-grid et .service-card */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.pillar-card {
    background: #fff;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-align: left;
    color: var(--text-primary);
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(124, 58, 237, 0.1) 100%);
    opacity: 0;
    transition: var(--transition-normal);
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 0 0 3px rgba(37,99,235,0.3);
}

.pillar-card:hover::before {
    opacity: 1;
    background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.15) 0%,
    rgba(88, 5, 230, 0.15) 100%);
}

.pillar-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: background var(--transition-normal);
}

.pillar-card:hover .pillar-icon-wrapper {
    background: rgba(214, 46, 46, 0.1);
}

.icon-animate {
    font-size: 2rem;
    transition: transform var(--transition-normal), color var(--transition-normal);
    color: var(--primary-dark);
}

.pillar-card:hover .icon-animate {
    transform: scale(1.1);
    color: var(--primary-color);
}

.pillar-title {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.pillar-card p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
}

/* Overlay "En savoir plus" */
.card-overlay {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(0,0,0,0.05);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    transition: background var(--transition-normal), transform var(--transition-normal), opacity var(--transition-normal);
}

.pillar-card:hover .card-overlay {
    background: rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.overlay-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.9;
}

/* Texte Intégration & Synergies */
.integration-text {
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    color: #fff;
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }
}


/* ------------------------
   SECTION SERVICES AMÉLIORÉE
------------------------ */

.services-section {
    position: relative;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    overflow: hidden;
    text-align: center;
    /* Motif discret en background (facultatif) */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-blend-mode: overlay;
}

.services-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.service-card {
    background: #fff;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-align: left;
    color: var(--text-primary);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(124, 58, 237, 0.1) 100%);
    opacity: 0;
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    /* Ajout d'une ombre bleutée subtile autour de la carte */
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 0 0 3px rgba(37,99,235,0.3);
}

.service-card:hover::before {
    opacity: 1;
    /* On augmente légèrement l'opacité du dégradé pour un rendu plus "bleuté" */
    background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.15) 0%,
    rgba(88, 5, 230, 0.15) 100%);
}


.service-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: background var(--transition-normal);
}

.service-card:hover .service-icon-wrapper {
    background: rgba(214, 46, 46, 0.1);
}

.icon-animate {
    font-size: 2rem;
    transition: transform var(--transition-normal), color var(--transition-normal);
    color: var(--primary-dark);
}

.service-card:hover .icon-animate {
    transform: scale(1.1);
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
}

/* Overlay "En savoir plus" */
.card-overlay {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(0,0,0,0.05);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    transition: background var(--transition-normal), transform var(--transition-normal), opacity var(--transition-normal);
}

.service-card:hover .card-overlay {
    background: rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.overlay-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.9;
}

/* CTA en bas de section */
.services-cta {
    margin-top: var(--spacing-xl);
}

.hero-button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    background: linear-gradient(45deg, #fff, #eee);
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ANIMATIONS DE RÉVÉLATION AU SCROLL */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.animate-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

.layout-footer {
    background: var(--background-dark);
    color: #f9fafb;
    position: relative;
    overflow: hidden;
    padding: var(--spacing-xl) var(--spacing-lg);
    font-size: 0.95rem;
}

.footer-top {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-xl);
}

.footer-section {
    position: relative;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: #ffffff;
    position: relative;
}

.footer-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin-top: var(--spacing-xs);
}

.footer-section p {
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links li a {
    color: #f9fafb;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity var(--transition-normal);
}

.footer-links li a:hover {
    opacity: 1;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.social-links a {
    color: #f9fafb;
    font-size: 1.2rem;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.social-links a:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.newsletter-container {
    margin-top: var(--spacing-md);
}

.newsletter-container p {
    margin-bottom: var(--spacing-sm);
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-xs);
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem var(--spacing-sm);
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(62,113,223,0.2);
}

.newsletter-button {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.newsletter-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    font-size: 0.85rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    .newsletter-form {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    .newsletter-button {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-inner {
        padding: var(--spacing-lg);
    }
}

/* ------------------------
   FORMULAIRE DE CONTACT MODERNISÉ
------------------------ */
.contact-section {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg,
    var(--background-light) 0%,
    #f3f4f6 100%);
    position: relative;
    overflow: hidden;
    text-align: center; /* s'assurer du centrage global */
}

.contact-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' ...");
    opacity: 0.5;
}

.section-title.text-center {
    text-align: center;
    margin-bottom: var(--spacing-md); /* S'assurer d'un espace cohérent */
}

.section-subtitle.text-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.contact-info {
    padding: var(--spacing-xl);
    background: linear-gradient(135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%);
    border-radius: var(--radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform var(--transition-normal);
}

.contact-info:hover::before {
    transform: translateX(100%);
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.contact-info p {
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.contact-details .contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    transition: var(--transition-fast);
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-form-wrapper {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateZ(0);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper:hover {
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 1rem var(--spacing-md);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 1rem;
    background: var(--background-light);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 1rem var(--spacing-md);
    background: linear-gradient(45deg,
    var(--primary-color),
    var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-button:hover::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: var(--spacing-sm);
    }

    .contact-info {
        order: 2;
    }

    .contact-form-wrapper {
        order: 1;
    }
}

/* Carte */
.map-container {
    margin-top: var(--spacing-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

.map-container:hover {
    box-shadow: var(--shadow-md);
}


/* Animation d'entrée pour le formulaire */
@keyframes formAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form-wrapper {
    animation: formAppear 0.6s ease-out forwards;
}

/* État de succès et d'erreur */
.form-control.success {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.form-control.error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ------------------------
   FOOTER MODERNE
------------------------ */
.layout-footer {
    background: var(--background-dark);
    color: white;
    padding: var(--spacing-xl) var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: var(--spacing-xl);
}

/* ------------------------
   ANIMATIONS
------------------------ */
@keyframes titleAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ------------------------
   MEDIA QUERIES OPTIMISÉES
------------------------ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-sm);
        text-align: center;
        display: none;
    }

    .nav-list.active {
        display: flex;
    }

    .mobile-menu-button {
        display: block;
        font-size: 1.5rem;
        color: var(--text-primary);
        background: none;
        border: none;
        cursor: pointer;
        padding: var(--spacing-xs);
    }

    .hero-section {
        padding: var(--spacing-xl) var(--spacing-sm);
    }

    .hero-content {
        padding: 0 var(--spacing-sm);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }

    .service-card {
        margin: 0 var(--spacing-sm);
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: var(--spacing-sm);
    }

    .contact-info {
        order: 2;
    }

    .contact-form-wrapper {
        order: 1;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .service-card {
        padding: var(--spacing-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }
}

/* Support for les modes sombres */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #edeff1;
        --text-secondary: #e5e7eb;
        --background-light: #111827;
        --background-dark: #030712;
    }

    .layout-header {
        background: rgba(17, 24, 39, 0.95);
    }

    .service-card {
        background: #1f2937;
    }

    .contact-form-wrapper {
        background: #1f2937;
    }

    .form-control {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }

    .form-control:focus {
        border-color: var(--primary-light);
    }
}

/* Animations de scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-normal);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Optimisations de performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* SECTION STATISTIQUES AMELIOREE ET EPUREE */

.stats-section {
    position: relative;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    overflow: hidden;
    text-align: center;
    background-size: cover;
    background-blend-mode: overlay;
}

.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

/* HEADER DE LA SECTION */
.stats-header {
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.stats-heading {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

.stats-intro {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.stats-update {
    font-size: 0.9rem;
    opacity: 0.75;
}

/* CONTAINER STATISTIQUES */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.stat-item {
    flex: 1 1 200px;
    min-width: 200px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
    position: relative;
    text-align: center;
}

/* HOVER SUR L'ELEMENT DE STAT */
.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: rgba(255,255,255,0.15);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.stats-icon {
    font-size: 2rem;
    color: #fff;
}

.counter {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
}

/* CTA */
.stats-cta {
    margin-bottom: var(--spacing-xl);
}

.hero-button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    background: linear-gradient(45deg, #fff, #eee);
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* TESTIMONIAL */
.stats-testimonial {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.stats-testimonial blockquote {
    margin: 0;
    text-align: left;
    color: #fff;
}

.testimonial-quote {
    font-size: 1.25rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

.testimonial-author {
    display: block;
    font-size: 1rem;
    opacity: 0.85;
    text-align: right;
}

/* ANIMATIONS DE REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
