/* Définir un fond noir par défaut pour tout le site */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #333252; /* Fond noir */
    color: #f4f4f4; /* Texte clair pour une bonne lisibilité */
    overflow: hidden; /* Empêche les barres de défilement */
    display: flex;
    flex-direction: column;
}

/* Menu principal */
header {
    background-color: #333252;
    color: white;
    padding: 10px 0;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
    text-align: center;
    flex-shrink: 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

header nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: #ff6600;
    color: black;
}

/* Conteneur principal */
.main-container {
    flex: 1; /* Permet au contenu de remplir l'espace disponible */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Empêche les débordements */
}

/* Iframe avec animation */
iframe {
    width: 100%;
    height: calc(100vh - 60px); /* Hauteur totale moins celle du menu */
    border: none;
    transition: transform 0.8s ease-in-out;
    transform-origin: center; /* Nécessaire pour la rotation */
}

/* Classe pour la rotation */
iframe.rotating {
    transform: rotateY(180deg);
}

/* Images dans les pages chargées */
img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ajuste le contenu sans déformation */
    display: block;
    margin: auto;
    transform-origin: center; /* Nécessaire pour les animations */
}

/* Overlay global pour tous les types de contenu */
#overlay-frame {
    display: none;
    position: absolute; /* Utilisé pour éviter les conflits avec les rotations */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color:#1f1f1f); /* Fond semi-transparent */
    z-index: 10; /* Superpose au-dessus du reste */
}

/* Contenu de l'overlay (iframe ou audio player) */
#overlay-frame iframe, #overlay-frame audio {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: none;
    border-radius: 10px;
}

/* Bouton de fermeture */
#close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: #fff;
    background-color: #ff6600;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 20;
}

#close-overlay:hover {
    background-color: #ff3300;
}
