/*
 * Quiz La Dolce Vita – styles
 * À enqueue via functions.php : wp_enqueue_style( 'ldv-quiz', get_template_directory_uri() . '/css/quiz.css' );
 * Compatible avec style.css (variables --color-primary, --radius-*, --shadow-*, --space-*, --text-*)
 */

/* ========================================
   SECTION WRAPPER
   ======================================== */
.quiz-section {
    padding: var(--space-2xl) 0;
    background: linear-gradient(180deg, #FFF5EB 0%, var(--color-bg) 100%);
}

/* ========================================
   OUTER CARD
   ======================================== */
.quiz-outer-card {
    max-width: 680px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg);
    overflow: hidden;
}

/* ========================================
   QUIZ HEADER BLOCK
   ======================================== */
.quiz-header-block {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, #FFF5EB 0%, #FFE8D0 100%);
    border: 1px solid #FFD09E;
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
}
.quiz-header-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}
.quiz-header-title {
    display: block;
    font-size: var(--text-base);
    font-weight: 900;
    color: var(--color-text);
    line-height: 1.2;
}
.quiz-header-sub {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-light);
    margin-top: 2px;
}

/* ========================================
   STEP ROW & PROGRESS
   ======================================== */
.ldv-step-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}
.ldv-step-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.ldv-step-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
}
.ldv-progress-bar {
    height: 5px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-md);
}
.ldv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* ========================================
   QUESTION CARD
   ======================================== */
.ldv-question-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
}
.ldv-q-emoji {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: var(--space-xs);
}
.ldv-q-text {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.35;
    margin: 0 0 4px;
}
.ldv-q-hint {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    font-style: italic;
    margin: 0;
}

/* ========================================
   OPTIONS
   ======================================== */
.ldv-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
}
.ldv-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    transition: all var(--transition-fast);
    min-height: 48px; /* touch target */
}
.ldv-option:hover:not(:disabled) {
    border-color: var(--color-primary-light);
    background: #FFF5EB;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.ldv-option:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}
.ldv-option.is-selected   { border-color: var(--color-primary); background: #FFF5EB; }
.ldv-option.is-correct    { border-color: var(--color-secondary); background: #E0F7FA; color: #005F60; }
.ldv-option.is-wrong      { border-color: #EF4444; background: #FEF2F2; color: #991B1B; }
.ldv-option[disabled]     { cursor: default; pointer-events: none; }

.ldv-option-letter {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text);
    transition: all var(--transition-fast);
}
.ldv-option.is-selected:not(.is-correct):not(.is-wrong) .ldv-option-letter {
    background: var(--color-primary);
    color: #fff;
}
.ldv-option.is-correct .ldv-option-letter {
    background: var(--color-secondary);
    color: #fff;
}
.ldv-option.is-wrong .ldv-option-letter {
    background: #EF4444;
    color: #fff;
}

/* ========================================
   FEEDBACK
   ======================================== */
.ldv-feedback {
    display: none;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-size: var(--text-sm);
    line-height: 1.55;
    margin-bottom: var(--space-sm);
    border-left: 4px solid;
}
.ldv-feedback.is-visible  { display: block; }
.ldv-feedback.is-good     { background: #E0F7FA; border-color: var(--color-secondary); color: #005F60; }
.ldv-feedback.is-bad      { background: #FEF2F2; border-color: #EF4444;               color: #991B1B; }
.ldv-feedback-title {
    display: block;
    font-weight: 800;
    font-size: var(--text-sm);
    margin-bottom: 4px;
}

/* ========================================
   NEXT BUTTON
   ======================================== */
.ldv-btn-next {
    display: none;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    min-height: 48px;
}
.ldv-btn-next.is-visible { display: block; }
.ldv-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.06);
}
.ldv-btn-next:active { transform: translateY(0); }

/* ========================================
   RESULT CARD
   ======================================== */
.ldv-result-card {
    display: none;
    text-align: center;
    padding: var(--space-md) 0 0;
}
.ldv-result-card.is-visible { display: block; }

.ldv-score-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    box-shadow: var(--shadow-md);
}
.ldv-score-num   { font-size: 2rem; font-weight: 900; color: #fff; line-height: 1; }
.ldv-score-denom { font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.85); }

.ldv-result-title {
    font-size: var(--text-lg);
    font-weight: 900;
    color: var(--color-text);
    margin: 0 0 var(--space-xs);
}
.ldv-result-msg {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto var(--space-md);
}

.ldv-result-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}
.ldv-result-badge {
    background: #FFF5EB;
    border: 1px solid #FFD09E;
    color: var(--color-primary-dark);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 5px 14px;
    border-radius: var(--radius-full);
}

.ldv-result-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

/* Boutons partagés résultat */
.ldv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 48px;
    text-decoration: none;
}
.ldv-btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.ldv-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.ldv-btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}
.ldv-btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    .quiz-outer-card       { padding: var(--space-sm); }
    .ldv-result-cta        { grid-template-columns: 1fr; }
    .ldv-option            { font-size: var(--text-xs); padding: 0.7rem 0.75rem; }
    .ldv-option-letter     { width: 26px; height: 26px; }
}