/* 
    Quiz TECFÉE - Expert BDL 
    Premium Design System (Vanilla CSS)
*/

:root {
    --primary: #003399;
    --primary-hover: #002266;
    --primary-light: #e6ecf7;
    --secondary: #2563eb;
    --success: #10b981;
    --success-light: #ecfdf5;
    --error: #ef4444;
    --error-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --radius-lg: 2rem;
    --radius-md: 1rem;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-indigo: 0 10px 15px -3px rgba(79, 70, 229, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
}

.progress-counter {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid #f1f5f9;
}

.max-width {
    max-width: 42rem;
    margin: 0 auto;
}


.abandon-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(255, 0, 0, 0.2);
}

.abandon-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
}

/* CARDS */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid #f1f5f9;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* WELCOME SCREEN */
.welcome-logo-container {
    margin-bottom: 2rem;
}

.welcome-logo {
    max-width: 180px;
    height: auto;
}

.result-icon-box {
    width: 6rem;
    height: 6rem;
    background: #fffbeb;
    color: #f59e0b;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transform: rotate(3deg);
}

.welcome-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.welcome-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-indigo);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -5px rgba(79, 70, 229, 0.3);
}

/* QUIZ ELEMENTS */
.progress-bar-container {
    width: 100%;
    height: 0.75rem;
    background: #e2e8f0;
    border-radius: 9999px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e7ff;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #1e293b;
    line-height: 1.3;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 1.25rem;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-btn:hover:not(:disabled) {
    border-color: #c7d2fe;
    background: #eff6ff;
}

.option-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 4px #e0e7ff;
}

.option-btn.correct {
    border-color: var(--success);
    background: var(--success-light);
    color: #065f46;
    box-shadow: 0 0 0 4px #d1fae5;
}

.option-btn.wrong {
    border-color: var(--error);
    background: var(--error-light);
    color: #991b1b;
    box-shadow: 0 0 0 4px #fee2e2;
}

.option-btn:disabled {
    cursor: default;
}

/* FEEDBACK */
.feedback-box {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #f8fafc, #ffffff);
    border: 2px solid #f1f5f9;
    border-radius: 1.5rem;
}

.feedback-header {
    display: flex;
    gap: 1rem;
}

.feedback-icon {
    padding: 0.5rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.feedback-content p.label {
    font-size: 10px;
    font-weight: 900;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.feedback-text {
    font-size: 1rem;
    color: #334155;
    font-weight: 500;
    margin-bottom: 1rem;
}

.bdl-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.bdl-link:hover {
    text-decoration: underline;
}

/* RESULTS */
.results-score {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.results-score span {
    font-size: 1.5rem;
    color: #cbd5e1;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

.history-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #475569;
}

/* UTILS */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.resource-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 1rem;
    text-decoration: none;
    display: block;
    position: relative;
    transition: all 0.2s;
}

.resource-card:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.1);
    transform: translateY(-2px);
}

.resource-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 0.25rem;
    padding-right: 1.5rem;
}

.resource-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.resource-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #94a3b8;
}

.resource-card:hover .resource-icon {
    color: var(--primary);
}

.text-center { text-align: center; }
.mt-10 { margin-top: 2.5rem; }
.mt-16 { margin-top: 4rem; }

/* RESPONSIVE */
@media (max-width: 640px) {
    .app-container {
        padding: 1rem 0.5rem;
    }

    .header {
        margin-bottom: 2rem;
    }

    .logo-img {
        height: 2.25rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .welcome-icon-box {
        width: 4.5rem;
        height: 4.5rem;
        margin-bottom: 1.5rem;
    }

    .question-text {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .option-btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .btn-primary {
        padding: 1rem;
        font-size: 1rem;
    }

    .results-score {
        font-size: 3.5rem;
    }

    .feedback-box {
        margin-top: 1.5rem;
        padding: 1.25rem;
    }

    .feedback-text {
        font-size: 0.9375rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .category-tag {
        padding: 0.25rem 0.75rem;
        font-size: 9px;
    }

    .logo-badge {
        display: none;
    }
}
