:root {
    --primary-blue: #0056b3;
    --primary-orange: #ff8c00;
    --dark-bg: #0f1215;
    --card-bg: #1c2127;
    --text-main: #f0f0f0;
    --text-muted: #b0b0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(28, 33, 39, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* --- Header & Nav --- */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-orange);
}

.btn-cta {
    background: linear-gradient(135deg, var(--primary-blue), #004494);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.5);
    color: white;
    padding: 10px 25px;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1c2127 0%, var(--dark-bg) 100%);
    padding-top: 80px;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.jpg');
    /* Fallback or Overlay */
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, white, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content span {
    color: var(--primary-orange);
    -webkit-text-fill-color: var(--primary-orange);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: var(--glass-border);
    transition: transform 0.3s, border-color 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Gallery/Portfolio --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    height: 300px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s;
    background: #1c2127;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

/* --- Project Slider --- */
.project-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-out;
}

.slider-wrapper img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #1c2127;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.before-after-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-orange);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    z-index: 5;
}

.before-after-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--primary-orange);
    font-size: 0.9rem;
    font-weight: 500;
}

.before-after-indicator i {
    font-size: 1rem;
}

.slider-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s, transform 0.3s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.portfolio-item:hover .slider-nav button {
    opacity: 1;
}

.slider-nav button:hover {
    background: var(--primary-orange);
    transform: translateY(-50%) scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-dots .dot.active {
    background: var(--primary-orange);
    transform: scale(1.3);
    border-color: var(--primary-orange);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1c2127;
    color: #444;
    font-size: 3rem;
}

/* --- Projects Carousel --- */
.projects-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.projects-carousel-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.project-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 15px;
}

.project-slide-content {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-slide-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.project-images-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-images-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-out;
}

.project-image-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.project-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #1c2127;
}

.project-single-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #1c2127;
}

.project-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1c2127;
    color: #444;
    font-size: 3rem;
}

.project-images-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.project-images-nav button {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: all;
    opacity: 0;
}

.project-slide:hover .project-images-nav button {
    opacity: 1;
}

.project-images-nav button:hover {
    background: var(--primary-orange);
    transform: scale(1.1);
}

.project-images-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.project-images-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-images-dot.active {
    background: var(--primary-orange);
    transform: scale(1.3);
    border-color: var(--primary-orange);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.projects-carousel-prev,
.projects-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 10;
}

.projects-carousel-prev {
    left: 0;
}

.projects-carousel-next {
    right: 0;
}

.projects-carousel-prev:hover,
.projects-carousel-next:hover {
    background: var(--primary-orange);
    transform: translateY(-50%) scale(1.1);
}

.projects-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.projects-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.projects-carousel-dot.active {
    background: var(--primary-orange);
    transform: scale(1.2);
    border-color: var(--primary-orange);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
}

.project-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.project-slide:hover .project-slide-overlay {
    transform: translateY(0);
}

.project-slide-overlay h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.project-slide-overlay p {
    color: var(--text-muted);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.before-after-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-orange);
    font-size: 0.9rem;
    font-weight: 500;
}

.before-after-indicator i {
    font-size: 1rem;
}

.empty-projects {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-projects i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-projects p {
    font-size: 1.2rem;
    margin: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .projects-carousel {
        padding: 0 50px;
    }
    
    .project-slide-content {
        height: 300px;
    }
    
    .projects-carousel-prev,
    .projects-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .project-slide-overlay {
        padding: 20px;
    }
    
    .project-slide-overlay h3 {
        font-size: 1.2rem;
    }
    
    .project-images-nav button {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* --- Footer --- */
footer {
    background: #050608;
    padding: 60px 0 20px;
    margin-top: 50px;
    border-top: var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary-orange);
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Admin Login --- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    border: var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-blue);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #004494;
}

/* --- Admin Dashboard --- */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.mobile-menu-toggle {
    display: none;
}

.sidebar {
    background: var(--card-bg);
    padding: 20px;
    border-right: var(--glass-border);
}

.sidebar-brand {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 40px;
    display: block;
    color: white;
    text-align: center;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-muted);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-orange);
}

.admin-main {
    padding: 40px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-orange);
    font-weight: 600;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: rgba(0, 86, 179, 0.2);
    border: 1px solid var(--primary-blue);
    color: #e0e6ed;
}

.alert-error {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
    color: #ffb3b3;
}

/* --- Mobile Menu & Responsive --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu bg */
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.4s;
}

/* Burger Animation */
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: 80px;
        background: var(--card-bg);
        height: calc(100vh - 80px);
        width: 100%;
        /* Full width for better mobile experience */
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        border-left: var(--glass-border);
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 15px 0;
        opacity: 0;
    }

    .nav-links.active li {
        opacity: 1;
        transition: opacity 0.5s ease 0.2s;
    }

    .nav-links a {
        display: block;
        padding: 10px;
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .form-control {
        font-size: 16px;
    }

    nav .btn-cta {
        display: none;
    }
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary-orange);
}

/* --- Scroll Animation (Reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Contact Section --- */
.contact-info-box {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: var(--glass-border);
}

.contact-input {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-input:focus {
    outline: none;
    border-color: var(--primary-orange);
}


/* Hover Links for Contact */
.hover-link {
    transition: color 0.3s;
}

.hover-link:hover {
    color: var(--primary-orange);
}

/* Visually Hidden for Honeypot */
.vh {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
}

/* Maintenance Preview Banner */
.maintenance-banner {
    background: #ff8c00;
    color: #000;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: bold;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.maintenance-banner i {
    margin-right: 10px;
}

.maintenance-banner a {
    text-decoration: underline;
    margin-left: 15px;
    color: #000;
}

/* Offset header when banner is active */
body.with-maintenance-banner header {
    top: 36px;
}

body.with-maintenance-banner .hero {
    padding-top: 116px;
}

@media (max-width: 768px) {
    body.with-maintenance-banner .nav-links {
        top: 116px;
    }
}

/* Simulator Section */
.simulator-section {
    padding: 100px 0;
    background: #0a0c0e;
}

.simulator-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: center;
}

.simulator-viewer {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* L'aspect-ratio doit suivre l'image pour éviter les décalages de masque */
}

.simulator-viewer img {
    width: 100%;
    height: auto;
    display: block;
}

.color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: background-color 0.8s ease;
    z-index: 2;

    /* Méthode PRO : Masque PNG pour un détourage parfait */
    -webkit-mask-image: url('../images/simulator_mask.png');
    mask-image: url('../images/simulator_mask.png');

    /* Indique au navigateur d'utiliser le Blanc comme zone de masque et le Noir comme vide */
    -webkit-mask-source-type: luminance;
    mask-mode: luminance;
    -webkit-mask-type: luminance;
    mask-type: luminance;

    /* On force le masque à remplir exactement le conteneur sans déborder */
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.color-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--primary-orange);
    transform: scale(1.2);
}

.color-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.color-info h4 {
    color: var(--primary-orange);
    margin-bottom: 5px;
}

.color-info span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .simulator-container {
        grid-template-columns: 1fr;
    }
}

/* --- Admin Generic Modals --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.admin-modal {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: var(--glass-border);
    max-width: 450px;
    width: 90%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-modal h3 {
    margin-bottom: 15px;
    color: var(--primary-orange);
}

.admin-modal p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-confirm {
    background: #dc3545;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-confirm:hover {
    background: #c82333;
}

.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.btn-cancel:hover {
    background: var(--glass-bg);
    color: var(--text-main);
}

/* --- Admin Drag & Drop Interface --- */
.projects-drag-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding: 5px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: move;
}

.project-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card.drag-over {
    border-color: var(--primary-orange);
    background: rgba(255, 140, 0, 0.1);
}

.project-card-header {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
}

.drag-handle {
    color: var(--text-muted);
    cursor: grab;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s;
}

.drag-handle:hover {
    color: var(--primary-orange);
}

.drag-handle:active {
    cursor: grabbing;
}

.project-preview {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-preview {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-info h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.photo-count, .order-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.photo-count i {
    font-size: 0.7rem;
}

.order-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.project-actions {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: rgba(0, 86, 179, 0.2);
    color: var(--primary-blue);
}

.btn-edit:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-delete {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
}

.project-description {
    padding: 0 15px 15px 95px;
}

.project-description p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.empty-state small {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- Photos Drag & Drop --- */
.photos-drag-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.photo-item {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: move;
}

.photo-item.dragging {
    opacity: 0.5;
    transform: scale(0.9);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.photo-item.drag-over {
    border-color: var(--primary-orange);
    background: rgba(255, 140, 0, 0.1);
}

.photo-drag-handle {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: grab;
}

.photo-item:hover .photo-drag-handle {
    opacity: 1;
}

.photo-drag-handle:active {
    cursor: grabbing;
}

.photo-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.btn-photo-delete {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-photo-delete:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.photo-type-selector {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 6;
}

.photo-type-select {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-type-select:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
}

.photo-type-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.3);
}

.photo-order {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: var(--primary-orange);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
}

.photo-position-number {
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.photo-position-number:hover {
    transform: scale(1.1);
    background-color: var(--primary-orange-dark, #e67e00);
}

.help-text {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        background: var(--card-bg);
        border-right: var(--glass-border);
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: var(--primary-orange);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
        transition: all 0.3s;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--primary-orange-dark, #e67e00);
        transform: scale(1.05);
    }
    
    .admin-header {
        padding: 20px 20px 20px 70px;
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 15px 15px 15px 60px;
    }
    
    .admin-header h2 {
        font-size: 1.5rem;
    }
    
    /* Formulaire en grille sur mobile */
    .admin-main > div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .project-card-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .project-info {
        order: 3;
        flex-basis: 100%;
    }
    
    .project-actions {
        order: 2;
    }
    
    .project-description {
        padding-left: 15px;
    }
    
    .photos-drag-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
        padding: 8px;
    }
    
    .photo-order {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .btn-photo-delete {
        width: 24px;
        height: 24px;
    }
    
    .photo-type-select {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    /* Modal responsive */
    .admin-modal {
        margin: 20px;
        max-width: calc(100% - 40px);
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-confirm, .btn-cancel {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .photos-drag-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .admin-header h2 {
        font-size: 1.2rem;
    }
    
    .mobile-menu-toggle {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 15px;
        left: 15px;
    }
    
    .admin-header {
        padding: 10px 10px 10px 55px;
    }
}

/* --- Position Modal Specific --- */
.position-modal {
    text-align: left;
}

.position-modal h3 {
    text-align: center;
    margin-bottom: 10px;
}

.position-modal p {
    margin-bottom: 20px;
    text-align: center;
}

.position-input-group {
    margin-bottom: 25px;
}

.position-input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.position-input-group input {
    width: 100%;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 16px;
    transition: border-color 0.3s;
}

.position-input-group input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
}