@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

@layer base, layout, components, interactive, animations;

@layer base {
    :root {
        --primary: #f59e0b;
        --primary-hover: #d97706;
        --bg-cream: #fdfbf7;
        --bg-tan: #c28e5c;
        --bg-dark: #111827;
        --text-main: #374151;
        --text-heading: #1f2937;
        --white: #ffffff;
        --border: #e5e7eb;
        --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Transition plus douce */
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    html {
        scroll-behavior: smooth;
    }
    body {
        font-family: "Plus Jakarta Sans", sans-serif;
        background-color: var(--bg-cream);
        color: var(--text-main);
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        overflow-x: hidden; /* Empêche les débordements avec le parallaxe */
    }
    h1,
    h2,
    h3,
    h4 {
        color: var(--text-heading);
        font-weight: 700;
        line-height: 1.2;
    }
}

@layer layout {
    .container {
        max-width: 1300px;
        margin: 0 auto;
        padding: 0 5%;
    }
    section {
        padding: 6rem 0;
    }
}

@layer components {
    /* Top Bar & Navbar */
    .top-bar {
        background-color: var(--bg-dark);
        color: #9ca3af;
        font-size: 0.85rem;
        padding: 0.8rem 0;
        font-weight: 500;
    }
    .top-bar-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .top-info {
        display: flex;
        gap: 2rem;
    }

    .navbar {
        background-color: var(--white);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 1000;
        transition:
            padding 0.3s ease,
            box-shadow 0.3s ease;
    }
    .navbar.scrolled {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 90px;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--text-heading);
    }
    .logo-icon {
        width: 24px;
        height: 24px;
        background-color: var(--primary);
        border-radius: 4px;
    }

    .nav-links {
        display: flex;
        gap: 2.5rem;
    }
    .nav-links a {
        text-decoration: none;
        color: var(--text-heading);
        font-weight: 600;
        font-size: 0.95rem;
        transition: var(--transition);
        position: relative;
    }

    /* Animation de soulignement sur les liens */
    .nav-links a::after {
        content: "";
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -4px;
        left: 0;
        background-color: var(--primary);
        transition: width 0.3s ease;
    }
    .nav-links a:hover::after,
    .nav-links a.active::after {
        width: 100%;
    }
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary);
    }

    /* Buttons avec effet "Shine" (Brillance) */
    .btn-primary,
    .btn-outline {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2rem;
        border-radius: 6px;
        font-weight: 700;
        text-decoration: none;
        transition: var(--transition);
        position: relative;
        overflow: hidden;
        cursor: pointer;
    }

    .btn-primary {
        background-color: var(--primary);
        color: var(--white);
        border: 2px solid var(--primary);
    }
    .btn-outline {
        background-color: transparent;
        color: var(--white);
        border: 2px solid var(--white);
    }

    .btn-primary::before,
    .btn-outline::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%
        );
        transform: skewX(-25deg);
        transition: var(--transition);
        z-index: 1;
    }

    .btn-primary:hover::before,
    .btn-outline:hover::before {
        left: 200%;
        transition: 0.7s ease;
    }
    .btn-primary:hover {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    }
    .btn-outline:hover {
        background-color: var(--white);
        color: var(--text-heading);
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    /* Hero Section (Parallaxe préparé) */
    .hero {
        position: relative;
        height: 85vh;
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    .hero-bg {
        position: absolute;
        top: -10%;
        left: 0;
        width: 100%;
        height: 120%; /* Plus grand pour le parallaxe */
        background-size: cover;
        background-position: center;
        z-index: -2;
        will-change: transform; /* Optimisation GPU */
    }
    .hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            to right,
            rgba(17, 24, 39, 0.9) 0%,
            rgba(17, 24, 39, 0.4) 100%
        );
        z-index: -1;
    }

    .hero-content {
        position: relative;
        z-index: 1;
    }
    .hero-text-box h1 {
        color: var(--white);
        font-size: clamp(3rem, 6vw, 4.5rem);
        margin-bottom: 2rem;
        letter-spacing: -1px;
    }
    .hero-buttons {
        display: flex;
        gap: 1rem;
        margin-bottom: 3rem;
    }

    /* Badge avec animation flottante */
    .trust-badge {
        display: inline-flex;
        align-items: center;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 0.8rem 1.5rem;
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        animation: float 6s ease-in-out infinite; /* Animation continue */
    }
    .avatars {
        display: flex;
    }
    .avatars img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid var(--text-heading);
        margin-left: -10px;
    }
    .avatars img:first-child {
        margin-left: 0;
    }
    .trust-text {
        color: var(--white);
        font-size: 0.85rem;
        font-weight: 500;
    }
    .stars {
        color: var(--primary);
        font-size: 1rem;
        letter-spacing: 2px;
        margin-bottom: 2px;
    }

    /* Titles */
    .subtitle {
        display: inline-block;
        color: var(--primary);
        font-weight: 800;
        font-size: 0.85rem;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 1rem;
        position: relative;
        padding-left: 20px;
    }
    .subtitle::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
        height: 2px;
        background-color: var(--primary);
    }
    .section-heading {
        text-align: center;
        margin-bottom: 4rem;
    }
    .section-heading .subtitle::before {
        display: none;
    } /* On cache la barre pour les titres centrés */
    .section-heading h2 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    /* Stats Section */
    .stats-section {
        background-color: var(--bg-tan);
        color: var(--white);
        position: relative;
        overflow: hidden;
    }
    .stats-section h2,
    .stats-section h3,
    .stats-section p {
        color: var(--white);
    }
    .stats-header {
        margin-bottom: 4rem;
    }
    .stats-header .subtitle {
        color: var(--bg-dark);
    }
    .stats-header .subtitle::before {
        background-color: var(--bg-dark);
    }
    .stats-header h2 {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin-bottom: 4rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding: 2rem 0;
    }
    .stat-box h3 {
        font-size: 3rem;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
    }
    .stat-box p {
        font-weight: 600;
        font-size: 1.1rem;
        opacity: 0.9;
    }
    .stats-image img {
        width: 100%;
        height: 500px;
        object-fit: cover;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        transition: transform 0.5s ease;
    }
    .stats-image:hover img {
        transform: scale(1.02);
    }

    /* Services Grid avec Zoom d'image */
    .services-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .service-card {
        background: var(--white);
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid var(--border);
        transition: var(--transition);
        cursor: pointer;
    }
    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        border-color: transparent;
    }

    .service-img {
        height: 240px;
        background-size: cover;
        background-position: center;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .service-card:hover .service-img {
        transform: scale(1.08);
    } /* Zoom interne */

    .service-content {
        padding: 2rem;
        position: relative;
        z-index: 2;
        background: var(--white);
    }
    .service-content h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        transition: color 0.3s;
    }
    .service-card:hover .service-content h3 {
        color: var(--primary);
    }
    .service-content p {
        color: var(--text-main);
        margin-bottom: 1.5rem;
    }
    .read-more {
        color: var(--primary);
        font-weight: 700;
        text-decoration: none;
        font-size: 0.95rem;
    }

    /* Features Split */
    .features-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }
    .features-text h2 {
        font-size: clamp(2rem, 4vw, 3rem);
        margin-bottom: 1.5rem;
    }
    .feature-item {
        display: flex;
        gap: 1.5rem;
        margin-bottom: 2rem;
        transition: transform 0.3s;
    }
    .feature-item:hover {
        transform: translateX(10px);
    } /* Glissement au survol */
    .check-icon {
        width: 30px;
        height: 30px;
        background: var(--primary);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-weight: bold;
    }
    .feature-item h4 {
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
    }
    .features-image-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .features-image-grid img {
        width: 100%;
        border-radius: 12px;
        object-fit: cover;
        transition: transform 0.5s;
    }
    .features-image-grid img:hover {
        transform: scale(1.05) rotate(-1deg);
    }
    .features-image-grid .img-1 {
        height: 350px;
        margin-top: 3rem;
    }
    .features-image-grid .img-2 {
        height: 350px;
    }

    /* Process Section */
    .process-section {
        background-color: var(--white);
    }
    .process-grid {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
    }
    .process-step {
        flex: 1;
        text-align: center;
        transition: var(--transition);
    }
    .process-step:hover {
        transform: translateY(-10px);
    }
    .step-number {
        width: 60px;
        height: 60px;
        background: var(--bg-cream);
        border: 2px dashed var(--border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 2rem;
        font-weight: 800;
        font-size: 1.2rem;
        color: var(--primary);
        transition: all 0.3s;
    }
    .process-step:hover .step-number {
        background: var(--primary);
        color: white;
        border-style: solid;
        border-color: var(--primary);
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
    }
    .step-card {
        background: var(--bg-cream);
        padding: 2.5rem 2rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        height: 100%;
    }
    .step-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    .process-connector {
        flex: 0 0 50px;
        height: 2px;
        background: var(--border);
        margin-top: 30px;
        position: relative;
        overflow: hidden;
    }

    /* Animation du connecteur */
    .process-connector::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--primary);
        animation: connectLine 2s infinite linear;
    }

    /* Testimonials */
    .testimonials-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .testimonial-card {
        background: var(--white);
        padding: 2.5rem;
        border-radius: 12px;
        color: var(--text-main);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: var(--transition);
        border: 1px solid transparent;
    }
    .testimonial-card:hover {
        transform: translateY(-10px);
        border-color: var(--primary);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }
    .testimonial-card p {
        color: var(--text-main);
        font-style: italic;
        margin-bottom: 2rem;
        flex-grow: 1;
    }
    .client-info {
        display: flex;
        align-items: center;
        gap: 1rem;
        border-top: 1px solid var(--border);
        padding-top: 1.5rem;
    }
    .client-info img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        transition: transform 0.3s;
    }
    .testimonial-card:hover .client-info img {
        transform: scale(1.1);
    }
    .client-info h4 {
        color: var(--text-heading);
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }
    .client-info span {
        font-size: 0.85rem;
        color: var(--text-muted);
    }

    /* Appointment Form */
    .appointment-section {
        background-color: var(--white);
    }
    .appointment-box {
        background: var(--bg-cream);
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: 4rem;
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 4rem;
        align-items: center;
        transition: box-shadow 0.4s;
    }
    .appointment-box:hover {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    }
    .appointment-text h2 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    .input-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .input-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .input-group label {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-heading);
    }
    .input-group input,
    .input-group select {
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        font-family: inherit;
        font-size: 1rem;
        transition: var(--transition);
        outline: none;
    }
    .input-group input:focus,
    .input-group select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

    /* Blog avec Zoom d'image */
    .blog-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    .blog-card {
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        background: var(--white);
        transition: var(--transition);
    }
    .blog-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    }

    .blog-img-wrapper {
        overflow: hidden;
        height: 300px;
    }
    .blog-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .blog-card:hover img {
        transform: scale(1.1);
    }

    .blog-content {
        padding: 2.5rem;
    }
    .blog-content .date {
        color: var(--primary);
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        margin-bottom: 1rem;
        display: block;
    }
    .blog-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        transition: color 0.3s;
    }
    .blog-card:hover h3 {
        color: var(--primary);
    }

    /* CTA Banner & Footer */
    .cta-banner {
        background-color: var(--bg-dark);
        padding: 5rem 0;
        position: relative;
        overflow: hidden;
    }
    .cta-banner::before {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        background: var(--primary);
        border-radius: 50%;
        filter: blur(100px);
        opacity: 0.1;
        top: -200px;
        right: -100px;
        animation: pulse 6s infinite;
    }
    .cta-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        z-index: 1;
    }
    .cta-content h2 {
        color: var(--white);
        font-size: 2.5rem;
        margin: 0;
    }

    .footer {
        background-color: #0b1120;
        color: #9ca3af;
        padding: 5rem 0 2rem;
    }
    .footer-grid {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: 4rem;
        margin-bottom: 4rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 4rem;
    }
    .footer h4 {
        color: var(--white);
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .footer-links a {
        color: #9ca3af;
        text-decoration: none;
        transition: var(--transition);
    }
    .footer-links a:hover {
        color: var(--primary);
        padding-left: 5px;
    } /* Glissement des liens de footer */
    .footer-contact p {
        margin-bottom: 1rem;
    }
    .footer-bottom {
        text-align: center;
        font-size: 0.9rem;
    }

    /* Responsive */
    .mobile-menu-btn {
        display: none;
        background: none;
        border: none;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }
    .mobile-menu-btn span {
        width: 25px;
        height: 3px;
        background: var(--text-heading);
        border-radius: 2px;
    }

    @media (max-width: 1024px) {
        .top-bar {
            display: none;
        }
        .nav-btn {
            display: none;
        }

        .nav-links {
            position: absolute;
            top: 90px;
            left: 0;
            width: 100%;
            background-color: var(--white);
            flex-direction: column;
            padding: 2rem 5%;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
            visibility: hidden;
            opacity: 0;
            transform: translateY(-20px);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .nav-links.is-active {
            visibility: visible;
            opacity: 1;
            transform: translateY(0);
        }
        .mobile-menu-btn {
            display: flex;
            z-index: 1001;
        }
        .mobile-menu-btn span {
            transition:
                transform 0.3s ease,
                opacity 0.3s ease;
            transform-origin: center;
        }
        .mobile-menu-btn.is-active span:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }
        .mobile-menu-btn.is-active span:nth-child(2) {
            opacity: 0;
        }
        .mobile-menu-btn.is-active span:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }

        .stats-grid,
        .services-grid,
        .features-split,
        .testimonials-grid,
        .appointment-box,
        .blog-grid {
            grid-template-columns: 1fr;
        }
        .stats-grid {
            grid-template-columns: 1fr 1fr;
        }
        .appointment-box {
            padding: 2.5rem;
            gap: 2rem;
        }
        .features-image-grid .img-1 {
            margin-top: 0;
        }
        .process-grid {
            flex-direction: column;
            align-items: center;
        }
        .process-connector {
            display: none;
        }
        .process-step {
            width: 100%;
            margin-bottom: 2rem;
        }
        .cta-content {
            flex-direction: column;
            text-align: center;
            gap: 2rem;
        }
        .footer-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
        }
    }

    @media (max-width: 600px) {
        .hero-buttons {
            flex-direction: column;
        }
        .stats-grid {
            grid-template-columns: 1fr;
            text-align: center;
        }
        .input-grid {
            grid-template-columns: 1fr;
        }
    }
}

@layer animations {
    /* Révélation de base (Opacity & Slide) */
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-up.active {
        opacity: 1;
        transform: translateY(0);
    }
    .delay-1 {
        transition-delay: 0.15s;
    }
    .delay-2 {
        transition-delay: 0.3s;
    }

    /* Flottaison continue (Badge) */
    @keyframes float {
        0% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-10px);
        }
        100% {
            transform: translateY(0px);
        }
    }

    /* Flux d'énergie (Connecteur processus) */
    @keyframes connectLine {
        0% {
            left: -100%;
        }
        100% {
            left: 100%;
        }
    }

    /* Pulsation (CTA) */
    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 0.1;
        }
        50% {
            transform: scale(1.2);
            opacity: 0.15;
        }
        100% {
            transform: scale(1);
            opacity: 0.1;
        }
    }
}
