/* === VARIABLES CSS ÉTENDUES === */
:root {
    --bg-primary: #0A0A10; /* Plus sombre et bleuté pour le côté Apple */
    --bg-secondary: #16161D;
    --bg-tertiary: #1E2139;
    --surface-glass: rgba(10, 10, 16, 0.7); /* Background plus sombre pour le flou */

    /* Texte */
    --text-primary: #EAEAEF;
    --text-secondary: #B1B1B9;
    --text-muted: #94A3B8;

    /* Accents et gradients (plus lumineux) */
    --gradient-primary: linear-gradient(135deg, #7F00FF 0%, #E100FF 50%, #FFD700 100%); /* Plus vibrant */
    --gradient-secondary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --accent-purple: #7C3AED;
    --accent-pink: #EC4899;
    --accent-blue: #3B82F6;

    /* États */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;

    /* Espacement et rayons */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions pour la fluidité 120 FPS */
    --transition-fast: 0.15s cubic-bezier(0.19, 1, 0.22, 1);
    --transition-base: 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    --transition-slow: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.3);

    /* Typographie */
    --font-family-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-urbanist: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; /* Spécifique pour certains titres */
    --font-size-base: 1rem;
    --font-size-lg: 15px;
    --font-size-xl: 2rem;
}

/* === RESET ET BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family-inter);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

/* === UTILITAIRES === */
.container {
    width: min(90%, 1200px);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* TYPOGRAPHIE STANDARDISÉE SUR DES CLASSES EXCLUSIVEMENT */
.title-hero {
    font-family: var(--font-family-urbanist);
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.1;
    color: var(--text-primary);
}

.title-section {
    font-size: 2.25rem;
    margin-bottom: var(--space-3xl);
    text-align: center;
    position: relative;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.title-section::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.title-card {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-align: center;
}

.title-subsection {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;
    opacity: 0;
    animation: fadeInUp .5s ease 0.6s forwards;
}

.second-text {
    animation: fadeInUp .5s ease .7s forwards;
    color: #8eff84;
}


strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Styling for <strong> inside contact info */

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(11, 13, 23, 0.95);
    box-shadow: var(--shadow-lg);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text-primary);
}

/* Directement sur a.logo */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    margin: 0;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-blue);
}

/* Ajout hover */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    width: min(90%, 800px);
    border-radius: 15px;
    padding: 10px;
    transition: 1s;
    animation: outline-glow 1s ease 1s forwards; /* Animation pour l'outline */
    box-shadow: rgba(0, 0, 0, 0.4) 10px 20px 30px, rgba(0, 0, 0, 0.3) 10px 1px 53px 3px, rgba(162, 162, 162, 0.2) 0px -1px 3px inset;


}


@keyframes outline-glow {

    from {


    }

    to {
        opacity: 1;
        background: rgba(255, 255, 255, 0.02);


    }

}

@media screen and (min-width: 768px) {
    .hero-content {
        width: 90%;
        padding: 200px 10px;
    }

}


.line-mask {
    display: block;
    overflow: hidden;
}

.word {
    display: inline-block;
    transform: translateY(110%);
    animation: slide-up 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    white-space: nowrap;
}

@keyframes slide-up {
    to {
        transform: translateY(0%);
    }
}

.animated-bg-effect {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.animated-bg-effect::before, .animated-bg-effect::after {
    content: '';
    position: absolute;
    width: 50vmax;
    height: 50vmax;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.1;
    animation: move-glow 20s infinite alternate;
}

.animated-bg-effect::before {
    background: var(--accent-purple);
    left: 10%;
    top: 10%;
}

.animated-bg-effect::after {
    background: var(--accent-pink);
    right: 10%;
    bottom: 10%;
    animation-delay: -10s;
}

@keyframes move-glow {
    0% {
        transform: translate(-20%, -20%) scale(1);
    }
    100% {
        transform: translate(20%, 20%) scale(1.1);
    }
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0s ease-out 0s forwards;
}

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


/* BOUTONS & FORMULAIRES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--font-size-base);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-spring);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    animation: fadeInUp .5s ease .9s backwards;
}

/* shadow-lg */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 0 30px rgba(124, 58, 237, 0.3);
}

/* shadow-xl, shadow-glow */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp .5s ease 1s backwards;
}

/* Ajouter bordure ici */
.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.form-row > .form-group {
    flex: 1;
    min-width: 150px; /* Assure que les champs ne sont pas trop écrasés */
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

/* Stylisation de div.form-label */
.form-input {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-family: var(--font-family-inter);
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input.error {
    border-color: var(--error);
}

.form-error {
    color: var(--error);
    font-size: 0.875rem;
    min-height: 1.2rem;
    margin-top: 0.25rem;
}

/* Pour garder la place même vide */
.form-result {
    margin-top: var(--space-md);
    font-weight: 500;
    min-height: 1.2rem;
}

/* Pour les messages de succès/erreur */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


/* SECTIONS ET CARTES DE SERVICES (100% flexbox) */
.section {
    padding: var(--space-4xl) 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2xl);
    margin-top: var(--space-3xl);
}

.serv1 {
    animation: fadeInUp 1s ease-out 0.5s backwards;
}

.serv2 {
    animation: fadeInUp 1s ease-out 0.7s backwards;
}

.serv3 {
    animation: fadeInUp 1s ease-out 0.9s backwards;
}

.serv4 {
    animation: fadeInUp 1s ease-out 1.1s backwards;
}


.service-card {
    flex: 1 1 280px;
    max-width: calc(25% - var(--space-lg)); /* Pour 4 colonnes, ajusté par la marge */
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-purple);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--accent-blue); /* Ajustement pour être plus intégré */
    text-align: center;
}

.service-list {
    list-style: none;
    padding-left: 0;
    margin-top: auto;
}

/* push content to bottom */
.service-list li {
    padding: var(--space-xs) 0 var(--space-xs) var(--space-lg);
    position: relative;
    color: var(--text-secondary);
}

.service-list li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: #08ee00;
    font-weight: 900;
    font-size: 1.2rem;
    top: 0;
}

/* Centrer le › */


/* CONTACT (100% flexbox) */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3xl);
    margin-top: var(--space-3xl);
}

.contact-form {
    flex: 1.5;
    min-width: 320px;
    background: var(--bg-tertiary);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item > div {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* For the strong equivalent div */


/* FOOTER & SCROLL-TOP */
.footer {
    background: var(--bg-secondary);
    padding: var(--space-xl) 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.9;
}

.scroll-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

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


/* RESPONSIVE */
@media (max-width: 1024px) {
    .service-card {
        max-width: calc(50% - var(--space-lg));
    }

    /* 2 colonnes sur tablette */
    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-form, .contact-info {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .title-section {
        font-size: 2rem;
        margin-bottom: var(--space-2xl);
    }

    .hero-content {

        height: 464px;
    }


    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .service-card {
        max-width: 100%; /* 1 colonne sur mobile */
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Champs de formulaire en colonne */
    .form-row > .form-group {
        min-width: unset;
    }

    /* Reset min-width for mobile fields */
    .hero-cta {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-title {
        font-size: clamp(2.2rem, 7vw, 3.5rem);
    }

    /* Réduction pour mobiles */
}

/* Mobile menu overlay */
#nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    padding: var(--space-md) 0;
    animation: fadeInDown 0.3s ease-out;
}

#nav-menu.active li {
    width: 100%;
    text-align: center;
    padding: var(--space-sm) 0;
}

#nav-menu.active .nav-link {
    display: block;
    width: calc(100% - 2 * var(--space-xl));
    margin: 0 auto;
}

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

/* === PREFERS REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}