/* Variables CSS - Palette Gaïa (Nature & Terre) */
:root {
    --primary-color: #2E7D32;      /* Vert forêt profond */
    --secondary-color: #8D6E63;    /* Brun terre */
    --accent-color: #FF8F00;       /* Ambre doré */
    --tertiary-color: #4E342E;     /* Brun foncé */
    --dark-color: #2c2c2c;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* Support RTL pour l'arabe */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-selector {
    order: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Boutons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #a91b32);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

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

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

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Desktop layout - une seule ligne horizontale */
@media (min-width: 769px) {
    .nav-top, .nav-bottom {
        display: contents;
    }
}

.nav-logo h2 {
    color: var(--primary-color);
    font-size: 24px;
}

.language-selector {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 6px 12px;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

.lang-btn:hover {
    border-color: var(--primary-color);
}

/* Drapeaux CSS */
.flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.flag-fr {
    background: linear-gradient(to right, #002395 33.33%, #ffffff 33.33%, #ffffff 66.67%, #ed2939 66.67%);
}

.flag-en {
    background: linear-gradient(135deg, #012169 25%, transparent 25%), 
                linear-gradient(225deg, #012169 25%, transparent 25%),
                linear-gradient(315deg, #012169 25%, transparent 25%),
                linear-gradient(45deg, #012169 25%, transparent 25%);
    background-color: #ffffff;
    background-position: 0 0, 0 100%, 100% 0, 100% 100%;
    background-size: 8px 6px;
}

.flag-en::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 45%, #c8102e 45%, #c8102e 55%, transparent 55%),
                linear-gradient(to right, transparent 45%, #c8102e 45%, #c8102e 55%, transparent 55%);
}

.flag-de {
    background: linear-gradient(to bottom, #000000 33.33%, #dd0000 33.33%, #dd0000 66.67%, #ffce00 66.67%);
}

.flag-ar {
    background: linear-gradient(to bottom, #c1272d 33.33%, #ffffff 33.33%, #ffffff 66.67%, #006233 66.67%);
}

.currency-selector {
    display: flex;
    gap: 5px;
    margin-left: 1rem;
}

.currency-btn {
    padding: 6px 12px;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 50px;
    font-weight: 600;
    color: var(--secondary-color);
}

.currency-btn.active {
    background: var(--secondary-color);
    color: white;
}

.currency-btn:hover {
    border-color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#cartBtn {
    position: relative;
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--dark-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    min-height: 70vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    padding: 0 40px;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-heavy);
}

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 3rem;
    position: relative;
}

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

/* Gallery */
.gallery-section {
    padding: 80px 0;
    background: #fff;
}

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

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.artwork-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.artwork-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.artwork-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.artwork-info {
    padding: 1.5rem;
}

.artwork-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.artwork-artist {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.artwork-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 1rem;
}

.artwork-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-reserved {
    background: #fff3cd;
    color: #856404;
}

.status-sold {
    background: #f8d7da;
    color: #721c24;
}

/* Artists Section */
.artists-section {
    padding: 80px 0;
    background: var(--light-color);
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.artist-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.artist-card:hover {
    transform: translateY(-5px);
}

.artist-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--primary-color);
}

.artist-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.artist-specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.artist-bio {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.artist-view-works {
    margin-top: auto;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.artist-view-works:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.artist-filter-title {
    animation: fadeInUp 0.5s ease;
    margin-bottom: 2rem;
}

.artist-filter-title h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.artist-filter-title button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.artist-filter-title button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.no-artworks {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Section À Propos */
.about-section {
    padding: 60px 0;
    background: #f8f9fa;
}

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

.about-intro {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.about-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.about-intro p:first-child {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.feature {
    background: white;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-color);
}

.modal-body {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.modal-body .artwork-image {
    flex: 1;
    text-align: center;
}

.modal-body .artwork-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.artwork-details {
    flex: 1;
    padding-left: 1rem;
}

.artwork-details h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.artist-name {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.artwork-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.artwork-info p {
    margin: 0.5rem 0;
}

.artwork-description {
    color: #666;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions button {
    flex: 1;
}

/* Login Form */
.login-form {
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.login-form h2 {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin: 0.5rem 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-form button {
    width: 100%;
    margin: 1rem 0;
}

.login-form p {
    text-align: center;
    margin-top: 1rem;
}

.login-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-form a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section p {
    margin: 0.5rem 0;
    color: #ccc;
}

/* Menu Hamburger pour mobile */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-container {
        flex-direction: column;
        padding: 0.8rem 1rem;
        gap: 0.8rem;
    }

    .nav-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: left 0.3s ease;
        padding-top: 2rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

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

    .nav-menu .nav-link {
        padding: 1rem 0;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .language-selector {
        display: flex;
        gap: 0.3rem;
        order: 3;
    }

    .language-selector .lang-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: auto;
        gap: 4px;
    }
    
    .language-selector .flag {
        width: 12px;
        height: 9px;
    }
    
    .currency-selector {
        display: flex;
        gap: 0.3rem;
        margin: 0;
        order: 4;
    }

    .currency-selector .currency-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: auto;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        margin-top: 140px; /* Plus d'espace pour la navbar 2 lignes */
    }

    .hero-title {
        font-size: 2rem; /* Plus petit pour éviter les débordements */
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1rem; /* Également plus petit sur mobile */
        line-height: 1.4;
    }

    .modal-body {
        flex-direction: column;
    }

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

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

@media (max-width: 480px) {
    .hero {
        margin-top: 120px; /* Moins d'espace sur très petits écrans */
        padding: 20px 15px;
    }

    .hero-title {
        font-size: 1.6rem; /* Encore plus petit sur très petits écrans */
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .btn-large {
        padding: 12px 24px;
        font-size: 16px;
    }

    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
    
    /* Ajuster les sélecteurs de langue/devise sur très petits écrans */
    .language-selector .lang-btn,
    .currency-selector .currency-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    
    @media (max-width: 480px) {
        .language-selector .flag {
            width: 10px;
            height: 7px;
        }
    }
}

/* Protection des images */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

img::selection {
    background: transparent;
}

img::-moz-selection {
    background: transparent;
}

/* Désactiver la sélection de texte sur les images */
.artwork-image img,
.artist-photo,
#modalImage {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Message de protection */
.protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    pointer-events: none;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Loading states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

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

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

/* Badge Certificat Artiste */
.artist-certificate-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #8b4513;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 2px solid #b8860b;
}

.artist-certificate-badge i {
    font-size: 0.8rem;
}

.artwork-card {
    position: relative;
}

/* Badge dans le modal */
.modal-certificate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #8b4513;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    border: 2px solid #b8860b;
}

/* Bouton contexte */
.btn-context {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0.5rem 0.25rem;
}

.btn-context:hover {
    background: linear-gradient(135deg, #d35400, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

/* Modal de visualisation en contexte */
.context-modal .modal-content {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    padding: 0;
    overflow: hidden;
}

.context-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.context-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.context-header h2 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.context-artwork-info {
    margin: 0;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.context-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Contrôles latéraux */
.context-controls {
    width: 280px;
    background: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.context-controls h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Sélecteur de pièces */
.room-selector {
    margin-bottom: 30px;
}

.room-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.room-btn {
    background: white;
    border: 2px solid #ddd;
    padding: 15px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.room-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.room-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.room-btn i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.room-btn span {
    display: block;
    font-weight: 500;
}

/* Contrôles d'œuvre */
.artwork-controls {
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

#sizeValue {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Zone d'affichage */
.context-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    min-height: 0;
}

.room-container {
    position: relative;
    flex: 1;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    min-height: 400px;
    margin-bottom: 20px;
}

#roomImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Superposition de l'œuvre */
.artwork-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    cursor: move;
    z-index: 2;
}

#overlayArtwork {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.artwork-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 8px solid #8B4513;
    border-radius: 4px;
    background: linear-gradient(45deg, #D2691E, #CD853F);
    z-index: -1;
    box-shadow: 
        inset 0 0 0 2px #654321,
        0 5px 15px rgba(0,0,0,0.3);
}

/* Informations contexte */
.context-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.dimensions-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
}

.dimensions-info p {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.context-actions {
    display: flex;
    gap: 10px;
}

.context-actions button {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .context-modal .modal-content {
        width: 98%;
        height: 95vh;
    }
    
    .context-body {
        flex-direction: column;
    }
    
    .context-controls {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        max-height: 300px;
    }
    
    .room-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .context-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .context-actions {
        width: 100%;
        justify-content: center;
    }
} 