/* Chronomètre (onglets Chronomètre et Fiche de score) : modes, chiffres, panneaux, boutons, plein écran */

.timer-mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mode-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--blue);
    border-radius: 999px;
    background: var(--card);
    color: var(--blue);
    font-size: 0.85rem;
}

/* Chrono de ce mode en cours alors qu'un autre mode est affiché : point clignotant */
.mode-btn.running::after {
    content: '';
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    margin-left: 0.45em;
    border-radius: 50%;
    background: var(--pour);
    vertical-align: 0.1em;
    animation: running-blink 1.2s ease-in-out infinite;
}

@keyframes running-blink { 50% { opacity: 0.25; } }

.mode-btn.active {
    background: var(--blue);
    color: white;
}

.timer-display-card {
    position: relative;
    background: var(--timer-bg);
    outline: 1px solid var(--timer-border); /* liseré en mode sombre, sans changer la taille */
    outline-offset: -1px;
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Son et plein écran, dans le coin haut droit du chrono */
.timer-tools {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: flex;
    gap: 0.3rem;
}

.timer-tool {
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--timer-label);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timer-tool:hover { background: rgba(255, 255, 255, 0.16); }
.timer-tool.on {
    background: rgba(95, 208, 208, 0.18);
    border-color: var(--timer-digits);
}

.step-title {
    color: var(--timer-label);
    margin-bottom: 0.5rem;
    min-height: 1.5em;
    padding-inline: 5rem; /* place des boutons du coin, titre toujours centré */
}

.timer-digits {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
    color: var(--timer-digits);
    margin: 0.5rem 0 1rem;
    letter-spacing: 2px;
}

.step-title .pour { color: var(--pour-light); }
.step-title .contre { color: var(--contre-light); }

.timer-digits.warning { color: var(--timer-warning); }
.timer-digits.time-up { color: var(--timer-up); }
.timer-digits.timeout { color: var(--timer-warning); }

/* Mode Compétition : panneau à la place des chiffres, rouge pour 10 s, 5 s et 0 s */
.competition-panel {
    margin: 0.5rem auto 1rem;
    padding: 0.6rem 1.5rem;
    max-width: 320px;
    border-radius: var(--radius);
    background: #f8fafc;
    color: var(--timer-bg);
    font-size: 2.2rem;
    font-weight: 800;
}

.competition-panel.alert {
    background: var(--timer-up);
    color: white;
}

/* Indication POI sous les chiffres : discrète, juste lisible pour qui en a besoin */
.poi-status {
    min-height: 1.2em;
    margin: -0.6rem 0 0.8rem;
    font-size: 0.8rem;
    color: var(--timer-label);
}

.poi-status.open { color: var(--pour-light); }
.step-title.timeout-title { color: var(--timer-warning); font-weight: 700; }

.timer-controls {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Temps mort : sur sa propre ligne, jaune adouci (fond légèrement teinté) pour rester discret */
.btn.timeout-btn {
    flex-basis: 100%;
    background-color: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #fde68a;
}

.btn.timeout-btn.active {
    background-color: rgba(250, 204, 21, 0.22);
    border-color: rgba(250, 204, 21, 0.6);
}

/* Annuler « Parole terminée » : sur sa propre ligne, quelques secondes après le clic */
.btn.undo-btn {
    flex-basis: 100%;
    background: transparent;
    border: 1px dashed var(--timer-digits);
    color: var(--timer-digits);
}

.btn.undo-btn[hidden] { display: none; }

/* Rappel des raccourcis clavier : seulement sur ordinateur (souris ou pavé tactile) */
.shortcut-hint {
    display: none;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    color: var(--timer-label);
}

@media (hover: hover) and (pointer: fine) {
    .shortcut-hint { display: block; }
}

/* Remise à zéro complète : sur sa propre ligne, plus discrète que les commandes de parole */
.btn.reset-all {
    flex-basis: 100%;
    margin-top: 0.3rem;
    background: transparent;
    border: 1px solid var(--text-soft);
    color: var(--timer-label);
    font-size: 0.8rem;
}

.btn.reset-all.danger {
    background-color: var(--contre-fill);
    border-color: var(--contre-fill);
    color: white;
}

.speaker-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.speaker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.speaker-item.active {
    border-left: 4px solid var(--blue);
    background: var(--highlight);
    font-weight: 700;
}

.speaker-name { font-size: 0.95rem; color: var(--text-strong); }
.speaker-duration { font-size: 0.85rem; color: var(--blue); font-weight: 700; }
.speaker-recorded { font-size: 0.85rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm); }
.speaker-recorded.recorded { background-color: var(--pour-bg); color: var(--pour); }
.speaker-recorded.overtime { background-color: var(--contre-bg); color: var(--contre); }

.custom-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.custom-inputs input {
    width: 65px;
    padding: 0.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
}

.separator-colon { font-weight: 700; font-size: 1.2rem; color: var(--text-soft); }

/* Téléphone */
@media (max-width: 768px) {
    /* Chrono : boutons en grille 2 x 2 */
    .timer-digits { font-size: 3rem; }
    /* Boutons son / plein écran au-dessus du titre plutôt qu'à côté (manque de largeur) */
    .step-title { padding-inline: 0; margin-top: 1.8rem; }
    .timer-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .btn.reset-all,
    .btn.undo-btn,
    .btn.timeout-btn { grid-column: 1 / -1; }
}
