#resultat_simulation {
    position:absolute;
}
#reglages_simulation {
    position:absolute;
}
#menu_logo {
    border-radius: 50px;
    width: 100px;
    height:100px;
    position:absolute;
    top:10px;
    left:10px;
    background-color: aquamarine;
}
.nav-pills {
    margin-top: 10px;
}

.modal.show .modal-dialog {
    margin-top: 100px;
}
.nav-pills .nav-item {
    border: 1px solid #474848 !important;
}
.nav-pills button {
    text-transform: uppercase;
}
.nav-pills button.active {
font-weight: bold;
}

@media (orientation:portrait) {

    #menu_logo {
        width: 70px !important;
        height:70px !important;
    }
    #reglages_simulation {
        width: 100%;
        height: 60%;
        left:0px;
        right:0px;
        bottom:0px;
        overflow: scroll;
        background: #fdfaf6;
        box-shadow: 0 4px 16px rgba(0,0,0,0.05);
        border-radius: 12px;
    }
    #resultat_simulation {
        width: 100%;
        height: 40%;
        left:0px;
        right:0px;
        top:0px;
    }
}
@media (orientation:landscape) {
    
    #reglages_simulation {
        
        width: 50%;
        height: 100%;
        top:0px;
        left:0px;
        bottom:0px;
        overflow: scroll;
    }
    #resultat_simulation {
        width: 50%;
        height: 100%;
        top:0px;
        right:0px;
        bottom:0px;
        
    }
    #reglages_simulation .tabs {
        margin-top: 130px;
    }

    .motif-preview {
        /* display:inline-block; */
    }
}

#price_button {
    position:absolute;
    bottom: 60px;
    left:0;
    right:0;
    display:block;
    width: auto;
}

.nav .nav-item button.active {
  background-color: transparent;
  /* //color: var(--bs-danger) !important; */
}
.nav .nav-item button.active::after {
  content: "";
  border-bottom: 4px solid var(--bs-primary);
  width: 100%;
  position: absolute;
  left: 0;
  bottom: -1px;
  border-radius: 5px 5px 0 0;
}
/* Animations des boutons */
@keyframes buttonPulse {
    0% { box-shadow: 0 10px 30px rgba(218, 165, 32, 0.5); }
    50% { box-shadow: 0 15px 40px rgba(218, 165, 32, 0.7); }
    100% { box-shadow: 0 10px 30px rgba(218, 165, 32, 0.5); }
}

#price_button::before,
#mobile_continue_btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.2), transparent) !important;
    transition: all 0.5s !important;
}

#price_button:hover::before,
#mobile_continue_btn:hover::before {
    left: 100% !important;
}

#price_button:hover,
#mobile_continue_btn:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 20px 50px rgba(218, 165, 32, 0.7) !important;
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

#price_button:active,
#mobile_continue_btn:active {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 10px 25px rgba(218, 165, 32, 0.5) !important;
}/* =================================================
   STYLES ORIGINAUX MAINTENUS
   ================================================= */

#resultat_simulation {
    position: absolute;
}

#reglages_simulation {
    position: absolute;
}

#menu_logo {
    border-radius: 50px;
    width: 100px;
    height: 100px;
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: aquamarine;
}

.nav-pills {
    margin-top: 10px;
}

.modal.show .modal-dialog {
    margin-top: 100px;
}

.nav-pills .nav-item {
    border: 1px solid #474848 !important;
}

.nav-pills button {
    text-transform: uppercase;
}

.nav-pills button.active {
    font-weight: bold;
}

.nav .nav-item button.active {
    background-color: transparent;
}

.nav .nav-item button.active::after {
    content: "";
    border-bottom: 4px solid var(--bs-primary);
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    border-radius: 5px 5px 0 0;
}

/* =================================================
   NOUVEAU THÈME NOIR/DORÉ AMÉLIORÉ
   ================================================= */

/* Animation de particules en arrière-plan */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(218, 165, 32, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
    animation: backgroundShift 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Amélioration du body */
body {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 50%, #000 100%) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Logo modernisé */
#menu_logo {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 24px !important;
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3) !important;
    z-index: 1000 !important;
}

/* Layouts responsifs */
/* Layouts responsifs */
@media (orientation: portrait) {
    #menu_logo {
        width: 70px !important;
        height: 70px !important;
        font-size: 18px !important;
    }

    #reglages_simulation {
        width: 100% !important;
        height: 60% !important;
        left: 0px !important;
        right: 0px !important;
        bottom: 0px !important;
        background: rgba(0, 0, 0, 0.85) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(218, 165, 32, 0.3) !important;
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3) !important;
        border-radius: 20px 20px 0 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transition: all 0.3s ease !important;
        padding-bottom: 20px !important;
        padding-top: 80px !important; /* AJOUTÉ : espace pour le header fixe */
    }

    #resultat_simulation {
        width: 100% !important;
        height: 40% !important;
        left: 0px !important;
        right: 0px !important;
        top: 0px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 0 0 20px 20px !important;
        border: 1px solid rgba(218, 165, 32, 0.2) !important;
        box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.1) !important;
        overflow: visible !important;
    }

    /* NOUVEAU : Header fixe avec prix et bouton */
    .tabs {
        position: sticky !important; /* CHANGÉ : sticky au lieu de static */
        top: 0 !important;
        z-index: 100 !important;
        background: rgba(0, 0, 0, 0.95) !important; /* AJOUTÉ : fond pour masquer le contenu en dessous */
        backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(218, 165, 32, 0.3) !important;
        margin-top: 0 !important; /* CHANGÉ : 0 au lieu de 10px */
        padding: 10px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    /* NOUVEAU : Bouton mobile intégré avec le prix */
    #mobile_continue_btn {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
        color: #000 !important;
        border: none !important;
        padding: 10px 20px !important;
        border-radius: 20px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        box-shadow: 0 6px 15px rgba(218, 165, 32, 0.4) !important;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        z-index: 1000 !important;
        overflow: hidden !important;
        animation: buttonPulse 2s infinite !important;
        backdrop-filter: blur(10px) !important;
        border: 2px solid #000 !important;
        margin: 0 !important;
        margin-left: 15px !important;
        width: auto !important;
        max-width: none !important;
        display: inline-block !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* NOUVEAU : Container prix + bouton sur la même ligne */
    .tabs > div:first-child {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important; /* Prix à droite */
    }

    .tabs > div:first-child > div {
        flex-shrink: 0 !important;
    }

    /* Masquer le bouton bleu original sur mobile */
    #price_button {
        display: none !important;
    }
}

@media (orientation: landscape) {
    #reglages_simulation {
        width: 50% !important;
        height: 100% !important;
        top: 0px !important;
        left: 0px !important;
        bottom: 0px !important;
        background: rgba(0, 0, 0, 0.85) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(218, 165, 32, 0.3) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
        border-radius: 0 20px 20px 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transition: all 0.3s ease !important;
    }

    #resultat_simulation {
        width: 50% !important;
        height: 100% !important;
        top: 0px !important;
        right: 0px !important;
        bottom: 0px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 20px 0 0 20px !important;
        border: 1px solid rgba(218, 165, 32, 0.2) !important;
        box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.1) !important;
        overflow: visible !important;
    }

    #reglages_simulation .tabs {
        margin-top: 130px !important;
        position: static !important; /* AJOUTÉ : position static sur PC */
        background: transparent !important; /* AJOUTÉ : fond transparent sur PC */
        border-bottom: none !important; /* AJOUTÉ : pas de bordure sur PC */
    }

    /* Bouton PC en bas à droite du visualisateur avec "4." */
    #price_button {
        position: absolute !important;
        bottom: 30px !important;
        right: 30px !important;
        background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
        color: #000 !important;
        border: none !important;
        padding: 15px 30px !important;
        border-radius: 25px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4) !important;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        z-index: 1000 !important;
        overflow: hidden !important;
        animation: buttonPulse 2s infinite !important;
        backdrop-filter: blur(10px) !important;
        border: 2px solid #000 !important;
        margin: 0 !important;
        width: auto !important;
        max-width: none !important;
        display: inline-block !important;
        white-space: nowrap !important;
        left: auto !important;
    }

    /* Masquer le bouton mobile sur PC */
    #mobile_continue_btn {
        display: none !important;
    }
}

/* Amélioration du prix */
.text-success {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 10px rgba(218, 165, 32, 0.3) !important;
    animation: priceGlow 2s ease-in-out infinite alternate !important;
    display: inline-block !important; /* AJOUTÉ : s'assurer de l'affichage */
    visibility: visible !important; /* AJOUTÉ : s'assurer de la visibilité */
}

/* CORRECTION : S'assurer que les spans de prix s'affichent */
#summary-prix-2,
#summary-price,
#summary-width,
#summary-height,
#summary-depth,
#summary-material,
#summary-motif {
    display: inline !important;
    visibility: visible !important;
    color: inherit !important;
}

@keyframes priceGlow {
    from { filter: drop-shadow(0 0 5px rgba(218, 165, 32, 0.4)); }
    to { filter: drop-shadow(0 0 15px rgba(218, 165, 32, 0.7)); }
}

/* Onglets ultra-modernes */
.nav-pills {
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 15px !important;
    padding: 8px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.nav-pills .nav-item {
    border: none !important;
}

.nav-pills .nav-link {
    color: rgba(218, 165, 32, 0.9) !important;
    border-radius: 12px !important;
    padding: 15px 25px !important;
    margin: 0 5px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    overflow: hidden !important;
    border: 2px solid transparent !important;
    text-transform: uppercase !important;
}

.nav-pills .nav-link::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.1), transparent) !important;
    transition: all 0.5s !important;
}

.nav-pills .nav-link:hover::before {
    left: 100% !important;
}

.nav-pills .nav-link:hover {
    color: #FFD700 !important;
    background: rgba(218, 165, 32, 0.1) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(218, 165, 32, 0.4) !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3) !important;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-color: #DAA520 !important;
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

/* Surcharge pour les styles actifs existants */
.nav .nav-item button.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
}

.nav .nav-item button.active::after {
    border-bottom: 4px solid #DAA520 !important;
}

/* Contenu des onglets */
.tab-content {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    border-radius: 20px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    margin-top: 20px !important;
    transition: all 0.3s ease !important;
    overflow: visible !important;
}

.tab-content:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Groupes d'options */
.option-group {
    background: rgba(0, 0, 0, 0.7) !important;
    padding: 25px !important;
    border-radius: 15px !important;
    margin-bottom: 25px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.option-group:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-3px) !important;
    border-color: rgba(218, 165, 32, 0.5) !important;
}

/* Labels */
.option-group label {
    color: #DAA520 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    margin-bottom: 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.option-group label span {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    text-shadow: 0 2px 10px rgba(218, 165, 32, 0.4) !important;
}

/* Sliders */
input[type="range"] {
    -webkit-appearance: none !important;
    width: 100% !important;
    height: 8px !important;
    border-radius: 20px !important;
    background: linear-gradient(to right, 
        #DAA520 0%, 
        #DAA520 var(--progress, 50%), 
        rgba(218, 165, 32, 0.3) var(--progress, 50%), 
        rgba(218, 165, 32, 0.3) 100%) !important;
    outline: none !important;
    margin: 15px 0 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3) !important;
    transition: all 0.3s ease !important;
}

input[type="range"]:hover {
    box-shadow: 0 6px 25px rgba(218, 165, 32, 0.5) !important;
    transform: translateY(-1px) !important;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    cursor: pointer !important;
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.6) !important;
    transition: all 0.3s ease !important;
    border: 3px solid #000 !important;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3) !important;
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.8) !important;
}

input[type="range"]::-moz-range-thumb {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    cursor: pointer !important;
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.6) !important;
    border: 3px solid #000 !important;
    transition: all 0.3s ease !important;
}

/* Select */
select {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid rgba(218, 165, 32, 0.4) !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #DAA520 !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
}

select:hover {
    border-color: #DAA520 !important;
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3) !important;
    transform: translateY(-2px) !important;
}

select:focus {
    outline: none !important;
    border-color: #FFD700 !important;
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Boutons de catégorie */
.category-button {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid rgba(218, 165, 32, 0.4) !important;
    border-radius: 15px !important;
    padding: 15px 25px !important;
    font-weight: 700 !important;
    color: #DAA520 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    overflow: hidden !important;
}

.category-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.2), transparent) !important;
    transition: all 0.5s !important;
}

.category-button:hover::before {
    left: 100% !important;
}

.category-button:hover {
    border-color: #DAA520 !important;
    background: rgba(218, 165, 32, 0.1) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(218, 165, 32, 0.3) !important;
}

.category-button.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-color: #DAA520 !important;
    box-shadow: 0 10px 30px rgba(218, 165, 32, 0.5) !important;
    transform: translateY(-3px) scale(1.05) !important;
}

/* Aperçus de motifs */
.motif-previews {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(218, 165, 32, 0.5) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    max-height: 450px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.motif-preview {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(218, 165, 32, 0.4) !important;
    border-radius: 15px !important;
    padding: 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
}

.motif-preview::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.2), transparent) !important;
    transition: all 0.5s !important;
}

.motif-preview:hover::before {
    left: 100% !important;
}

.motif-preview:hover {
    border-color: #DAA520 !important;
    box-shadow: 0 15px 40px rgba(218, 165, 32, 0.4) !important;
    transform: translateY(-5px) scale(1.03) !important;
    background: rgba(255, 255, 255, 1) !important;
}

.motif-preview.selected {
    border-color: #DAA520 !important;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%) !important;
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.4) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

.motif-preview img {
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

.motif-preview:hover img {
    transform: scale(1.1) rotate(2deg) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4) !important;
}

.motif-label {
    font-weight: 600 !important;
    color: #333 !important;
    text-transform: capitalize !important;
    letter-spacing: 0.3px !important;
    text-align: center !important;
    margin-top: 10px !important;
}

.motif-preview.selected .motif-label {
    color: #DAA520 !important;
    font-weight: 800 !important;
}

/* Scrollbar personnalisée */
.motif-previews::-webkit-scrollbar {
    width: 12px !important;
}

.motif-previews::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 6px !important;
}

.motif-previews::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    border-radius: 6px !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
}

.motif-previews::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

/* Canvas container */
#canvas-container {
    border-radius: 20px !important;
    overflow: visible !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    border: 2px solid rgba(218, 165, 32, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important; /* AJOUTÉ : assurer la largeur */
    height: 100% !important; /* AJOUTÉ : assurer la hauteur */
    display: block !important; /* AJOUTÉ : assurer l'affichage */
}

#canvas-container:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-3px) !important;
    border-color: rgba(218, 165, 32, 0.5) !important;
}

/* CORRECTION : S'assurer que le canvas Three.js s'affiche correctement */
#canvas-container canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 18px !important; /* Légèrement plus petit que le container */
}

/* CORRECTION : Conteneur de résultat sans casser le 3D */
#resultat_simulation {
    background: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(218, 165, 32, 0.2) !important;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.1) !important;
    overflow: visible !important;
    position: absolute !important; /* AJOUTÉ : s'assurer de la position */
    z-index: 2 !important; /* AJOUTÉ : z-index approprié */
    display: block !important; /* AJOUTÉ : s'assurer de l'affichage */
}

/* CORRECTION : S'assurer que les containers principaux s'affichent */
#reglages_simulation {
    display: block !important; /* AJOUTÉ : s'assurer de l'affichage */
    position: absolute !important; /* AJOUTÉ : s'assurer de la position */
    z-index: 3 !important; /* AJOUTÉ : z-index approprié */
}

/* CORRECTION : S'assurer que tous les éléments de contrôle fonctionnent */
input[type="range"],
select,
button {
    pointer-events: auto !important; /* AJOUTÉ : s'assurer que les interactions fonctionnent */
}

/* CORRECTION : S'assurer que les onglets fonctionnent */
.nav-pills .nav-link {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* CORRECTION : S'assurer que les aperçus de motifs fonctionnent */
.motif-preview,
.category-button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* CORRECTION : S'assurer que les boutons principaux fonctionnent */
#price_button,
#mobile_continue_btn,
#devis-button,
.ar-button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* CORRECTION : S'assurer que les sliders et les inputs fonctionnent */
#width,
#height,
#material,
#width-value,
#height-value {
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
}

/* CORRECTION : S'assurer que les conteneurs de motifs s'affichent */
#category-buttons,
#motif-previews {
    display: block !important;
    visibility: visible !important;
}

/* CORRECTION : S'assurer que les labels s'affichent */
.option-group label {
    display: flex !important;
    visibility: visible !important;
}

#price_button::before,
#mobile_continue_btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.2), transparent) !important;
    transition: all 0.5s !important;
}

#price_button:hover::before,
#mobile_continue_btn:hover::before {
    left: 100% !important;
}

#price_button:hover,
#mobile_continue_btn:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 20px 50px rgba(218, 165, 32, 0.7) !important;
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

#price_button:active,
#mobile_continue_btn:active {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 10px 25px rgba(218, 165, 32, 0.5) !important;
}

/* Modal améliorée */
.modal-content {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden !important;
    max-height: 85vh !important; /* RÉDUIT : 85vh au lieu de 90vh */
    display: flex !important; /* AJOUTÉ : flex pour contrôler la disposition */
    flex-direction: column !important;
}

.modal-header {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-bottom: none !important;
    padding: 20px 25px !important; /* RÉDUIT : padding plus petit */
    flex-shrink: 0 !important; /* AJOUTÉ : empêche la compression */
}

.modal-header h1 {
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    font-size: 1.3rem !important; /* AJOUTÉ : taille plus petite */
    margin: 0 !important; /* AJOUTÉ : supprimer les marges */
}

/* CORRECTION : Bouton de fermeture visible et stylé */
.btn-close {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 50% !important;
    opacity: 1 !important;
    filter: invert(1) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #000 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.btn-close:hover {
    background: rgba(218, 165, 32, 0.8) !important;
    transform: scale(1.1) !important;
    border-color: #DAA520 !important;
    filter: invert(0) !important;
}

.btn-close::before {
    content: "✕" !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #fff !important;
}

.btn-close:hover::before {
    color: #000 !important;
}

.modal-body {
    padding: 20px 25px !important; /* RÉDUIT : padding plus petit */
    flex-grow: 1 !important; /* AJOUTÉ : prend l'espace disponible */
    overflow-y: auto !important; /* AJOUTÉ : scroll si nécessaire */
    display: flex !important; /* AJOUTÉ : flex pour contrôler le contenu */
    flex-direction: column !important;
}

.summary {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    border-radius: 15px !important;
    padding: 20px !important; /* RÉDUIT : 20px au lieu de 25px */
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    flex-grow: 1 !important; /* AJOUTÉ : prend l'espace disponible */
    display: flex !important; /* AJOUTÉ : flex pour organiser le contenu */
    flex-direction: column !important;
}

.summary p {
    font-weight: 600 !important;
    color: #DAA520 !important;
    margin-bottom: 12px !important; /* RÉDUIT : 12px au lieu de 15px */
    padding: 8px 12px !important; /* RÉDUIT : padding plus petit */
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 8px !important;
    border-left: 4px solid #DAA520 !important;
    font-size: 14px !important; /* AJOUTÉ : texte plus petit */
}

/* NOUVEAU : Container pour les boutons avec espacement contrôlé */
.summary-buttons {
    margin-top: auto !important; /* AJOUTÉ : pousse les boutons en bas */
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    flex-shrink: 0 !important; /* AJOUTÉ : empêche la compression des boutons */
}

/* CORRECTION : Bouton AR avec charte graphique noir/doré */
.ar-button {
    background: linear-gradient(135deg, #2c2c2c 0%, #DAA520 100%) !important; /* CHANGÉ : noir vers doré */
    color: #FFD700 !important; /* CHANGÉ : texte doré */
    border: none !important;
    padding: 12px 25px !important; /* RÉDUIT : padding plus petit */
    border-radius: 20px !important; /* RÉDUIT : border-radius plus petit */
    font-size: 14px !important; /* RÉDUIT : font plus petite */
    font-weight: 700 !important;
    cursor: pointer !important;
    margin: 0 !important; /* SUPPRIMÉ : margin */
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 6px 20px rgba(44, 44, 44, 0.4) !important; /* CHANGÉ : ombre noire */
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    animation: pulseBlackGold 2s infinite !important; /* CHANGÉ : nouvelle animation */
    backdrop-filter: blur(10px) !important;
    border: 2px solid #DAA520 !important; /* CHANGÉ : bordure dorée */
}

.ar-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.3), transparent) !important; /* CHANGÉ : effet doré */
    transition: all 0.5s !important;
}

.ar-button:hover::before {
    left: 100% !important;
}

.ar-button:hover {
    transform: translateY(-2px) scale(1.02) !important; /* RÉDUIT : mouvement plus subtil */
    box-shadow: 0 12px 30px rgba(218, 165, 32, 0.5) !important; /* CHANGÉ : ombre dorée */
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important; /* CHANGÉ : hover doré */
    color: #000 !important; /* CHANGÉ : texte noir au hover */
}

.ar-button:active {
    transform: translateY(-1px) scale(1.01) !important; /* RÉDUIT : mouvement plus subtil */
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4) !important; /* CHANGÉ : ombre dorée */
}

/* CORRECTION : Bouton devis avec même style que le bouton AR */
#devis-button,
.devis-button {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important; /* Garde le style doré principal */
    color: #000 !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin: 0 !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    animation: buttonPulse 2s infinite !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid #000 !important;
}

#devis-button::before,
.devis-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.2), transparent) !important;
    transition: all 0.5s !important;
}

#devis-button:hover::before,
.devis-button:hover::before {
    left: 100% !important;
}

#devis-button:hover,
.devis-button:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(218, 165, 32, 0.6) !important;
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

#devis-button:active,
.devis-button:active {
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4) !important;
}

/* NOUVELLE : Animation de pulsation noir/doré pour l'AR */
@keyframes pulseBlackGold {
    0% { box-shadow: 0 6px 20px rgba(44, 44, 44, 0.4); }
    50% { box-shadow: 0 8px 25px rgba(218, 165, 32, 0.6); }
    100% { box-shadow: 0 6px 20px rgba(44, 44, 44, 0.4); }
}

/* Responsive amélioré */
@media (max-width: 768px) {
    .option-group {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    /* CORRECTION : Onglets plus petits et côte à côte sur mobile */
    .nav-pills {
        padding: 5px !important;
        margin-top: 5px !important;
    }
    
    .nav-pills .nav-link {
        padding: 8px 12px !important;
        font-size: 11px !important;
        margin: 0 2px !important;
        border-radius: 8px !important;
        letter-spacing: 0.3px !important;
        text-align: center !important;
        min-width: auto !important;
        flex: 1 !important;
        white-space: nowrap !important;
    }
    
    .nav-pills .nav-item {
        flex: 1 !important;
        text-align: center !important;
    }
    
    /* NOUVEAU : Désactiver le scroll pour les onglets Dimensions et Matériau */
    #pills-home,
    #pills-profile {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    /* NOUVEAU : Forcer la hauteur fixe pour les onglets simples */
    #pills-home .option-group,
    #pills-profile .option-group {
        margin-bottom: 15px !important;
    }
    
    /* NOUVEAU : Supprimer l'espace vide en bas des onglets simples */
    #pills-home > div:last-child,
    #pills-profile > div:last-child {
        display: none !important;
    }
    
    /* CORRECTION FORCÉE : Boutons de catégorie TOUS sur UNE ligne */
    .category-buttons {
        gap: 2px !important; /* RÉDUIT : gap minimal pour tenir 5 boutons */
        margin-bottom: 10px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* FORCÉ : absolument pas de retour ligne */
        justify-content: space-between !important; /* CHANGÉ : répartition équitable */
        align-items: center !important;
        overflow: hidden !important; /* CHANGÉ : pas de scroll */
        padding: 1px !important; /* RÉDUIT : padding minimal */
        width: 100% !important;
        max-height: 35px !important; /* RÉDUIT : hauteur plus petite */
        height: 35px !important;
        box-sizing: border-box !important;
    }
    
    .category-button {
        padding: 4px 6px !important; /* RÉDUIT : padding plus petit */
        font-size: 8px !important; /* RÉDUIT : police plus petite */
        min-width: 55px !important; /* AJOUTÉ : largeur minimale contrôlée */
        max-width: 65px !important; /* AJOUTÉ : largeur maximale pour tenir 5 */
        flex: 1 !important; /* Chaque bouton prend une part égale */
        flex-shrink: 1 !important; /* PERMET la compression */
        border-radius: 6px !important; /* RÉDUIT */
        background: rgba(255, 255, 255, 0.95) !important;
        color: #333 !important;
        border: 1px solid rgba(218, 165, 32, 0.6) !important;
        letter-spacing: 0px !important; /* SUPPRIMÉ : pas de letter-spacing */
        line-height: 1 !important; /* RÉDUIT */
        height: 28px !important; /* RÉDUIT : hauteur plus petite */
        white-space: nowrap !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        box-sizing: border-box !important;
        font-weight: 600 !important;
    }
    
    .category-button.active {
        background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
        color: #000 !important;
        border-color: #DAA520 !important;
        transform: scale(1.01) !important; /* RÉDUIT : scale plus petit */
        font-weight: 700 !important;
    }
    
    /* CORRECTION SELON MAQUETTE : Grille de motifs exactement comme demandé */
    .motif-previews {
        max-height: 350px !important; /* AUGMENTÉ : plus d'espace comme sur la maquette */
        background: rgba(255, 255, 255, 0.98) !important;
        border: 2px solid rgba(218, 165, 32, 0.5) !important;
        border-radius: 15px !important; /* AUGMENTÉ : border-radius plus moderne */
        padding: 15px !important; /* AUGMENTÉ : plus d'espace intérieur */
        margin-top: 8px !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important; /* 3 colonnes égales */
        grid-auto-rows: 110px !important; /* AJOUTÉ : hauteur fixe des lignes comme maquette */
        grid-gap: 12px !important; /* AUGMENTÉ : gap plus grand comme maquette */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        justify-items: center !important;
        align-items: start !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .motif-preview {
        padding: 12px !important; /* AUGMENTÉ : plus d'espace comme maquette */
        min-height: 100px !important; /* AUGMENTÉ : hauteur comme maquette */
        max-height: 110px !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 1) !important; /* CHANGÉ : fond blanc pur */
        border-radius: 10px !important; /* AUGMENTÉ : border-radius plus moderne */
        border: 2px solid rgba(0, 0, 0, 0.8) !important; /* CHANGÉ : bordure noire comme maquette */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important; /* CHANGÉ : répartition comme maquette */
        box-sizing: border-box !important;
        overflow: hidden !important;
        position: relative !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .motif-preview:hover {
        border-color: #DAA520 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3) !important;
    }
    
    .motif-preview.selected {
        border-color: #DAA520 !important;
        background: rgba(218, 165, 32, 0.1) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 10px rgba(218, 165, 32, 0.4) !important;
    }
    
    .motif-preview img {
        width: 55px !important; /* AUGMENTÉ : images plus grandes comme maquette */
        height: 55px !important;
        max-width: 55px !important;
        max-height: 55px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: rgba(240, 240, 240, 0.3) !important; /* CHANGÉ : fond plus discret */
        border-radius: 5px !important;
        margin: 0 auto 8px auto !important; /* AUGMENTÉ : marge plus grande */
        object-fit: contain !important;
        flex-shrink: 0 !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important; /* AJOUTÉ : bordure légère autour image */
    }
    
    .motif-label {
        font-size: 11px !important; /* AUGMENTÉ : police plus lisible comme maquette */
        line-height: 1.2 !important;
        margin-top: 5px !important;
        text-align: center !important;
        color: #000 !important; /* CHANGÉ : texte noir comme maquette */
        font-weight: 600 !important; /* AUGMENTÉ : police plus grasse */
        width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: block !important;
        max-height: 16px !important;
        position: static !important; /* Position normale comme maquette */
        text-transform: capitalize !important; /* AJOUTÉ : première lettre en majuscule */
    }
    
    .motif-preview.selected .motif-label {
        color: #DAA520 !important; /* Couleur dorée quand sélectionné */
        font-weight: 700 !important;
    }
    
    /* NOUVEAU : Optimisation de l'espace pour l'onglet Motifs */
    #pills-contact .option-group:first-child {
        margin-bottom: 5px !important; /* RÉDUIT l'espace entre catégories et titre motifs */
    }
    
    #pills-contact .option-group:last-child {
        margin-bottom: 5px !important; /* RÉDUIT l'espace en bas */
    }
    
    /* CORRECTION : Conteneur de réglages avec scroll optimisé */
    #reglages_simulation {
        padding-bottom: 20px !important;
        padding-top: 10px !important;
    }
    
    /* CORRECTION : Titre des sections plus petit */
    .option-group h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important; /* RÉDUIT : 8px au lieu de 10px */
        color: #DAA520 !important;
        font-weight: 600 !important;
        border-bottom: 1px solid #DAA520 !important;
        padding-bottom: 4px !important; /* RÉDUIT : 4px au lieu de 5px */
    }
    
    /* CORRECTION : Contenu des onglets plus compact */
    .tab-content {
        padding: 15px !important;
        margin-top: 10px !important;
    }
    
    /* CORRECTION : Container des tabs plus compact */
    .tabs {
        margin-top: 10px !important;
        padding: 0 10px !important;
    }
    
    /* CORRECTION : Prix plus compact */
    .tabs > div {
        margin-bottom: 10px !important;
    }
    
    .text-success {
        font-size: 0.7em !important;
    }
    
    .text-success.fw-bold {
        font-size: 1.2em !important;
    }
    
    /* Scrollbar mobile plus fine */
    .motif-previews::-webkit-scrollbar {
        width: 8px !important;
    }
    
    .motif-previews::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
        border-radius: 4px !important;
        border: 1px solid rgba(0, 0, 0, 0.2) !important;
    }
}

/* =================================================
   NOUVEAU LAYOUT 2 COLONNES POUR L'ONGLET MOTIFS
   ================================================= */

/* Container principal de l'onglet motifs avec layout 2 colonnes */
#pills-contact {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    height: auto !important;
    min-height: 400px !important;
    width: 100% !important;
}

/* Colonne de gauche - Catégories */
.categories-column {
    flex: 0 0 120px !important; /* Largeur fixe pour les catégories */
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 5px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    height: fit-content !important;
    min-height: 350px !important;
}

/* Colonne de droite - Motifs */
.motifs-column {
    flex: 1 !important; /* Prend tout l'espace restant */
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    padding: 15px !important;
    min-height: 350px !important;
}

/* Titre des catégories */
.categories-column h3 {
    font-size: 12px !important;
    margin: 0 0 10px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Titre des motifs */
.motifs-column h3 {
    font-size: 14px !important;
    margin: 0 0 15px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Boutons de catégories - maintenant verticaux */
.category-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    align-items: stretch !important;
}

.category-button {
    padding: 8px 6px !important;
    font-size: 9px !important;
    min-width: auto !important;
    max-width: none !important;
    width: 100% !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(218, 165, 32, 0.6) !important;
    letter-spacing: 0px !important;
    line-height: 1.1 !important;
    height: auto !important;
    min-height: 35px !important;
    white-space: normal !important; /* Permet le retour à la ligne */
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
}

.category-button:hover {
    background: rgba(218, 165, 32, 0.2) !important;
    border-color: #DAA520 !important;
    transform: translateX(3px) !important;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.3) !important;
}

.category-button.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-color: #DAA520 !important;
    transform: translateX(5px) scale(1.02) !important;
    font-weight: 700 !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.4) !important;
}

/* Container des motifs - grille optimisée */
.motif-previews {
    max-height: 320px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(218, 165, 32, 0.5) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important;
    grid-auto-rows: 100px !important;
    grid-gap: 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    justify-items: center !important;
    align-items: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Aperçus de motifs individuels */
.motif-preview {
    padding: 8px !important;
    min-height: 90px !important;
    max-height: 100px !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 1) !important;
    border-radius: 8px !important;
    border: 2px solid rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.motif-preview:hover {
    border-color: #DAA520 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3) !important;
}

.motif-preview.selected {
    border-color: #DAA520 !important;
    background: rgba(218, 165, 32, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.4) !important;
}

.motif-preview img {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(240, 240, 240, 0.3) !important;
    border-radius: 4px !important;
    margin: 0 auto 5px auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.motif-label {
    font-size: 9px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    text-align: center !important;
    color: #000 !important;
    font-weight: 600 !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-height: 20px !important;
    position: static !important;
    text-transform: capitalize !important;
}

.motif-preview.selected .motif-label {
    color: #DAA520 !important;
    font-weight: 700 !important;
}

/* Responsive pour tablettes */
@media (max-width: 768px) and (min-width: 481px) {
    .categories-column {
        flex: 0 0 100px !important;
        min-height: 300px !important;
    }
    
    .category-button {
        font-size: 8px !important;
        min-height: 30px !important;
        padding: 6px 4px !important;
    }
    
    .motif-previews {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
        grid-auto-rows: 90px !important;
        max-height: 280px !important;
    }
    
    .motif-preview {
        min-height: 80px !important;
        max-height: 90px !important;
    }
    
    .motif-preview img {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Responsive pour très petits écrans */
@media (max-width: 480px) {
    #pills-contact {
        gap: 10px !important;
    }
    
    .categories-column {
        flex: 0 0 85px !important;
        padding: 8px 3px !important;
        min-height: 280px !important;
    }
    
    .categories-column h3 {
        font-size: 10px !important;
        margin: 0 0 8px 0 !important;
    }
    
    .category-button {
        font-size: 7px !important;
        min-height: 28px !important;
        padding: 4px 2px !important;
        gap: 4px !important;
    }
    
    .motifs-column {
        padding: 10px !important;
        min-height: 280px !important;
    }
    
    .motifs-column h3 {
        font-size: 12px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .motif-previews {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: 85px !important;
        grid-gap: 6px !important;
        max-height: 250px !important;
        padding: 8px !important;
    }
    
    .motif-preview {
        padding: 6px !important;
        min-height: 75px !important;
        max-height: 85px !important;
    }
    
    .motif-preview img {
        width: 40px !important;
        height: 40px !important;
        margin: 0 auto 3px auto !important;
    }
    
    .motif-label {
        font-size: 8px !important;
        line-height: 1 !important;
    }
}

/* Scrollbar pour la colonne motifs */
.motif-previews::-webkit-scrollbar {
    width: 8px !important;
}

.motif-previews::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
}

.motif-previews::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.motif-previews::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

/* SUPPRESSION des styles conflictuels de l'ancien layout */
@media (max-width: 768px) {
    /* Annuler les anciens styles pour les boutons de catégorie horizontaux */
    #pills-contact .option-group:first-child {
        margin-bottom: 0 !important;
    }
    
    /* Réinitialiser les styles qui forcaient le layout horizontal */
    .category-buttons {
        /* Tous les nouveaux styles sont définis plus haut */
    }
    
    /* Annuler les anciens styles des previews */
    #pills-contact .option-group:last-child {
        margin-bottom: 0 !important;
    }
}

/* =================================================
   NOUVEAU LAYOUT 2 COLONNES POUR L'ONGLET MOTIFS
   ================================================= */

/* Container principal de l'onglet motifs avec layout 2 colonnes */
#pills-contact {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    height: auto !important;
    min-height: 400px !important;
    width: 100% !important;
}

/* Colonne de gauche - Catégories */
.categories-column {
    flex: 0 0 120px !important; /* Largeur fixe pour les catégories */
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 5px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    height: fit-content !important;
    min-height: 350px !important;
}

/* Colonne de droite - Motifs */
.motifs-column {
    flex: 1 !important; /* Prend tout l'espace restant */
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    padding: 15px !important;
    min-height: 350px !important;
}

/* Titre des catégories */
.categories-column h3 {
    font-size: 12px !important;
    margin: 0 0 10px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Titre des motifs */
.motifs-column h3 {
    font-size: 14px !important;
    margin: 0 0 15px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Boutons de catégories - maintenant verticaux */
.category-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important; /* RÉDUIT : gap plus petit pour économiser l'espace */
    width: 100% !important;
    align-items: stretch !important;
    overflow: visible !important; /* AJOUTÉ : éviter que les boutons soient coupés */
}

.category-button {
    padding: 10px 8px !important; /* AUGMENTÉ : plus de padding par défaut */
    font-size: 10px !important; /* AUGMENTÉ : plus lisible par défaut */
    min-width: auto !important;
    max-width: none !important;
    width: 100% !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(218, 165, 32, 0.6) !important;
    letter-spacing: 0px !important;
    line-height: 1.2 !important; /* AJOUTÉ : meilleur espacement des lignes */
    height: auto !important;
    min-height: 38px !important; /* AUGMENTÉ : plus de hauteur par défaut */
    white-space: normal !important; /* Permet le retour à la ligne */
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important; /* CHANGÉ : de hidden à visible */
    text-overflow: clip !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    word-break: break-word !important; /* AJOUTÉ : coupure de mots si nécessaire */
}

.category-button:hover {
    background: rgba(218, 165, 32, 0.2) !important;
    border-color: #DAA520 !important;
    transform: translateX(3px) !important;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.3) !important;
}

.category-button.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-color: #DAA520 !important;
    transform: translateX(5px) scale(1.02) !important;
    font-weight: 700 !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.4) !important;
}

/* Container des motifs - grille optimisée */
.motif-previews {
    max-height: 320px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(218, 165, 32, 0.5) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important;
    grid-auto-rows: 100px !important;
    grid-gap: 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    justify-items: center !important;
    align-items: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Aperçus de motifs individuels */
.motif-preview {
    padding: 8px !important;
    min-height: 90px !important;
    max-height: 100px !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 1) !important;
    border-radius: 8px !important;
    border: 2px solid rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.motif-preview:hover {
    border-color: #DAA520 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3) !important;
}

.motif-preview.selected {
    border-color: #DAA520 !important;
    background: rgba(218, 165, 32, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.4) !important;
}

.motif-preview img {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(240, 240, 240, 0.3) !important;
    border-radius: 4px !important;
    margin: 0 auto 5px auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.motif-label {
    font-size: 9px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    text-align: center !important;
    color: #000 !important;
    font-weight: 600 !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-height: 20px !important;
    position: static !important;
    text-transform: capitalize !important;
}

.motif-preview.selected .motif-label {
    color: #DAA520 !important;
    font-weight: 700 !important;
}

/* Responsive pour tablettes */
@media (max-width: 768px) and (min-width: 481px) {
    .categories-column {
        flex: 0 0 110px !important; /* AUGMENTÉ : plus d'espace */
        min-height: 300px !important;
        padding: 10px 6px !important; /* AUGMENTÉ : plus de padding */
    }
    
    .category-button {
        font-size: 9px !important; /* AUGMENTÉ : plus lisible */
        min-height: 34px !important; /* AUGMENTÉ : plus de hauteur */
        padding: 7px 5px !important; /* AUGMENTÉ : plus de padding */
    }
    
    .motif-previews {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
        grid-auto-rows: 90px !important;
        max-height: 280px !important;
    }
    
    .motif-preview {
        min-height: 80px !important;
        max-height: 90px !important;
    }
    
    .motif-preview img {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Responsive pour très petits écrans */
@media (max-width: 480px) {
    #pills-contact {
        gap: 8px !important;
    }
    
    .categories-column {
        flex: 0 0 95px !important; /* AUGMENTÉ : plus d'espace pour les boutons */
        padding: 8px 4px !important; /* AUGMENTÉ : plus de padding */
        min-height: 280px !important;
        overflow: visible !important; /* AJOUTÉ : éviter que les boutons soient coupés */
    }
    
    .categories-column h3 {
        font-size: 9px !important; /* RÉDUIT : pour économiser de l'espace */
        margin: 0 0 6px 0 !important; /* RÉDUIT : moins d'espace */
        padding-bottom: 3px !important; /* RÉDUIT */
    }
    
    .category-button {
        font-size: 8px !important; /* AUGMENTÉ : plus lisible */
        min-height: 32px !important; /* AUGMENTÉ : plus de hauteur */
        padding: 5px 3px !important; /* AUGMENTÉ : plus de padding */
        gap: 4px !important;
        line-height: 1.2 !important; /* AJOUTÉ : meilleur espacement des lignes */
        word-break: break-word !important; /* AJOUTÉ : coupure de mots si nécessaire */
    }
    
    .motifs-column {
        padding: 10px !important;
        min-height: 280px !important;
    }
    
    .motifs-column h3 {
        font-size: 12px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .motif-previews {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: 85px !important;
        grid-gap: 6px !important;
        max-height: 250px !important;
        padding: 8px !important;
    }
    
    .motif-preview {
        padding: 6px !important;
        min-height: 75px !important;
        max-height: 85px !important;
    }
    
    .motif-preview img {
        width: 40px !important;
        height: 40px !important;
        margin: 0 auto 3px auto !important;
    }
    
    .motif-label {
        font-size: 8px !important;
        line-height: 1 !important;
    }
}

/* Scrollbar pour la colonne motifs */
.motif-previews::-webkit-scrollbar {
    width: 8px !important;
}

.motif-previews::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
}

.motif-previews::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.motif-previews::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

/* SUPPRESSION des styles conflictuels de l'ancien layout */
@media (max-width: 768px) {
    /* Annuler les anciens styles pour les boutons de catégorie horizontaux */
    #pills-contact .option-group:first-child {
        margin-bottom: 0 !important;
    }
    
    /* Réinitialiser les styles qui forcaient le layout horizontal */
    .category-buttons {
        /* Tous les nouveaux styles sont définis plus haut */
    }
    
    /* Annuler les anciens styles des previews */
    #pills-contact .option-group:last-child {
        margin-bottom: 0 !important;
    }
}

/* =================================================
   NOUVEAU LAYOUT 2 COLONNES POUR L'ONGLET MOTIFS
   ================================================= */

/* Container principal de l'onglet motifs avec layout 2 colonnes */
#pills-contact {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    height: auto !important;
    min-height: 400px !important;
    width: 100% !important;
}

/* Colonne de gauche - Catégories */
.categories-column {
    flex: 0 0 120px !important; /* Largeur fixe pour les catégories */
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 5px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    height: fit-content !important;
    min-height: 350px !important;
}

/* Colonne de droite - Motifs */
.motifs-column {
    flex: 1 !important; /* Prend tout l'espace restant */
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    padding: 15px !important;
    min-height: 350px !important;
}

/* Titre des catégories */
.categories-column h3 {
    font-size: 12px !important;
    margin: 0 0 10px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Titre des motifs */
.motifs-column h3 {
    font-size: 14px !important;
    margin: 0 0 15px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Boutons de catégories - maintenant verticaux */
.category-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important; /* RÉDUIT : gap plus petit pour économiser l'espace */
    width: 100% !important;
    align-items: stretch !important;
    overflow: visible !important; /* AJOUTÉ : éviter que les boutons soient coupés */
}

.category-button {
    padding: 10px 8px !important; /* AUGMENTÉ : plus de padding par défaut */
    font-size: 10px !important; /* AUGMENTÉ : plus lisible par défaut */
    min-width: auto !important;
    max-width: none !important;
    width: 100% !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(218, 165, 32, 0.6) !important;
    letter-spacing: 0px !important;
    line-height: 1.2 !important; /* AJOUTÉ : meilleur espacement des lignes */
    height: auto !important;
    min-height: 38px !important; /* AUGMENTÉ : plus de hauteur par défaut */
    white-space: normal !important; /* Permet le retour à la ligne */
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important; /* CHANGÉ : de hidden à visible */
    text-overflow: clip !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    word-break: break-word !important; /* AJOUTÉ : coupure de mots si nécessaire */
}

.category-button:hover {
    background: rgba(218, 165, 32, 0.2) !important;
    border-color: #DAA520 !important;
    transform: translateX(3px) !important;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.3) !important;
}

.category-button.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-color: #DAA520 !important;
    transform: translateX(5px) scale(1.02) !important;
    font-weight: 700 !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.4) !important;
}

/* Container des motifs - grille optimisée pour 2 colonnes + aperçu */
.motif-previews {
    max-height: 280px !important; /* RÉDUIT : pour montrer seulement 2 lignes complètes + début de la 3ème */
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(218, 165, 32, 0.5) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* FORCÉ : exactement 2 colonnes */
    grid-auto-rows: 120px !important; /* AUGMENTÉ : hauteur plus grande pour mieux voir les motifs */
    grid-gap: 12px !important; /* AUGMENTÉ : plus d'espace entre les motifs */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    justify-items: center !important;
    align-items: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    scroll-behavior: smooth !important; /* AJOUTÉ : scroll fluide */
}

/* Aperçus de motifs individuels - plus grands et mieux visibles */
.motif-preview {
    padding: 12px !important; /* AUGMENTÉ : plus d'espace intérieur */
    min-height: 110px !important; /* AUGMENTÉ : hauteur plus grande */
    max-height: 120px !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 1) !important;
    border-radius: 10px !important; /* AUGMENTÉ : coins plus arrondis */
    border: 2px solid rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.motif-preview:hover {
    border-color: #DAA520 !important;
    transform: translateY(-3px) scale(1.03) !important; /* AUGMENTÉ : effet hover plus prononcé */
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4) !important; /* AUGMENTÉ : ombre plus marquée */
}

.motif-preview.selected {
    border-color: #DAA520 !important;
    background: rgba(218, 165, 32, 0.15) !important; /* AUGMENTÉ : fond sélectionné plus visible */
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 15px rgba(218, 165, 32, 0.5) !important; /* AUGMENTÉ : ombre sélection plus marquée */
}

.motif-preview img {
    width: 65px !important; /* AUGMENTÉ : images plus grandes pour mieux voir les détails */
    height: 65px !important;
    max-width: 65px !important;
    max-height: 65px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(240, 240, 240, 0.3) !important;
    border-radius: 6px !important; /* AUGMENTÉ : coins plus arrondis */
    margin: 0 auto 8px auto !important; /* AUGMENTÉ : plus d'espace sous l'image */
    object-fit: contain !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.motif-label {
    font-size: 11px !important; /* AUGMENTÉ : police plus lisible */
    line-height: 1.2 !important;
    margin: 0 !important;
    text-align: center !important;
    color: #000 !important;
    font-weight: 600 !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-height: 24px !important; /* AUGMENTÉ : plus d'espace pour le texte */
    position: static !important;
    text-transform: capitalize !important;
}

.motif-preview.selected .motif-label {
    color: #DAA520 !important;
    font-weight: 700 !important;
}

/* Responsive pour tablettes */
@media (max-width: 768px) and (min-width: 481px) {
    .categories-column {
        flex: 0 0 110px !important; /* AUGMENTÉ : plus d'espace */
        min-height: 300px !important;
        padding: 10px 6px !important; /* AUGMENTÉ : plus de padding */
    }
    
    .category-button {
        font-size: 9px !important; /* AUGMENTÉ : plus lisible */
        min-height: 34px !important; /* AUGMENTÉ : plus de hauteur */
        padding: 7px 5px !important; /* AUGMENTÉ : plus de padding */
    }
    
    .motif-previews {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
        grid-auto-rows: 90px !important;
        max-height: 280px !important;
    }
    
    .motif-preview {
        min-height: 80px !important;
        max-height: 90px !important;
    }
    
    .motif-preview img {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Responsive pour très petits écrans */
@media (max-width: 480px) {
    #pills-contact {
        gap: 8px !important;
    }
    
    .categories-column {
        flex: 0 0 95px !important; /* AUGMENTÉ : plus d'espace pour les boutons */
        padding: 8px 4px !important; /* AUGMENTÉ : plus de padding */
        min-height: 280px !important;
        overflow: visible !important; /* AJOUTÉ : éviter que les boutons soient coupés */
    }
    
    .categories-column h3 {
        font-size: 9px !important; /* RÉDUIT : pour économiser de l'espace */
        margin: 0 0 6px 0 !important; /* RÉDUIT : moins d'espace */
        padding-bottom: 3px !important; /* RÉDUIT */
    }
    
    .category-button {
        font-size: 8px !important; /* AUGMENTÉ : plus lisible */
        min-height: 32px !important; /* AUGMENTÉ : plus de hauteur */
        padding: 5px 3px !important; /* AUGMENTÉ : plus de padding */
        gap: 4px !important;
        line-height: 1.2 !important; /* AJOUTÉ : meilleur espacement des lignes */
        word-break: break-word !important; /* AJOUTÉ : coupure de mots si nécessaire */
    }
    
    .motifs-column {
        padding: 10px !important;
        min-height: 280px !important;
    }
    
    .motifs-column h3 {
        font-size: 12px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .motif-previews {
        grid-template-columns: 1fr 1fr !important; /* FORCÉ : 2 colonnes sur mobile */
        grid-auto-rows: 95px !important; /* AJUSTÉ : hauteur adaptée mobile */
        grid-gap: 8px !important;
        max-height: 220px !important; /* RÉDUIT : pour montrer début de la 3ème ligne sur mobile */
        padding: 10px !important;
    }
    
    .motif-preview {
        padding: 8px !important;
        min-height: 85px !important;
        max-height: 95px !important;
    }
    
    .motif-preview img {
        width: 45px !important; /* AJUSTÉ : taille image mobile pour 2 colonnes */
        height: 45px !important;
        margin: 0 auto 5px auto !important;
    }
    
    .motif-label {
        font-size: 9px !important; /* AJUSTÉ : police mobile */
        line-height: 1.1 !important;
    }
}

/* Scrollbar pour la colonne motifs */
.motif-previews::-webkit-scrollbar {
    width: 8px !important;
}

.motif-previews::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
}

.motif-previews::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.motif-previews::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

/* SUPPRESSION des styles conflictuels de l'ancien layout */
@media (max-width: 768px) {
    /* Annuler les anciens styles pour les boutons de catégorie horizontaux */
    #pills-contact .option-group:first-child {
        margin-bottom: 0 !important;
    }
    
    /* Réinitialiser les styles qui forcaient le layout horizontal */
    .category-buttons {
        /* Tous les nouveaux styles sont définis plus haut */
    }
    
    /* Annuler les anciens styles des previews */
    #pills-contact .option-group:last-child {
        margin-bottom: 0 !important;
    }
}

/* =================================================
   NOUVEAU LAYOUT 2 COLONNES POUR L'ONGLET MOTIFS
   ================================================= */

/* Container principal de l'onglet motifs avec layout 2 colonnes */
#pills-contact {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    height: auto !important;
    min-height: 400px !important;
    width: 100% !important;
}

/* Colonne de gauche - Catégories */
.categories-column {
    flex: 0 0 120px !important; /* Largeur fixe pour les catégories */
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 5px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    height: fit-content !important;
    min-height: 350px !important;
}

/* Colonne de droite - Motifs */
.motifs-column {
    flex: 1 !important; /* Prend tout l'espace restant */
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(218, 165, 32, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    padding: 15px !important;
    min-height: 350px !important;
}

/* Titre des catégories */
.categories-column h3 {
    font-size: 12px !important;
    margin: 0 0 10px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Titre des motifs */
.motifs-column h3 {
    font-size: 14px !important;
    margin: 0 0 15px 0 !important;
    color: #DAA520 !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-bottom: 1px solid #DAA520 !important;
    padding-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Boutons de catégories - maintenant verticaux */
.category-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important; /* RÉDUIT : gap plus petit pour économiser l'espace */
    width: 100% !important;
    align-items: stretch !important;
    overflow: visible !important; /* AJOUTÉ : éviter que les boutons soient coupés */
}

.category-button {
    padding: 10px 8px !important; /* AUGMENTÉ : plus de padding par défaut */
    font-size: 10px !important; /* AUGMENTÉ : plus lisible par défaut */
    min-width: auto !important;
    max-width: none !important;
    width: 100% !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(218, 165, 32, 0.6) !important;
    letter-spacing: 0px !important;
    line-height: 1.2 !important; /* AJOUTÉ : meilleur espacement des lignes */
    height: auto !important;
    min-height: 38px !important; /* AUGMENTÉ : plus de hauteur par défaut */
    white-space: normal !important; /* Permet le retour à la ligne */
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important; /* CHANGÉ : de hidden à visible */
    text-overflow: clip !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    word-break: break-word !important; /* AJOUTÉ : coupure de mots si nécessaire */
}

.category-button:hover {
    background: rgba(218, 165, 32, 0.2) !important;
    border-color: #DAA520 !important;
    transform: translateX(3px) !important;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.3) !important;
}

.category-button.active {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    color: #000 !important;
    border-color: #DAA520 !important;
    transform: translateX(5px) scale(1.02) !important;
    font-weight: 700 !important;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.4) !important;
}

/* Container des motifs - grille optimisée pour 2 colonnes + aperçu */
.motif-previews {
    max-height: 280px !important; /* RÉDUIT : pour montrer seulement 2 lignes complètes + début de la 3ème */
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(218, 165, 32, 0.5) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* FORCÉ : exactement 2 colonnes */
    grid-auto-rows: 120px !important; /* AUGMENTÉ : hauteur plus grande pour mieux voir les motifs */
    grid-column-gap: 12px !important; /* SPÉCIFIQUE : gap horizontal */
    grid-row-gap: 12px !important; /* SPÉCIFIQUE : gap vertical */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    justify-items: stretch !important; /* CHANGÉ : étire les éléments dans leurs cellules */
    align-items: stretch !important; /* CHANGÉ : étire les éléments dans leurs cellules */
    width: 100% !important;
    box-sizing: border-box !important;
    scroll-behavior: smooth !important; /* AJOUTÉ : scroll fluide */
}

/* Aperçus de motifs individuels - plus grands et mieux visibles */
.motif-preview {
    padding: 12px !important; /* AUGMENTÉ : plus d'espace intérieur */
    min-height: 110px !important; /* AUGMENTÉ : hauteur plus grande */
    max-height: 120px !important;
    width: 100% !important; /* FORCÉ : prend toute la largeur de sa cellule */
    max-width: none !important; /* AJOUTÉ : pas de limite de largeur */
    background: rgba(255, 255, 255, 1) !important;
    border-radius: 10px !important; /* AUGMENTÉ : coins plus arrondis */
    border: 2px solid rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    grid-column: auto !important; /* AJOUTÉ : placement automatique dans la grille */
    grid-row: auto !important; /* AJOUTÉ : placement automatique dans la grille */
}

.motif-preview:hover {
    border-color: #DAA520 !important;
    transform: translateY(-3px) scale(1.03) !important; /* AUGMENTÉ : effet hover plus prononcé */
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4) !important; /* AUGMENTÉ : ombre plus marquée */
}

.motif-preview.selected {
    border-color: #DAA520 !important;
    background: rgba(218, 165, 32, 0.15) !important; /* AUGMENTÉ : fond sélectionné plus visible */
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 15px rgba(218, 165, 32, 0.5) !important; /* AUGMENTÉ : ombre sélection plus marquée */
}

.motif-preview img {
    width: 65px !important; /* AUGMENTÉ : images plus grandes pour mieux voir les détails */
    height: 65px !important;
    max-width: 65px !important;
    max-height: 65px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(240, 240, 240, 0.3) !important;
    border-radius: 6px !important; /* AUGMENTÉ : coins plus arrondis */
    margin: 0 auto 8px auto !important; /* AUGMENTÉ : plus d'espace sous l'image */
    object-fit: contain !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.motif-label {
    font-size: 11px !important; /* AUGMENTÉ : police plus lisible */
    line-height: 1.2 !important;
    margin: 0 !important;
    text-align: center !important;
    color: #000 !important;
    font-weight: 600 !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-height: 24px !important; /* AUGMENTÉ : plus d'espace pour le texte */
    position: static !important;
    text-transform: capitalize !important;
}

.motif-preview.selected .motif-label {
    color: #DAA520 !important;
    font-weight: 700 !important;
}

/* Responsive pour tablettes */
@media (max-width: 768px) and (min-width: 481px) {
    .categories-column {
        flex: 0 0 110px !important; /* AUGMENTÉ : plus d'espace */
        min-height: 300px !important;
        padding: 10px 6px !important; /* AUGMENTÉ : plus de padding */
    }
    
    .category-button {
        font-size: 9px !important; /* AUGMENTÉ : plus lisible */
        min-height: 34px !important; /* AUGMENTÉ : plus de hauteur */
        padding: 7px 5px !important; /* AUGMENTÉ : plus de padding */
    }
    
    .motif-previews {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
        grid-auto-rows: 90px !important;
        max-height: 280px !important;
    }
    
    .motif-preview {
        min-height: 80px !important;
        max-height: 90px !important;
    }
    
    .motif-preview img {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Responsive pour très petits écrans */
@media (max-width: 480px) {
    #pills-contact {
        gap: 8px !important;
    }
    
    .categories-column {
        flex: 0 0 95px !important; /* AUGMENTÉ : plus d'espace pour les boutons */
        padding: 8px 4px !important; /* AUGMENTÉ : plus de padding */
        min-height: 280px !important;
        overflow: visible !important; /* AJOUTÉ : éviter que les boutons soient coupés */
    }
    
    .categories-column h3 {
        font-size: 9px !important; /* RÉDUIT : pour économiser de l'espace */
        margin: 0 0 6px 0 !important; /* RÉDUIT : moins d'espace */
        padding-bottom: 3px !important; /* RÉDUIT */
    }
    
    .category-button {
        font-size: 8px !important; /* AUGMENTÉ : plus lisible */
        min-height: 32px !important; /* AUGMENTÉ : plus de hauteur */
        padding: 5px 3px !important; /* AUGMENTÉ : plus de padding */
        gap: 4px !important;
        line-height: 1.2 !important; /* AJOUTÉ : meilleur espacement des lignes */
        word-break: break-word !important; /* AJOUTÉ : coupure de mots si nécessaire */
    }
    
    .motifs-column {
        padding: 10px !important;
        min-height: 280px !important;
    }
    
    .motifs-column h3 {
        font-size: 12px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .motif-previews,
    #motif-previews {
        grid-template-columns: repeat(2, 1fr) !important; /* FORCÉ : 2 colonnes sur mobile */
        grid-auto-rows: 95px !important; /* AJUSTÉ : hauteur adaptée mobile */
        grid-column-gap: 8px !important;
        grid-row-gap: 8px !important;
        max-height: 220px !important; /* RÉDUIT : pour montrer début de la 3ème ligne sur mobile */
        padding: 10px !important;
    }
    
    .motif-preview {
        padding: 8px !important;
        min-height: 85px !important;
        max-height: 95px !important;
        grid-column: span 1 !important; /* AJOUTÉ : chaque motif = 1 colonne */
    }
    
    .motif-preview img {
        width: 45px !important; /* AJUSTÉ : taille image mobile pour 2 colonnes */
        height: 45px !important;
        margin: 0 auto 5px auto !important;
    }
    
    .motif-label {
        font-size: 9px !important; /* AJUSTÉ : police mobile */
        line-height: 1.1 !important;
    }
}

/* RÈGLE DE SÉCURITÉ : Force l'affichage en 2 colonnes */
#motif-previews {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* ALTERNATIVE : utilise repeat() pour plus de sécurité */
    grid-auto-rows: 120px !important;
    grid-column-gap: 12px !important;
    grid-row-gap: 12px !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Règle spécifique pour chaque motif dans la grille */
#motif-previews .motif-preview {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important; /* AJOUTÉ : évite les problèmes de largeur minimale */
    flex: none !important; /* AJOUTÉ : désactive flex pour la grille */
    grid-column: span 1 !important; /* AJOUTÉ : chaque motif occupe exactement 1 colonne */
}

/* Scrollbar pour la colonne motifs */
.motif-previews::-webkit-scrollbar {
    width: 8px !important;
}

.motif-previews::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
}

.motif-previews::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.motif-previews::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

/* SUPPRESSION des styles conflictuels de l'ancien layout */
@media (max-width: 768px) {
    /* Annuler les anciens styles pour les boutons de catégorie horizontaux */
    #pills-contact .option-group:first-child {
        margin-bottom: 0 !important;
    }
    
    /* Réinitialiser les styles qui forcaient le layout horizontal */
    .category-buttons {
        /* Tous les nouveaux styles sont définis plus haut */
    }
    
    /* Annuler les anciens styles des previews */
    #pills-contact .option-group:last-child {
        margin-bottom: 0 !important;
    }
}