/* CARP RUSH TV / GoWatch TEST124 — bouton plein ecran legerement reduit (CSS seulement).
 * PC : styles Video.js TEST121 inchanges ci-dessous.
 * Mobile : plein ecran du conteneur centre, sans etirement ni decalage.
 * Ce fichier doit etre charge independamment du style videojs du theme. */
body.single-video .crtv119-fullscreen-tools {
    display: flex; align-items: center; justify-content: flex-end;
    flex-wrap: wrap; gap: 8px; margin: 7px 0 14px;
}
body.single-video .crtv119-fullscreen-button {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; min-height: 42px; padding: 7px 12px;
    border: 1px solid #344d60; border-radius: 8px;
    background: #092637; color: #fff; font-size: 14px;
    font-weight: 700; line-height: 1.25; cursor: pointer;
    touch-action: manipulation;
}
body.single-video .crtv119-fullscreen-button:hover,
body.single-video .crtv119-fullscreen-button:focus-visible {
    background: #17475a; color: #fff;
    outline: 2px solid #b0d7e8; outline-offset: 2px;
}
body.single-video .crtv119-fullscreen-symbol { font-size: 20px; line-height: 1; }
/* Format plus discret sur telephone sans modifier le plein ecran lui-meme. */
@media (max-width: 767px) {
    body.single-video .crtv119-fullscreen-button {
        gap: 5px;
        min-height: 40px;
        padding: 6px 11px;
        font-size: 14px;
        border-radius: 7px;
    }
    body.single-video .crtv119-fullscreen-symbol { font-size: 19px; }
}
body.single-video .crtv119-fullscreen-status { font-size: 13px; color: #9e0208; }
html.crtv-theme-dark body.single-video .crtv119-fullscreen-button {
    background: #193c50; border-color: #607b8e; color: #fff;
}
html.crtv-theme-dark body.single-video .crtv119-fullscreen-status { color: #ffd59b; }

/* L'element fullscreen est le conteneur du theme. Ne pas etirer l'image YouTube
 * au format du telephone : centrer un rectangle 16/9 dans la surface disponible.
 * En paysage plus large que 16/9, les bandes noires sont egales a gauche/droite. */
.gowatch-video-player.crtv120-fullscreen-active,
.gowatch-video-player.crtv120-fullscreen-active:fullscreen,
.gowatch-video-player.crtv120-fullscreen-active:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important; height: 100vh !important;
    width: 100dvw !important; height: 100dvh !important;
    max-width: none !important; max-height: none !important;
    padding: 0 !important; margin: 0 !important;
    border: 0 !important; border-radius: 0 !important;
    transform: none !important; aspect-ratio: auto !important;
    background: #000 !important; overflow: hidden !important;
    z-index: 2147483000 !important;
    display: flex !important; justify-content: center !important;
    align-items: center !important;
}
.gowatch-video-player.crtv120-fullscreen-active .video-js,
.gowatch-video-player.crtv120-fullscreen-active .videosingle {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    width: min(100dvw, calc(100dvh * 16 / 9)) !important;
    height: min(100dvh, calc(100dvw * 9 / 16)) !important;
    max-width: 100dvw !important; max-height: 100dvh !important;
    margin: 0 !important; padding: 0 !important;
    border: 0 !important; transform: none !important;
    aspect-ratio: 16 / 9 !important;
    background: #000 !important; overflow: hidden !important;
}
.gowatch-video-player.crtv120-fullscreen-active .vjs-tech,
.gowatch-video-player.crtv120-fullscreen-active iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important; height: 100% !important;
    max-width: none !important; max-height: none !important;
    padding: 0 !important; margin: 0 !important; border: 0 !important;
    aspect-ratio: auto !important; transform: none !important;
}
/* Le controle de retour est un vrai bouton tactile, sur le coin superieur droit.
 * Ne pas laisser le bouton HTML blanc par defaut sous le lecteur. */
.gowatch-video-player .crtv120-fullscreen-close[hidden] { display: none !important; }
.gowatch-video-player.crtv120-fullscreen-active .crtv120-fullscreen-close {
    appearance: none !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    position: fixed !important;
    z-index: 2147483001 !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    left: auto !important; bottom: auto !important;
    width: 46px !important; height: 46px !important;
    min-width: 46px !important; min-height: 46px !important;
    padding: 0 !important; margin: 0 !important;
    background: rgba(18,28,35,.88) !important;
    border: 1px solid rgba(255,255,255,.5) !important;
    border-radius: 50% !important;
    color: #fff !important;
    font: 400 32px/1 Arial,sans-serif !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.4) !important;
    cursor: pointer !important; touch-action: manipulation !important;
}
.gowatch-video-player.crtv120-fullscreen-active .sticky-video-closer {
    display: none !important;
}
body.crtv120-windowed-fullscreen { overflow: hidden !important; }

/* TEST121 — Retablissement du plein ecran Video.js sur PC, comme en TEST119. */
/* En plein ecran uniquement : le theme applique normalement aspect-ratio:16/9
 * au conteneur Video.js et a son iframe. Retirer ce ratio au passage en fullscreen
 * pour eviter le decentrage/bande noire sur les ecrans Android larges.
 * Ne s'applique qu'aux lecteurs YouTube des fiches videos. */
body.single-video .gowatch-video-player .video-js.vjs-youtube:is(.vjs-fullscreen, :fullscreen, :-webkit-full-screen),
body.single-video .gowatch-video-player .video-js.vjs-youtube:fullscreen,
body.single-video .gowatch-video-player .video-js.vjs-youtube:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
    transform: none !important;
    background: #000 !important;
    overflow: hidden !important;
}
body.single-video .gowatch-video-player .video-js.vjs-youtube.vjs-fullscreen :is(.vjs-tech, iframe),
body.single-video .gowatch-video-player .video-js.vjs-youtube:fullscreen :is(.vjs-tech, iframe),
body.single-video .gowatch-video-player .video-js.vjs-youtube:-webkit-full-screen :is(.vjs-tech, iframe),
body.single-video .gowatch-video-player .video-js.vjs-youtube iframe:fullscreen,
body.single-video .gowatch-video-player .video-js.vjs-youtube iframe:-webkit-full-screen {
    position: absolute !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    aspect-ratio: auto !important;
    transform: none !important;
}
/* Si GoWatch passe en mini-lecteur sticky pendant la lecture, le vrai plein ecran
 * doit toujours primer sur les dimensions fixes de 350x195px du sticky. */
body.stick-video.single-video .gowatch-video-player > .video-js.vjs-youtube.vjs-fullscreen,
body.single-video .gowatch-video-player.video-is-sticky > .video-js.vjs-youtube.vjs-fullscreen {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
}

/* CARP RUSH TV TEST147 : arrondi sur le CADRE DU LECTEUR, pas seulement
 * sur l'enfant Video.js. Les lecteurs YouTube reconstruisent leur HTML
 * au lancement : le cadre parent reste le bon endroit pour masquer les coins.
 * Ces classes n'existent que dans la zone lecteur des fiches video GoWatch.
 * Ne modifie ni la taille du lecteur, ni ses controles, ni les autres iframes. */
.video-figure-content .gowatch-video-player,
.video-figure-content .main-video.embedded_videos {
    border-radius: 10px;
    overflow: hidden;
}
/* Un arrondi egalement sur le lecteur interne, au cas ou Video.js
 * agrandit ou remplace sa surface au lancement de la lecture. */
.video-figure-content .gowatch-video-player .video-js:not(.vjs-fullscreen) {
    border-radius: 10px;
    overflow: hidden;
}
/* Le mini-lecteur collant conserve son comportement et ses commandes. */
body.stick-video .video-figure-content .gowatch-video-player {
    border-radius: 0;
    overflow: visible;
}
/* Supprimer tout arrondi en plein ecran. Ne rien rogner dans l'image. */
.video-figure-content .gowatch-video-player.crtv120-fullscreen-active,
.video-figure-content .gowatch-video-player:fullscreen,
.video-figure-content .gowatch-video-player:-webkit-full-screen,
.video-figure-content .gowatch-video-player:has(.vjs-fullscreen),
.video-figure-content .gowatch-video-player:has(:fullscreen),
.video-figure-content .main-video.embedded_videos:fullscreen,
.video-figure-content .main-video.embedded_videos:-webkit-full-screen {
    border-radius: 0 !important;
}
.video-figure-content .gowatch-video-player .video-js:is(.vjs-fullscreen, :fullscreen, :-webkit-full-screen) {
    border-radius: 0 !important;
}
