/**
 * DevillePartsFinder - CSS simplifié
 */

.deville-partsfinder-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    color: #fff;
}

.partsfinder-header {
    text-align: center;
    margin-bottom: 25px;
}

.partsfinder-header h2 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.partsfinder-header h2 i {
    color: #e94560;
}

.partsfinder-header p {
    color: #a0a0a0;
    margin: 0;
    font-size: 0.95rem;
}

/* Step headers */
.partsfinder-step h3 {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-back {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-back:hover {
    background: rgba(255,255,255,0.2);
}

/* Gun families grid */
.gun-families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gun-family-card {
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.gun-family-card:hover {
    background: rgba(233, 69, 96, 0.2);
    border-color: #e94560;
    transform: translateY(-2px);
}

.gun-family-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #fff;
}

.gun-family-members {
    font-size: 0.8rem;
    color: #a0a0a0;
    line-height: 1.4;
}

.gun-member {
    display: inline;
}

/* Exploded view container */
.exploded-view-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Exploded view */
.exploded-image-wrapper {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    position: relative;
    min-height: 400px;
}

.exploded-image-wrapper img {
    width: 100%;
    height: auto;
}

/* Zones cliquables */
.exploded-zone {
    position: absolute;
    width: 36px;
    height: 36px;
    background: rgba(233, 69, 96, 0.85);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.2s;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.exploded-zone:hover {
    background: #e94560;
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.6);
}

/* Zone active (pièce sélectionnée dans l'URL) */
.exploded-zone.active {
    background: #27ae60 !important;
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.8);
    z-index: 100;
}

/* Other parts wrapper */
.other-parts-wrapper {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 15px;
}

.other-parts-wrapper h4 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.other-parts-wrapper h4 i {
    color: #e94560;
    font-size: 1.2rem;
}

.other-parts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.other-part-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.other-part-btn:hover {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
}

.other-part-btn.active {
    background: rgba(39, 174, 96, 0.4);
    border-color: #27ae60;
}

.other-part-btn .part-count {
    color: #a0a0a0;
    font-size: 0.75rem;
}

/* Loading */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No results */
.no-results {
    text-align: center;
    padding: 40px;
    color: #a0a0a0;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Tablette */
@media (max-width: 1024px) {
    .exploded-zone {
        width: 30px;
        height: 30px;
        font-size: 0.65rem;
    }
}

/* Mobile - iPhone 12 Pro Max et similaires */
@media (max-width: 768px) {
    .deville-partsfinder-container {
        padding: 15px;
    }
    
    .gun-families-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gun-family-card {
        padding: 12px;
    }
    
    .gun-family-name {
        font-size: 0.95rem;
    }
    
    .gun-family-members {
        font-size: 0.7rem;
    }
    
    .exploded-view-container {
        flex-direction: column;
    }
    
    .other-parts-wrapper {
        width: 100%;
    }
    
    .exploded-zone {
        width: 20px;
        height: 20px;
        font-size: 0.5rem;
        border-width: 1px;
    }
    
    .exploded-zone:hover {
        transform: translate(-50%, -50%) scale(1.15);
    }
    
    .exploded-zone.active {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Petit mobile (iPhone SE, petits Android) */
@media (max-width: 480px) {
    .exploded-zone {
        width: 18px;
        height: 18px;
        font-size: 0.45rem;
    }
}

/* Très petit écran */
@media (max-width: 360px) {
    .exploded-zone {
        width: 16px;
        height: 16px;
        font-size: 0.4rem;
    }
}
