* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: "Inter", sans-serif;
}

body {
    position: relative;
}

/* Vidéo plein écran avec recadrage cinéma */

.player-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #000;
    z-index: 1;
}

#player {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 100vw;
    height: 56.25vw;

    min-width: 177.78vh;
    min-height: 100vh;

    transform: translate(-50%, -50%);
    pointer-events: none !important;
}

#player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

#clip-local-player {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    object-fit: cover;
    pointer-events: none;
}

body.clip-local-video-active #clip-local-player {
    display: block;
}

body.clip-local-video-active #player {
    display: none;
}

/*
   YouTube affiche brièvement ses propres titres et commandes au démarrage
   sur certains téléphones. Le lecteur reste invisible jusqu'à ce que la
   lecture soit stable, puis apparaît avec un fondu propre.
*/

#player,
#youtube-player {
    opacity: 1;
    transition: opacity 0.42s ease;
}

body.youtube-surface-loading #player,
body.youtube-surface-loading #youtube-player {
    opacity: 0;
}

/* Assombrissement cinéma */

.player-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.42) 0%,
            rgba(0, 0, 0, 0.05) 28%,
            rgba(0, 0, 0, 0.02) 60%,
            rgba(0, 0, 0, 0.58) 100%
        );
}

/* Couche de clic invisible créée par player.js */

.video-click-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    color: transparent;
}

.video-click-layer:focus-visible {
    outline: 1px solid rgba(255, 59, 47, 0.72);
    outline-offset: -8px;
}

/* Fond de secours */

.background-blur {
    position: fixed;
    inset: 0;
    z-index: 0;

    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 47, 47, 0.15),
            #000 65%
        );
}

/* En-tête */

.site-header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    padding: 34px 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 10;
    pointer-events: none;
}

.logo,
.navigation {
    pointer-events: auto;
}

.logo {
    flex-shrink: 0;

    color: #ff3b2f;
    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.38em;
}

.navigation {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.4vw, 44px);
}

.navigation a {
    position: relative;

    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;

    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

.navigation a:hover,
.navigation a.active {
    color: #fff;
}

.navigation a.active::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    bottom: -8px;

    height: 1px;
    background: #ff3b2f;
}

/* Informations du projet */

.clip-overlay {
    position: fixed;
    left: 52px;
    bottom: 48px;

    z-index: 10;
    pointer-events: none;
}

.clip-number {
    margin-bottom: 10px;

    color: rgba(255, 255, 255, 0.58);

    font-size: 12px;
    letter-spacing: 0.16em;
}

.separator {
    color: #ff3b2f;
}

#clip-title {
    max-width: 70vw;

    color: #fff;

    font-size: clamp(38px, 5vw, 76px);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

/* Contrôles */

.controls {
    position: fixed;
    right: 42px;
    bottom: 38px;

    display: flex;
    gap: 12px;

    z-index: 12;
}

.controls button {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);

    color: #fff;
    font-size: 16px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.controls button:hover {
    background: #ff3b2f;
    border-color: #ff3b2f;
    transform: scale(1.05);
}

/* Transition entre les vidéos */

#transition {
    position: fixed;
    inset: 0;

    z-index: 20;
    pointer-events: none;

    background: #000;
    opacity: 0;

    transition: opacity 0.35s ease;
}

#transition.show {
    opacity: 1;
}

/* Tablette */

@media (max-width: 900px) {
    .site-header {
        padding: 28px 28px;
    }

    .navigation {
        gap: 18px;
    }

    .navigation a {
        font-size: 9px;
        letter-spacing: 0.13em;
    }

    .clip-overlay {
        left: 28px;
        bottom: 34px;
    }

    .controls {
        right: 26px;
        bottom: 26px;
    }
}

/* Mobile */

@media (max-width: 680px) {
    .site-header {
        align-items: flex-start;
        padding: 22px 20px;
    }

    .navigation {
        display: none;
    }

    .clip-overlay {
        left: 20px;
        bottom: 28px;
    }

    #clip-title {
        max-width: 75vw;
        font-size: 40px;
    }

    .controls {
        right: 18px;
        bottom: 20px;
    }

    .controls button {
        width: 42px;
        height: 42px;
    }
}

/* =========================================================
   FLÈCHES DE NAVIGATION VIDÉO
========================================================= */

.video-arrow {
    position: fixed;
    top: 50%;

    width: 58px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    background: transparent;

    color: rgba(255, 255, 255, 0.55);

    cursor: pointer;
    z-index: 15;

    transform: translateY(-50%);

    transition:
        color 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease;
}

.video-arrow-left {
    left: 18px;
}

.video-arrow-right {
    right: 18px;
}

.video-arrow svg {
    width: 34px;
    height: 34px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.video-arrow:hover {
    color: #ffffff;
}

.video-arrow-left:hover {
    transform:
        translateY(-50%)
        translateX(-4px);
}

.video-arrow-right:hover {
    transform:
        translateY(-50%)
        translateX(4px);
}

.video-arrow:active {
    color: #ff3b2f;
}

/* Flèches sur tablette */

@media (max-width: 900px) {
    .video-arrow {
        width: 48px;
        height: 70px;
    }

    .video-arrow-left {
        left: 4px;
    }

    .video-arrow-right {
        right: 4px;
    }

    .video-arrow svg {
        width: 28px;
        height: 28px;
    }
}

/* Flèches sur téléphone */

@media (max-width: 680px) {
    .video-arrow {
        width: 42px;
        height: 64px;
    }

    .video-arrow-left {
        left: 0;
    }

    .video-arrow-right {
        right: 0;
    }

    .video-arrow svg {
        width: 24px;
        height: 24px;
    }
}
/* =========================================================
   LECTEUR MP4 DE LA PAGE PERSO
========================================================= */

#youtube-player,
#local-player {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 100vw;
    height: 56.25vw;

    min-width: 177.78vh;
    min-height: 100vh;

    transform: translate(-50%, -50%);
    pointer-events: none !important;
}

#youtube-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

#local-player {
    display: none;
    border: 0;
    object-fit: cover;
    background: #000;
}
