/* ========================================
   VIDEO PLAYER
======================================== */

.mc-video-player {

    width: 75%;
    max-width: 900px;
    margin: 40px auto;

}

/* ========================================
   POSTER
======================================== */

.mc-video-poster {

    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 12px 30px rgba(0,0,0,.15);

}

/* ========================================
   CONTAINER
======================================== */

.mc-video-container {

    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    cursor: pointer;

    background: #000;

}

/* ========================================
   IMAGE
======================================== */

.mc-video-player .mc-video-container img {

    position: absolute;

    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    max-width: none;

    margin: 0;
    padding: 0;

    object-fit: cover;

    transition:
        transform .35s ease,
        filter .35s ease;

}

.mc-video-container:hover img {

    transform: scale(1.03);

    filter: brightness(.88);

}

/* ========================================
   BOUTON LECTURE
======================================== */

.mc-video-play {

    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    display: flex;

    align-items: center;
    justify-content: center;

    width: 76px;
    height: 76px;

    border: none;

    border-radius: 50%;

    background: rgba(255,255,255,.88);

    backdrop-filter: blur(4px);

    cursor: pointer;

    transition: all .25s ease;

}

.mc-video-container:hover .mc-video-play {

    transform: translate(-50%, -50%) scale(1.08);

    background: var(--mc-color-primary);

}

.mc-video-play-icon {

    width: 0;
    height: 0;

    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;

    border-left: 18px solid var(--mc-color-primary);

    transform: translateX(2px);

}

.mc-video-container:hover .mc-video-play-icon {

    border-left-color: #fff;

}

/* ========================================
   IFRAME
======================================== */

.mc-video-container iframe {

    position: absolute;

    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    border: 0;

}

/* ========================================
   CONTENEUR YOUTUBE
======================================== */

.mc-video-youtube {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 1;

}

.mc-video-youtube iframe {

    width: 100%;
    height: 100%;

    border: 0;

}

/* ========================================
   COUCHE D'INTERACTION
======================================== */

.mc-video-interaction-layer {

    position: absolute;

    inset: 0;

    z-index: 5;

    pointer-events: none;

}

/* ========================================
   BARRE DE CONTRÔLES MEDIA CORE
======================================== */

.mc-video-controls {

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 10;

    display: flex;

    align-items: center;

    gap: .75rem;

    padding: .75rem 1rem;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .75),
        rgba(0, 0, 0, 0)
    );

    color: #fff;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .2s ease,
        visibility .2s ease;

}

/* ========================================
   AFFICHAGE DES CONTRÔLES AU SURVOL
======================================== */

.mc-video-container:hover .mc-video-controls {

    opacity: 1;

    visibility: visible;

}

/* ========================================
   CONTRÔLE
======================================== */

.mc-video-control {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 2.5rem;
    height: 2.5rem;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(0, 0, 0, .55);

    color: #fff;

    cursor: pointer;

}

.mc-video-control:hover,
.mc-video-control:focus-visible {

    background: rgba(0, 0, 0, .8);

}

/* ========================================
   PROGRESSION
======================================== */

.mc-video-progress {

    flex: 1;

    min-width: 0;

    cursor: pointer;

}

/* ========================================
   TEMPS
======================================== */

.mc-video-time {

    position: absolute;

    left: 50%;
    bottom: 42px;

    transform: translateX(-50%);

    font-size: .85rem;

    line-height: 1;

    white-space: nowrap;

    color: #fff;

    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);

    pointer-events: none;

}

/* ========================================
   ZONE INFÉRIEURE NEUTRALISÉE
======================================== */

.mc-video-block-youtube {

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 70px;

    z-index: 20;

    pointer-events: auto;

    cursor: default;

}

/* ========================================
   BOUTON PLEIN ÉCRAN MEDIA CORE
======================================== */

.mc-video-fullscreen {

    position: absolute;

    right: 18px;
    bottom: 72px;

    z-index: 30;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(0, 0, 0, .55);

    color: #fff;

    font-size: 22px;

    cursor: pointer;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .2s ease,
        visibility .2s ease,
        background .2s ease;

    pointer-events: auto;

}

.mc-video-container:hover .mc-video-fullscreen {

    opacity: 1;

    visibility: visible;

}

.mc-video-fullscreen:hover,
.mc-video-fullscreen:focus-visible {

    background: rgba(0, 0, 0, .8);

}

/* ========================================
   PLEIN ÉCRAN MEDIA CORE
======================================== */

.mc-video-container:fullscreen {

    width: 100vw;
    height: 100vh;

    max-width: none;

    aspect-ratio: auto;

    border-radius: 0;

}

.mc-video-container:-webkit-full-screen {

    width: 100vw;
    height: 100vh;

    max-width: none;

    aspect-ratio: auto;

    border-radius: 0;

}

/* ========================================
   IFRAME EN PLEIN ÉCRAN
======================================== */

.mc-video-container:fullscreen iframe {

    width: 100%;
    height: 100%;

}

.mc-video-container:-webkit-full-screen iframe {

    width: 100%;
    height: 100%;

}

/* ========================================
   CHARGEMENT
======================================== */

.mc-video-loading {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background: #111;

    color: #fff;

    font-size: 1.2rem;

}

/* ========================================
   TITRE
======================================== */

.mc-video-title {

    margin-top: 18px;

    font-size: 1.5rem;

    font-weight: 700;

    line-height: 1.4;

}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {

    .mc-video-play {

        width: 60px;
        height: 60px;

    }
    
    .mc-video-player {

    width: 100%;
    max-width: 900px;
    margin: 40px auto;

    }

    .mc-video-play-icon {

        border-top-width: 9px;
        border-bottom-width: 9px;

        border-left-width: 15px;

    }

    .mc-video-title {

        font-size: 1.25rem;

    }

    .mc-video-fullscreen {

        right: 12px;
        bottom: 72px;

        width: 38px;
        height: 38px;

        font-size: 20px;

    }

}