/* ===================================
   CATEGORY LEVELS - STYLES
   Fichier: category-levels.css
   Description: Styles pour la liste des niveaux d'une catégorie
   Note: Utilise les variables CSS définies dans main.css
   =================================== */

body {
    padding-top: 100px;
    padding-bottom: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Conteneur spécifique pour le contenu des niveaux */
.levels-content {
    max-width: 800px;
    margin: 0 auto;
}

/* --- HEADER COMPACT --- */
.module-header {
    margin-bottom: 30px;
    margin-top: 0;
}

.mh-back {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: white;
}

.mh-back:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    background: #F0F9FF;
}

.mh-title h1 {
    font-size: 2rem;
    margin: 0;
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.mh-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* --- TIMELINE LIST COMPACTE --- */
.timeline-container {
    position: relative;
    padding-left: 20px;
    min-height: 450px;
    margin-bottom: 120px;
}

/* Ligne verticale fine */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 29px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background: #E2E8F0;
    z-index: 0;
}

/* --- ITEM STYLE (SLIM) --- */
.level-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
    text-decoration: none;
    height: 64px;
}

.level-row:hover {
    transform: translateX(5px);
    border-color: var(--cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Numéro (Petit Cercle) */
.lvl-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Anton', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #F1F5F9;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    z-index: 2;
}

/* Contenu */
.lvl-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.lvl-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

/* Meta infos */
.lvl-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score-box {
    background: #ECFDF5;
    color: var(--success);
    padding: 4px 8px;
    border-radius: 6px;
}

.status-txt {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions (Icones) */
.lvl-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: 0.2s;
    flex-shrink: 0;
    background: transparent;
}

.lvl-action svg {
    width: 18px;
    height: 18px;
}

.level-row:hover .lvl-action {
    background: #F8FAFC;
    color: var(--text-main);
}

/* --- ETATS --- */

/* TERMINÉ (Done) */
.level-row.done .lvl-num {
    background: var(--success);
    color: white;
}

.level-row.done .lvl-title {
    color: var(--text-muted);
}

.level-row.done:hover .lvl-action {
    color: var(--cyan);
}

/* ACTIF (En cours) */
.level-row.active {
    border: 2px solid var(--cyan);
    background: #F0F9FF;
    height: 72px;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.15);
}

.level-row.active:hover {
    transform: scale(1.02);
}

.level-row.active .lvl-num {
    background: var(--cyan);
    color: white;
    width: 36px;
    height: 36px;
}

.level-row.active .lvl-title {
    font-weight: 700;
    color: var(--deep-blue);
    font-size: 1rem;
}

.level-row.active .lvl-action {
    background: var(--cyan);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .container {
        padding: 0 20px;
    }

    .levels-content {
        max-width: 100%;
    }

    .timeline-container {
        margin-bottom: 60px;
        min-height: 300px;
        padding-left: 15px;
    }

    .timeline-container::before {
        left: 24px;
    }

    .module-header {
        margin-bottom: 25px;
        margin-top: 0;
    }

    .mh-title {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mh-back {
        font-size: 0.85rem;
        margin-bottom: 16px;
        padding: 8px 14px;
        order: -1;
        align-self: flex-start;
    }

    .mh-title h1 {
        font-size: 1.6rem;
        order: 1;
        margin-bottom: 8px;
    }

    .mh-title p {
        font-size: 0.85rem;
        order: 2;
    }

    .level-row {
        height: auto;
        min-height: 56px;
        padding: 10px 12px;
        gap: 12px;
        margin-bottom: 6px;
    }

    .lvl-num {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .lvl-info {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 3px;
    }

    .lvl-title {
        font-size: 0.88rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        margin-right: 0;
    }

    .lvl-meta {
        font-size: 0.7rem;
        gap: 8px;
    }

    .score-box {
        padding: 2px 6px;
        font-size: 0.7rem;
    }

    .status-txt {
        font-size: 0.65rem;
    }

    .lvl-action {
        width: 28px;
        height: 28px;
    }

    .lvl-action svg {
        width: 16px;
        height: 16px;
    }

    .level-row.active {
        height: auto;
        min-height: 64px;
    }

    .level-row.active .lvl-num {
        width: 32px;
        height: 32px;
    }

    .level-row.active .lvl-title {
        font-size: 0.92rem;
    }

    /* Footer */
    footer {
        padding: 40px 0;
        font-size: 0.85rem;
    }

    footer a {
        display: block;
        margin: 8px 0 !important;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .container {
        padding: 0 16px;
    }

    .timeline-container {
        margin-bottom: 50px;
        min-height: 250px;
        padding-left: 12px;
    }

    .timeline-container::before {
        left: 21px;
    }

    .module-header {
        margin-bottom: 20px;
    }

    .mh-title {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mh-back {
        font-size: 0.8rem;
        margin-bottom: 14px;
        padding: 7px 12px;
        order: -1;
        align-self: flex-start;
    }

    .mh-title h1 {
        font-size: 1.4rem;
        order: 1;
        margin-bottom: 6px;
    }

    .mh-title p {
        font-size: 0.8rem;
        order: 2;
    }

    .level-row {
        min-height: 52px;
        padding: 8px 10px;
        gap: 10px;
        margin-bottom: 6px;
    }

    .lvl-num {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .lvl-title {
        font-size: 0.82rem;
    }

    .lvl-meta {
        font-size: 0.65rem;
        gap: 6px;
    }

    .score-box {
        padding: 2px 5px;
        font-size: 0.65rem;
    }

    .status-txt {
        font-size: 0.6rem;
    }

    .lvl-action {
        width: 26px;
        height: 26px;
    }

    .lvl-action svg {
        width: 14px;
        height: 14px;
    }

    .level-row.active {
        min-height: 60px;
    }

    .level-row.active .lvl-num {
        width: 30px;
        height: 30px;
    }

    .level-row.active .lvl-title {
        font-size: 0.88rem;
    }
}
