/* ============================================
   Styles pour questions radio
   ============================================ */

.tcm-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tcm-radio-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.tcm-radio-label:hover {
    border-color: #4a90e2;
    background: #f8f9fa;
}

.tcm-radio-label input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tcm-radio-label input[type="radio"]:checked + label,
.tcm-radio-label:has(input[type="radio"]:checked) {
    border-color: #4a90e2;
    background: #e3f2fd;
}

.tcm-btn-validate {
    margin-top: 10px;
    width: 100%;
}

/* Feedback warning */
.tcm-feedback-warning {
    background: #fff3cd;
    color: #856404;
}

.tcm-feedback-error {
    background: #f8d7da;
    color: #721c24;
}
/* ============================================
   Gestion des retours à la ligne dans les questions
   ============================================ */

.tcm-question-content {
    white-space: pre-line; /* Préserve les retours à la ligne */
    line-height: 1.6;
}

.tcm-question-content br {
    display: block;
    margin: 6px 0;
    content: "";
}

/* Espacement entre les paragraphes dans le contenu */
.tcm-question-content p {
    margin: 8px 0;
}

/* Style pour le texte d'instruction (souvent après le \r\n\r\n) */
.tcm-question-content br + br {
    margin: 12px 0;
}
/* ============================================
   Historique et replay
   ============================================ */

.tcm-screen-history {
    text-align: center;
}

.tcm-previous-results {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.tcm-previous-results h3 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
}

/* Carte de résultat unique */
.tcm-result-card {
    background: #fff;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.tcm-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.tcm-result-row:last-child {
    border-bottom: none;
}

.tcm-result-label {
    font-weight: 600;
    color: #6c757d;
}

.tcm-result-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

/* Tableau d'historique */
.tcm-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}

.tcm-history-table th {
    background: #4a90e2;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.tcm-history-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.tcm-history-table tr:last-child td {
    border-bottom: none;
}

.tcm-row-current {
    background: #e3f2fd;
}

.tcm-badge-current {
    display: inline-block;
    background: #4a90e2;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
}

/* Statistiques personnelles */
.tcm-stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.tcm-stat-item {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.tcm-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 5px;
}

.tcm-stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Zone de confirmation de replay */
.tcm-replay-zone {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.tcm-replay-warning {
    font-size: 15px;
    color: #856404;
    margin-bottom: 15px;
}

.tcm-replay-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tcm-btn-replay-confirm {
    background: #dc3545;
    color: white;
}

.tcm-btn-replay-confirm:hover {
    background: #c82333;
}

.tcm-btn-cancel {
    background: #6c757d;
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
}

.tcm-btn-cancel:hover {
    background: #5a6268;
}

.tcm-btn-replay {
    background: #17a2b8;
    color: white;
    margin-top: 20px;
}

.tcm-btn-replay:hover {
    background: #138496;
}

/* Responsive */
@media (max-width: 600px) {
    .tcm-stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .tcm-replay-form {
        flex-direction: column;
    }
    .tcm-btn-replay-confirm,
    .tcm-btn-cancel {
        width: 100%;
    }
}
