/* ============================================================================
   FORCE MODE CLAIR - Override mode sombre système
   ============================================================================ */

/* Force light mode pour tout le document */
:root {
    color-scheme: light only;
}

html, body {
    background-color: white !important;
    color: #333 !important;
}

/* Force tous les éléments à rester en mode clair */
* {
    color-scheme: light;
}

input, select, textarea, button {
    background-color: white !important;
    color: #333 !important;
}

/* ============================================================================
   FIN FORCE MODE CLAIR
   ============================================================================ */

/* ═══════════════════════════════════════════════════════════════════════════
   KONFIGURATOR WEB - CSS MASTER - 44 CONSIGNES
   ═══════════════════════════════════════════════════════════════════════════ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Desktop: contenu en haut, pas étiré verticalement */
    min-height: 100vh;
    padding: 10px;
}

@media (max-width: 768px) {
    body {
        padding: 0;
        align-items: center; /* Mobile: centré verticalement */
    }
    
    #app {
        max-width: 100vw;
        height: 100vh;
        box-shadow: none;
    }
}

/* Application responsive - DIMENSION ADAPTATIVE */
#app {
    width: 100%;
    max-width: 95vw;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

/* Mobile: plein écran via classe .is-mobile */
html.is-mobile #app {
    max-width: 100vw !important;
    height: 100vh !important;
    box-shadow: none !important;
}

/* Grand écran : légèrement plus étroit */
@media (min-width: 1200px) {
    #app {
        max-width: 90vw;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE FIX - Position Fixed forcée via classe JavaScript
   ═══════════════════════════════════════════════════════════════ */
html.is-mobile .comp-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

html.is-mobile .comp-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

html.is-mobile .detail-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

html.is-mobile .detail-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

html.is-mobile .comp-scroll {
    padding-top: 80px !important;
    padding-bottom: 65px !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    height: 100% !important;
    touch-action: pan-y !important;
}

html.is-mobile #screen-detail {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

html.is-mobile .detail-preview {
    margin-top: 5px !important;
}

/* Desktop: espace de 5px au-dessus */
@media (min-width: 769px) {
    .detail-preview {
        margin-top: 5px !important;
    }
}

/* Mobile portrait: supprimer margin-top de detail-preview */
@media (max-width: 600px) and (orientation: portrait) {
    html.is-mobile .detail-preview,
    .detail-preview {
        margin-top: 0 !important;
    }
}

html.is-mobile .comp-header {
    min-height: 60px !important;
    padding: 4px 8px !important;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Écran accueil : s'adapte au contenu sur desktop */
#screen-accueil {
    position: relative; /* Pas absolute pour s'adapter au contenu */
    height: auto; /* S'adapte au contenu */
}

/* Mobile: écran accueil plein écran */
html.is-mobile #screen-accueil {
    position: absolute !important;
    height: 100% !important;
}

/* Écrans composants et détail : hauteur minimale pour scroll correct */
#screen-composants,
#screen-detail {
    min-height: 600px; /* Desktop: hauteur minimale pour bon layout */
}

/* Mobile: écrans composants et détail plein écran */
html.is-mobile #screen-composants,
html.is-mobile #screen-detail {
    min-height: 100vh !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÉCRAN ACCUEIL - CONSIGNE 1: Logo et Konfigurator CENTRÉS
   ═══════════════════════════════════════════════════════════════════════════ */
/* Padding et styles supplémentaires pour accueil */
#screen-accueil {
    padding: 10px;
    align-content: flex-start; /* Contenu aligné en haut */
}

/* Logo CENTRÉ - Caché sur desktop, visible sur mobile */
.accueil-logo {
    text-align: center;
    margin-bottom: 10px;
    display: none; /* Caché sur desktop */
}

.accueil-logo img {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
}

/* Konfigurator CENTRÉ avec gradient et ombre 3D */
.konfigurator-title {
    font-size: clamp(24px, 6vw, 30px);
    font-weight: bold;
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #62ae64 0%, #62ae64 35%, #003df2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Ombre avec text-shadow car filter ne fonctionne pas avec background-clip */
    text-shadow: 0px 15px 10px rgba(128, 128, 128, 0.4);
}

.pc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 0; /* Pas d'espace sous la grille, le bouton est le dernier élément */
}

@media (max-width: 500px) {
    .pc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px; /* Augmenté de 15px à 25px (+10px) */
        margin-bottom: 50px; /* Réduit de 70px à 50px */
    }
    
    /* 7. Mobile: réduire les espaces */
    #screen-accueil {
        padding: 5px;
        padding-bottom: 0; /* Pas de padding en bas, le bouton est fixe */
    }
    
    /* 3. Espace au-dessus du logo sur mobile + afficher le logo */
    .accueil-logo {
        display: block; /* Afficher le logo sur mobile */
        margin-top: 15px;
    }
    
    .konfigurator-title {
        margin-bottom: 30px; /* Augmenté de 10px à 30px */
    }
}

/* 3. Bouton Charger fixe en bas sur mobile */
html.is-mobile .btn-charger-grid {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    grid-column: auto !important;
}

.pc-type {
    padding: 10px;
    background: #e8e8e8 !important;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pc-type img {
    width: 100%;
    max-width: 110px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.pc-type span {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.pc-type:hover {
    background: #d0d0d0 !important;
    border-color: #3498db !important;
    transform: translateY(-2px);
}

.btn-charger-grid {
    grid-column: 1 / -1; /* Span all columns */
    padding: 15px 24px;
    background: #3498db !important;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-charger-grid:hover {
    background: #2980b9 !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.website {
    color: #3052b8;
    font-weight: bold;
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÉCRAN COMPOSANTS
   ═══════════════════════════════════════════════════════════════════════════ */
.comp-header {
    min-height: 70px;
    padding: 5px 10px;
    border-bottom: 2px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    flex-shrink: 0;
}

.comp-logo {
    width: 120px;
    flex-shrink: 0;
}

.comp-logo img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
}

.comp-titles {
    flex: 1;
    text-align: right;
    min-width: 150px;
}

.comp-subtitle {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

/* Mobile portrait: remonter pc-type-label */
@media (max-width: 600px) and (orientation: portrait) {
    .comp-subtitle {
        margin-top: -20px; /* Total -25px (5 + 20) */
    }
}

/* Mobile: konfigurator-title dans comp-titles */
.comp-titles .konfigurator-title {
    font-size: clamp(24px, 5vw, 30px);
    text-align: right;
}

/* Desktop: logo caché, Konfigurator à gauche, subtitle à droite */
@media (min-width: 769px), (min-width: 480px) and (orientation: landscape) {
    .comp-header {
        min-height: 37px; /* Réduit de 50px à 37px (-25%) */
        padding: 2px 10px; /* Réduit padding vertical */
    }
    
    .comp-titles {
        /* margin-top supprimé pour enlever espace */
    }
}

@media (min-width: 769px) {
    .comp-logo {
        display: none; /* Cacher logo sur desktop */
    }
    
    .comp-titles {
        display: flex;
        align-items: center;
        justify-content: space-between; /* Konfigurator gauche, subtitle droite */
        width: 100%;
        height: 35px; /* Augmenté de 29px à 35px */
        margin-top: 15px; /* Descendre de 5px de plus (10+5) */
    }
    
    .comp-titles .konfigurator-title {
        font-size: 35px; /* Augmenté de 29px à 35px */
        text-align: left;
        line-height: 35px;
    }
    
    .comp-subtitle {
        font-size: 21px; /* Proportionnel (18 * 35/29) */
        margin-top: -10px; /* Remonter de 10px */
        text-align: right;
        margin-left: auto; /* Force à droite */
    }
}

/* 5. Mobile: header plus compact */
.comp-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.component-item {
    border: 1px solid #ccc;
    margin-bottom: 4px;
    border-radius: 4px;
    overflow: hidden;
}

.component-header {
    background: #f0f0f0;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
}

.component-header:hover {
    background: #e8e8e8;
}

.component-header .arrow {
    transition: transform 0.2s;
    display: inline-block;
    margin-right: 5px;
}

.component-item.expanded .arrow {
    transform: rotate(90deg);
}

.btn-delete {
    padding: 2px 8px;
    font-size: 11px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.component-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.component-item.expanded .component-content {
    max-height: 150px;
}

.component-preview {
    padding: 5px;
    display: flex;
    gap: 10px;
    cursor: pointer;
}

/* Pas de hover background - on garde blanc */

/* CONSIGNE 2: Images fond blanc SANS CADRE */
.component-preview img {
    width: 190px;
    height: 90px;
    object-fit: contain;
    background: #ffffff;
    flex-shrink: 0;
}

.component-preview .info {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Nom en haut, prix/quantité en bas */
    gap: 0;
}

.component-preview .comp-text-block {
    align-self: flex-end; /* Bloc aligné à droite */
    text-align: right;
    width: fit-content; /* Ne prend que la largeur du contenu */
    max-width: 100%; /* Limite à la largeur du parent */
}

.component-preview .comp-nom-main {
    font-size: 11px;
    font-weight: bold !important;
    line-height: 1.3;
}

.component-preview .comp-separator {
    height: 1px;
    background: #ddd;
    margin: 3px 0;
    width: 100%; /* Prend la largeur du bloc parent */
}

.component-preview .comp-props {
    font-size: 10px;
    line-height: 1.3;
    color: #555;
}

.component-preview .comp-price-area {
    font-size: 15px; /* Augmenté de 14 à 15 */
    font-weight: bold;
    color: #27ae60;
    margin-top: auto;
}

.component-preview .comp-price-area.out-of-stock {
    color: #e74c3c; /* Rouge si hors stock */
}

/* Anciens sélecteurs pour compatibilité */
.component-preview .nom {
    font-size: 11px;
    font-weight: bold;
    line-height: 1.3;
    max-height: 70px;
    overflow: hidden;
    white-space: pre-wrap;
}

.component-preview .prix {
    font-size: 14px;
    font-weight: bold;
    color: #27ae60;
}

/* Contrôles quantité */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    justify-content: flex-end;
}

.quantity-control button {
    width: 24px;
    height: 24px;
    border: 1px solid #999;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
}

.quantity-control span {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

/* CONSIGNE 3: Checkboxes sur MÊME ligne */
.checkboxes-row {
    padding: 15px;
    border-top: 1px solid #ccc;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.checkbox-left {
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-right {
    text-align: right;
    cursor: pointer;
    font-size: 13px;
}

/* Footer comp - sticky */
.comp-footer {
    border-top: 2px solid #ccc;
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    font-size: 12px;
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 100;
    flex-shrink: 0;
    position: relative; /* Pour position absolue du total */
}

/* 
  Mobile portrait : 
  - Ligne 1: Charger, Sauvegarder
  - Ligne 2: Supprimer, Choisis
  - Ligne 3: Ouvrir/Fermer + Total PC
  - Ligne 4: MAJ + Retour
*/
.comp-footer > * {
    flex: 0 0 auto;
}

/* Total PC centré absolument sur desktop */
.comp-total {
    text-align: center;
    font-weight: bold;
    font-size: 15px;
}

.comp-total strong {
    color: #27ae60;
    font-size: 20px;
}

/* 
  Mobile paysage + Desktop + iPad :
  Total centré, Ouvrir/Fermer collé à droite
*/
@media (min-width: 480px) and (orientation: landscape),
       (min-width: 700px) {
    .comp-footer {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .comp-total {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }
    
    /* Ouvrir/Fermer collé à droite */
    .comp-footer .toggle-label {
        margin-left: auto;
    }
}

.comp-footer button {
    padding: 5px 8px;
    border: none;
    background: #3052b8;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}

.comp-footer button:hover {
    background: #2541a0;
}

.btn-small {
    font-size: 10px !important;
    padding: 4px 6px !important;
}

.btn-danger {
    background: #e74c3c !important;
}

.btn-danger:hover {
    background: #c0392b !important;
}

.btn-toggle {
    background: #27ae60 !important;
}

.btn-toggle:hover {
    background: #229954 !important;
}

.toggle-label {
    font-size: 11px;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÉCRAN DÉTAIL
   ═══════════════════════════════════════════════════════════════════════════ */
.detail-header {
    min-height: 50px;
    padding: 8px 10px;
    border-bottom: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

.detail-logo img {
    height: 35px;
    width: auto;
}

.detail-header h2 {
    font-size: 18px;
    color: #3052b8;
    flex: 1;
    text-align: center;
    margin: 0;
}

.detail-header button {
    min-width: 80px !important;
    background-color: #3498db !important;
    color: white !important;
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* Titre de la section détail */
#detail-title {
    font-weight: bold !important;
}

.detail-preview {
    padding: 4px 10px 8px 10px;
    border-bottom: 2px solid #ccc;
    display: flex;
    align-items: stretch; /* Permet à l'image de s'étendre */
    gap: 10px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

/* CONSIGNE 2: Images fond blanc SANS CADRE */
.detail-preview img {
    width: 250px;
    min-height: 100px; /* Hauteur minimum */
    max-height: 130px; /* Hauteur maximum */
    object-fit: contain;
    background: #ffffff;
    flex-shrink: 0;
}

/* Mobile: réduire padding par 2 */
html.is-mobile .detail-preview {
    padding: 2px 10px 4px 10px; /* Divisé par 2 */
}

/* Mobile portrait: image utilise toute la hauteur */
html.is-mobile .detail-preview img {
    width: 150px;
    height: 100%; /* Toute la hauteur */
}

/* Faible résolution : réduire largeur image */
@media (max-width: 600px) {
    .detail-preview {
        padding: 2px 10px 4px 10px; /* Divisé par 2 */
    }
    
    .detail-preview img {
        width: 150px;
        height: 100%;
    }
}

.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Nom en haut, prix/quantité en bas */
    gap: 0;
    text-align: right;
}

.detail-nom-main {
    font-size: 14px;
    font-weight: bold !important; /* Toujours en gras */
    line-height: 1.3;
}

.detail-text-block {
    align-self: flex-end; /* Bloc aligné à droite */
    text-align: right;
    width: fit-content; /* Ne prend que la largeur du contenu */
    max-width: 100%; /* Limite à la largeur du parent */
}

.detail-separator {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
    width: 100%; /* Prend toute la largeur du bloc parent (qui est fit-content) */
}

/* Retirer les règles redondantes */

.detail-props {
    font-size: 12px;
    line-height: 1.4;
    color: #333;
}

.detail-price-area {
    font-size: 20px; /* Augmenté de 18 à 20 */
    font-weight: bold;
    color: #27ae60;
    margin-top: auto; /* Pousse en bas */
}

.detail-price-area.out-of-stock {
    color: #e74c3c; /* Rouge si hors stock */
}

.quantity-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.quantity-compact button {
    width: 22px;
    height: 22px;
    border: 1px solid #999;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.quantity-compact button:hover {
    background: #e0e0e0;
}

.quantity-compact span {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

/* Anciens sélecteurs pour compatibilité */
.detail-info #detail-nom {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
}

.detail-info #detail-prix {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 2px;
}


.detail-filters {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

.filter-select, .filter-btn, .filter-operator, .filter-operator-select, .filter-value-select {
    padding: 4px 6px;
    border: 1px solid #999;
    background: #e0e0e0 !important;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.filter-select {
    border-radius: 0 7px 7px 0 !important;
}

.filter-select:hover, .filter-btn:hover {
    background: #e0e0e0;
}

.filter-btn {
    background: #e67e22;
    color: white;
    border: none;
    margin-left: auto; /* Pousser le bouton RAZ à droite */
    order: 999; /* S'assurer qu'il est toujours en dernier */
}

.filter-btn-raz {
    background: #e67e22 !important;
    color: white !important;
    border: none !important;
    padding: 4px 8px !important;
    font-weight: bold !important;
    min-height: 28px !important;
    height: 28px !important;
}

/* Bouton aide filtres - même hauteur que RAZ 28px */
.detail-filters .btn-small.btn-help {
    min-width: 23px !important;
    max-width: 23px !important;
    width: 23px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 23px !important;
    font-size: 16px !important;
    background-color: #3498db !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.filter-group {
    display: flex;
    gap: 0; /* Pas d'espace pour les selects collés */
    align-items: center;
}

.filter-search-wrapper {
    position: relative;
    display: inline-block;
}

.filter-search {
    padding: 6px 30px 6px 10px; /* Espace pour le bouton à droite */
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 12px;
    min-width: 200px;
    background: white;
}

.filter-search:focus {
    outline: none;
    border-color: #3052b8;
    background: #f9f9f9;
}

.filter-search-clear {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #ff6666 !important; /* Rouge pastel comme ancienne version */
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 3px;
}

.filter-search-clear:hover {
    background: #ffe6e6;
    color: #ff3333 !important; /* Rouge plus vif au hover */
}

/* Selects collés pour filtres numériques */
.filter-operator-select {
    width: 38px;
    padding: 4px 2px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #999;
    border-radius: 3px 0 0 3px;
    border-right: none;
    background: #f0f0f0;
    margin: 0;
    font-size: 11px;
}

.filter-value-select {
    min-width: 110px;
    padding: 4px 6px;
    border: 1px solid #999;
    border-radius: 0 7px 7px 0 !important;
    background: #f0f0f0;
    margin: 0;
    font-size: 11px;
}

.filter-operator-select:hover,
.filter-value-select:hover {
    background: #e0e0e0;
}

.filter-operator-select:focus,
.filter-value-select:focus {
    outline: none;
    background: #e0e0e0;
}

/* Anciens boutons opérateurs (deprecated mais garde pour compatibilité) */
.filter-operator {
    padding: 4px 8px;
    font-weight: bold;
    min-width: 32px;
    text-align: center;
}

.filter-operator.active {
    background: #3052b8;
    color: white;
    border-color: #3052b8;
}

.detail-table-wrap {
    flex: 1;
    overflow-y: auto;
}

.detail-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.detail-table-wrap thead {
    background: #3052b8;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.detail-table-wrap th {
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
}

.detail-table-wrap tbody tr {
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.detail-table-wrap tbody tr:hover {
    background: #f5f5f5;
}

.detail-table-wrap tbody tr.selected {
    background: #d4edda;
}

.detail-table-wrap td {
    padding: 8px 6px;
}

/* Mobile portrait: optimisations colonnes */
@media (max-width: 600px) and (orientation: portrait) {
    .detail-table-wrap tbody td:nth-child(2) {
        font-size: 12px;
    }
    
    /* Réduire colonne Stock au minimum */
    .detail-table-wrap th:first-child,
    .detail-table-wrap td:first-child {
        width: 30px !important;
        min-width: 30px !important;
        padding: 4px 2px !important;
    }
    
    /* Réduire largeur colonne Prix au minimum */
    .detail-table-wrap th:last-child,
    .detail-table-wrap td:last-child {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        font-size: 10px !important;
    }
}

/* Mobile portrait: cacher colonne PassMark */
html.is-mobile .passmark-col {
    display: none !important;
}

@media (max-width: 600px) and (orientation: portrait) {
    .passmark-col {
        display: none !important;
    }
    
    /* Maximiser colonne Article */
    .detail-table-wrap tbody td:nth-child(2) {
        width: auto !important;
        max-width: none !important;
    }
}

/* Desktop/Paysage: réduire PassMark, maximiser Article */
@media (min-width: 601px), (orientation: landscape) {
    .passmark-col {
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        padding: 4px 2px !important;
        font-size: 11px !important;
    }
    
    .detail-table-wrap tbody td:nth-child(2) {
        width: auto !important;
        max-width: none !important;
    }
}

.stock-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.stock-ok {
    background: #27ae60;
}

.stock-supplier {
    background: #f39c12;
}

.stock-no {
    background: #000000;
}

.detail-footer {
    min-height: 50px;
    border-top: 2px solid #ccc;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 8px 10px;
    gap: 10px;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* MAJ à gauche */
.detail-footer > button:first-child {
    justify-self: start;
}

/* Total PC centré */
.detail-footer .comp-total {
    justify-self: center;
    text-align: center;
}

/* Retour à droite */
.detail-footer > button:last-child {
    justify-self: end;
}

.detail-footer button {
    background: #3498db !important;
    color: white !important;
    border: none !important;
    min-height: 25px !important;
    height: 25px !important;
    padding: 0;
    border-radius: 3px;
    cursor: pointer;
}

.detail-footer button:hover {
    background: #2980b9 !important;
}

/* Bouton MAJ dans detail-footer : 50px */
.detail-footer button[onclick*="refresh"] {
    min-width: 50px !important;
    width: 50px !important;
}

/* Bouton Retour dans detail-footer : 80px */
.detail-footer button[onclick*="retourAccueil"] {
    min-width: 80px !important;
    width: 80px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════════════════════════════════ */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    z-index: 1000;
}

#loading.hidden {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.comp-scroll::-webkit-scrollbar,
.detail-table-wrap::-webkit-scrollbar {
    width: 10px;
}

.comp-scroll::-webkit-scrollbar-track,
.detail-table-wrap::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.comp-scroll::-webkit-scrollbar-thumb,
.detail-table-wrap::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 500px) {
    .component-preview img {
        width: 120px;
        height: 60px;
    }
    
    .detail-preview img {
        width: 150px;
        height: 80px;
    }
    
    .comp-footer {
        grid-template-columns: 1fr 1fr;
        font-size: 10px;
    }
    
    .checkboxes-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .checkbox-left,
    .checkbox-right {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESKTOP LARGE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1200px) {
    .component-preview img {
        width: 220px;
        height: 110px;
    }
    
    .detail-preview img {
        width: 300px;
        height: 120px;
    }
    
    .pc-type img {
        max-width: 130px;
    }
}

/* Bouton standard - largeur consistante */
.btn-std {
    min-width: 80px !important;
    background-color: #3498db !important;
    color: white !important;
}

/* Boutons MAJ et Retour - Couleurs v1.0.75 */
/* Boutons MAJ et Retour - Couleurs v1.0.75 */
button[onclick*="refresh"] {
    background: #3498db !important;
    color: white !important;
    border: none !important;
    min-width: 50px !important;
    width: 50px !important;
    min-height: 25px !important;
    height: 25px !important;
}

button[onclick*="retourAccueil"] {
    background: #3498db !important;
    color: white !important;
    border: none !important;
    min-width: 88px !important;
    width: 88px !important;
    min-height: 25px !important;
    height: 25px !important;
}

button[onclick*="refresh"]:hover,
button[onclick*="retourAccueil"]:hover {
    background: #2980b9 !important;
}

/* Bouton delete - Croix rouge avec fond léger */
.btn-delete {
    background-color: #0000000a !important;
    color: #cc0000 !important;
    border: none !important;
    font-size: 18px !important;
}

/* Bouton Format - Couleurs v1.0.75 */
button[onclick*="showFormatDialog"] {
    background: #3498db !important;
    color: white !important;
}

/* Texte noir pour Format, Choisis, Supprimer */
button[onclick*="showFormatDialog"],
button[onclick*="toggleShowSelected"],
button[onclick*="toutSupprimer"] {
    color: black !important;
}

/* Enlever couleur fond Choisis et Supprimer */
button[onclick*="toggleShowSelected"],
button[onclick*="toutSupprimer"] {
    background: transparent !important;
}

button[onclick*="toutSupprimer"] {
    color: #e74c3c !important;
}



/* Desktop: augmenter polices */
@media (min-width: 769px) {
    /* detail-preview: +2px */
    .detail-preview {
        font-size: calc(1em + 2px);
    }
    
    /* detail-filters: +2px */
    .detail-filters,
    .detail-filters select,
    .detail-filters button,
    .detail-filters input {
        font-size: calc(1em + 2px);
    }
    
    /* detail-table: +2px */
    .detail-table-wrap,
    .detail-table-wrap th,
    .detail-table-wrap td {
        font-size: calc(1em + 2px);
    }
    
    /* component-preview: +3px */
    .comp-item {
        font-size: calc(1em + 3px);
    }
    
    /* comp-price-area: 20px */
    .comp-price-area {
        font-size: 20px !important;
    }
    
    /* component-preview img: TOUJOURS toute la hauteur min 110px */
    .comp-item img {
        height: 100% !important;
        min-height: 110px !important;
        max-height: none !important;
        object-fit: contain;
    }
    
    /* detail-preview img: max 120px */
    .detail-preview img {
        max-height: 120px !important;
    }
    
    /* Augmenter largeur colonne PassMark */
    .passmark-col {
        width: 90px !important;
        min-width: 90px !important;
    }
    
    /* Décaler titre Prix 2px gauche */
    .detail-table-wrap th:last-child {
        padding-right: 10px !important;
    }
    
    /* Décaler données Prix 5px gauche */
    .detail-table-wrap td:last-child {
        padding-right: 13px !important;
    }
}

/* Mobile portrait: optimisations supplémentaires */
@media (max-width: 600px) and (orientation: portrait) {
    /* Image component-preview: hauteur -10px min 90px */
    .comp-item img {
        height: calc(100% - 10px) !important;
        min-height: 90px !important;
        max-height: none !important;
        object-fit: contain;
    }
    
    /* Augmenter largeur titre Prix */
    .detail-table-wrap th:last-child {
        width: 60px !important;
        min-width: 60px !important;
        padding-right: 4px !important;
    }
    
    /* Décaler données Prix -1px vers gauche */
    .detail-table-wrap td:last-child {
        padding-right: 7px !important;
    }
    
    /* detail-filters: recherche + Fabriquant + RAZ sur 1ère ligne */
    .detail-filters {
        display: flex;
        flex-wrap: wrap;
    }
    
    .filter-search-wrapper {
        order: 1;
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .filter-group:first-of-type {
        order: 2;
        flex: 0 1 auto;
    }
    
    .filter-btn {
        order: 3;
        margin-left: auto !important;
    }
    
    .filter-group:not(:first-of-type) {
        order: 4;
    }
    
    /* Windows et Montage sur même ligne */
    .checkboxes-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
    }
}

/* Desktop ou mobile paysage: comp-total centré */
@media (min-width: 601px), (orientation: landscape) {
    .comp-total {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Desktop: comp-header +4px et comp-subtitle -4px */
@media (min-width: 769px) {
    .comp-header {
        min-height: 41px !important;
    }
    
    .comp-subtitle {
        margin-top: -4px !important;
    }
    
    /* detail-nom-main et detail-props */
    .detail-nom-main {
        font-size: 14px !important;
    }
    
    .detail-props {
        font-size: 12px !important;
    }
    
    /* comp-footer: Format, Choisis, Supprimer même largeur que Partage */
    .comp-footer .btn-small {
        min-width: 90px !important;
    }
    
    /* Retour et MAJ à droite */
    .comp-footer {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .comp-footer .btn-std:last-of-type {
        margin-left: auto !important;
    }
    
    /* toggle-all et MAJ juste avant Retour */
    .comp-footer .toggle-label {
        order: 98;
    }
    
    .comp-footer button[onclick*="refresh"] {
        order: 99;
    }
    
    .comp-footer .btn-std:last-of-type {
        order: 100;
    }
    
    /* comp-total à gauche en desktop */
    .comp-total {
        margin-right: auto !important;
    }
}

/* Réduire espace checkboxes-row (divisé par 2) */
.checkboxes-row {
    gap: 5px !important;
    margin: 5px 0 !important;
    padding: 5px 0 !important;
}

.checkboxes-row label {
    margin: 2px 0 !important;
    padding: 2px !important;
}

/* Mobile portrait: RAZ après Fabriquant et tout à droite - FIX FINAL */
@media (max-width: 600px) and (orientation: portrait) {
    .detail-filters {
        display: flex;
        flex-wrap: wrap;
        position: relative;
    }
    
    /* Recherche: flex 1 */
    .filter-search-wrapper {
        order: 1;
        flex: 1 1 140px;
    }
    
    /* Fabriquant: flex 0 auto */
    .filter-group:first-of-type {
        order: 2;
        flex: 0 0 auto;
    }
    
    /* RAZ: tout à droite */
    .filter-btn {
        order: 3;
        margin-left: auto !important;
        flex: 0 0 auto;
    }
    
    /* Autres filtres */
    .filter-group:not(:first-of-type) {
        order: 4;
        flex: 1 1 100%;
    }
    
    /* Images component: PRIORITÉ MAXIMALE */
    .comp-item img {
        height: calc(100% - 10px) !important;
        min-height: 90px !important;
        max-height: none !important;
        width: auto !important;
        object-fit: contain !important;
    }
}

/* Desktop: konfigurator-title et comp-subtitle */
@media (min-width: 769px) {
    .konfigurator-title {
        min-height: 41px !important;
        line-height: 41px !important;
    }
    
    .comp-subtitle {
        margin-top: -10px !important;
    }
    
    /* comp-footer: MAJ et toggle avant Retour */
    .comp-footer {
        position: relative;
    }
    
    .comp-footer button[onclick*="refresh"] {
        order: 98;
        margin-left: auto;
    }
    
    .comp-footer .toggle-label {
        order: 97;
    }
    
    .comp-footer .btn-std:last-of-type {
        order: 99;
    }
}
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
/* ============================================================================
   CORRECTIONS v1.0.57 - FIX ORDRE FINAL + SUPPRIMER 68px
   ============================================================================ */

/* Desktop: interligne comp-props +50% */
@media (min-width: 769px) {
    .comp-props {
        line-height: 1.8 !important;
    }
    
    .detail-props {
        line-height: 1.8 !important;
    }
    
    .detail-props br:nth-of-type(2) {
        margin-bottom: 0.5em;
    }
}

/* btn-delete: border-radius, padding, font-size */
.btn-delete {
    border-radius: 20px !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
}

/* component-header .arrow: couleur selon stock */
.component-item:not(.has-selection) .arrow {
    color: #999999 !important;
}

.component-item.has-selection .arrow {
    color: #27ae60 !important;
}

.component-item.has-selection.stock-supplier .arrow {
    color: #f39c12 !important;
}

.component-item.has-selection.out-of-stock .arrow {
    color: #000000 !important;
}

/* filter-nb_ports_usbc: 90px */
select[data-filter="nb_ports_usbc"] {
    min-width: 90px !important;
}

/* filter-nb_ports_m2: 80px */
select[data-filter="nb_ports_m2"] {
    width: 80px !important;
}

/* MOBILE PORTRAIT */
@media (max-width: 600px) and (orientation: portrait) {
    
    .component-header {
        font-size: 11px !important;
    }
    
    select[data-filter="nb_ports_1g"],
    select[data-filter="nb_ports_2_5g"],
    select[data-filter="nb_ports_5g"],
    select[data-filter="nb_ports_10g"] {
        min-width: 113px !important;
    }
    
    .detail-filters {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
    }
    
    .filter-search-wrapper {
        order: 1 !important;
        flex: 0 1 auto !important;
    }
    
    .filter-group:first-of-type {
        order: 2 !important;
        flex: 0 0 auto !important;
    }
    
    .filter-group:not(:first-of-type) {
        order: 3 !important;
        flex: 0 1 auto !important;
    }
    
    .filter-btn {
        order: 4 !important;
        text-align: right !important;
    }
    
    .component-item img,
    .comp-item img {
        min-height: 50px !important;
        max-height: 100px !important;
        max-width: 180px !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    .filter-operator-select {
        width: 35px !important;
    }
}

/* ALL: detail-filters RAZ dernier */
@media (min-width: 601px) {
    .detail-filters {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
    }
    
    .filter-search-wrapper {
        order: 1 !important;
        flex: 0 1 auto !important;
    }
    
    .filter-group {
        order: 2 !important;
        flex: 0 1 auto !important;
    }
    
    .filter-btn {
        order: 3 !important;
        margin-left: auto !important;
    }
}

/* ============================================================================
   COMP-FOOTER - SUPPRIMER 68px
   ============================================================================ */

.comp-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    align-items: center !important;
}

/* ÉCRASER la règle btn-small générale pour comp-footer */
.comp-footer .btn-small {
    min-width: unset !important;
    width: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Charger: 25px×25px */
.comp-footer button.btn-small[onclick*="charger"] {
    min-width: 25px !important;
    max-width: 25px !important;
    width: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 25px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 16px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Sauvegarder: 25px×25px */
.comp-footer button.btn-small[onclick*="sauvegarder"] {
    min-width: 25px !important;
    max-width: 25px !important;
    width: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 25px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 16px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Aide: 23px×25px */
.comp-footer button.btn-small.btn-help {
    min-width: 23px !important;
    max-width: 23px !important;
    width: 23px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 23px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 16px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    background-color: #3498db !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: bold !important;
}

.comp-footer button.btn-small.btn-help:hover {
    background-color: #2980b9 !important;
}

/* Partage: 25px×25px */
.comp-footer button.btn-small[onclick*="partager"] {
    min-width: 25px !important;
    max-width: 25px !important;
    width: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 25px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Format: 57px×25px */
.comp-footer button.btn-small[onclick*="showFormatDialog"] {
    min-width: 57px !important;
    max-width: 57px !important;
    width: 57px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 57px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Choisis: 25px×25px */
.comp-footer button.btn-small[onclick*="toggleShowSelected"] {
    min-width: 25px !important;
    max-width: 25px !important;
    width: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 25px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Supprimer: 68px×25px */
.comp-footer button.btn-small.btn-danger {
    min-width: 68px !important;
    max-width: 68px !important;
    width: 68px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 68px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Alignement label Ouvrir avec checkbox */
.comp-footer label.toggle-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
}

.comp-footer label.toggle-label input[type="checkbox"] {
    margin: 0 !important;
}

/* ============================================================================
   DESKTOP: 1 ligne avec ORDRE ÉLEVÉ pour Total/Ouvrir/MAJ/Retour
   ============================================================================ */
@media (min-width: 601px) {
    .comp-footer {
        flex-wrap: nowrap !important;
    }
    
    /* Ordre FAIBLE pour les boutons à gauche */
    .comp-footer button.btn-small[onclick*="charger"] {
        order: 1 !important;
    }
    
    .comp-footer button.btn-small[onclick*="sauvegarder"] {
        order: 2 !important;
    }
    
    .comp-footer button.btn-small[onclick*="partager"] {
        order: 3 !important;
    }
    
    .comp-footer button.btn-small[onclick*="showFormatDialog"] {
        order: 4 !important;
    }
    
    .comp-footer button.btn-small[onclick*="toggleShowSelected"] {
        order: 5 !important;
    }
    
    .comp-footer button.btn-small.btn-danger {
        order: 6 !important;
    }
    
    .comp-footer button.btn-small.btn-help {
        order: 7 !important;
    }
    
    /* Ordre ÉLEVÉ pour Total et contrôles à droite */
    .comp-footer .comp-total {
        order: 100 !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    
    .comp-footer label.toggle-label {
        order: 101 !important;
        margin-left: 0 !important;
        margin-right: 5px !important;
    }
    
    .comp-footer button[onclick*="refresh"] {
        order: 102 !important;
        margin-right: 0 !important;
    }
    
    .comp-footer .btn-std:last-of-type {
        order: 103 !important;
        margin-left: 5px !important;
    }
}

/* ============================================================================
   MOBILE: Ligne 1 [Boutons] / Ligne 2 Total...[Ouvrir MAJ Retour]
   ============================================================================ */
@media (max-width: 600px) and (orientation: portrait) {
    .comp-footer {
        flex-wrap: wrap !important;
    }
    
    /* Ligne 1: Tous les boutons */
    .comp-footer button.btn-small[onclick*="charger"] {
        order: 1 !important;
    }
    
    .comp-footer button.btn-small[onclick*="sauvegarder"] {
        order: 2 !important;
    }
    
    .comp-footer button.btn-small[onclick*="partager"] {
        order: 3 !important;
    }
    
    .comp-footer button.btn-small[onclick*="showFormatDialog"] {
        order: 4 !important;
    }
    
    .comp-footer button.btn-small[onclick*="toggleShowSelected"] {
        order: 5 !important;
    }
    
    .comp-footer button.btn-small.btn-danger {
        order: 6 !important;
    }
    
    .comp-footer button.btn-small.btn-help {
        order: 7 !important;
    }
    
    /* Ligne 2: Total à gauche */
    .comp-footer .comp-total {
        order: 100 !important;
        flex: 0 0 auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: left !important;
    }
    
    /* Ligne 2: Ouvrir/MAJ/Retour à droite */
    .comp-footer label.toggle-label {
        order: 101 !important;
        margin-left: auto !important;
        margin-right: 5px !important;
    }
    
    .comp-footer button[onclick*="refresh"] {
        order: 102 !important;
    }
    
    .comp-footer .btn-std:last-of-type {
        order: 103 !important;
        margin-left: 5px !important;
    }
}

/* ============================================================================
   COMP-FOOTER v1.0.68 - Base v1.0.65 + Corrections
   ============================================================================ */

.comp-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 5px 15px !important;
    background: #fff !important;
    border-top: 1px solid #ddd !important;
    position: relative !important;
}

.total-label {
    font-size: 15px !important;
    color: #000 !important;
    font-weight: bold !important;
}

.total-amount {
    font-size: 20px !important;
    color: #27ae60 !important;
    font-weight: bold !important;
    margin-left: 5px !important;
}

/* BOUTON AIDE - 25px centré */
.btn-small.btn-help {
    min-width: 25px !important;
    width: 25px !important;
    max-width: 25px !important;
    height: 25px !important;
    flex: 0 0 25px !important;
    padding: 0 !important;
    margin: 0 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* DESKTOP >= 1201px : Position absolute pour Total + B+D à droite */
@media (min-width: 1201px) {
    .mobile-only-row {
        display: none !important;
    }
    
    .desktop-only-row {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        position: relative !important;
    }
    
    .desktop-only-row > div:first-child {
        flex: 0 0 auto !important;
        display: flex !important;
        gap: 5px !important;
    }
    
    .desktop-only-row .total-display-centered {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: baseline !important;
    }
    
    /* B+D à droite */
    .desktop-only-row > div:last-child {
        flex: 0 0 auto !important;
        display: flex !important;
        gap: 5px !important;
        align-items: center !important;
        margin-left: auto !important;
    }
}

/* MOBILE <= 1200px : 2 lignes avec espace 10px */
@media (max-width: 1200px) {
    .desktop-only-row {
        display: none !important;
    }
    
    .comp-footer {
        flex-wrap: wrap !important;
        padding: 5px 12px !important;
        gap: 0 !important;
    }
    
    .mobile-only-row {
        display: flex !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-only-row > div:first-child,
    .mobile-only-row > button {
        flex: 1 !important;
    }
    
    .mobile-only-row > div:first-child {
        justify-content: flex-start !important;
    }
    
    .mobile-only-row > div:last-child,
    .mobile-only-row > button {
        justify-content: flex-end !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Espace 10px entre les 2 lignes + fine ligne */
    .footer-row-separator {
        border-top: 1px solid #ddd !important;
        margin-top: 5px !important;
        padding-top: 5px !important;
    }
}

/* FIX SCROLL MOBILE */
html.is-mobile .comp-scroll {
    padding-top: 80px !important;
    padding-bottom: 70px !important;
}

/* Separators - Largeur du NOM du composant */
.comp-separator,
.detail-separator {
    display: block !important;
    height: 1px !important;
    background-color: #eee !important;
    margin: 5px 0 !important;
    width: 100% !important;
}

/* Component-preview blanc fixe */
.component-preview {
    background-color: #ffffff !important;
}

/* PassMark GPU invisible en mobile portrait */
@media (max-width: 600px) and (orientation: portrait) {
    .passmark-gpu-col,
    th.passmark-gpu-col {
        display: none !important;
    }
}

/* checkboxes-row toujours visible */
.checkboxes-row {
    display: flex !important;
    visibility: visible !important;
}

/* Dimensions boutons */
.btn-small[onclick*="charger"],
.btn-small[onclick*="sauvegarder"] {
    min-width: 23px;
    width: 23px;
    height: 25px;
}

.btn-small[onclick*="partager"],
.btn-small[onclick*="showFormatDialog"],
.btn-small[onclick*="toggleShowSelected"] {
    min-width: 57px;
    width: 57px;
    height: 25px;
}

.btn-small.btn-danger {
    min-width: 68px;
    width: 68px;
    height: 25px;
}

/* ============================================================================
   ALIGNEMENT CHECKBOXES Windows/Montage - v1.0.69
   ============================================================================ */

/* Alignement horizontal parfait des checkboxes et labels */
.checkbox-left, .checkbox-right {
    display: inline-flex !important;
    align-items: center !important; /* Aligne verticalement le texte au centre du carré */
    gap: 8px !important; /* Espace entre le carré et le texte */
    cursor: pointer;
}

.checkbox-left input[type="checkbox"], 
.checkbox-right input[type="checkbox"] {
    margin: 0 !important; /* Supprime les marges par défaut qui décalent le carré */
    cursor: pointer;
}

/* ============================================================================
   COLONNE IOPS SSD - v1.0.71
   ============================================================================ */

/* IOPS invisible en mobile portrait */
@media (max-width: 600px) and (orientation: portrait) {
    .iops-col,
    th.iops-col {
        display: none !important;
    }
}

/* ============================================================================
   MOBILE PORTRAIT - PC-TYPE ET PC-GRID - v1.0.72
   ============================================================================ */

@media (max-width: 600px) and (orientation: portrait) {
    .pc-type {
        padding: 5px !important;
        gap: 5px !important;
    }
    
    .pc-grid {
        gap: 5px !important;
    }
}

/* ============================================================================
   AMÉLIORATIONS v1.0.73
   ============================================================================ */

/* Numéro de version - Styles */
.konfigurator-title span {
    letter-spacing: -0.04em !important;
    font-size: 9px !important;
}

@media (max-width: 600px) and (orientation: portrait) {
    .konfigurator-title span {
        font-size: 8px !important;
    }
}

/* Letter-spacing filtres */
.filter-select, .filter-operator-select, .filter-value-select {
    letter-spacing: -0.04em !important;
}

/* Font-size filtres desktop */
@media (min-width: 601px) {
    .filter-select, .filter-operator-select, .filter-value-select, .filter-btn {
        font-size: calc(1.2em) !important;
    }
}

/* Font-size filtres mobile portrait */
@media (max-width: 600px) and (orientation: portrait) {
    .filter-select, .filter-operator-select, .filter-value-select, .filter-btn {
        font-size: calc(0.6em) !important;
    }
}

/* Min-width USB-C filter */
.filter-select[onchange*="nb_ports_usbc"],
.filter-value-select#filter-nb_ports_usbc {
    min-width: 90px !important;
}

/* Comp-footer toujours visible */
.comp-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 9999 !important;
}

/* ============================================================================
   FIX MOZILLA - BOUTON RETOUR - v1.0.74
   ============================================================================ */

/* Désactiver pointer-events sur l'arrière-plan */
.detail-screen {
    pointer-events: none !important;
}

/* Réactiver pointer-events sur les enfants */
.detail-screen * {
    pointer-events: auto !important;
}

/* Forcer pointer-events sur le footer */
.comp-footer {
    pointer-events: auto !important;
}

/* Z-index élevé pour les boutons du footer */
.comp-footer button {
    position: relative !important;
    z-index: 10000 !important;

/* Mobile portrait - Boutons ? et RAZ après fabriquant sur 1ère ligne */
@media (max-width: 600px) and (orientation: portrait) {
    .detail-filters .btn-small.btn-help {
        order: 2 !important;
        margin-left: auto !important;
    }
    
    .filter-btn-raz {
        order: 3 !important;
    }
    
    .filter-group {
        order: 10 !important;
    }
    
    .filter-search-wrapper {
        order: 1 !important;
        flex-basis: 100% !important;
    }
}


/* Mobile portrait - detail-preview padding */
@media (max-width: 600px) and (orientation: portrait) {
    .detail-preview {
        padding: 10px 10px 4px 10px !important;
    }
}


/* Garantir 5px entre boutons footer */
.footer-row-container > div[style*="display:flex"] {
    gap: 5px !important;
}

}
