/**
 * 🏠 Room View - Styles MODIFIÉS V2
 * Visualisation de photos dans une pièce
 * 
 * ✨ NOUVEAUTÉS :
 * 1. Boutons alignés sous la photo (design élégant conservé)
 * 2. 3 designs de scrollbar pour le panneau de tailles
 */

/* ================================
   BOUTON DÉCLENCHEUR DANS LA LIGHTBOX
   ================================ */

/* S'assurer que le conteneur parent permet le wrap */
.pcp-photo-panel {
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.pcp-room-view-trigger-wrapper {
    width: 100%;
    flex-basis: 100%;
    text-align: center;
    margin-top: -30px;
    padding: 0 20px;
    order: 999;
}

.pcp-room-view-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.pcp-room-view-trigger:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

.pcp-room-view-trigger svg {
    width: 20px;
    height: 20px;
}

/* ================================
   MODALE ROOM VIEW
   ================================ */

.pcp-room-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.pcp-room-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.pcp-room-view-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pcp-room-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pcp-room-view-close:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}

/* ================================
   HEADER
   ================================ */

.pcp-room-view-header {
    padding: 30px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    text-align: center;
}

.pcp-room-view-header h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.pcp-room-view-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* ================================
   BODY
   ================================ */

.pcp-room-view-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* ================================
   SÉLECTEUR DE TEMPLATES
   ================================ */

.pcp-room-templates-selector h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.pcp-room-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.pcp-room-category-title {
    grid-column: 1 / -1;
    margin: 20px 0 10px 0;
    padding-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
}

.pcp-room-category-title:first-child {
    margin-top: 0;
}

.pcp-room-template-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pcp-room-template-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pcp-room-template-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.pcp-room-template-name {
    padding: 12px;
    background: white;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.pcp-room-templates-loading,
.pcp-room-templates-error {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

.pcp-room-templates-error {
    color: #e74c3c;
}

/* ================================
   ZONE D'AFFICHAGE
   ================================ */

.pcp-room-view-display {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pcp-room-view-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f5f5f5;
    padding: 20px;
    padding-bottom: 30px;
}

.pcp-room-template-bg {
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-width: 95%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcp-room-template-bg > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(90vh - 450px);
    object-fit: contain;
}

.pcp-room-photo-layer {
    position: absolute;
    cursor: move;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
}

.pcp-room-photo-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ✨✨✨ NOUVELLE ZONE DE BOUTONS SOUS LA PHOTO ✨✨✨ */
.pcp-room-view-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 25px;
    padding: 0 20px;
    max-width: 900px;
    width: 100%;
}

/* Groupe de boutons à droite (position fixe) */
.pcp-room-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 450px;
    justify-content: flex-end;
    margin-left: auto;
}

/* Compteur de photos (groupe de droite) */
.pcp-photo-counter {
    position: static !important;
    transform: none !important;
    background: rgba(0, 115, 170, 0.1) !important;
    color: #0073aa !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15) !important;
    border: 2px solid #0073aa;
    transition: all 0.3s ease;
}

.pcp-photo-counter:hover {
    background: rgba(0, 115, 170, 0.15) !important;
    box-shadow: 0 3px 10px rgba(0, 115, 170, 0.25) !important;
}

.pcp-photo-counter span {
    color: #005a87 !important;
    font-weight: 700;
}

/* Bouton Ajouter une photo (groupe de droite) */
.pcp-add-photo-btn {
    position: static !important;
    transform: none !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(0, 115, 170, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.pcp-add-photo-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004770 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.4) !important;
}

.pcp-add-photo-btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* Bouton Changer d'ambiance (gauche) */
.pcp-room-change-template {
    padding: 12px 30px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 115, 170, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pcp-room-change-template:hover {
    background: linear-gradient(135deg, #005a87 0%, #004770 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.4);
}

/* Bouton "Tout effacer" (groupe de droite) */
.pcp-clear-all-btn {
    position: static !important;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.pcp-clear-all-btn svg {
    width: 18px !important;
    height: 18px !important;
}

.pcp-clear-all-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4) !important;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .pcp-room-view-content {
        width: 95%;
        height: 95vh;
        margin: 2.5vh auto;
    }
    
    .pcp-room-view-header h3 {
        font-size: 22px;
    }
    
    .pcp-room-templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .pcp-room-view-trigger {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .pcp-room-view-trigger svg {
        width: 16px;
        height: 16px;
    }
    
    .pcp-room-template-bg > img {
        max-height: calc(90vh - 350px);
    }
    
    /* Boutons responsive */
    .pcp-room-view-controls {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
        padding: 0 10px;
    }
    
    .pcp-room-controls-right {
        flex-direction: column;
        width: 100%;
        min-width: unset;
    }
    
    .pcp-photo-counter,
    .pcp-add-photo-btn,
    .pcp-room-change-template,
    .pcp-clear-all-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        margin-left: 0 !important;
        order: unset;
    }
    
    .pcp-clear-all-btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

/* ============================================================
   SÉLECTEUR DE TAILLES ROOM VIEW
   ============================================================ */

.pcp-room-sizes-panel {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #0073aa;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    max-height: 36vh;
    overflow-y: auto;
    z-index: 10;
    min-width: 120px;
    animation: slideInFromRight 0.4s ease-out;
}

/* ============================================================
   🎨 SCROLLBAR - VERSION 1 : MINIMALISTE (PAR DÉFAUT)
   Barre fine (6px), gris clair, poignée bleue au survol
   
   👉 POUR TESTER UNE AUTRE VERSION :
   1. Commente tout ce bloc (ajoute /* au début et */ à la fin)
   2. Décommente la VERSION 2 ou VERSION 3 plus bas
   ============================================================ */

.pcp-room-sizes-panel::-webkit-scrollbar {
    width: 6px;
}

.pcp-room-sizes-panel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.pcp-room-sizes-panel::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.pcp-room-sizes-panel::-webkit-scrollbar-thumb:hover {
    background: #0073aa;
}

/* Firefox */
.pcp-room-sizes-panel {
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 #f0f0f0;
}

/* ============================================================
   🎨 SCROLLBAR - VERSION 2 : MODERNE AVEC OMBRE
   Barre moyenne (10px), fond gris bordure, ombre portée
   
   👉 POUR ACTIVER :
   1. Commente la VERSION 1 ci-dessus
   2. Décommente ce bloc (retire les /* et */)
   ============================================================ */

/*
.pcp-room-sizes-panel::-webkit-scrollbar {
    width: 10px;
}

.pcp-room-sizes-panel::-webkit-scrollbar-track {
    background: #e8e8e8;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
}

.pcp-room-sizes-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0073aa 0%, #005a87 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.pcp-room-sizes-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #005a87 0%, #004770 100%);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.pcp-room-sizes-panel {
    scrollbar-width: auto;
    scrollbar-color: #0073aa #e8e8e8;
}
*/

/* ============================================================
   🎨 SCROLLBAR - VERSION 3 : INVISIBLE (apparaît au survol)
   Complètement invisible par défaut, apparaît en survol
   
   👉 POUR ACTIVER :
   1. Commente la VERSION 1 ci-dessus
   2. Décommente ce bloc (retire les /* et */)
   ============================================================ */

/*
.pcp-room-sizes-panel::-webkit-scrollbar {
    width: 8px;
}

.pcp-room-sizes-panel::-webkit-scrollbar-track {
    background: transparent;
}

.pcp-room-sizes-panel::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.pcp-room-sizes-panel:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 115, 170, 0.5);
}

.pcp-room-sizes-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 115, 170, 0.8);
}

.pcp-room-sizes-panel {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.pcp-room-sizes-panel:hover {
    scrollbar-color: rgba(0, 115, 170, 0.5) transparent;
}
*/

/* ============================================================
   FIN DES 3 VERSIONS DE SCROLLBAR
   ============================================================ */

.pcp-room-sizes-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    text-align: center;
}

.pcp-room-sizes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.pcp-room-size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.pcp-room-size-item:hover {
    border-color: #0073aa;
    background: rgba(0, 115, 170, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.pcp-room-size-item.active {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border-color: #0073aa;
}

.pcp-room-size-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pcp-room-size-item.disabled:hover {
    border-color: #e0e0e0;
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.pcp-room-sizes-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.pcp-room-sizes-error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    font-size: 13px;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.pcp-room-photo-info {
    background: rgba(0, 115, 170, 0.95) !important;
    color: white !important;
    padding: 4px 9px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    position: absolute !important;
    bottom: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 768px) {
    .pcp-room-sizes-panel {
        right: 15px;
        max-height: 30vh;
        min-width: 120px;
    }
    
    .pcp-room-sizes-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .pcp-room-sizes-grid {
        gap: 6px;
    }
    
    .pcp-room-size-item {
        padding: 8px;
        font-size: 12px;
    }
}

/* ============================================================
   MODE MULTI-PHOTOS - SÉLECTEUR DE PHOTOS
   ============================================================ */

.pcp-photo-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcp-photo-selector-content {
    background: white !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 900px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 30px !important;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    flex-direction: column !important;
}

#pcp-room-photo-selector {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcp-photo-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.pcp-photo-selector-header h3 {
    margin: 0;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.pcp-photo-selector-close {
    width: 35px;
    height: 35px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcp-photo-selector-close:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

.pcp-photo-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.pcp-photo-thumbnail {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pcp-photo-thumbnail:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.3);
}

.pcp-photo-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.pcp-selector-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pcp-selector-photo-item:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.3);
}

.pcp-selector-photo-item.already-on-wall {
    opacity: 0.4;
    cursor: not-allowed;
}

.pcp-selector-photo-item.already-on-wall:hover {
    border-color: #ccc;
    transform: none;
}

.pcp-selector-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pcp-selector-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 115, 170, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pcp-selector-photo-item.already-on-wall .pcp-selector-photo-overlay {
    opacity: 1;
    background: rgba(220, 53, 69, 0.9);
}


/* ============================================================
   PHOTOS SUR LE MUR (Mode multi-photos)
   ============================================================ */

.pcp-room-photo-layer.multi-photo {
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.pcp-room-photo-layer.multi-photo:hover {
    border-color: #0073aa;
    box-shadow: 0 5px 20px rgba(0, 115, 170, 0.4);
}

.pcp-room-photo-layer.multi-photo.selected {
    border-color: #0073aa;
    border-width: 4px;
    box-shadow: 0 5px 20px rgba(0, 115, 170, 0.5);
}


/* ============================================================
   BOUTON "❌" SUPPRESSION INDIVIDUELLE
   ============================================================ */

.pcp-photo-remove-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #dc3545;
    border-radius: 50%;
    color: #dc3545;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
}
.pcp-room-photo-layer.multi-photo:hover .pcp-photo-remove-btn {
    opacity: 1;
}

.pcp-photo-remove-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}


/* ============================================================
   INDICATEUR DE DRAG
   ============================================================ */

.pcp-room-photo-layer.dragging {
    opacity: 0.7;
    cursor: grabbing !important;
    z-index: 1000 !important;
}

.pcp-room-photo-layer.multi-photo {
    /* cursor: grab; */  /* Supprimé : on garde cursor: move du parent */
}

.pcp-room-photo-layer.multi-photo:active {
    cursor: grabbing;
}


/* ============================================================
   BADGE DE TAILLE (Adaptation pour multi-photos)
   ============================================================ */

.pcp-room-photo-layer.multi-photo .pcp-room-photo-info {
    background: rgba(0, 115, 170, 0.95) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    bottom: -25px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.pcp-room-photo-layer.multi-photo.selected .pcp-room-photo-info {
    background: rgba(0, 90, 135, 1) !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pcp-room-photo-layer.multi-photo {
    animation: fadeInScale 0.3s ease-out;
}

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

.pcp-photo-selector-content {
    animation: slideInFromBottom 0.4s ease-out;
}


/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (max-width: 768px) {
    /* Mini-galerie */
    .pcp-photo-selector-content {
        padding: 20px;
        max-height: 90vh;
    }
    
    .pcp-photo-selector-header h3 {
        font-size: 18px;
    }
    
    .pcp-photo-selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    /* Bouton suppression */
    .pcp-photo-remove-btn {
        top: -10px;
        right: -10px;
        width: 28px;
        height: 28px;
        font-size: 16px;
        opacity: 1;
    }
    
    /* Badge de taille */
    .pcp-room-photo-layer.multi-photo .pcp-room-photo-info {
        font-size: 10px !important;
        padding: 4px 8px !important;
        bottom: -22px !important;
    }
}


/* ============================================================
   RESPONSIVE - TABLETTE
   ============================================================ */

@media (max-width: 1024px) and (min-width: 769px) {
    .pcp-photo-selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}


/* ============================================================
   ÉTAT DE CHARGEMENT
   ============================================================ */

.pcp-photo-selector-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.pcp-photo-selector-loading::after {
    content: '...';
    animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}


.pcp-photo-selector-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 15px;
}


/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */

/* Focus visible pour navigation au clavier */
.pcp-add-photo-btn:focus-visible,
.pcp-clear-all-btn:focus-visible,
.pcp-photo-remove-btn:focus-visible,
.pcp-selector-photo-item:focus-visible,
.pcp-room-change-template:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* Réduction des animations pour utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   🛒 BOUTON AJOUT AU PANIER (Room View)
   ============================================================ */

.pcp-room-cart-section {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pcp-room-add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 8px 15px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.pcp-room-add-to-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1ea97c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.pcp-room-add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* État désactivé */
.pcp-room-add-to-cart-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

/* État chargement */
.pcp-room-add-to-cart-btn.loading {
    background: #6c757d;
    pointer-events: none;
    position: relative;
}

.pcp-room-add-to-cart-btn.loading span {
    opacity: 0.7;
}

.pcp-room-add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    right: 15px;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: pcp-cart-spin 0.8s linear infinite;
}

/* État succès */
.pcp-room-add-to-cart-btn.success {
    background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
}

/* Icône SVG dans le bouton */
.pcp-room-add-to-cart-btn svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

/* Messages de feedback */
.pcp-room-cart-feedback {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    min-height: 20px;
    line-height: 1.4;
}

.pcp-room-cart-feedback .success {
    color: #28a745;
    font-weight: 500;
}

.pcp-room-cart-feedback .error {
    color: #dc3545;
    font-weight: 500;
}

.pcp-room-cart-feedback .loading {
    color: #ffc107;
}

/* Animation de rotation */
@keyframes pcp-cart-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Focus pour accessibilité */
.pcp-room-add-to-cart-btn:focus-visible {
    outline: 3px solid #28a745;
    outline-offset: 2px;
}

/* ============================================================
   🆕 SÉLECTEUR DE SUPPORTS (Type de produit)
   À AJOUTER À LA FIN DE room-view.css
   (avant le commentaire "FIN DES STYLES")
   ============================================================ */

.pcp-room-supports-section {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pcp-room-supports-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    text-align: center;
}

.pcp-room-supports-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
}

.pcp-room-support-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pcp-room-support-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.pcp-room-support-item.active {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-color: #0073aa;
    color: white;
}

.pcp-room-support-item .support-name {
    font-size: 13px;
    font-weight: 500;
}

.pcp-room-support-item .support-price {
    font-size: 13px;
    font-weight: 700;
    color: #28a745;
}

.pcp-room-support-item.active .support-price {
    color: #90EE90;
}

/* Badge nombre de supports sur les tailles */
.pcp-room-size-item .support-count {
    display: block;
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.pcp-room-size-item.active .support-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Message info dans le feedback */
.pcp-room-cart-feedback .info {
    color: #0073aa;
    font-style: italic;
}

/* Scrollbar personnalisee pour la liste des supports */
.pcp-room-supports-list::-webkit-scrollbar {
    width: 6px;
}

.pcp-room-supports-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pcp-room-supports-list::-webkit-scrollbar-thumb {
    background: #0073aa;
    border-radius: 3px;
}

.pcp-room-supports-list::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}


/* ============================================================
   RESPONSIVE - MOBILE (Supports)
   ============================================================ */

@media (max-width: 768px) {
    .pcp-room-supports-list {
        max-height: 120px;
    }
    
    .pcp-room-support-item {
        padding: 8px 10px;
    }
    
    .pcp-room-support-item .support-name,
    .pcp-room-support-item .support-price {
        font-size: 12px;
    }
}

/* ============================================================
   OVERRIDE - Panneau tailles style compact
   ============================================================ */

.pcp-room-sizes-panel .pcp-room-sizes-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 10px 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    text-align: center !important;
}

.pcp-room-sizes-panel .pcp-room-size-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 12px !important;
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: #333 !important;
}

.pcp-room-sizes-panel .pcp-room-size-item:hover {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
}

.pcp-room-sizes-panel .pcp-room-size-item.active {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%) !important;
    color: white !important;
    border-color: #0073aa !important;
}

/* Réduire la hauteur des cases et ajouter de l'espace */
.pcp-room-sizes-panel .pcp-room-sizes-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.pcp-room-sizes-panel .pcp-room-size-item {
    padding: 4px 12px !important;
    min-height: auto !important;
}

.pcp-room-sizes-panel .pcp-room-size-item .support-count {
    font-size: 10px !important;
    margin-top: 0px !important;
}
/* ============================================================
   FIN DES STYLES
   ============================================================ */
