/* =========================================
   Nomad Quiz – voyage-nomad.fr
   Design moderne – fond blanc, ombrage, arrondi
   ========================================= */

* { box-sizing: border-box; }

.nomad-quiz-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 640px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* ---- Bandeau haut coloré ---- */
.nomad-quiz-wrap::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #8b4513 0%, #d4a574 100%);
}

/* ---- Écrans ---- */
.nomad-quiz-screen {
    display: none;
    padding: 40px 44px 44px;
}
.nomad-quiz-screen.active {
    display: block;
}

/* ---- Header résultats ---- */
.nomad-quiz-results-header {
    text-align: center;
    margin-bottom: 32px;
}

.nomad-quiz-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    line-height: 1;
}

.nomad-quiz-title {
    font-size: 1.45rem;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    font-weight: 700;
    line-height: 1.3;
}

.nomad-quiz-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* ---- Barre de progression ---- */
.nomad-quiz-progress-wrap {
    margin-bottom: 32px;
}

.nomad-quiz-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nomad-quiz-progress-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8b4513;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nomad-quiz-progress-pct {
    font-size: 0.78rem;
    color: #999;
}

.nomad-quiz-progress-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 99px;
    overflow: hidden;
}

.nomad-quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b4513 0%, #d4a574 100%);
    border-radius: 99px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* ---- Question ---- */
.nomad-quiz-question-block {
    margin-bottom: 28px;
}

.nomad-quiz-question-text {
    font-size: 1.15rem;
    color: #111;
    margin: 0 0 22px 0;
    line-height: 1.55;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* ---- Options ---- */
.nomad-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nomad-quiz-option {
    padding: 14px 18px;
    background: #fafafa;
    border: 1.5px solid #ebebeb;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.97rem;
    color: #222;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nomad-quiz-option:hover {
    border-color: #d4a574;
    background: #fff;
    box-shadow: 0 2px 12px rgba(139, 69, 19, 0.08);
    transform: translateY(-1px);
}

.nomad-quiz-option.selected {
    border-color: #8b4513;
    background: #fff8f4;
    color: #8b4513;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(139, 69, 19, 0.12);
}

.nomad-quiz-option.selected::after {
    content: '✓';
    margin-left: auto;
    font-size: 0.9rem;
    color: #8b4513;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Navigation ---- */
.nomad-quiz-nav {
    margin-top: 16px;
}

.nomad-quiz-btn-secondary {
    padding: 9px 20px;
    background: transparent;
    color: #888;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.nomad-quiz-btn-secondary:hover {
    border-color: #8b4513;
    color: #8b4513;
}

/* ---- Résultats ---- */
.nomad-quiz-results-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

/* Carte générique */
.nomad-quiz-result-card {
    background: #fff;
    border: 1.5px solid #ebebeb;
    border-radius: 16px;
    padding: 22px 24px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.nomad-quiz-result-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Carte #1 mise en avant */
.nomad-quiz-result-card.rank-1 {
    border-color: #8b4513;
    background: #fff;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.10);
}

.nomad-quiz-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #8b4513;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 14px;
}

.nomad-quiz-result-rank {
    font-size: 0.75rem;
    color: #bbb;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.nomad-quiz-result-name {
    font-size: 1.18rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nomad-quiz-result-country {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 12px;
}

.nomad-quiz-result-desc {
    font-size: 0.93rem;
    color: #444;
    line-height: 1.65;
    margin: 0 0 14px 0;
}

/* Mini barre de score */
.nomad-quiz-score-wrap {
    margin-bottom: 16px;
}

.nomad-quiz-score-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 5px;
}

.nomad-quiz-score-bar {
    height: 3px;
    background: #f0f0f0;
    border-radius: 99px;
    overflow: hidden;
}

.nomad-quiz-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b4513, #d4a574);
    border-radius: 99px;
    transition: width 0.6s ease;
}

.nomad-quiz-result-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #8b4513;
    color: #fff !important;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.1s;
}

.nomad-quiz-result-link:hover {
    background: #6b3410;
    transform: translateY(-1px);
    color: #fff !important;
}

/* ---- Bouton restart ---- */
.nomad-quiz-restart {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    padding: 10px 22px;
    background: transparent;
    color: #999;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.nomad-quiz-restart:hover {
    color: #8b4513;
    border-color: #8b4513;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .nomad-quiz-screen {
        padding: 28px 22px 32px;
    }
    .nomad-quiz-title {
        font-size: 1.2rem;
    }
    .nomad-quiz-question-text {
        font-size: 1rem;
    }
    .nomad-quiz-option {
        font-size: 0.92rem;
        padding: 12px 14px;
    }
    .nomad-quiz-result-card {
        padding: 18px 18px;
    }
}
