/* =========================================
   Lesson Validator - Barre de navigation
   ========================================= */

/* Conteneur principal de la barre */
.iframe-container {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Barre de navigation - Style harmonisé avec les trainings */
.iframe-nav {
    min-height: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 100px; /* Espace pour le bouton exit à gauche (80px + marges) */
    background-color: #2d3e5b;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    gap: 20px; /* Espacement entre les boutons */
}

/* Bouton de sortie */
.iframe-container a.exit {
    width: 80px;
    height: 40px;
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
}

.iframe-container a.exit:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.iframe-container a.exit img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1); /* Rendre l'icône blanche */
    opacity: 0.9;
    transition: all 0.3s;
}

.iframe-container a.exit:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* Boutons de navigation Instructions/Documentation */
.iframe-nav button {
    padding: 8px 20px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    min-width: 120px;
}

.iframe-nav button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.iframe-nav button:active {
    transform: translateY(0);
}

.iframe-nav button.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Iframe d'instructions */
.iframe-container iframe {
    flex: 1;
    border: none;
    width: 100%;
    height: 400px;
    background-color: white;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
    .iframe-nav {
        padding: 0 80px 0 80px; /* Ajustement pour mobile */
        gap: 10px;
    }
    
    .iframe-nav button {
        padding: 6px 15px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .iframe-container a.exit {
        width: 60px;
    }
}

/* =========================================
   Styles legacy pour compatibilité
   ========================================= */

/* Support pour l'ancien système d'onglets si nécessaire */
.instruction-bar {
    min-height: 40px;
    height: 40px;
    display: flex;
    align-items: stretch;
    background-color: #2d3e5b;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.instruction-bar .exit-button {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
    text-decoration: none;
    z-index: 10;
}

.instruction-bar .exit-button:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.instruction-bar .exit-button img.exit {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: all 0.3s;
}

.instruction-bar .exit-button:hover img.exit {
    opacity: 1;
    transform: scale(1.1);
}

.instruction-tabs {
    display: flex;
    align-items: stretch;
    height: 40px;
    background-color: #2d3e5b;
    flex: 1;
}

.instruction-tabs .tab {
    padding: 0 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    background-color: transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    border: none;
}

.instruction-tabs .tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.instruction-tabs .tab.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    border-bottom: 3px solid #007acc;
}

.instruction-tabs .tab:last-child {
    border-right: none;
}
