/* ========================================================
   Expression Orale Topics — Frontend Styles
   ======================================================== */

.eot-wrapper {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
}

.eot-empty,
.eot-empty-small {
    color: #6b7280;
    font-style: italic;
    padding: 12px 0;
}

/* ---- Accordion items ---- */
.eot-accordion-item {
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.eot-accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.eot-chevron {
    display: inline-block;
    transition: transform 0.25s ease;
    font-size: 0.8em;
    color: #6b7280;
}

.eot-accordion-header[aria-expanded="true"] .eot-chevron {
    transform: rotate(90deg);
}

.eot-title {
    flex: 1;
}

.eot-period {
    font-size: 0.85em;
    font-weight: normal;
    color: #6b7280;
    margin-right: 8px;
}

.eot-count {
    font-size: 0.8em;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.08);
    color: #4b5563;
}

.eot-accordion-body {
    display: none;
    padding: 16px 18px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.eot-accordion-item.is-open > .eot-accordion-body {
    display: block;
}

/* ---- Level-based styling ---- */
.eot-level-1 {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
}
.eot-level-1 .eot-chevron,
.eot-level-1 .eot-period { color: rgba(255,255,255,0.85); }
.eot-level-1 .eot-count {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
.eot-month { border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }

.eot-level-2 {
    background: #eef2ff;
    color: #3730a3;
}
.eot-tache { margin: 10px 0; border: 1px solid #e0e7ff; }

.eot-level-3 {
    background: #f3f4f6;
    color: #374151;
}
.eot-partie { margin: 8px 0; border: 1px solid #e5e7eb; }

.eot-level-4 {
    background: #fafafa;
    color: #1f2937;
}
.eot-sujet { margin: 6px 0; border: 1px solid #e5e7eb; }

.eot-accordion-header:hover { filter: brightness(0.96); }

/* ---- Descriptions ---- */
.eot-description,
.eot-sujet-description {
    padding: 8px 0 14px;
    color: #4b5563;
    line-height: 1.6;
    border-bottom: 1px dashed #e5e7eb;
    margin-bottom: 14px;
}

/* ---- Answers section ---- */
.eot-answers-section { margin-top: 16px; }
.eot-answers-heading {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    margin: 0 0 12px;
}

.eot-answers-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eot-answer {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
}

.eot-answer-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 40px;
}

.eot-upvote-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #6b7280;
    transition: all 0.15s ease;
}
.eot-upvote-btn:hover { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.eot-upvote-btn.voted { background: #4f46e5; color: #fff; border-color: #4f46e5; cursor: default; }

.eot-upvote-count {
    font-weight: 700;
    font-size: 0.9rem;
    color: #374151;
}

.eot-answer-content { flex: 1; }
.eot-answer-meta {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 6px;
}
.eot-answer-body { color: #1f2937; line-height: 1.55; }
.eot-answer-body p { margin: 0 0 8px; }

/* ---- Comments on answers ---- */
.eot-answer-comments { margin-top: 12px; }
.eot-toggle-comments {
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    font-size: 0.88rem;
    padding: 4px 0;
}
.eot-toggle-comments:hover { text-decoration: underline; }

.eot-comments-wrap {
    margin-top: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.eot-comment {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}
.eot-comment:last-of-type { border-bottom: none; }
.eot-comment-header {
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.eot-comment-date {
    color: #9ca3af;
    margin-left: 6px;
    font-weight: normal;
}
.eot-comment-body { font-size: 0.93rem; color: #374151; }
.eot-comment-body p { margin: 0; }

.eot-comment-form { margin-top: 12px; }
.eot-comment-form input[type="text"],
.eot-comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: inherit;
}

/* ---- Submit Answer Form ---- */
.eot-submit-section {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.eot-submit-section h4 { margin-top: 0; margin-bottom: 12px; color: #111827; }

.eot-answer-form p { margin-bottom: 12px; }
.eot-answer-form label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 4px;
    color: #374151;
    font-weight: 500;
}
.eot-answer-form input[type="text"],
.eot-answer-form input[type="email"],
.eot-answer-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}
.eot-answer-form textarea { resize: vertical; }
.eot-answer-form input:focus,
.eot-answer-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ---- Buttons ---- */
.eot-btn {
    display: inline-block;
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s ease;
}
.eot-btn:hover { background: #4338ca; }
.eot-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.eot-btn-small { padding: 6px 12px; font-size: 0.85rem; }

/* ---- Messages ---- */
.eot-form-message,
.eot-comment-message {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9rem;
}
.eot-form-message.success,
.eot-comment-message.success { color: #059669; }
.eot-form-message.error,
.eot-comment-message.error { color: #dc2626; }

.eot-login-notice {
    padding: 14px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
    margin-top: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .eot-accordion-header {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    .eot-accordion-body { padding: 12px 14px 16px; }
    .eot-count { font-size: 0.75em; padding: 2px 8px; }
    .eot-period { display: none; }
    .eot-answer { flex-direction: column; }
    .eot-answer-vote { flex-direction: row; }
}
