/* ====================================================
   TSA FORM - STYLES MODERNES
   ==================================================== */

.tsa-container {
    max-width: 900px;
    margin: 15px auto 40px;
    padding: 0 15px;
}

/* EN-TETE */
.tsa-header {
    text-align: center;
    padding: 22px 20px 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 14px 14px 0 0;
    color: white;
}

.tsa-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 3px;
    letter-spacing: 0.5px;
}

.tsa-subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
}

/* INSTRUCTIONS */
.tsa-instructions {
    background: #fff;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    padding: 18px 24px;
    border-bottom: 1px solid #eef1f5;
}

.tsa-instructions-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #667eea;
    margin-bottom: 8px;
}

.tsa-instructions p {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 6px;
}

.tsa-instructions-important {
    font-weight: 600;
    color: #764ba2;
}

/* GENRE */
.tsa-gender-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 14px 24px;
    background: #fff;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #eef1f5;
}

.tsa-gender-pill {
    cursor: pointer;
}

.tsa-gender-pill input {
    display: none;
}

.tsa-gender-pill span {
    display: inline-block;
    padding: 8px 28px;
    border: 1.5px solid #d0d7de;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    background: #fafbfc;
    transition: all 0.2s;
}

.tsa-gender-pill:hover span {
    border-color: #667eea;
    background: #f0f4ff;
}

.tsa-gender-pill input:checked + span {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* BARRE DE PROGRESSION */
.tsa-progress-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 28px;
    background: #e8ecf1;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #d0d7de;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.tsa-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.tsa-progress-text {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-shadow: 0 0 4px rgba(255,255,255,0.8);
}

/* QUESTIONS */
.tsa-question {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    background: #fff;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #eef1f5;
    transition: background 0.2s;
}

.tsa-question-alt {
    background: #fafafd;
}

.tsa-question:hover {
    background: #f5f3ff;
}

.tsa-answered {
    border-left: 3px solid #667eea;
}

.tsa-question-num {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.tsa-question-content {
    flex: 1;
    min-width: 0;
}

.tsa-question-text {
    font-size: 15.5px;
    color: #2c3e50;
    line-height: 1.55;
    margin-bottom: 10px;
}

/* OPTIONS DE REPONSE */
.tsa-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tsa-option {
    cursor: pointer;
    flex: 1;
    min-width: 140px;
}

.tsa-option input {
    display: none;
}

.tsa-option-label {
    display: block;
    padding: 8px 10px;
    border: 1.5px solid #e0e6ed;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    background: #fafbfc;
    text-align: center;
    transition: all 0.15s;
}

.tsa-option:hover .tsa-option-label {
    border-color: #b0bcf7;
    background: #f5f3ff;
}

.tsa-option input:checked + .tsa-option-label {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    font-weight: 600;
}

/* BOUTONS */
.tsa-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px 24px;
    background: #fff;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #e0e6ed;
    flex-wrap: wrap;
}

.tsa-btn {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tsa-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.tsa-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tsa-btn-secondary {
    background: #f0f4ff;
    color: #667eea;
    border: 1.5px solid #d0dcf7;
}

.tsa-btn-secondary:hover {
    background: #e0e8ff;
}

.tsa-btn-outline {
    background: transparent;
    color: #94a3b8;
    border: 1.5px solid #d0d7de;
}

.tsa-btn-outline:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* FOOTER */
.tsa-footer {
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 14px 14px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* RESPONSIVE */
@media screen and (max-width: 700px) {
    .tsa-options {
        flex-direction: column;
    }

    .tsa-option {
        min-width: 0;
    }

    .tsa-question {
        padding: 12px 14px;
        gap: 10px;
    }

    .tsa-question-num {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .tsa-title {
        font-size: 18px;
    }
}

/* IMPRESSION */
@media print {
    .menu, .noprint, .tsa-progress-bar, .tsa-actions { display: none !important; }
    .tsa-container { max-width: 100%; margin: 0; }
    .tsa-header { background: #667eea; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tsa-question { break-inside: avoid; }
    .tsa-option input:checked + .tsa-option-label {
        background: #667eea;
        color: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
