/* ==========================================================================
   TABS - Système d'onglets unifié
   ========================================================================== */

/* Navigation principale des onglets */
.tab-navigation {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 5px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
}

/* Boutons d'onglets */
.tab-btn {
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    min-width: auto;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Variantes de boutons d'onglets */
.tab-btn-primary {
    background-color: var(--primary);
    color: white;
}

/* États des boutons d'onglets */
.tab-btn-primary:hover {
    background-color: #0d62d0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background-color: var(--primary);
    color: white;
}

/* Container principal des onglets */
.tab-container {
    margin: 60px 0;
}

/* Navigation alternative avec bordure */
.tab-buttons {
    display: flex;
    border-bottom: 2px solid var(--medium);
    margin-bottom: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-buttons .tab-btn {
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background-color: transparent;
    color: var(--dark);
}

.tab-buttons .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: var(--light);
}

.tab-buttons .tab-btn:hover {
    background-color: var(--light);
    box-shadow: none;
}

/* Contenu des onglets */
.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Styles des contenus d'onglets */
.tab-content h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.tab-content p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Onglets pour versions RPi */
.rpi-tabs .tab-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    padding: 12px 25px;

}

.rpi-tabs .tab-btn:hover {
    background-color: #f8f9fa;
}

/* Onglets pour produits */
.product-tabs .tab-navigation {
    background-color: white;
    border-bottom: 2px solid #e0e0e0;
    padding: 20px;
}

.product-tabs .tab-btn {
    min-width: 140px;
    border-radius: 8px;
}

.product-tabs .tab-btn-primary {
    order: -1;
    flex: 1 1 100%;
}

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

/* Tablettes */
@media (max-width: 992px) {
    .tab-navigation {
        padding: 25px 15px;
    }
    
    .tab-buttons {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .tab-navigation {
        gap: 10px;
    }
    
    .tab-btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
        border-radius: 8px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .tab-btn-primary {
        order: -1;
        flex: 1 1 100%;
    }
    
    .tab-buttons {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-buttons .tab-btn {
        border: 1px solid var(--medium);
        border-bottom: 1px solid var(--medium);
        margin-bottom: 5px;
        border-radius: 5px;
    }
    
    .tab-buttons .tab-btn.active {
        border: 1px solid var(--primary);
    }
    
    .tab-container {
        margin: 40px 0;
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        padding: 20px 10px;
    }
    
    .tab-btn {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .tab-content h3 {
        font-size: 1.5rem;
    }
}