/**
 * Tiroir Mobile pour Propriétés Détaillées
 */

/* Overlay sombre */
.cpp-mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cpp-mobile-drawer-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Tiroir qui slide depuis le bas */
.cpp-mobile-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cpp-mobile-drawer.open {
    transform: translateY(0);
}

/* En-tête du tiroir */
.cpp-mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #A020F0 0%, #8B15D0 100%);
    border-radius: 20px 20px 0 0;
}

.cpp-mobile-drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpp-mobile-drawer-title i {
    font-size: 20px;
}

.cpp-mobile-drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cpp-mobile-drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cpp-mobile-drawer-close i {
    color: #ffffff;
    font-size: 18px;
}

/* Corps du tiroir (scrollable) */
.cpp-mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Adaptation des groupes de propriétés pour mobile */
.cpp-mobile-drawer .cpp-property-group {
    margin-bottom: 20px;
}

.cpp-mobile-drawer .cpp-property-group h5 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpp-mobile-drawer .cpp-property-section {
    margin-bottom: 20px;
}

.cpp-mobile-drawer .cpp-property-section h6 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpp-mobile-drawer .cpp-property-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.cpp-mobile-drawer .cpp-property-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cpp-mobile-drawer .cpp-property-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.cpp-mobile-drawer .cpp-property-input,
.cpp-mobile-drawer .cpp-property-slider {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.cpp-mobile-drawer .cpp-property-input:focus,
.cpp-mobile-drawer .cpp-property-slider:focus {
    outline: none;
    border-color: #A020F0;
}

.cpp-mobile-drawer .cpp-property-color {
    height: 50px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
}

.cpp-mobile-drawer .cpp-property-value {
    font-size: 13px;
    font-weight: 600;
    color: #A020F0;
    margin-left: 8px;
}

/* Boutons dans le tiroir */
.cpp-mobile-drawer button:not(.cpp-mobile-drawer-close) {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cpp-mobile-drawer button:not(.cpp-mobile-drawer-close):hover {
    border-color: #A020F0;
    background: rgba(160, 32, 240, 0.1);
}

/* Animation smooth */
@media (prefers-reduced-motion: reduce) {
    .cpp-mobile-drawer,
    .cpp-mobile-drawer-overlay {
        transition: none;
    }
}

