/* ============================================
   CSS DÉDIÉ PAGE MATIERES
   ============================================ */

/* Section hero titre */
.matieres-hero {
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 8rem) clamp(1.5rem, 3vw, 2rem);
    background: white;
    width: 100%;
}

.matieres-title {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    color: #000;
    text-align: left;
    max-width: 100%;
    margin: 0;
    letter-spacing: 0.02em;
}

/* Section grille des matières */
.matieres-grid-section {
    padding: clamp(1rem, 2vw, 2rem) clamp(2rem, 5vw, 8rem) clamp(2rem, 5vw, 5rem);
    background: white;
    width: 100%;
}

.matieres-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 2vw, 2rem);
    width: 100%;
    max-width: none;
    margin: 0;
}

@media (min-width: 640px) {
    .matieres-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(1.2rem, 1.8vw, 1.5rem);
    }
}

@media (min-width: 1024px) {
    .matieres-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: clamp(0.8rem, 1.2vw, 1.2rem);
    }
}

/* Carte matière */
.matiere-card {
    display: flex;
    flex-direction: column;
    background: white;
    width: 100%;
}

.matiere-card:hover {
    transform: translateY(-5px);
    transition: transform 0.4s ease;
}

/* Image matière - Plus large */
.matiere-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    margin-bottom: clamp(1rem, 2vw, 1.8rem);
}

.matiere-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.matiere-card:hover .matiere-image img {
    transform: scale(1.05);
}

/* Label catégorie sur l'image */
.matiere-label {
    position: absolute;
    top: clamp(0.8rem, 1.5vw, 1rem);
    left: clamp(0.8rem, 1.5vw, 1rem);
    background: rgba(255, 255, 255, 0.9);
    padding: clamp(0.3rem, 0.5vw, 0.4rem) clamp(0.6rem, 1vw, 0.8rem);
    border-radius: 2px;
}

.matiere-category {
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #000;
}

/* Contenu de la carte */
.matiere-content {
    padding: 0 clamp(0.3rem, 0.8vw, 0.5rem);
}

.matiere-name {
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    font-weight: 300;
    color: #000;
    margin: 0 0 clamp(0.5rem, 1vw, 0.8rem) 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.matiere-name strong {
    font-weight: 600;
}

.matiere-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(35px, 5vw, 40px);
    height: clamp(35px, 5vw, 40px);
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
    transition: all 0.3s ease;
}

.matiere-link:hover {
    background: #333;
    transform: translateX(5px);
}

.matiere-description {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.matiere-description strong {
    color: #000;
    font-weight: 500;
}

/* Bande avec image de fond */
.matiere-banner {
    width: 100%;
    height: 200px;
    background-image: url('images/matiere/mbande.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-overlay {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 2rem;
}

.banner-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Section application texte */
.application-section {
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 8rem);
    background: white;
}

.application-title {
    font-size: clamp(1.45rem, 2.2vw, 1.95rem);
    font-weight: 700;
    color: #000;
    margin: 0 0 1.6rem 0;
    text-align: left;
}

.application-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.application-content {
    flex: 1;
    max-width: 650px;
}

.application-visuals {
    flex: 1;
    min-width: 510px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-left: auto;
    margin-top: -4.5rem;
}

.application-gif {
    width: 100%;
}

.application-gif img {
    width: 100%;
    height: auto;
    display: block;
}

.application-materials {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.material-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.material-preview-image {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.material-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-preview-info {
    display: flex;
    align-items: center;
}

.material-preview-name {
    font-size: 1rem;
    color: #333;
    font-weight: 400;
}

.material-preview-name strong {
    font-weight: 600;
    color: #000;
}

@media (max-width: 1024px) {
    .application-layout {
        flex-direction: column;
        gap: 3rem;
    }
    
    .application-visuals {
        display: none;
    }
    
    .application-content {
        max-width: 100%;
    }
    
    .application-materials {
        flex-direction: row;
        gap: 2rem;
    }
}

.application-quote {
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    font-style: italic;
    color: #333;
    margin: 2.4rem 0;
    padding-left: 2.1rem;
    padding-right: 1.9rem;
    border-left: none;
    position: relative;
    line-height: 1.22;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

.application-quote .quote-line {
    display: block;
    white-space: nowrap;
}

.application-quote .quote-line:last-child {
    display: inline;
}

.application-quote::before {
    content: '“';
    position: absolute;
    left: 0;
    top: -0.1em;
    font-size: 2.7rem;
    color: #8a8080;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
}

.application-quote::after {
    content: '”';
    position: relative;
    display: inline;
    font-size: 2.7rem;
    color: #8a8080;
    font-style: normal;
    font-weight: 700;
    line-height: 0;
    vertical-align: -0.35em;
    margin-left: 0.1rem;
}

.application-text {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.8;
    color: #333;
    margin: 0 0 2.5rem 0;
    text-align: left;
    padding-left: 3rem;
}

.application-text strong {
    color: #000;
    font-weight: 600;
}

.application-text em {
    font-style: italic;
}

.application-highlight {
    margin-top: 3.5rem;
}

.highlight-quote {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-style: italic;
    font-weight: 600;
    color: #333;
    margin: 0 0 2.5rem 0;
    line-height: 1.4;
    position: relative;
    padding: 0;
}

.highlight-quote::before {
    content: '"';
    font-size: 4em;
    color: #ccc;
    position: absolute;
    top: -0.3em;
    left: -0.3em;
    line-height: 1;
    font-family: Georgia, serif;
}

.highlight-quote::after {
    content: '"';
    font-size: 4em;
    color: #ccc;
    position: absolute;
    bottom: -0.6em;
    right: 0;
    line-height: 1;
    font-family: Georgia, serif;
}

.highlight-text {
    font-size: clamp(0.95rem, 1.1vw, 1rem);
    line-height: 1.8;
    color: #333;
    margin: 0 0 1rem 0;
    text-align: left;
}

.highlight-text strong {
    color: #000;
    font-weight: 600;
}

.highlight-text em {
    font-style: italic;
    font-weight: 600;
}

/* Section couleur avec fond gris */
.couleur-section {
    background: #f5f5f5;
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 8rem);
}

.couleur-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #000;
    margin: 0 0 3rem 0;
    text-align: left;
}

.couleur-quote {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-style: italic;
    color: #333;
    margin: 0 0 3rem 0;
    padding-left: 0;
    text-align: left;
    line-height: 1.3;
    font-weight: 400;
}

.couleur-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.couleur-image {
    flex: 0 0 50%;
    max-width: 50%;
    align-self: stretch;
}

.couleur-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.couleur-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.couleur-intro {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.couleur-stats {
    display: flex;
    gap: 3rem;
    margin: 2rem 0;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 700;
    color: #000;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    font-weight: 600;
    color: #666;
    letter-spacing: 0.05em;
}

.couleur-description,
.couleur-conclusion {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.couleur-description strong,
.couleur-conclusion strong {
    color: #000;
    font-weight: 600;
}

.couleur-btn {
    display: inline-block;
    text-decoration: none;
    align-self: flex-start;
    background: #000;
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.couleur-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive pour la section couleur */
@media (max-width: 768px) {
    .matieres-hero {
        padding: 2rem 1rem 1rem;
    }
    
    .matieres-title {
        font-size: 1.3rem;
    }
    
    .matieres-grid-section {
        padding: 1rem;
    }
    
    .matieres-grid {
        gap: 2rem;
    }
    
    .matiere-image {
        aspect-ratio: 4/5;
    }
    
    .matiere-name {
        font-size: 1.3rem;
    }
    
    .matiere-description {
        font-size: 0.9rem;
    }
    
    /* Banner responsive */
    .matiere-banner {
        height: 150px;
    }
    
    .banner-title {
        font-size: 1.3rem;
    }
    
    .banner-subtitle {
        font-size: 0.8rem;
    }
    
    /* Application section */
    .application-section {
        padding: 2rem 1rem;
    }
    
    .application-content {
        max-width: 100%;
    }
    
    .application-title {
        font-size: 1.3rem;
        margin-bottom: 1.4rem;
    }
    
    .application-quote {
        font-size: 1.2rem;
        margin: 2rem 0;
        padding-left: 1.4rem;
        padding-right: 1.1rem;
    }

    .application-quote .quote-line {
        white-space: normal;
    }

    .application-quote::before,
    .application-quote::after {
        font-size: 2rem;
    }
    
    .application-text {
        padding-left: 0;
        font-size: 0.95rem;
    }
    
    .highlight-text {
        padding-left: 0;
    }
    
    /* Couleur section */
    .couleur-section {
        padding: 2rem 1rem;
    }
    
    .couleur-title {
        font-size: 1.5rem;
    }
    
    .couleur-quote {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    .couleur-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .couleur-image {
        flex: 1;
        max-width: 100%;
        align-self: auto;
    }
    
    .couleur-image img {
        height: auto;
        max-height: 400px;
    }
    
    .couleur-text {
        gap: 1rem;
    }
    
    .couleur-intro,
    .couleur-description,
    .couleur-conclusion {
        font-size: 0.95rem;
    }
    
    .couleur-stats {
        gap: 2rem;
        margin: 1.5rem 0;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .couleur-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}

/* Section texture avec fond blanc */
.texture-section {
    background: white;
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 8rem);
}

.texture-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #000;
    margin: 0 0 4rem 0;
    text-align: left;
}

.texture-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.texture-text {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.texture-quote {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-style: italic;
    color: #333;
    margin: 0 0 2rem 0;
    line-height: 1.3;
    font-weight: 400;
}

.texture-paragraph {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.texture-paragraph strong {
    color: #000;
    font-weight: 600;
}

.texture-btn {
    display: inline-block;
    text-decoration: none;
    align-self: flex-start;
    background: #000;
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.texture-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.texture-images {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    gap: 1rem;
    align-items: stretch;
    height: 600px;
}

.texture-image-large {
    flex: 2;
}

.texture-image-small {
    flex: 1;
}

.texture-image-large img,
.texture-image-small img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Responsive pour la section texture */
@media (max-width: 768px) {
    .texture-section {
        padding: 2rem 1rem;
    }
    
    .texture-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .texture-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .texture-text {
        flex: 1;
        max-width: 100%;
    }
    
    .texture-quote {
        font-size: 1.2rem;
    }
    
    .texture-paragraph {
        font-size: 0.95rem;
    }
    
    .texture-images {
        flex: 1;
        max-width: 100%;
        height: 300px;
        flex-direction: row;
    }
    
    .texture-image-large,
    .texture-image-small {
        flex: 1;
    }
    
    .texture-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}

/* Section association avec fond gris */
.association-section {
    background: #f5f5f5;
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 8rem);
}

.association-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #000;
    margin: 0 0 4rem 0;
    text-align: left;
}

.association-content {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.association-image {
    flex: 0 0 50%;
    max-width: 50%;
    width: 100%;
}

.association-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.association-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.association-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
}

.association-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.association-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.association-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c7c7c7;
}

.association-dot.is-active {
    background: #555;
}

.association-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: flex-start;
    align-self: flex-start;
    padding-left: 0.8rem;
}

@media (max-width: 1200px) {
    .association-content {
        gap: 2.2rem;
    }

    .association-paragraph br {
        display: none;
    }
}

@media (max-width: 980px) {
    .association-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .association-image,
    .association-text {
        max-width: 100%;
        width: 100%;
    }

    .association-text {
        padding-left: 0;
    }
}

.association-quote {
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    font-style: italic;
    color: #333;
    margin: 0 0 2rem 0;
    line-height: 1.3;
    font-weight: 700;
}

.quote-mark {
    font-size: clamp(2.2rem, 3.5vw, 3rem);
    color: #999;
    font-style: normal;
    font-weight: 700;
    line-height: 0;
    vertical-align: middle;
}

.association-paragraph {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.association-btn {
    display: inline-block;
    text-decoration: none;
    align-self: flex-start;
    background: #000;
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.association-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.matiere-dialogue-section {
    background: #f5f5f5;
    padding: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 5vw, 8rem);
}

.matiere-dialogue-content {
    display: flex;
    align-items: stretch;
    gap: 3rem;
}

.matiere-dialogue-text {
    flex: 1;
    color: #333;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    line-height: 1.55;
}

.matiere-dialogue-text p {
    margin: 0 0 1.9rem 0;
}

.matiere-dialogue-text p:last-child {
    margin-bottom: 0;
}

.matiere-dialogue-image {
    flex: 0 0 32%;
    max-width: 32%;
}

.matiere-dialogue-image img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive pour la section association */
@media (max-width: 768px) {
    .association-section {
        padding: 2rem 1rem;
    }
    
    .association-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .association-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .association-image {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }

    .association-slider {
        aspect-ratio: auto;
        height: 62vw;
        min-height: 220px;
        max-height: 320px;
    }
    
    .association-quote {
        font-size: 1.2rem;
    }
    
    .association-paragraph {
        font-size: 0.95rem;
    }

    .association-paragraph br {
        display: none;
    }
    
    .association-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
        margin-top: 1rem;
    }

    .matiere-dialogue-section {
        padding: 2rem 1rem;
    }

    .matiere-dialogue-content {
        flex-direction: column;
        gap: 1.2rem;
    }

    .matiere-dialogue-image {
        flex: 1;
        max-width: 100%;
    }

    .matiere-dialogue-image img {
        height: auto;
        min-height: 0;
    }

    .matiere-dialogue-text {
        font-size: 0.95rem;
    }
}

/* Override container pour page matières */
body .container {
    max-width: none;
    width: 100%;
}

/* ========================================
   CONFIGURATEUR 3D ROOM
   ======================================== */
.room-3d-container {
    width: 100%;
    position: relative;
    background: transparent;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

#room-3d-canvas {
    width: 100%;
    height: 430px;
    max-height: 430px;
    display: block;
    cursor: grab;
}

#room-3d-canvas:active {
    cursor: grabbing;
}

/* Inline controls layout */
.room-3d-controls-inline {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.texture-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.texture-selector-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.texture-selector-inline label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #333;
}

.furniture-controls-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.furniture-controls-inline label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #333;
}

.texture-options {
    display: flex;
    gap: 8px;
}

.texture-btn-3d {
    width: 45px;
    height: 45px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: all 0.3s ease;
}

.texture-btn-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.texture-btn-3d:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.texture-btn-3d.active {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.room-3d-hint {
    text-align: center;
    color: #666;
    padding: 4px 12px 2px;
    font-size: 0.68rem;
}

.furniture-buttons {
    display: flex;
    gap: 8px;
}

.add-furniture-btn,
.clear-furniture-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-furniture-btn {
    background: #1a1a1a;
    color: white;
}

.add-furniture-btn:hover {
    background: #333;
}

.clear-furniture-btn {
    background: #e0e0e0;
    color: #333;
}

.clear-furniture-btn:hover {
    background: #ccc;
}

/* ============================================
   PANNEAU DE CONTRÔLE DES TEXTURES
   ============================================ */
.texture-control-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 6px;
    margin-top: 0;
}

.control-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-column h4 {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 3px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.texture-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.texture-options-grid .texture-btn-3d {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.texture-options-grid .texture-btn-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.texture-options-grid .texture-btn-3d:hover {
    border-color: #888;
    transform: scale(1.05);
}

.texture-options-grid .texture-btn-3d.active {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.control-sliders {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-row label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #555;
    min-width: 55px;
}

.slider-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.slider-row input[type="range"]::-webkit-slider-thumb:hover {
    background: #000;
}

.slider-row span {
    font-size: 0.7rem;
    color: #666;
    min-width: 35px;
    text-align: right;
}

/* Panneau sliders */
.texture-sliders-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
    margin-top: 8px;
}

.sliders-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    min-width: 70px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #555;
}

.slider-group input[type="range"] {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    cursor: pointer;
}

.slider-group span {
    font-size: 0.7rem;
    color: #666;
    min-width: 30px;
}

/* Barre mobilier */
.furniture-control-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-top: 10px;
}

.furniture-control-bar label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .texture-control-panel {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .texture-options-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .texture-sliders-panel {
        padding: 10px;
    }
    
    .sliders-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .slider-label {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 500px) {
    .texture-control-panel {
        grid-template-columns: 1fr;
    }
}