/* Styles Page Affichage TV_xxx */

/* Corps de la page (racine) */
body {
    text-align: center;
    font-size: 50px;
    background-color: black;
    color: white;
    overflow: hidden;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Section supérieure qui contient la colonne gauche et le conteneur média */
#top-section {
    height: 80%;
    width: 100%;
    display: flex;
    align-items: flex-start;
}

/* Colonne gauche (logo + message vertical) */
#section-top-gauche {
    width: 20%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    z-index: 10;
    background-color: #EFEFEF;
    overflow: hidden;
}

/* Zone du logo dans la colonne gauche */
#logo-area {
    height: 20%;
    display: flex;
    font-size: 20px;
    justify-content: center;
    align-items: center;
}

#logo {
    max-height: 80%;
    max-width: 80%;
    display: block;
    opacity: 1 !important;
    width: auto;
    object-fit: contain;
}

/* Conteneur pour le message défilant vertical (gauche) */
#scrolling-TextGauche-container {
    height: 80%;
    position: relative;
    overflow: hidden;
}

/* Élément texte défilant vertical (gauche) */
#scrolling-TextGauche {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #cf2e2e;
    font-size: calc(2vw + 0.1em);
    line-height: 1.5;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    animation: scrollMessageVertical 15s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    overflow: hidden;
}

/* Conteneur média (droite) */
#media-container {
    width: 80%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #272727;
    position: relative;
    overflow: hidden;
}

/* Section inférieure pour le texte défilant horizontal */
#bottom-section {
    height: 20%;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: #cf2e2e;
}

/* Conteneur pour le texte défilant horizontal (bas) */
#scrolling-TextBas-container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: auto;
    color: #EFEFEF;
    white-space: nowrap;
    font-size: 10vh;
    line-height: 1.1;
    transform: translateY(-50%);
}

/* Élément texte défilant horizontal (bas) */
#scrolling-TextBas {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 30s linear infinite;
    animation-delay: 1s;
}

/* Règles génériques pour images et vidéos (laissez en fin pour clarté) */
img, video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

/* Effet de fondu au noir (overlay), placé en fin car utilisé dynamiquement par script.js */
.fade-out-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 999;
}

.fade-out-overlay.active {
    opacity: 1;
}

/* Animations (placées à la fin du fichier) */
@keyframes scrollMessageVertical {
    0% { transform: translateY(100%); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}

@keyframes scrollText {
    0% { transform: translateX(0%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    95% { transform: translateX(-100%); opacity: 0; }
    99% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0%); opacity: 0; }
}