/* Custom variables matching the logo's premium tech identity[cite: 1] */
:root {
    --primary: #0052cc;
    /* Cobalt/Electric Blue from logo[cite: 1] */
    --primary-glow: rgba(0, 82, 204, 0.15);
    --dark-bg: #050e1e;
    /* Deep Space Blue from logo background[cite: 1] */
    --card-bg: #0b1a30;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-sans: 'Inter', sans-serif;
    --font-tech: 'Orbitron', sans-serif;
    /* --font-sans: 'Raleway', sans-serif; */

    --font-sans: 'Nunito', sans-serif;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Un léger serrage pour donner du caractère aux titres en Nunito */
}

.filter-btn {
    font-family: var(--font-sans);
    font-weight: 600;
    /* Nunito est magnifique en 600 pour les boutons */
}

/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 8rem 0;
}

/* Utility Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 82, 204, 0.35);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
}

.section-title-wrap {
    margin-bottom: 4rem;
}

.section-title-wrap.text-center {
    text-align: center;
}

.sub-title {
    font-family: var(--font-tech);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Preloader Logo Constellation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #030a15;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
}

.loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

#loaderCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Logo reveal container ── */
.loader-reveal {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
}

.loader-letters {
    display: flex;
    gap: 0.4rem;
    perspective: 800px;
}

/* Each letter appears with a star burst */
.lr-letter {
    font-family: 'Orbitron', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--white);
    display: inline-block;
    opacity: 0;
    transform: scale(0.3) rotateX(40deg) translateY(30px);
    animation: lrLetterReveal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(0.25s * var(--i) + 0.3s);
    text-shadow: 
        0 0 0px rgba(0, 82, 204, 0),
        0 0 0px rgba(0, 210, 255, 0);
    position: relative;
}

/* Alternate color on first O and third position (I->blue-ish) */
.lr-letter:nth-child(1),
.lr-letter:nth-child(4) {
    color: var(--primary);
}

@keyframes lrLetterReveal {
    0% {
        opacity: 0;
        transform: scale(0.3) rotateX(40deg) translateY(30px);
        text-shadow: 0 0 0px rgba(0, 82, 204, 0);
    }
    40% {
        opacity: 1;
        transform: scale(1.2) rotateX(-8deg) translateY(-4px);
        text-shadow: 
            0 0 30px rgba(0, 82, 204, 0.5),
            0 0 60px rgba(0, 210, 255, 0.2);
    }
    70% {
        transform: scale(0.95) rotateX(3deg) translateY(2px);
        text-shadow: 
            0 0 20px rgba(0, 82, 204, 0.25),
            0 0 40px rgba(0, 210, 255, 0.1);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateX(0deg) translateY(0);
        text-shadow: 
            0 0 15px rgba(0, 82, 204, 0.15),
            0 0 30px rgba(0, 210, 255, 0.05);
    }
}

/* Subtitle appears after all letters */
.lr-sub {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    animation: lrSubReveal 0.6s ease 1.8s forwards;
}

@keyframes lrSubReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .loader {
        background: var(--dark-bg);
    }
    #loaderCanvas {
        display: none;
    }
    .lr-letter {
        opacity: 1;
        transform: none;
        animation: none;
        font-size: 2.5rem;
    }
    .lr-sub {
        opacity: 1;
        transform: none;
        animation: none;
        font-size: 1rem;
    }
    .loader-reveal {
        gap: 0.2rem;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background-color: rgba(5, 14, 30, 0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-main {
    font-family: var(--font-tech);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 3px;
    line-height: 1;
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--primary);
    letter-spacing: 4px;
    font-weight: 600;
    margin-top: 2px;
}

.logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}


.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--white);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 82, 204, 0.1);
    border: 1px solid rgba(0, 82, 204, 0.2);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-image-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.2;
    z-index: 1;
    filter: blur(40px);
}

.hero-tech-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 2;
    font-family: monospace;
}

.code-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.code-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

.hero-tech-card pre {
    color: #a7b7cd;
}

.hero-tech-card .keyword {
    color: #ff79c6;
}

.hero-tech-card .string {
    color: #f1fa8c;
}

/* Hero Constellation Canvas */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 2. STYLE DU CARROUSEL DE LOGOS CLIENTS */
.partners {
    background-color: #030a15;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.partners-title {
    text-align: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 500;
}

.slider-track-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
}

/* Masque élégant avec dégradé transparent sur les côtés pour l'effet premium */
.slider-track-wrap::before,
.slider-track-wrap::after {
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.slider-track-wrap::before {
    left: 0;
    background: linear-gradient(to right, #030a15 0%, transparent 100%);
}

.slider-track-wrap::after {
    right: 0;
    background: linear-gradient(to left, #030a15 0%, transparent 100%);
}

.slider-track {
    display: flex;
    width: calc(250px * 10);
    /* 250px de large par slide * nombre total de slides (G1 + G2) */
    animation: scrollInfinite 25s linear infinite;
}

.slider-track:hover {
    animation-play-state: paused;
    /* Le défilement s'arrête doucement au survol */
}

.slide {
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}.slide img {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(150%);
    /* Rend les logos homogènes et blancs/gris */
    opacity: 0.4;
    transition: var(--transition);
}

.slide img:hover {
    filter: grayscale(0%) brightness(100%);
    /* Reprend ses couleurs d'origine au survol */
    opacity: 0.9;
}

/* Animation CSS pure pour le défilement continu */
@keyframes scrollInfinite {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 5));
        /* Se déplace de la moitié exacte de la largeur (largeur du Groupe 1) */
    }
}

/* Ajustement pour les petits écrans */
@media (max-width: 768px) {

    .slider-track-wrap::before,
    .slider-track-wrap::after {
        width: 50px;
    }

    .slide {
        width: 160px;
    }

    .slider-track {
        width: calc(160px * 10);
    }

    @keyframes scrollInfinite {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-160px * 5));
        }
    }
}

/* Section À Propos & Stats */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(0, 82, 204, 0.3);
}

.stat-number {
    font-family: var(--font-tech);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Section Témoignages */
.testimonial-slider-container {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.testimonial-card {
    min-width: 100%;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.testimonial-card.active {
    opacity: 1;
}

.quote {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 2rem;
    text-align: center;
}

.client-info {
    text-align: center;
}

.client-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.client-info span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
}

.dot-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.dot-btn.active {
    background-color: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* Barres de progression du slider témoignages */
.testimonial-progress-wrap {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 1rem;
}

.testimonial-progress-bar {
    width: 48px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.3s ease;
}

.testimonial-progress-bar:hover {
    background: rgba(255, 255, 255, 0.15);
}

.testimonial-progress-bar .progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), #00d2ff);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.testimonial-progress-bar.active .progress-fill {
    animation: progressFill 5s linear forwards;
}

.testimonial-progress-bar.paused .progress-fill {
    animation-play-state: paused;
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-progress-bar .progress-fill {
        animation: none;
    }
}

/* Pause overlay on hover */
.testimonial-slider-container.paused .testimonial-slider {
    transition-duration: 0.9s;
}

/* FAQ Layout */
.modern-faq-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    font-size: 0.9rem;
    transition: var(--transition);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: rgba(0, 0, 0, 0.1);
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

.contact-line i {
    color: var(--primary);
}

.contact-form {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background-color: rgba(5, 14, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 82, 204, 0.2), 0 0 0 3px var(--primary-glow);
    transform: translateY(-2px);
    background-color: rgba(5, 14, 30, 0.8);
}

/* Filled state when input has value */
.contact-form input.filled,
.contact-form textarea.filled {
    border-color: rgba(0, 82, 204, 0.3);
    background-color: rgba(5, 14, 30, 0.7);
}

.form-group.focused .form-field-hint {
    color: var(--text-muted);
}

.form-group.focused input,
.form-group.focused textarea {
    border-color: var(--primary);
}

/* Form progress bar */
.contact-form {
    position: relative;
    overflow: hidden;
}

.form-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(to right, var(--primary), #00d2ff);
    border-radius: 8px 8px 0 0;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.form-progress-bar.complete {
    background: linear-gradient(to right, #10b981, #34d399);
}

/* Helper text under fields */
.form-field-hint {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 0.35rem;
    transition: color 0.3s ease;
    padding-left: 0.25rem;
}

.form-field-hint.visible {
    color: var(--text-muted);
}

/* Contact form responsive */
@media (max-width: 576px) {
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    position: absolute;
    bottom: -1.2rem;
    left: 0;
    display: none;
}

.form-group.invalid .error-msg {
    display: block;
}

.form-group.invalid input,
.form-group.invalid textarea {
    border-color: #ef4444;
}

.form-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    display: none;
    text-align: center;
}

.btn-block {
    width: 100%;
}

/* Footer */
.footer {
    background-color: #030a15;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 5rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== LIVING O - BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    background: transparent;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, visibility 0.5s ease, bottom 0.3s ease, right 0.3s ease;
    will-change: transform;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* The O letter */
.btt-o {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    z-index: 2;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 82, 204, 0.3);
    will-change: transform, text-shadow;
}

/* SVG progress ring */
.btt-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    z-index: 1;
}

.btt-ring-progress {
    transition: stroke-dashoffset 0.15s ease-out, stroke 0.4s ease;
}

/* Outer glow ring */
.btt-glow-ring {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px solid rgba(0, 82, 204, 0.1);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* Hover: O ignites */
.back-to-top:hover .btt-o {
    color: #00d2ff;
    transform: scale(1.15);
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.5), 0 0 40px rgba(0, 210, 255, 0.2);
}

.back-to-top:hover .btt-glow-ring {
    opacity: 1;
    transform: scale(1.3);
    border-color: rgba(0, 210, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 82, 204, 0.15);
}

/* Pulse effect in show state */
.back-to-top.show .btt-o {
    animation: bttPulse 3s ease-in-out infinite;
}

@keyframes bttPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 82, 204, 0.3); }
    50% { text-shadow: 0 0 20px rgba(0, 82, 204, 0.6), 0 0 40px rgba(0, 82, 204, 0.2); }
}

/* Shockwave ring on click */
.btt-shockwave {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}

.btt-shockwave.animate {
    animation: bttShockwave 0.6s ease-out forwards;
}

@keyframes bttShockwave {
    0% { transform: scale(1); opacity: 0.8; border-color: var(--primary); }
    50% { opacity: 0.4; border-color: #00d2ff; }
    100% { transform: scale(2.5); opacity: 0; border-color: #00d2ff; }
}

/* Floating particles on click */
.btt-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: var(--primary);
}

.btt-particle.animate {
    animation: bttParticle 0.7s ease-out forwards;
}

@keyframes bttParticle {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
    .btt-o {
        font-size: 1.3rem;
    }
    .btt-glow-ring {
        width: 60px;
        height: 60px;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Hero micro-interactions --- */
/* Badge pulse */
.badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 82, 204, 0); }
    50% { box-shadow: 0 0 15px rgba(0, 82, 204, 0.08), 0 0 30px rgba(0, 82, 204, 0.03); }
}

/* Hero title: gradient text glow */
.hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, #88bbff 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroTitleShimmer 6s ease-in-out infinite;
}

@keyframes heroTitleShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}



/* Hero glow color shift */
.hero-glow {
    animation: glowShift 5s ease-in-out infinite;
}

@keyframes glowShift {
    0%, 100% { background: radial-gradient(circle, var(--primary) 0%, transparent 70%); opacity: 0.2; }
    50% { background: radial-gradient(circle, #00d2ff 0%, transparent 70%); opacity: 0.15; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .badge { animation: none; }
    .hero h1 { animation: none; background: none; -webkit-text-fill-color: var(--text-main); }
    .hero-tech-card { animation: none; }
    .hero-glow { animation: none; }
}

/* Responsive Design */
@media (max-width: 968px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--dark-bg);
        width: 100%;
        height: 100vh;
        justify-content: center;
        transition: 0.4s ease;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-grid,
    .about-grid,
    .modern-faq-layout,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item.left .step-num {
        right: 1.5rem;
        left: auto;
    }
}

/* SECTION SOLUTIONS DYNAMIQUE */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.solution-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
}

.card-inner {
    padding: 2.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 2;
    position: relative;
}

/* Effet de lueur en arrière-plan au survol */
.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(0, 102, 255, 0.15), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.solution-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.solution-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #ffffff;
    transition: color 0.3s ease;
}

.solution-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color, #0066ff);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.3s ease;
}

/* --- EFFETS AU SURVOL (HOVER) --- */
.solution-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 102, 255, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.solution-card:hover::before {
    opacity: 1;
}

/* Dynamisation spécifique de l'icône et du titre lors du survol de la zone */
.solution-card:hover .solution-icon {
    color: var(--primary-color, #0066ff);
    transform: scale(1.1) rotate(5deg);
}

.solution-card:hover .solution-card h3 {
    color: var(--primary-color, #0066ff);
}

.solution-card:hover .solution-desc {
    color: #ffffff;
    /* Le texte devient plus lumineux et lisible */
}

.solution-card:hover .learn-more {
    gap: 0.8rem;
    /* La flèche se déplace légèrement vers la droite */
}

/* TIMELINE PREND VIE */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 4rem auto 0 auto;
}

/* Ligne de fond (éteinte) */
.timeline-container::before {
    content: '';
    position: absolute;
    width: 4px;
    background: rgba(255, 255, 255, 0.05);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Ligne animée (allumée) qui va grandir avec le JS */
.timeline-progress-line {
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, #0055ff, #00d2ff);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 0%;
    /* Contrôlé par le JavaScript */
    transition: height 0.1s linear;
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
    z-index: 1;
}

.timeline {
    position: relative;
    z-index: 2;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 3rem;
}

.timeline-item.left {
    left: 0;
    padding-right: 3.5rem;
}

.timeline-item.right {
    left: 50%;
    padding-left: 3.5rem;
}

/* Les points d'ancrage centraux */
.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #0d1527;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 25px;
    z-index: 3;
    transition: all 0.4s ease;
}

.timeline-item.left .timeline-dot {
    right: -8px;
}

.timeline-item.right .timeline-dot {
    left: -8px;
}

/* Quand l'élément devient actif (au scroll) */
.timeline-item.active .timeline-dot {
    background: #00d2ff;
    border-color: #0055ff;
    box-shadow: 0 0 12px #00d2ff, 0 0 20px #0055ff;
    transform: scale(1.2);
}

/* Conteneur de texte */
.timeline-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.timeline-item.left .timeline-content:hover {
    transform: translateX(-5px);
}

.timeline-item.right .timeline-content:hover {
    transform: translateX(5px);
}

/* Chiffres d'étapes technologiques */
.step-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    transition: color 0.4s ease;
}

.timeline-item.active .step-num {
    color: rgba(0, 210, 255, 0.08);
}

.timeline-content:hover .step-num {
    color: rgba(0, 210, 255, 0.18);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.timeline-item.active .timeline-content h3 {
    color: #00d2ff;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/*--- RESPONSIVE MOBILE ---*/
@media (max-width: 768px) {

    .timeline-container::before,
    .timeline-progress-line {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        margin-bottom: 2.5rem;
    }

    .timeline-item.left {
        left: 0;
        padding-right: 0;
        padding-left: 3.5rem;
    }

    .timeline-item.right {
        left: 0;
        padding-left: 3.5rem;
    }

    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 12px;
    }
}

/* --- PORTFOLIO ULTRA-DYNAMIQUE --- */
.portfolio-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(0, 102, 255, 0.1);
    border-color: #00d2ff;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* Gestion de l'animation de filtrage */
.portfolio-item {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease,
        max-width 0.4s ease;
    transform-origin: center;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    gap: 0;
}

.portfolio-card-inner {
    background: #0d1527;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Boîte d'image et effets de grille */
.portfolio-img-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

/* Effet trame de fond technologique */
.portfolio-tech-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

/* Contenu textuel persistant mais magnifié au survol */
.portfolio-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 2rem;
    background: linear-gradient(to top, #0d1527 80%, rgba(13, 21, 39, 0.9) 40%, transparent 100%);
    transform: translateY(40px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tech-tag {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.portfolio-content h4 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.portfolio-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-link:hover {
    color: #00d2ff;
}

/* --- LOGIQUE HOVER ANIMATION --- */
.portfolio-card-inner:hover {
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 102, 255, 0.1);
    transform: translateY(-4px);
}

.portfolio-card-inner:hover .portfolio-img-box {
    transform: scale(1.06);
}

.portfolio-card-inner:hover .portfolio-tech-grid {
    opacity: 0.7;
}

.portfolio-card-inner:hover .portfolio-content {
    transform: translateY(0);
}

.portfolio-card-inner:hover .tech-tag {
    background: #00d2ff;
    color: #0d1527;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.portfolio-card-inner:hover .portfolio-content p {
    opacity: 1;
}

.portfolio-card-inner:hover .project-link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

@media (max-width: 576px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-content {
        transform: translateY(0);
    }

    .project-link {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(0, 82, 204, 0.06) 0%, rgba(0, 82, 204, 0.02) 30%, transparent 60%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    will-change: transform, left, top;
}

.cursor-dot {
    position: fixed;
    width: clamp(5px, 0.5vw, 9px);
    height: clamp(5px, 0.5vw, 9px);
    border-radius: 50%;
    background-color: var(--primary);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 82, 204, 0.5), 0 0 20px rgba(0, 82, 204, 0.2);
    transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease, opacity 0.3s ease;
    will-change: transform, left, top;
}

.cursor-dot.hover {
    width: 10px;
    height: 10px;
    background-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.6), 0 0 30px rgba(0, 210, 255, 0.3);
}

/* Hide cursor glow on touch devices */
@media (hover: none) and (pointer: coarse) {

    .cursor-glow,
    .cursor-dot {
        display: none;
    }
}

body.cursor-active {
    cursor: none;
}

body.cursor-active a,
body.cursor-active button,
body.cursor-active input,
body.cursor-active textarea,
body.cursor-active select,
body.cursor-active [role="button"] {
    cursor: none;
}