* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #181920, #0f1015);
    color: #ffffff;
    overflow-x: hidden;
}

#ecran-configuration {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

#ecran-configuration h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

main {
    display: flex;
    justify-content: center;
    width: 100%;
}

.colonne {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    max-width: 720px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#zone-depot {
    border: 2px dashed #2575fc;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(37, 117, 252, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#zone-depot:hover, #zone-depot.glissement {
    border-color: #6a11cb;
    background: rgba(37, 117, 252, 0.1);
    transform: scale(1.01);
}

.icone-televersement svg {
    display: block;
}

.titre-zone-depot {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.sous-titre-zone-depot {
    font-size: 14px;
    color: #666666;
}

#bouton-saisie-directe {
    background: transparent;
    border: 1px dashed #2575fc;
    color: #2575fc;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}

#bouton-saisie-directe:hover {
    background: rgba(37, 117, 252, 0.1);
    border-style: solid;
}

#etape-editeur {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.en-tete-editeur {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #e1e8f0;
}

.titre-editeur {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

#bouton-changer-fichier {
    background: transparent;
    border: none;
    color: #2575fc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

#bouton-changer-fichier:hover {
    color: #6a11cb;
    text-decoration: underline;
}

.conteneur-editeur-texte {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#zone-texte-script {
    width: 100%;
    height: 160px;
    padding: 14px 16px;
    border: 1.5px solid #dcdfe6;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    color: #1a1a1a;
}

#zone-texte-script:focus {
    border-color: #2575fc;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.15);
}

.barre-statistiques {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555555;
    padding: 0 4px;
}

.barre-statistiques strong {
    color: #2575fc;
}

.groupe-reglages {
    background: #f7f9fc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e1e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.etiquette-vitesse {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.etiquette-vitesse strong {
    color: #2575fc;
    font-size: 16px;
}

#curseur-vitesse {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #dcdfe6;
    outline: none;
}

#curseur-vitesse::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2575fc;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}

#curseur-vitesse::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.repere-curseur {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888888;
}

#bouton-demarrer-prompteur {
    background: linear-gradient(135deg, #111111, #2a2a2a);
    color: #ffffff;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#bouton-demarrer-prompteur:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #000000, #1f1f1f);
}

.masque {
    display: none !important;
}

#ecran-prompteur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #000000;
    z-index: 10;
}

#apercu-camera {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    z-index: 1;
}

#couche-prompteur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.75) 100%);
}

#texte-prompteur {
    color: #ffffff;
    font-size: 26px;
    line-height: 1.5;
    text-align: left;
    font-weight: bold;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 0;
    width: 35%;
    left: 15px;
    will-change: transform;
    white-space: pre-wrap;
    word-break: break-word;
}

.ligne-regard {
    position: absolute;
    top: 35%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 0, 0, 0.5);
    z-index: 3;
    pointer-events: none;
}

#chronometre-enregistrement {
    position: absolute;
    top: 25px;
    right: 25px;
    background-color: rgba(255, 59, 48, 0.9);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 999;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    letter-spacing: 1px;
}

#superposition-decompte {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}

#nombre-decompte {
    font-size: 130px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 50px rgba(37, 117, 252, 0.9);
    line-height: 1;
}

#nombre-decompte.animation {
    animation: animationDecompte 0.95s ease-out forwards;
}

#barre-controles {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    max-width: 520px;
}

.bouton-controle {
    color: #ffffff;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    flex: 1;
    min-width: 110px;
    text-align: center;
}

.bouton-controle.secondaire {
    background-color: #4a4e5d;
    border: 1.5px solid #5a5f70;
}

.bouton-controle.secondaire:hover {
    background-color: #5c6174;
}

.bouton-controle.principal {
    background-color: #2575fc;
    border: 1.5px solid #3a82ff;
}

.bouton-controle.principal:hover {
    background-color: #478cff;
}

.bouton-controle.danger {
    background-color: #ff3b30;
    border: 1.5px solid #ff4d43;
}

.bouton-controle.danger:hover {
    background-color: #ff5d54;
}

@keyframes animationDecompte {
    0% {
        transform: scale(1.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.85;
    }
    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    #ecran-configuration h1 {
        font-size: 1.8rem;
    }
    #texte-prompteur {
        width: 38%;
        left: 12px;
        font-size: 22px;
    }
    #barre-controles {
        bottom: 20px;
    }
}
