/**
 * RUH Platform — App styles
 */

.ruh-platform-page {
    --ruh-primary: #0f172a;
    --ruh-accent: #ffd95e;
    --ruh-surface: #ffffff;
    --ruh-muted: #f8fafc;
    --ruh-border: #e2e8f0;
    --ruh-text: #1e293b;
    --ruh-text-muted: #64748b;
    --ruh-error: #ef4444;
    --ruh-radius: 0.75rem;
}

/* Layout communauté */
.ruh-community {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.ruh-community__nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--ruh-border);
    padding-bottom: 0.5rem;
}

.ruh-community__nav button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--ruh-text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--ruh-radius);
    transition: all 0.2s ease;
}

.ruh-community__nav button.is-active,
.ruh-community__nav button:hover {
    background: var(--ruh-muted);
    color: var(--ruh-primary);
}

/* Composer */
.ruh-composer {
    background: var(--ruh-surface);
    border: 1px solid var(--ruh-border);
    border-radius: var(--ruh-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ruh-composer input,
.ruh-composer textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--ruh-border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

/* Posts */
.ruh-post {
    background: var(--ruh-surface);
    border: 1px solid var(--ruh-border);
    border-radius: var(--ruh-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ruh-post__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ruh-post__header time {
    display: block;
    font-size: 0.85rem;
    color: var(--ruh-text-muted);
}

.ruh-post__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.ruh-post__content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ruh-post__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ruh-border);
}

/* Réactions */
.ruh-reactions {
    display: flex;
    gap: 0.5rem;
}

.ruh-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--ruh-border);
    background: var(--ruh-muted);
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.ruh-reaction.is-active {
    background: var(--ruh-accent);
    border-color: var(--ruh-accent);
    color: var(--ruh-primary);
}

.ruh-comments-toggle {
    background: transparent;
    border: none;
    color: var(--ruh-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.ruh-comments-toggle:hover {
    color: var(--ruh-primary);
}

/* Commentaires */
.ruh-comments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ruh-border);
}

.ruh-comment,
.ruh-comment-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ruh-comment-form textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--ruh-border);
    border-radius: 0.5rem;
    resize: vertical;
}

/* Notifications */
.ruh-notifications {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.ruh-notification {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ruh-border);
    background: var(--ruh-muted);
}

.ruh-notification.is-read {
    background: transparent;
    opacity: 0.7;
}

.ruh-notification time {
    display: block;
    font-size: 0.8rem;
    color: var(--ruh-text-muted);
    margin-top: 0.25rem;
}

/* Leaderboard */
.ruh-leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ruh-leaderboard__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ruh-border);
}

.ruh-rank {
    width: 2rem;
    font-weight: 700;
    color: var(--ruh-text-muted);
}

.ruh-name {
    flex: 1;
}

.ruh-points {
    font-weight: 700;
    color: var(--ruh-primary);
}

/* Offres */
.ruh-offers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.ruh-offer-card {
    background: var(--ruh-surface);
    border: 1px solid var(--ruh-border);
    border-radius: var(--ruh-radius);
    padding: 1.5rem;
    text-align: center;
}

.ruh-offer-card h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.ruh-offer-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ruh-primary);
    margin: 0.5rem 0;
}

.ruh-offer-card__level {
    color: var(--ruh-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Classroom */
.ruh-classroom,
.ruh-calendar {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.ruh-course-list,
.ruh-event-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ruh-course-card,
.ruh-event-card {
    background: var(--ruh-surface);
    border: 1px solid var(--ruh-border);
    border-radius: var(--ruh-radius);
    padding: 1.25rem;
}

.ruh-course-card h3,
.ruh-event-card h3 {
    margin-top: 0;
}

.ruh-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--ruh-border);
    border-radius: 9999px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.ruh-progress-bar > div {
    height: 100%;
    background: var(--ruh-accent);
    transition: width 0.3s ease;
}

.ruh-modules {
    margin-top: 1.5rem;
}

.ruh-module {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--ruh-muted);
    border-radius: var(--ruh-radius);
}

.ruh-module h4 {
    margin-top: 0;
}

.ruh-lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ruh-lesson-list li {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.ruh-lesson-list li:hover {
    background: var(--ruh-border);
}

.ruh-lesson-viewer {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--ruh-surface);
    border: 1px solid var(--ruh-border);
    border-radius: var(--ruh-radius);
}

.ruh-lesson-content {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Calendrier */
.ruh-event-card time {
    display: block;
    color: var(--ruh-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Composants communs */
.ruh-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.ruh-avatar-small {
    width: 32px;
    height: 32px;
}

.ruh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    color: var(--ruh-primary);
    background: var(--ruh-accent);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.ruh-button:hover {
    opacity: 0.9;
}

.ruh-button-soft {
    background: var(--ruh-muted);
    color: var(--ruh-text);
    border: 1px solid var(--ruh-border);
}

.ruh-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ruh-access-denied {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    background: var(--ruh-muted);
    border: 1px solid var(--ruh-border);
    border-radius: var(--ruh-radius);
}

.ruh-access-denied p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--ruh-text);
}

.ruh-loading,
.ruh-empty,
.ruh-error {
    text-align: center;
    padding: 2rem;
    color: var(--ruh-text-muted);
}

.ruh-error {
    color: var(--ruh-error);
}

#ruh-load-more {
    width: 100%;
    margin-top: 1rem;
}
