/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
    /* Couleurs - Thème Clair (Défaut) */
    --bg-main: #E0F3E1;
    --bg-secondary: #D4FFD7;
    --bg-card: #ffffff;
    --accent-primary: #1A535C; /* Bleu canard */
    --accent-secondary: #123b42; /* Bleu canard sombre */
    --text-main: #1a1a24;
    --text-muted: #555566;
    --border-color: rgba(0, 0, 0, 0.1);
    --error-color: #e53935;
    --success-color: #43a047;
    
    /* Variables d'opacité et composants (Thème clair) */
    --nav-bg-scrolled: rgba(224, 243, 225, 0.9);
    --overlay-bg: rgba(255, 255, 255, 0.85);
    --tag-bg: rgba(0, 0, 0, 0.05);
    --input-bg: rgba(0, 0, 0, 0.02);
    --input-bg-focus: rgba(0, 0, 0, 0.05);
    --popular-bg: linear-gradient(180deg, var(--bg-card) 0%, #f0f7f1 100%);
    --accent-primary-transparent: rgba(26, 83, 92, 0.1);
    --accent-primary-shadow: rgba(26, 83, 92, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.1);
    --shadow-btn: rgba(0, 0, 0, 0.15);
    
    /* Typographie */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Thème Sombre — inversion du thème clair (teal foncé + accents mint) */
body.dark-theme {
    --bg-main: #123b42;
    --bg-secondary: #0e2e34;
    --bg-card: #1A535C;
    --accent-primary: #D4FFD7;
    --accent-secondary: #D4FFD7;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-color: rgba(212, 255, 215, 0.12);
    --error-color: #ff6b6b;
    --success-color: #7ee787;

    --nav-bg-scrolled: rgba(18, 59, 66, 0.9);
    --overlay-bg: rgba(14, 46, 52, 0.85);
    --tag-bg: rgba(212, 255, 215, 0.08);
    --input-bg: rgba(212, 255, 215, 0.04);
    --input-bg-focus: rgba(212, 255, 215, 0.08);
    --popular-bg: linear-gradient(180deg, var(--bg-card) 0%, #154850 100%);
    --accent-primary-transparent: rgba(212, 255, 215, 0.1);
    --accent-primary-shadow: rgba(212, 255, 215, 0.25);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --shadow-btn: rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
@media (pointer: fine) {
    body, a, button, input, textarea {
        cursor: none !important;
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate3d(-50%, -50%, 0);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    will-change: transform, width, height;
}

/* Point central — précis, suit la souris à 1:1 */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-primary-shadow);
    transition: opacity 0.3s ease, width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Anneau extérieur — suit avec un léger retard (lerp côté JS) */
.cursor-outline {
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--accent-primary);
    transition: opacity 0.3s ease, width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease;
}

/* Au hover : le point disparaît, l'anneau grossit et se teinte */
.cursor-dot.hover {
    width: 0;
    height: 0;
}

.cursor-outline.hover {
    width: 56px;
    height: 56px;
    background-color: var(--accent-primary-transparent);
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
}

/* ==========================================================================
   TYPOGRAPHIE & UTILITAIRES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

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

.beta-badge {
    font-size: 0.9rem;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    padding: 4px 12px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 10px;
    border: none;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--accent-primary-shadow);
}

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

.btn-outline:hover {
    background-color: var(--accent-primary);
    color: var(--bg-main);
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 var(--accent-primary-shadow); }
    70% { box-shadow: 0 0 0 15px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ==========================================================================
   LOADER
   ========================================================================== */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
#navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition-fast);
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    padding: 15px 0;
    background-color: var(--nav-bg-scrolled);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.footer-logo-img {
    height: 38px;
    width: auto;
    display: block;
    margin: 0 auto 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

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

.hamburger .bar {
    display: block;
    width: 25px; height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: var(--transition-fast);
}

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

.bg-shapes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orb-float 15s infinite ease-in-out;
}

.shape-1 {
    top: 10%; left: 10%;
    width: 350px; height: 350px;
    background-color: var(--accent-primary);
}

.shape-2 {
    bottom: 10%; right: 10%;
    width: 450px; height: 450px;
    background-color: var(--accent-secondary);
    animation-delay: -7.5s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15vw, -10vh) scale(1.2); }
    66% { transform: translate(-10vw, 15vh) scale(0.8); }
    100% { transform: translate(0, 0) scale(1); }
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.greeting {
    color: var(--accent-primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.hero-name {
    font-size: 4.5rem;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    height: 48px; /* Évite les sauts lors du typewriter */
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent-primary);
}

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

.hero-hook {
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-main);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-7px) translateX(-50%); }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.image-border-anim {
    position: absolute;
    top: -15px; left: -15px; right: -15px; bottom: -15px;
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    z-index: -1;
    animation: morph 8s ease-in-out infinite;
}

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

.about-image-wrapper picture {
    display: block;
    width: 100%;
}

.about-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.about-text h3 { margin-bottom: 20px; font-size: 1.8rem; }
.about-text .bio { color: var(--text-muted); margin-bottom: 30px; }

.skills-container { margin-bottom: 30px; }
.skills-container h4 { margin-bottom: 15px; }

.soft-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 6px 15px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* ==========================================================================
   PORTFOLIO (TRAVAUX)
   ========================================================================== */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-main);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-hover);
    border-color: var(--accent-primary);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: var(--transition-fast);
}

.card:hover .card-overlay {
    opacity: 1;
}

.btn-icon {
    width: 45px; height: 45px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.card:hover .btn-icon {
    transform: translateY(0);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-tags span {
    font-size: 0.8rem;
    color: var(--text-muted);
    background-color: var(--tag-bg);
    padding: 4px 10px;
    border-radius: 4px;
}

/* ==========================================================================
   PRICING (FORMULES)
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: stretch;
    justify-content: center;
}

.pricing-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    border-color: var(--accent-primary);
}

.pricing-card.popular {
    background: var(--popular-bg);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px var(--accent-primary-transparent);
}

.popular-badge {
    position: absolute;
    top: -15px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-main);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.plan-name {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 30px;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin: 0 auto 40px auto;
    width: 100%;
    max-width: 320px;
    text-align: left;
}

.plan-features li {
    margin-bottom: 15px;
    color: var(--text-main);
    line-height: 1.5;
    padding-left: 28px;
    position: relative;
    font-size: 0.95rem;
}

.plan-features li i {
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 18px;
    text-align: center;
    font-size: 0.95em;
}

.pricing-card .btn {
    margin-top: auto;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 680px;
    margin: -20px auto 50px auto;
    font-size: 1.05rem;
}

.plan-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    line-height: 1;
}

.plan-target {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    min-height: 2.6em;
    font-style: italic;
}

.feat-sub {
    display: block;
    width: 100%;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 2px;
}

/* TABLEAU COMPARATIF */
.compare-wrapper {
    margin-top: 80px;
}

.compare-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-main);
}

.compare-scroll {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
    font-size: 0.95rem;
    table-layout: fixed;
}

.compare-table th:first-child,
.compare-table td:first-child {
    width: 26%;
}

.compare-table thead th:not(:first-child),
.compare-table tbody td {
    width: 18.5%;
}

.compare-table th,
.compare-table td {
    padding: 14px 18px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
}

.compare-table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
    position: sticky;
    top: 0;
}

.compare-table tbody th {
    text-align: left;
    color: var(--text-main);
    font-weight: 500;
    background-color: transparent;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:hover {
    background-color: var(--accent-primary-transparent);
}

.compare-table .th-highlight,
.compare-table .td-highlight {
    background: linear-gradient(180deg, var(--accent-primary-transparent), transparent);
    color: var(--accent-primary);
    font-weight: 600;
}

.compare-table .th-highlight {
    background: var(--accent-primary);
    color: var(--bg-main);
}

.compare-table .th-sub {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 2px;
}

.compare-table .ok { color: var(--accent-primary); }
.compare-table .ko { color: var(--text-muted); opacity: 0.5; }

/* Tableau comparatif — version mobile (carte par ligne) */
@media (max-width: 720px) {
    .compare-scroll {
        overflow-x: visible;
        border: none;
        background: transparent;
        padding: 0;
    }

    .compare-table {
        min-width: 0;
        width: 100%;
        table-layout: auto;
        font-size: 0.9rem;
        border-collapse: separate;
        border-spacing: 0;
    }

    .compare-table thead { display: none; }

    .compare-table tbody,
    .compare-table tr {
        display: block;
        width: 100%;
    }

    .compare-table tr {
        background-color: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px 18px;
        margin-bottom: 16px;
    }

    .compare-table tr:hover {
        background-color: var(--bg-card);
    }

    .compare-table tbody th {
        display: block;
        width: 100%;
        text-align: left;
        font-weight: 700;
        font-size: 1rem;
        color: var(--accent-primary);
        padding: 0 0 12px 0;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 12px;
    }

    .compare-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        text-align: right;
        padding: 8px 0;
        border: none;
        gap: 12px;
    }

    .compare-table tbody td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        text-align: left;
        flex: 1;
    }

    .compare-table tbody td.td-highlight {
        background: var(--accent-primary-transparent);
        border-radius: 6px;
        padding: 8px 10px;
        margin: 4px -4px;
    }

    .compare-table tbody td.td-highlight::before {
        color: var(--accent-primary);
        font-weight: 700;
    }

    .compare-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .compare-table tbody tr:last-child td {
        border-bottom: none;
    }

    .compare-table .th-sub {
        display: block;
        margin-top: 4px;
    }
}

/* ADD-ONS */
.addons-wrapper {
    margin-top: 80px;
}

.addons-intro {
    text-align: center;
    color: var(--text-muted);
    margin: -15px auto 35px auto;
    max-width: 600px;
}

.addons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
}

.addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 20px;
    transition: var(--transition-slow);
}

.addon-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.addon-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-weight: 500;
}

.addon-label i {
    color: var(--accent-primary);
    width: 20px;
    text-align: center;
}

.addon-price {
    color: var(--accent-primary);
    font-weight: 700;
    white-space: nowrap;
}

.addon-price small {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 2px;
}

.addon-price-text {
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 500;
    white-space: normal;
    text-align: right;
}

@media (min-width: 600px) {
    .addons-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   INSPIRATIONS (SCROLLING IMAGES)
   ========================================================================== */
.overflow-hidden {
    overflow: hidden;
}

.scrolling-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.scrolling-wrapper::before,
.scrolling-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.scrolling-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-secondary) 0%, transparent 100%);
}

.scrolling-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-secondary) 0%, transparent 100%);
}

.scrolling-content {
    display: flex;
    width: max-content;
    animation: scroll-left 40s linear infinite;
}

.scrolling-content:hover {
    animation-play-state: paused;
}

.scrolling-track {
    display: flex;
    gap: 30px;
    padding-right: 30px;
    flex-shrink: 0;
}

.inspi-image {
    width: 350px;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), border-color var(--transition-fast), filter var(--transition-fast);
    filter: grayscale(80%) brightness(0.8);
    cursor: pointer;
}


.inspi-image:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    filter: grayscale(0%) brightness(1);
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   FAQ (OPTIMISATION IA)
   ========================================================================== */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.faq-item.active {
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.faq-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.faq-header i {
    color: var(--accent-primary);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-header i {
    transform: rotate(180deg);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background-color: var(--input-bg);
}

.faq-item.active .faq-body {
    max-height: 300px;
    padding: 0 20px 20px 20px;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.contact-info h3 { font-size: 1.8rem; margin-bottom: 15px; }
.contact-info p { color: var(--text-muted); margin-bottom: 30px; }

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.contact-item i {
    width: 40px; height: 40px;
    background-color: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.contact-item[href]:hover { color: var(--accent-primary); }

.social-links { display: flex; gap: 15px; }
.social-links a {
    width: 45px; height: 45px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}
.social-links a:hover {
    background-color: var(--accent-primary);
    color: var(--bg-main);
}

.contact-form {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-group { margin-bottom: 18px; }

.form-group label,
.form-checkboxes legend {
    display: flex;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    padding: 0;
}

.required {
    color: var(--accent-primary);
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 18px;
}

@media (min-width: 600px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 13px 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: var(--input-bg-focus);
    box-shadow: 0 0 0 3px var(--accent-primary-transparent);
}

.form-group select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Checkboxes / add-ons */
.form-checkboxes {
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.form-checkboxes legend {
    padding: 0 8px;
    margin-bottom: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 16px;
    margin-top: 10px;
}

@media (min-width: 500px) {
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
}

.check-item {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 6px 4px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.check-item:hover {
    color: var(--accent-primary);
}

.check-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    margin: 0;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition-fast);
    box-sizing: border-box;
}

.check-item input[type="checkbox"]:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.check-item input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    color: var(--bg-main);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.check-item.consent {
    margin: 4px 0 18px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    align-items: flex-start;
}

.btn-loader { display: none; }
.loading .btn-text { display: none; }
.loading .btn-loader { display: inline-block; }

.form-note {
    margin-top: 14px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.form-note i {
    color: var(--accent-primary);
    margin-right: 4px;
}

.form-message {
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}
.form-message.success { color: var(--success-color); }
.form-message.error { color: var(--error-color); }

/* ==========================================================================
   PAGES LÉGALES (CGV / MENTIONS)
   ========================================================================== */
.legal-page {
    padding: 140px 0 100px;
}

.legal-header {
    max-width: 820px;
    margin: 0 auto 50px;
    text-align: center;
}

.legal-header h1 {
    font-size: 2.6rem;
    margin-bottom: 12px;
}

.legal-header .legal-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.legal-meta {
    display: inline-block;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: var(--tag-bg);
    padding: 6px 16px;
    border-radius: 20px;
}

.legal-content {
    max-width: 820px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 50px;
}

.legal-content h2 {
    font-size: 1.4rem;
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-primary-transparent);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.1rem;
    margin: 24px 0 10px;
    color: var(--accent-primary);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    font-size: 0.97rem;
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 22px;
    margin-bottom: 16px;
}

.legal-content li {
    margin-bottom: 6px;
}

.legal-content strong {
    color: var(--text-main);
}

.legal-content a {
    color: var(--accent-primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-toc {
    max-width: 820px;
    margin: 0 auto 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 30px;
}

.legal-toc h2 {
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.legal-toc ol {
    columns: 2;
    column-gap: 30px;
    padding-left: 20px;
    margin: 0;
}

.legal-toc li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.legal-toc a {
    color: var(--text-muted);
    text-decoration: none;
}

.legal-toc a:hover {
    color: var(--accent-primary);
}

.legal-data-box {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 16px 0;
}

.legal-data-box p {
    margin-bottom: 6px;
}

.legal-signature {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .legal-content { padding: 30px 22px; }
    .legal-page { padding: 110px 0 70px; }
    .legal-toc ol { columns: 1; }
    .legal-header h1 { font-size: 2rem; }
}

/* ==========================================================================
   BANDEAU COOKIES
   ========================================================================== */
.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: 560px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 12px 40px var(--shadow-hover);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.cookie-banner.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-banner-text strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.cookie-banner-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--accent-primary);
    text-decoration: none;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 10px 22px;
    font-size: 0.92rem;
}

@media (max-width: 520px) {
    .cookie-banner-actions {
        flex-direction: column-reverse;
    }
    .cookie-btn {
        width: 100%;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
#footer {
    background-color: var(--bg-secondary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.footer-brand p {
    color: var(--text-muted);
    margin: 10px auto 0;
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}
.footer-links a:hover { color: var(--accent-primary); }

.footer-socials {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}
.footer-socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}
.footer-socials a:hover { color: var(--accent-primary); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 999;
    box-shadow: 0 5px 15px var(--shadow-btn);
}

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

#back-to-top:hover {
    transform: translateY(-5px);
}

/* ==========================================================================
   ANIMATIONS (REVEAL)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */
@media (min-width: 768px) {
    .about-grid { grid-template-columns: 1fr 1.5fr; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr 1fr; }
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        align-items: start;
        text-align: left;
    }
    .footer-brand p { margin-left: 0; margin-right: 0; }
    .footer-logo-img { margin-left: 0; margin-right: 0; }
    .footer-socials { justify-content: flex-start; }
}

@media (min-width: 1024px) {
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
    .pricing-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .pricing-grid-4 .pricing-card { padding: 35px 22px; }
    .pricing-card.popular { transform: scale(1.05); z-index: 10; }
    .pricing-card.popular:hover { transform: scale(1.08); }
}

@media (max-width: 991px) {
    .hamburger { display: block; }

    #nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 100%; height: 100vh;
        background-color: var(--bg-main);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: -1;
    }

    #nav-menu.active { right: 0; }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .nav-link { font-size: 1.5rem; }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 767px) {
    .hero-name { font-size: 3rem; }
    .hero-title { font-size: 1.5rem; }
    .hero-buttons { flex-direction: column; width: 100%; }

    .section { padding: 70px 0; }
}

/* === Optim mobile : réduction des animations lourdes === */
@media (max-width: 768px) {
    .shape { filter: blur(40px); opacity: 0.2; animation: none; }
    .shape-1 { width: 220px; height: 220px; }
    .shape-2 { width: 260px; height: 260px; }
    .cursor-dot, .cursor-outline { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.works-cta {
    margin-top: 50px;
    text-align: center;
}
.works-cta p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}
