/* Page Nuancier */

/* ============================================
   LOADER AVEC LOGO ANIMÉ
   ============================================ */
.nuancier-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nuancier-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo-container {
    position: relative;
    width: 180px;
    height: 80px;
}

.loader-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loader-logo-1 {
    opacity: 1;
}

.loader-logo-2 {
    opacity: 0;
}

.loader-progress-bar {
    width: 200px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 30px;
    overflow: hidden;
}

.loader-progress-fill {
    width: 0%;
    height: 100%;
    background: #000;
    border-radius: 3px;
    transition: width 0.1s ease;
}

.loader-text {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Masquer le contenu initialement pour éviter le flash */
.nuances-grid {
    opacity: 0;
}

.nuances-grid.loaded {
    opacity: 1;
}

.nuancier-main {
    padding-top: 45px;
    min-height: 100vh;
    background: #fff;
}

.nuancier-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.nuancier-container > .nuancier-title,
.nuancier-container > .nuancier-description {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

.nuancier-title {
    font-size: 48px;
    font-weight: 300;
    text-align: left;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

/* Section avant les onglets avec flex */
.pre-tabs-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 40px;
    padding: 0 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Description de l'onglet sélectionné à gauche */
.selected-tab-description {
    text-align: left;
    flex: 1;
}

.selected-tab-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.selected-tab-text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

/* Description texte technique à droite */
.nuancier-description {
    text-align: right;
    flex: 1;
}

.nuancier-description p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* Barre d'onglets */
.tabs-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: #e5e5e5;
    padding: 8px 20px;
    margin: 0 0 60px 0;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* ============================================
   BARRE DE RECHERCHE NUANCIER
   ============================================ */
.nuancier-search-container {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.nuancier-search-wrapper {
    position: relative;
    z-index: 100;
}

/* Cacher la barre de recherche quand la vue détaillée est active */
.color-detail-view.active ~ .nuancier-container .nuancier-search-container,
body:has(.color-detail-view.active) .nuancier-search-container {
    display: none !important;
}

.nuancier-search-input {
    width: 220px;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.nuancier-search-input:focus {
    width: 280px;
    border-color: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nuancier-search-input::placeholder {
    color: #999;
}

.nuancier-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.nuancier-search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    display: none;
    z-index: 150;
    max-height: 400px;
    overflow-y: auto;
}

.nuancier-search-results.active {
    display: block;
}

.nuancier-search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.nuancier-search-result-item:last-child {
    border-bottom: none;
}

.nuancier-search-result-item:hover {
    background: #f5f5f5;
}

.nuancier-search-result-item:first-child {
    border-radius: 12px 12px 0 0;
}

.nuancier-search-result-item:last-child {
    border-radius: 0 0 12px 12px;
}

.nuancier-search-result-item:only-child {
    border-radius: 12px;
}

.result-ref {
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

.result-brand {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 10px;
}

.nuancier-search-no-result {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ============================================ */

.tab-item {
    position: relative;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 400;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    z-index: 1;
}

.tab-item .tab-brand {
    font-weight: 600;
}

.tab-item:hover {
    color: #000;
}

.tab-item.active {
    color: #000;
    font-weight: 600;
}

.tab-item.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    background: #fff;
    border-radius: 6px;
    z-index: -1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Sous-catégories Couleurs / Textures */
.sub-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 200px;
    margin: 60px auto 40px auto;
    padding: 0 40px;
    position: relative;
    max-width: 1400px;
}

@media (max-width: 1920px) {
    .sub-categories {
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Sur écran 24 pouces Full HD (1920x1080) */
@media (min-width: 1920px) and (max-width: 1920px) {
    .nuance-item {
        width: 100px;
    }
    
    .nuance-color {
        width: 100px;
        height: 100px;
    }
    
    .collection-items {
        grid-template-columns: repeat(4, 100px);
    }
    
    .collection-items-2col {
        grid-template-columns: repeat(2, 100px) !important;
    }
    
    .collection-items-3col {
        grid-template-columns: repeat(3, 100px);
    }
}

/* Sur très grand écran uniquement (4K, etc.) */
@media (min-width: 1921px) {
    .nuance-item {
        width: 106px;
    }
    
    .nuance-color {
        width: 106px;
        height: 106px;
    }
    
    .collection-items {
        grid-template-columns: repeat(4, 106px);
    }
    
    .collection-items-2col {
        grid-template-columns: repeat(2, 106px) !important;
    }
    
    .collection-items-3col {
        grid-template-columns: repeat(3, 106px);
    }
    
    .collection-items-row {
        gap: 12px;
    }
}

.sub-categories::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 800px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.sub-category-item {
    position: relative;
    font-size: 24px;
    font-weight: 500;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    padding-bottom: 12px;
    padding-left: 8px;
    padding-right: 8px;
    transition: color 0.3s ease;
    z-index: 1;
}

.sub-category-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sub-category-item.active {
    font-weight: 800;
}

.sub-category-item.active::after {
    transform: scaleX(1);
    height: 4px;
}

.sub-category-item:hover {
    color: #000;
}

/* Contenu des onglets */
.tabs-content {
    min-height: 400px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h2 {
    display: none;
}

.tab-content p {
    display: none;
}

/* Grille de nuances */
.nuances-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 0 40px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.collections-row {
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: stretch;
    justify-content: flex-start;
}

.collection-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 0 0 auto;
    justify-content: flex-start;
}

/* Positionnement à gauche pour COLLECTION /01 */
.collection-group.collection-01-left {
    margin-right: auto;
    align-self: flex-start;
}

/* Décalage à gauche pour COLLECTION /BEIGE */
.collection-group.collection-beige-left {
    position: relative;
    left: -30px;
}

.align-bottom {
    align-self: flex-end;
    justify-content: flex-end;
}

.align-bottom .collection-title {
    margin-top: auto;
}

.collection-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #000;
    margin: 0;
    padding-bottom: 3px;
    border-bottom: 1px solid #e0e0e0;
}

.collection-items {
    display: grid;
    grid-template-columns: repeat(4, 96px);
    gap: 8px;
    justify-content: start;
}

.collection-items-row {
    display: flex;
    flex-direction: row;
    grid-template-columns: none;
    flex-wrap: nowrap;
}

.collection-items-3col {
    grid-template-columns: repeat(3, 96px);
}

.collection-items-2col {
    grid-template-columns: repeat(2, 96px) !important;
}

/* Forcer l'alignement en bas pour les collections align-bottom */
.align-bottom .collection-items {
    align-content: end;
}

/* Par défaut, tailles réduites pour tous les écrans */
.nuance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 96px;
}

.nuance-item:hover {
    transform: translateY(-4px);
}

.nuance-color {
    width: 96px;
    height: 96px;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.nuance-color img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nuance-item:hover .nuance-color {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.nuance-name {
    font-size: 10px;
    font-weight: 500;
    color: #333;
    text-align: center;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

/* Empty placeholder for keeping a gap in the grid */
.nuance-empty {
    pointer-events: none;
}

.nuance-empty .nuance-color {
    background: transparent;
    box-shadow: none;
}

.nuance-empty .nuance-name {
    display: block;
    color: transparent;
    min-height: 32px;
}

/* Aligner les collections sur laptop */
@media (max-width: 1600px) and (min-width: 1025px) {
    .nuance-item {
        width: 70px;
    }
    
    .nuance-color {
        width: 70px;
        height: 70px;
    }
    
    .collection-items {
        grid-template-columns: repeat(4, 70px);
        gap: 10px;
    }
    
    .collection-items-2col {
        grid-template-columns: repeat(2, 70px) !important;
    }
    
    .collection-items-3col {
        grid-template-columns: repeat(3, 70px);
    }
    
    .nuance-name {
        font-size: 11px;
        min-height: 34px;
    }
    
    .collections-row {
        justify-content: flex-start;
        gap: 20px;
    }
    
    .collection-group {
        margin-right: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nuancier-main {
        padding-top: 60px;
    }

    .nuancier-container {
        padding: 20px 0;
    }

    .nuancier-title {
        font-size: 28px;
        margin-bottom: 30px;
        letter-spacing: 1px;
        padding: 0 15px;
    }

    .pre-tabs-section {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .selected-tab-description,
    .nuancier-description {
        text-align: left;
    }

    .selected-tab-title {
        font-size: 20px;
    }

    .selected-tab-text,
    .nuancier-description p {
        font-size: 14px;
    }

    .nuancier-description p br {
        display: none;
    }

    .tabs-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        width: 100%;
        margin-left: 0;
        position: relative;
    }

    .tab-item {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    .tab-item.active::before {
        width: calc(100% - 4px);
        height: calc(100% - 4px);
    }

    /* Barre de recherche centrée en dessous des onglets sur mobile */
    .nuancier-search-container {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 15px;
        order: 99;
    }
    
    .nuancier-search-input {
        width: 250px;
    }
    
    .nuancier-search-input:focus {
        width: 280px;
    }
    
    .nuancier-search-results {
        width: 280px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .tab-content h2 {
        font-size: 24px;
    }

    .nuances-grid {
        padding: 0 15px;
    }

    .collections-row {
        flex-direction: column;
        gap: 40px;
    }

    .collection-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .collection-items {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .collection-items-row {
        display: flex !important;
        flex-wrap: wrap;
        grid-template-columns: none !important;
        justify-content: center;
    }
    
    .collection-items-3col {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Désactiver le décalage de BEIGE sur mobile */
    .collection-group.collection-beige-left {
        position: static;
        left: 0;
    }

    .nuance-item {
        width: calc((100vw - 60px) / 4);
    }

    .nuance-color {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .collection-title {
        font-size: 16px;
    }

    .nuance-name {
        font-size: 10px;
    }

    .sub-categories {
        justify-content: center;
        gap: 60px;
        margin: 40px 0 30px 0;
        padding: 0 20px;
    }

    .sub-categories::before {
        display: none;
    }

    .sub-category-item {
        font-size: 18px;
    }

    .sub-category-item::after {
        display: none;
    }
}

/* Tablette */
@media (min-width: 769px) and (max-width: 1024px) {
    .nuancier-title {
        font-size: 36px;
        padding: 0 20px;
    }

    .pre-tabs-section {
        gap: 30px;
        padding: 0 20px;
    }

    .selected-tab-title {
        font-size: 22px;
    }

    .tab-item {
        padding: 14px 30px;
        font-size: 15px;
    }

    .sub-categories::before {
        left: 220px;
    }

    .nuances-grid {
        padding: 0 20px;
    }

    .collections-row {
        flex-direction: column;
        gap: 50px;
    }

    .collection-items {
        flex-wrap: wrap;
        gap: 14px;
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .collection-items-row {
        display: flex !important;
        flex-wrap: wrap;
        grid-template-columns: none !important;
    }
    
    .collection-items-3col {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .nuance-item {
        width: 80px;
    }

    .nuance-color {
        width: 80px;
        height: 80px;
    }

    .nuance-name {
        font-size: 11px;
    }
}

/* Bloquer le scroll quand vue détaillée ouverte */
body.detail-open,
html.detail-open {
    overflow: hidden !important;
    height: 100%;
    position: fixed;
    width: 100%;
}

/* Vue détaillée d'une couleur */
.color-detail-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    padding: 60px 20px 20px 20px;
    opacity: 0;
}

.color-detail-view.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.close-detail-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.detail-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    background: white;
    padding: 30px;
    display: grid;
    grid-template-columns: 340px 1fr 550px;
    gap: 30px;
    max-height: 92vh;
    overflow: hidden;
    box-sizing: border-box;
}

/* Colonne gauche : Collection */
.detail-left {
    border-right: 1px solid #e0e0e0;
    padding-right: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 88vh;
}

.detail-collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.collection-nav-btn {
    background: #f0f0f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.collection-nav-btn:hover {
    background: #e0e0e0;
}

.detail-collection-title {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.detail-collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Collection Brume reste à 4 colonnes */
.detail-collection-grid.grid-4col {
    grid-template-columns: repeat(4, 1fr);
}

.detail-collection-grid .nuance-item {
    width: 100%;
    cursor: pointer;
}

.detail-collection-grid .nuance-color {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
}

.detail-collection-grid .nuance-name {
    font-size: 9px;
}

/* Colonne milieu : Détails */
.detail-center {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    max-height: 88vh;
    padding-right: 10px;
}

.detail-main-color {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
}

.detail-main-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.detail-color-info {
    text-align: center;
}

.detail-color-ref {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.detail-suggestions {
    margin-top: 5px;
    text-align: center;
}

.detail-suggestions h4 {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 10px;
}

.suggestion-colors {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.touch-colors {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.suggestion-colors .nuance-item {
    width: 70px;
    flex-shrink: 0;
}

.suggestion-colors .nuance-color {
    width: 70px;
    height: 70px;
}

.touch-colors .nuance-item {
    width: 70px;
    flex-shrink: 0;
}

.touch-colors .nuance-color {
    width: 70px;
    height: 35px;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.detail-btn {
    background: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-width: 220px;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.detail-btn:hover {
    background: #333;
}

.detail-btn-outline {
    background: white;
    color: #000;
    border: 2px solid #000;
}

.detail-btn-outline:hover {
    background: #f0f0f0;
}

/* Colonne droite : Rendu */
.detail-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 88vh;
}

.detail-render-image {
    width: 100%;
    height: auto;
    min-height: 500px;
    max-height: 85vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.detail-disclaimer {
    font-size: 10px;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Responsive pour la vue détaillée */
@media (max-width: 1600px) and (min-width: 1025px) {
    .detail-container {
        grid-template-columns: 220px 1fr 300px;
        gap: 15px;
        padding: 15px;
        max-height: 88vh;
    }
    
    .detail-main-color {
        max-width: 170px;
    }
    
    .detail-center {
        gap: 8px;
        max-height: 84vh;
    }
    
    .detail-left,
    .detail-right {
        max-height: 84vh;
    }
    
    .detail-color-ref {
        font-size: 16px;
    }
    
    .detail-suggestions h4 {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .suggestion-colors,
    .touch-colors {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .suggestion-colors .nuance-item,
    .touch-colors .nuance-item {
        width: 60px;
    }
    
    .suggestion-colors .nuance-color {
        width: 60px;
        height: 60px;
    }
    
    .touch-colors .nuance-color {
        width: 60px;
        height: 30px;
    }
    
    .detail-btn {
        padding: 8px 12px;
        font-size: 10px;
    }
}

@media (max-width: 1200px) {
    .detail-container {
        grid-template-columns: 250px 1fr 350px;
        gap: 30px;
        padding: 30px;
    }
}

@media (max-width: 968px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    
    .detail-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 20px;
    }
    
    .detail-collection-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .detail-right {
        order: -1;
    }
}

@media (max-width: 768px) {
    .color-detail-view {
        padding: 50px 10px 20px 10px;
        align-items: flex-start;
    }
    
    .color-detail-view.active {
        display: block;
        overflow-y: auto;
    }
    
    .detail-container {
        padding: 15px;
        grid-template-columns: 1fr;
        gap: 20px;
        max-height: none;
        overflow: visible;
    }
    
    .detail-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 15px;
        max-height: none;
        overflow: visible;
    }
    
    .detail-center {
        max-height: none;
        overflow: visible;
    }
    
    .detail-right {
        max-height: none;
        overflow: visible;
        order: -1;
    }
    
    .detail-collection-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .detail-main-color {
        max-width: 200px;
    }
    
    .suggestion-colors,
    .touch-colors {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .suggestion-colors .nuance-item,
    .touch-colors .nuance-item {
        width: 70px;
    }
    
    .suggestion-colors .nuance-color {
        width: 70px;
        height: 70px;
    }
    
    .touch-colors .nuance-color {
        width: 70px;
        height: 35px;
    }
    
    .close-detail-btn {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 10px;
        right: 10px;
        position: fixed;
    }
    
    .detail-render-image {
        min-height: 250px;
        max-height: 350px;
    }
}

/* Très petits écrans (téléphones) */
@media (max-width: 480px) {
    .color-detail-view {
        padding: 45px 5px 15px 5px;
    }
    
    .detail-container {
        padding: 10px;
        gap: 15px;
    }
    
    .detail-collection-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .detail-collection-grid .nuance-color {
        height: 40px;
    }
    
    .detail-collection-grid .nuance-name {
        font-size: 7px;
    }
    
    .detail-main-color {
        max-width: 150px;
    }
    
    .detail-color-ref {
        font-size: 16px;
    }
    
    .detail-suggestions h4 {
        font-size: 11px;
    }
    
    .suggestion-colors .nuance-item,
    .touch-colors .nuance-item {
        width: 55px;
    }
    
    .suggestion-colors .nuance-color {
        width: 55px;
        height: 55px;
    }
    
    .touch-colors .nuance-color {
        width: 55px;
        height: 28px;
    }
    
    .detail-btn {
        padding: 10px 15px;
        font-size: 11px;
    }
    
    .detail-render-image {
        max-height: 250px;
    }
    
    .close-detail-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 8px;
        right: 8px;
    }
}

/* ========================================
   Section Textures
   ======================================== */
.textures-section {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.textures-layout {
    display: flex;
    gap: 80px;
    justify-content: space-between;
}

/* Colonne gauche - Images verticales grandes */
.textures-left {
    flex: 0 0 400px;
}

.textures-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Collection de textures */
.texture-collection {
    margin-bottom: 30px;
}

.texture-collection .collection-title {
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
    text-decoration: none;
    display: block;
    width: 100%;
}

.texture-collection .collection-title strong {
    font-weight: 700;
}

/* Items verticaux (colonne gauche) */
.texture-items-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.texture-item-large {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.texture-item-large img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}

.texture-item-large .texture-name {
    font-size: 14px;
    font-style: italic;
    color: #333;
}

/* Items en grille (colonne droite) */
.texture-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.texture-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.texture-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0;
}

.texture-item .texture-name {
    font-size: 13px;
    color: #333;
}

/* Responsive textures */
@media (max-width: 1200px) {
    .textures-layout {
        flex-direction: column;
        gap: 40px;
    }
    
    .textures-left {
        flex: 1;
    }
    
    .texture-items-vertical {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .texture-item-large {
        flex: 1;
        min-width: 250px;
    }
    
    .texture-item-large img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .textures-section {
        padding: 20px;
    }
    
    .texture-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .texture-item-large img {
        height: 150px;
    }
}

/* ========================================
   Lightbox Textures
   ======================================== */
.texture-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.texture-lightbox.active {
    display: flex;
    opacity: 1;
}

.texture-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
    pointer-events: none;
}

.texture-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 10001;
}

.texture-lightbox-close:hover {
    opacity: 0.7;
}

/* Curseur pointer sur les images de texture */
.texture-item img,
.texture-item-large img {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.texture-item img:hover,
.texture-item-large img:hover {
    transform: scale(1.02);
    opacity: 0.9;
}