/**
 * French LMS Blocks - Styles Frontend
 * Design professionnel pour les blocs de leçon
 */

:root {
    --primary: #7451EB;
    --primary-dark: #5E3DD1;
    --primary-light: #9B7DFF;
    --secondary: #FF6B6B;
    --success: #51CF66;
    --warning: #FFD93D;
    --danger: #FF6B6B;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-600: #868E96;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   VIDEO BLOCK
   ============================================ */

.french-lms-video-block {
    margin: 2rem 0;
}

.video-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-family: 'Bitter', sans-serif;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--gray-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-lg);
}

/* ============================================
   TEXT BLOCK
   ============================================ */

.french-lms-text-block {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.french-lms-text-block:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.french-lms-text-block.highlighted {
    background: linear-gradient(135deg, rgba(116, 81, 235, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-left: 4px solid var(--primary);
    padding-left: calc(2rem - 4px);
}

.text-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--gray-800);
}

.text-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 1.5rem 0 1rem;
    font-family: 'Bitter', sans-serif;
}

.text-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1.25rem 0 0.75rem;
}

.text-content p {
    margin-bottom: 1rem;
}

.text-content ul,
.text-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.text-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.text-content strong {
    font-weight: 700;
    color: var(--gray-900);
}

.text-content code {
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--primary);
}

.text-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    font-style: italic;
    color: var(--gray-700);
}

/* ============================================
   FILE BLOCK
   ============================================ */

.french-lms-file-block {
    margin: 2rem 0;
}

.file-download-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.file-download-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.file-icon {
    flex-shrink: 0;
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-family: 'Bitter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-type {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.file-download-card .btn {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.file-download-card .btn i {
    margin-right: 0.5rem;
}

/* ============================================
   QCM BLOCK
   ============================================ */

.french-lms-qcm-block {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.qcm-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.qcm-icon {
    flex-shrink: 0;
    font-size: 2rem;
}

.qcm-question {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.5;
    font-family: 'Bitter', sans-serif;
}

.qcm-points {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
}

.qcm-options {
    margin-bottom: 2rem;
}

.qcm-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.qcm-option:hover {
    border-color: var(--primary-light);
    background: var(--white);
    transform: translateX(4px);
}

.qcm-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(116, 81, 235, 0.1) 0%, rgba(116, 81, 235, 0.05) 100%);
}

.qcm-option.correct {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.1) 0%, rgba(81, 207, 102, 0.05) 100%);
}

.qcm-option.incorrect {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.option-radio {
    flex-shrink: 0;
}

.option-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.option-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-letter {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: all var(--transition);
}

.qcm-option.selected .option-letter {
    background: var(--primary);
    color: var(--white);
}

.qcm-option.correct .option-letter {
    background: var(--success);
    color: var(--white);
}

.qcm-option.incorrect .option-letter {
    background: var(--danger);
    color: var(--white);
}

.option-text {
    flex: 1;
    font-size: 1rem;
    color: var(--gray-800);
    font-weight: 500;
    line-height: 1.5;
}

.qcm-actions {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-100);
}

.submit-qcm {
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    min-width: 200px;
}

.submit-qcm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qcm-result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-content {
    max-width: 600px;
    margin: 0 auto;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.result-message {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Bitter', sans-serif;
}

.qcm-result.success {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.1) 0%, rgba(81, 207, 102, 0.05) 100%);
    border: 2px solid var(--success);
}

.qcm-result.success .result-message {
    color: var(--success);
}

.qcm-result.error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border: 2px solid var(--danger);
}

.qcm-result.error .result-message {
    color: var(--danger);
}

.result-explanation {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    text-align: left;
}

.result-explanation strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-weight: 700;
}

.result-explanation p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .french-lms-text-block,
    .french-lms-qcm-block {
        padding: 1.5rem;
    }
    
    .file-download-card {
        flex-direction: column;
        text-align: center;
    }
    
    .qcm-header {
        flex-direction: column;
    }
    
    .qcm-points {
        align-self: flex-start;
    }
    
    .option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

