/**
 * lesson-interactions.css — Commentaires, Q&A, Réactions dans le player de leçon
 * Préfixe: .svp-reactions-* .svp-interact-* .svp-comment-* .svp-qa-*
 */

/* ── Réactions ─────────────────────────────────────────────────────────────── */

.svp-reactions-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin: 16px 0 0;
}

.svp-reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: #d4d4d8;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.18s ease-out, background 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out, opacity 0.18s ease-out;
    user-select: none;
}

.svp-reaction-btn:hover {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.35);
    transform: scale(1.05);
}

.svp-reaction-btn.svp-reaction-active {
    background: rgba(139,92,246,0.22);
    border-color: rgba(139,92,246,0.55);
    color: #c4b5fd;
    box-shadow: 0 0 10px rgba(139,92,246,0.2);
}

.svp-reaction-emoji {
    font-size: 18px;
    line-height: 1;
}

.svp-reaction-count {
    font-size: 13px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* ── Onglets Comments / Q&A ─────────────────────────────────────────────────── */

.svp-interact-tabs {
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 16px;
}

.svp-tab-header {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.svp-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #71717a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease-out, background 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out, opacity 0.18s ease-out;
    margin-bottom: -1px;
}

.svp-tab-btn:hover {
    color: #e4e4e7;
}

.svp-tab-btn.svp-tab-active {
    color: #a78bfa;
    border-bottom-color: #7c3aed;
}

.svp-tab-badge {
    background: rgba(139,92,246,0.2);
    color: #c4b5fd;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

.svp-tab-panel {
    display: none;
}

.svp-tab-panel.svp-tab-panel-active {
    display: block;
}

/* ── Formulaire commentaire ─────────────────────────────────────────────────── */

.svp-comment-form,
.svp-qa-form {
    margin-bottom: 20px;
}

.svp-comment-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: #e4e4e7;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.18s;
    box-sizing: border-box;
}

.svp-comment-input:focus {
    outline: none;
    border-color: rgba(139,92,246,0.5);
    background: rgba(255,255,255,0.08);
}

.svp-comment-input::placeholder {
    color: #52525b;
}

.svp-comment-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.svp-comment-submit {
    padding: 8px 20px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.18s;
}

.svp-comment-submit:hover { opacity: 0.85; }
.svp-comment-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Commentaire ────────────────────────────────────────────────────────────── */

.svp-comments-list,
.svp-qa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.svp-loading-comments {
    color: #52525b;
    font-size: 13px;
    text-align: center;
    padding: 24px;
}

.svp-empty-interactions {
    color: #52525b;
    font-size: 14px;
    text-align: center;
    padding: 32px 16px;
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 10px;
}

.svp-comment {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color 0.18s;
}

.svp-comment:hover {
    border-color: rgba(255,255,255,0.12);
}

.svp-comment-top {
    border-left: 3px solid rgba(139,92,246,0.4);
}

.svp-reply {
    margin-left: 24px;
    border-left: 2px solid rgba(99,102,241,0.25);
    background: rgba(255,255,255,0.025);
    margin-top: 6px;
}

.svp-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.svp-comment-author {
    font-size: 13px;
    font-weight: 700;
    color: #e4e4e7;
}

.svp-comment-time {
    font-size: 11px;
    color: #52525b;
    margin-left: auto;
}

.svp-comment-body {
    font-size: 14px;
    color: #a1a1aa;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.svp-comment-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.svp-reply-btn,
.svp-comment-del {
    background: none;
    border: none;
    color: #52525b;
    font-size: 12px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 5px;
    transition: transform 0.15s ease-out, background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, opacity 0.15s ease-out;
}

.svp-reply-btn:hover { color: #a78bfa; background: rgba(139,92,246,0.1); }
.svp-comment-del:hover { color: #f87171; background: rgba(239,68,68,0.1); }

.svp-replies {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svp-reply-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */

.svp-instructor-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
}

.svp-pin-badge {
    font-size: 12px;
}

/* ── Q&A ─────────────────────────────────────────────────────────────────────── */

.svp-qa-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
}

.svp-qa-item.svp-qa-pinned {
    border-left: 3px solid #f59e0b;
    background: rgba(245,158,11,0.04);
}

.svp-qa-item.svp-qa-answered {
    border-left: 3px solid #10b981;
    background: rgba(16,185,129,0.04);
}

.svp-qa-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.svp-qa-author {
    font-size: 13px;
    font-weight: 700;
    color: #e4e4e7;
}

.svp-answered-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
}

.svp-qa-question {
    font-size: 15px;
    font-weight: 600;
    color: #e4e4e7;
    line-height: 1.5;
    margin-bottom: 10px;
}

.svp-qa-answer {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 8px;
}

.svp-qa-answer-label {
    font-size: 12px;
    font-weight: 700;
    color: #34d399;
    display: block;
    margin-bottom: 6px;
}

.svp-qa-answer p {
    font-size: 14px;
    color: #a1a1aa;
    line-height: 1.6;
    white-space: pre-wrap;
}

.svp-qa-item-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.svp-qa-upvote {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    color: #71717a;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s ease-out, background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, opacity 0.15s ease-out;
    margin-left: auto;
}

.svp-qa-upvote:hover {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    border-color: rgba(139,92,246,0.3);
}

.svp-qa-upvote-count {
    font-weight: 700;
}

.svp-qa-answer-btn {
    padding: 6px 14px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease-out, background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, opacity 0.15s ease-out;
}

.svp-qa-answer-btn:hover {
    background: rgba(245,158,11,0.2);
}

/* ── Bouton Sprint dans la barre de contrôles ────────────────────────────── */
.svp-sprint-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.1));
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 20px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease-out, background .15s ease-out, border-color .15s ease-out, color .15s ease-out, opacity .15s ease-out;
    white-space: nowrap;
    letter-spacing: .02em;
}
.svp-sprint-btn:hover {
    background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(251,191,36,0.18));
    border-color: #f59e0b;
    transform: translateY(-1px);
}
.svp-sprint-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Sprint Modal ────────────────────────────────────────────────────────── */
.svp-sprint-modal {
    position: fixed; inset: 0; z-index: 12000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.svp-sprint-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.svp-sprint-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.75);
}

.svp-sprint-panel {
    position: relative; z-index: 1;
    background: #13121f;
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 20px;
    width: 100%; max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px rgba(245,158,11,0.06);
    animation: svp-sprint-in .28s cubic-bezier(.22,.61,.36,1);
}
@keyframes svp-sprint-in {
    from { opacity: 0; transform: scale(.94) translateY(12px) }
    to   { opacity: 1; transform: scale(1) translateY(0) }
}

.svp-sprint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.svp-sprint-icon { font-size: 32px; flex-shrink: 0; }
.svp-sprint-title {
    font-size: 18px;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1.2;
}
.svp-sprint-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}
.svp-sprint-close {
    margin-left: auto;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s ease-out, background .15s ease-out, border-color .15s ease-out, color .15s ease-out, opacity .15s ease-out;
}
.svp-sprint-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.svp-sprint-summary {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    padding: 10px 14px;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 10px;
    margin-bottom: 16px;
}

.svp-sprint-lessons { margin-bottom: 20px; }
.svp-sprint-lessons-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}

.svp-sprint-lesson {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: border-color .15s;
}
.svp-sprint-lesson:hover { border-color: rgba(245,158,11,0.25); }

.svp-sprint-lesson-num {
    width: 28px; height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #000;
    font-size: 12px;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
}
.svp-sprint-lesson-info { flex: 1; min-width: 0; }
.svp-sprint-lesson-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 3px;
}
.svp-sprint-lesson-module {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
}
.svp-sprint-lesson-reason {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    font-style: italic;
    line-height: 1.4;
}
.svp-sprint-lesson-duration {
    font-size: 11px;
    color: #fbbf24;
    margin-top: 4px;
    font-weight: 600;
}
.svp-sprint-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    padding: 16px;
}

.svp-sprint-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
    gap: 12px;
}
.svp-sprint-total {
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
}
.svp-sprint-start {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease-out, background .15s ease-out, border-color .15s ease-out, color .15s ease-out, opacity .15s ease-out;
    white-space: nowrap;
}
.svp-sprint-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}
