
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
}

body {
    background-color: white;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden; /* Empêche le défilement horizontal */
    touch-action: manipulation;
}

.cta {
    padding: 10px;
    border: none;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    background-color: black;
    color: white;
    cursor: pointer;
    touch-action: manipulation;
}

/* LOGIN */
.window {
    width: 100%;
    max-width: 500px;  
    padding: 50px 20px;  
    height: 100vh;  
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: gray;
}

.window-title {
    padding: 10px;
    border-radius: 10px;
    border: none;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    background-color: black;
    color: white;
    width: 100%; /* Prend toute la largeur du parent */
}

.window-content {
    width: 100%; /* Prend toute la largeur du parent */
    padding: 20px;
    margin: 0; /* Supprime la marge pour éviter le débordement */
    text-align: center;
    display: flex;
    flex-direction: column; /* Change en colonne pour le contenu */
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: solid 2px black;
    background-color: white;
}

.button-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne en mobile */
    justify-content: center;
}

/* Conteneur des 6 cases */
.pin-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 10px 0;
    gap: 8px; /* Espace entre les cases */
}

/* Style de chaque case */
.pin-digit {
    width: calc(16.66% - 6px); /* 100% / 6 cases - gap */
    height: 30px;
    background-color: rgb(209, 209, 209);
    font-size: 20px;
    border: none;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

/* Style pour masquer les bordures et améliorer l'apparence */
.pin-digit:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5); /* Bordure bleue lors de la sélection */
}
/* Masque les chiffres avec des points */
.pin-digit {
    -webkit-text-security: disc; /* Pour les navigateurs WebKit (Chrome, Safari) */
    text-security: disc; /* Standard (peu supporté) */
    /* Solution alternative pour tous les navigateurs */
    position: relative;
}

.pin-digit::after {
    content: "•";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: black; /* Couleur du point */
    font-size: 20px;
    pointer-events: none; /* Permet de cliquer à travers le point */
}
.row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Permet aux éléments de passer à la ligne */
}

.pinpad-btn {
    width: 75px;
    height: 75px;
    font-size: 30px;
    font-weight: bold;
    color: black;
    border: none;
    border-radius: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    cursor: pointer;
    margin: 5px; /* Ajoute une marge pour éviter le collage */
}

.pinpad-btn:hover {
    background-color: lightgray;
}

#screen-used-error, #network-error {
    display: none;
    z-index: 10;
    position: absolute;
}

.debug-buttons {
    position: absolute;
    top: 0;
    display: flex;
    opacity: 0.05;
    scale: 0.5;
}

.debug-buttons > .cta {
    width: 300px;
}

/* MAIN */

.main-screen {
    width: 100%;
    max-width: 500px;  
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 500px;
    position: absolute;
    top: 0;

}

.main-container {
        padding: 20px;

}

.header {
    text-align: center;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
    background-color: white;
}

#current-screen-info {
    font-size: 20px;
    font-weight: bold;
}

.current-playing {
    background-color: rgb(209, 209, 209);
    color: black;
    width: fit-content;
    border-radius: 10px;
    padding: 5px;
    font-size: 10px;
}

.content-thumbnail {
    width: 120px;
    height: 108px;
}

.home-tab {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.top-app-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-weight: bold;
}

.playlist-tab {
    display: none;
}

.switch-tab {
    display: flex;
    justify-content: center;
    background-color: rgb(180, 180, 180);
    border-radius: 10px;
}

.switch-button {
    width: 100%;
    color: #000;
    font-size: 18px;
    height: 40px;
    background-color: rgb(180, 180, 180);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

.switch-button-active {
    background-color: rgb(86, 86, 86);
    color: white;
    font-weight: bold;

}

.sequence-item {
    cursor: pointer;
}

.playlist-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 12px;
    cursor: pointer;
    border: 2px solid transparent;
    background: white;
}

.playlist-item:hover {
    background: #e8e8e8;
}

.playlist-item.active {
    background: #ddd;
}

.playlist-item img {
    width: 100px;
    border-radius: 4px;
    object-fit: cover;
}

.playlist-item span {
    font-weight: bold;
    font-size: 15px;
}

.last-modified {
    color: gray;
    font-size: 12px;
}

.player {
    font-family: "Roboto", Arial, sans-serif;
    color: #0f0f0f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 50px;
}

.thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border: solid 2px black;
}

.content-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Titre en haut, dégradé sombre pour la lisibilité */
.overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: fit-content;
    border-radius: 5px;
    padding: 5px;
    background: rgb(206, 206, 206);
    color: #000;
    font-size: 15px;
    font-weight: bold;
    text-align: left;
}

.timeline {
    position: relative;
    width: 100%;

}

.chapters {
    display: flex;
    height: 30px;
    overflow: hidden;
    background: #e0e0e0;
}

/* Chaque chapitre = un segment cliquable de la barre */
.chapters .sequence-item {
    font-weight: bold;
    font-size: 12px;
    flex: 1;
    height: 100%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease;
    border: solid 2px black;

    color: black;
}

.chapters .sequence-item button {
    color: #000;
}


.chapters .sequence-item.active {
    background: gray; /* rouge YouTube pour le chapitre en cours */
    color: white;
    font-weight: bold;
}

.timecodes {
    position: absolute;
    bottom: 40px;
    left: 10px;
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    font-size: 12px;
    color: #606060;
}

.timecodes .separator {
    opacity: 0.6;
}

/* --- Commandes centrées --- */
.commands {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

.commands button {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.commands button:hover {
    background: #f2f2f2;
}

.timeline-cursor {
    position: absolute;
    top: -7px;
    transform: translateX(-6.5px)
}

.commands img {
    width: 70px;
}

.voile-validation {
    z-index: 100;
    position: sticky;
    overflow: hidden;
    top: 0;
    background-color: #00000073;
    backdrop-filter: blur(16px);
    width: 100%;
    margin: 0;
    height: 100vh;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    gap: 20px;
    font-weight: bold;
    text-align: center;
    padding: 30px;
}

.preview-change-playlist {
    width: 300px;
}