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

:root {
    /* Light theme - couleurs douces et modernes */
    --primary: #d4a574;
    --primary-dark: #b8865f;
    --secondary: #8b7355;
    --accent: #e8c4a0;
    --bg: #faf8f5;
    --bg-secondary: #fffcf7;
    --text: #2c2416;
    --text-secondary: #6b5d4f;
    --border: #ede7df;
    --shadow: rgba(139, 115, 85, 0.08);
    --gradient: linear-gradient(135deg, #d4a574 0%, #b8865f 100%);
}

[data-theme="dark"] {
    --bg: #1a1510;
    --bg-secondary: #2c2416;
    --text: #faf8f5;
    --text-secondary: #c7b9a8;
    --border: rgba(212, 165, 116, 0.15);
    --shadow: rgba(212, 165, 116, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Navigation Desktop */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px var(--shadow);
    transition: all 0.3s ease;
    max-width: 90%;
}

nav.scrolled {
    top: 10px;
    box-shadow: 0 15px 50px var(--shadow);
}

.nav-content {
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

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

.theme-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(180deg);
}

/* Navigation Mobile - Bottom Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px var(--shadow);
    width: calc(100% - 40px);
    max-width: 400px;
}

.mobile-nav-content {
    user-select: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.mobile-nav-icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }

    .mobile-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 5% 50px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(184, 134, 95, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-content {
    user-select: none;
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--gradient);
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-text .subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    animation: slideInLeft 1s ease-out 0.2s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    animation: slideInLeft 1s ease-out 0.4s backwards;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 165, 116, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: slideInRight 1s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.floating-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 10px 30px var(--shadow);
}

.floating-card:nth-child(2) {
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(212, 165, 116, 0.3);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 100px 5%;
    background: var(--bg-secondary);
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Tech Stack */
.tech-grid {
    user-select: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Chaque box a la même hauteur + organisation verticale */
.tech-item {
    background: var(--bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px var(--shadow);

    /* Force les éléments à se placer verticalement */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* texte en bas */
    align-items: center;

    height: 220px;
    /* Ajuste selon ta mise en page */
}

.tech-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(212, 165, 116, 0.2);
}

/* La zone image garde la même hauteur pour toutes */
.tech-icon {
    height: 100px;
    /* Uniformise la zone image */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Les images s'adaptent sans déformation */
.imgAbout {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.tech-name {
    font-weight: 600;
    color: var(--text);
    text-align: center;
}


/* Services Section */
.services {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    user-select: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 3rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 25px 50px rgba(212, 165, 116, 0.3);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    color: var(--text);
}

.service-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Contact Section */
.contact {
    padding: 100px 5%;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.contact-item {
    background: var(--bg);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--shadow);

    /* égalité des tailles */
    flex: 1 1 220px;
    /* grow, shrink, basis -> s'adapte (min ~320px) */
    max-width: 280px;
    /* évite qu'elle devienne trop large sur grand écran */

    /* organisation interne pour que label + value soient correctement placés */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* centre verticalement le contenu */
    align-items: center;
    /* texte aligné à gauche — change si tu veux centré */
    gap: 0.6rem;
}

.contact-item:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(212, 165, 116, 0.18);
}

.contact-label {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 1.15rem;
    color: var(--text);
    word-break: break-word;
    /* évite dépassement si mail long */
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.contact-value svg {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
}


/* Footer */
footer {
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.site-footer a {
    text-decoration: none;
    color: var(--text-secondary);
}

.site-footer a:hover {
    text-decoration: underline;
}


/* Responsive */
@media (max-width: 1024px) {

    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .hero {
        padding: 100px 5% 50px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .contact-info {
        gap: 1rem;
    }

    .contact-item {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 1.25rem;
    }

    .contact-value {
        font-size: 1.05rem;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Language Selector */
.lang-selector {
    position: relative;
    user-select: none;
}

.lang-selector-button {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
}

.lang-selector-button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.lang-flag {
    font-size: 1.4em;
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 8px 40px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 140px;
    z-index: 1000;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: var(--text);
    font-size: 0.95rem;
}

.lang-option:hover {
    background: var(--primary);
    color: white;
}

.lang-option.active {
    background: rgba(212, 165, 116, 0.1);
}

.mobile-lang-selector .lang-dropdown {
    bottom: calc(100% + 8px);
    top: auto;
}

.mobile-lang-selector .lang-selector-button {
    padding: 6px 10px;
}

/* Social Network */
.contact-value a {
    color: var(--primary);
    font-size: 1.2rem;
    text-decoration: none;
}

.contact-value a:hover {
    opacity: .8;
}

/* ===== REVIEWS - carrousel infini ===== */
.reviews {
    padding: 80px 5%;
    background: var(--bg-secondary);
    color: var(--text);
    overflow: hidden;
}

.reviews-header {
    text-align: center;
    margin-bottom: 3rem;
}

.reviews-header .section-subtitle {
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

/* Frame avec overflow pour masquer les débordements */
.reviews-frame {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

/* Track qui contient les cartes et qui défilera */
.reviews-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    will-change: transform;
    margin-top: 1%;
    margin-bottom: 3%;
}

/* Cartes d'avis */
.review-link {
    text-decoration: none;
    color: inherit;
}

.review-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.8rem;

    /* Taille fixe pour toutes les cartes */
    width: 420px;
    min-height: 280px;
    max-height: 280px;

    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;

    /* Organisation verticale */
    display: flex;
    flex-direction: column;
    gap: 1rem;

    /* Empêche tout débordement */
    overflow: hidden;
}

.review-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(212, 165, 116, 0.3);
}

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.review-stars {
    color: var(--primary);
    font-size: 1.2rem;
    letter-spacing: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.review-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.review-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;

    /* Prend l'espace restant */
    flex: 1;

    /* Empêche le débordement */
    overflow: hidden;
    word-wrap: break-word;

    /* Hauteur maximale pour environ 6 lignes */
    max-height: 10.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .review-card {
        width: 340px;
        min-height: 260px;
        max-height: 260px;
        padding: 1.5rem;
    }

    .review-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .review-card {
        width: 300px;
        min-height: 240px;
        max-height: 240px;
        padding: 1.2rem;
    }

    .review-text {
        font-size: 0.9rem;
    }

    .review-stars {
        font-size: 1rem;
    }

    .review-meta {
        font-size: 0.85rem;
    }
}


/* Projects page Section */
.projects {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    /* important pour hover */
    box-shadow: 0 10px 30px var(--shadow);
    transition: all .35s ease;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 15px 45px rgba(212, 165, 116, 0.3);
}

.project-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.project-info p {
    color: var(--text-secondary);
    line-height: 1.5;
}

@media(max-width:1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Coming Soon card */
.project-coming {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.coming-inner {
    padding: 2rem;
}

.coming-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 1rem;
}

.project-coming h3 {
    color: var(--text);
    margin-bottom: .6rem;
}

.project-coming p {
    color: var(--text-secondary);
}

/* hover effect same */
.project-coming:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 15px 45px rgba(212, 165, 116, 0.3);
}

/* Contact Page */
.contact-page {
    padding: 6rem 10%;
    text-align: center;
}

.contact-form {
    margin-top: 3rem;
    max-width: 600px;
    width: 100%;
    margin-inline: auto;
    text-align: left;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

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

.contact-form label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.3rem;
    display: block;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.3s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, .25);
    font-weight: 600;
}

.notification.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* Template Page */
.templates-hero {
    text-align: center;
    margin: 4rem 0;
    padding: 120px 5% 50px;
}

.templates-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0 2rem 5rem;
}

.template-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: transform 0.3s ease;
}

.template-card:hover {
    transform: translateY(-8px);
}

.template-images {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.template-images img {
    height: 160px;
    border-radius: 12px;
    flex-shrink: 0;
}

.template-features {
    list-style: none;
    padding: 0;
}

.template-features li {
    font-size: 0.95rem;
}

.template-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.old-price {
    text-decoration: line-through;
    opacity: 0.5;
}

.price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

/*.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}*/

/* LIGHTBOX ZOOM */
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    cursor: grab;
    transition: transform 0.15s ease;
    transform-origin: center center;
}

.lightbox-img.zoomed {
    cursor: grabbing;
}


.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
}

/* LIGHTBOX ARROWS - PREMIUM */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 2;
}

.lightbox-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-arrow.left {
    left: 20px;
}

.lightbox-arrow.right {
    right: 20px;
}

.lightbox-arrow.hidden {
    display: none;
}


/* Fix global pour éviter le débordement */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fix spécifique pour la page template sur mobile */
@media (max-width: 768px) {
    
    /* Hero section */
    .templates-hero {
        padding: 100px 3% 30px;
        margin: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .templates-hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .templates-hero .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Filtres */
    .templates-filters {
        padding: 0 3%;
        gap: 0.5rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Grid des templates */
    .templates-grid {
        grid-template-columns: 1fr;
        padding: 0 3% 4rem;
        gap: 1.5rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Carte template */
    .template-card {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
        box-sizing: border-box;
    }

    .template-card h3 {
        font-size: 1.3rem;
    }

    .template-description {
        font-size: 0.95rem;
    }

    /* Images dans la carte - IMPORTANT */
    .template-images {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        display: flex;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .template-images img {
        height: 140px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        flex-shrink: 0;
    }

    /* Features list */
    .template-features {
        padding-left: 0;
    }

    .template-features li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    /* Prix */
    .template-price {
        flex-wrap: wrap;
    }

    .price {
        font-size: 1.4rem;
    }

    /* Bouton */
    .template-card .btn {
        width: 100%;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    /* Badge */
    .template-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    /* Lightbox */
    .lightbox-img {
        max-width: 90%;
        max-height: 70%;
    }

    .lightbox-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-arrow.left {
        left: 10px;
    }

    .lightbox-arrow.right {
        right: 10px;
    }

    .lightbox-close {
        font-size: 2rem;
        top: 15px;
        right: 20px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .templates-hero {
        padding: 80px 5% 20px;
    }

    .templates-hero h1 {
        font-size: 1.5rem;
    }

    .templates-grid {
        padding: 0 5% 3rem;
    }

    .template-card {
        padding: 1.2rem;
    }

    .template-images img {
        height: 120px;
    }
}

/* Pages Legales */
.legal-page {
    max-width: 900px;
    margin: 60px auto;
    padding: 140px 20px 60px;
    font-size: 16px;
    line-height: 1.8;
}

.legal-page h1 {
    font-size: 32px;
    margin-bottom: 40px;
}

.legal-page h2 {
    font-size: 22px;
    margin-bottom: 15px;
    margin-top: 40px;
}

.legal-page p {
    margin-bottom: 10px;
}