/**
 * Styles frontend pour TLS Parcours
 */

/* ============================================
   BARRE DE PROGRESSION
   ============================================ */
.tls-pc-progression-bar {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.tls-pc-progression-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tls-pc-progression-header h3 {
    margin: 0;
    font-size: 18px;
}

.tls-pc-percentage {
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
}

.tls-pc-progress-bar {
    width: 100%;
    height: 10px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.tls-pc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4caf50);
    transition: width 0.5s ease;
}

.tls-pc-progress-text {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* ============================================
   CONTENEUR PARCOURS
   ============================================ */
.tls-pc-parcours-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tls-pc-parcours-header {
    text-align: center;
    margin-bottom: 40px;
}

.tls-pc-parcours-header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
}

.tls-pc-parcours-description {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   LISTE DES ÉTAPES
   ============================================ */
.tls-pc-etapes-list {
    display: grid;
    gap: 30px;
}

.tls-pc-etape {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.tls-pc-etape:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tls-pc-etape.completed {
    border-color: #4caf50;
    background: #f9fff9;
}

.tls-pc-etape.locked {
    border-color: #ccc;
    background: #f9f9f9;
    opacity: 0.6;
}

.tls-pc-etape-header h2 {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    margin-bottom: 15px;
}

.tls-pc-etape-number {
    background: #2271b1;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.tls-pc-badge {
    font-size: 20px;
}

.tls-pc-badge.completed {
    color: #4caf50;
}

.tls-pc-badge.locked {
    color: #999;
}

.tls-pc-etape-locked-message {
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    color: #856404;
}

.tls-pc-etape-content {
    margin-top: 20px;
}

/* ============================================
   ITEMS (LEÇONS ET CONTENUS)
   ============================================ */
.tls-pc-lecons-principales,
.tls-pc-contenus-complementaires {
    margin: 25px 0;
}

.tls-pc-lecons-principales h3,
.tls-pc-contenus-complementaires h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.tls-pc-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tls-pc-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-left: 4px solid #2271b1;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.tls-pc-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.tls-pc-item.completed {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.tls-pc-item-order {
    font-weight: bold;
    color: #2271b1;
    min-width: 30px;
}

.tls-pc-item a {
    flex: 1;
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.tls-pc-item.completed a {
    text-decoration: line-through;
    color: #999;
}

.tls-pc-item-check {
    color: #4caf50;
    font-size: 20px;
}

/* ============================================
   STATUS DE PROGRESSION
   ============================================ */
.tls-pc-progression-status {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 6px;
}

.tls-pc-etape-complete-banner {
    background: #d4edda;
    border-left: 4px solid #4caf50;
    padding: 15px;
    border-radius: 6px;
}

.tls-pc-etape-in-progress {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    border-radius: 6px;
}

/* ============================================
   LISTE PARCOURS (ARCHIVE)
   ============================================ */
.tls-pc-parcours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.tls-pc-parcours-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tls-pc-parcours-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.tls-pc-parcours-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.tls-pc-parcours-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tls-pc-parcours-card-content {
    padding: 20px;
}

.tls-pc-parcours-card-content h3 {
    margin: 0 0 15px;
    font-size: 20px;
}

.tls-pc-parcours-card-content h3 a {
    color: #333;
    text-decoration: none;
}

.tls-pc-parcours-duree {
    margin: 10px 0;
    color: #666;
}

.tls-pc-parcours-excerpt {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.tls-pc-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tls-pc-btn:hover {
    background: #195a8f;
}

/* ============================================
   LISTE DES LEÇONS (Ordre séquentiel)
   ============================================ */
.tls-pc-lesson-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.tls-pc-lesson {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.tls-pc-lesson:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Leçon verrouillée (gris) */
.tls-pc-lesson.is-locked {
    opacity: 0.6;
    background: #f5f5f5;
    border-color: #d0d0d0;
    cursor: not-allowed;
    pointer-events: none;
}

.tls-pc-lesson.is-locked:hover {
    box-shadow: none;
    transform: none;
}

/* Icône de statut */
.tls-pc-status {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
}

/* Statut : Complété (vert) */
.tls-pc-status.done {
    background: #e8f5e9;
    color: #4caf50;
}

/* Statut : En cours / Débloquée (orange) */
.tls-pc-status.current {
    background: #fff3e0;
    color: #ff9800;
}

/* Contenu de la leçon */
.tls-pc-ltitle {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.tls-pc-ldur {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.tls-pc-ldesc {
    margin: 0;
    font-size: 14px;
    color: #777;
    line-height: 1.5;
}

/* Bouton d'action */
.tls-pc-action {
    margin-left: auto;
    flex-shrink: 0;
}

.tls-pc-btn-action {
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Bouton : Validé (vert) */
.tls-pc-btn-action.is-done {
    background: #e8f5e9;
    color: #4caf50;
    border-color: #4caf50;
}

.tls-pc-btn-action.is-done:hover {
    background: #4caf50;
    color: white;
}

/* Bouton : Lancer la leçon (orange) */
.tls-pc-btn-action.is-current {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.tls-pc-btn-action.is-current:hover {
    background: #f57c00;
    border-color: #f57c00;
}

/* Bouton : À venir (gris) */
.tls-pc-btn-action.is-next {
    background: #f5f5f5;
    color: #999;
    border-color: #d0d0d0;
    cursor: not-allowed;
}

.tls-pc-lesson.is-locked .tls-pc-btn-action {
    pointer-events: none;
}

/* ============================================
   CARROUSEL CONTENUS COMPLÉMENTAIRES (3 CARTES)
   ============================================ */
.tls-pc-carousel-container {
    position: relative;
}

.tls-pc-carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow: hidden;
}

.tls-pc-extra-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.tls-pc-extra-card:hover {
    border-color: #55A1B4;
    box-shadow: 0 2px 8px rgba(85, 161, 180, 0.1);
    transform: translateY(-2px);
}

.tls-pc-extra-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tls-pc-extra-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #12343c;
    line-height: 1.4;
    min-height: 44px;
}

.tls-pc-extra-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tls-pc-extra-type {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.tls-pc-extra-status {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
}

.tls-pc-extra-status.status-completed {
    background: #dcfce7;
    color: #15803d;
}

.tls-pc-extra-status.status-todo {
    background: #fef3c7;
    color: #a16207;
}

.tls-pc-carousel-btn {
    position: absolute;
    top: 50%;
    right: -50px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #55A1B4;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tls-pc-carousel-btn:hover {
    background: #4a8fa0;
    transform: translateY(-50%) scale(1.1);
}

.tls-pc-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .tls-pc-carousel-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tls-pc-parcours-grid {
        grid-template-columns: 1fr;
    }
    
    .tls-pc-parcours-header h1 {
        font-size: 28px;
    }
    
    .tls-pc-lesson {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tls-pc-action {
        margin-left: 0;
        width: 100%;
    }
    
    .tls-pc-btn-action {
        width: 100%;
    }
    
    .tls-pc-carousel-track {
        grid-template-columns: 1fr;
    }
    
    .tls-pc-carousel-btn {
        right: 10px;
        width: 36px;
        height: 36px;
    }
}

