/* ============================================
   PREP SCORE v2 — La Boutique du Survivaliste
   Charte : #1a2e1a (vert foncé), #D4652C (orange), #f9f9f7 (fond)
   ============================================ */

/* CSS Variables */
:root {
    --green-dark:   #1a2e1a;
    --green-mid:    #2d4a1e;
    --green-light:  #4a7c59;

    --orange:       #D4652C;
    --orange-hover: #b85524;

    --bg-page:   #f9f9f7;
    --bg-white:  #ffffff;
    --bg-card:   #ffffff;

    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #999999;

    --border:    #e0e0e0;
    --shadow:    0 2px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);

    --radius:    8px;
    --radius-sm: 4px;

    --low-color:    #e53e3e;
    --mid-color:    #D4652C;
    --high-color:   #2d6a4f;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App container */
#app {
    min-height: 100vh;
}

/* ============================================
   SCREENS
   ============================================ */

.screen {
    display: none;
    min-height: 100vh;
    padding: 24px 16px;
    animation: fadeIn 0.3s ease;
    align-items: flex-start;
    justify-content: center;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

/* ============================================
   INTRO SCREEN
   ============================================ */

#screen-intro {
    background: var(--green-dark);
    color: #fff;
    align-items: center;
}

#screen-intro .container {
    text-align: center;
    padding: 48px 24px;
}

.intro-logo {
    margin-bottom: 32px;
}

.intro-logo img {
    height: 48px;
    filter: brightness(0) invert(1);
}

.intro-badge {
    display: inline-block;
    background: rgba(212, 101, 44, 0.2);
    border: 1px solid rgba(212, 101, 44, 0.6);
    color: #D4652C;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.intro-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 8px;
}

.intro-title span {
    color: var(--orange);
}

.intro-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.intro-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
    text-align: left;
}

.intro-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

.intro-feature-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.intro-duration {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 16px;
}

/* ============================================
   BRIEFING SCREEN
   ============================================ */

#screen-briefing {
    background: var(--bg-page);
    align-items: center;
}

#screen-briefing .container {
    padding: 40px 0;
}

.briefing-header {
    text-align: center;
    margin-bottom: 32px;
}

.briefing-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--green-dark);
}

.briefing-header p {
    color: var(--text-muted);
    margin-top: 8px;
}

.briefing-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.briefing-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: var(--shadow);
}

.briefing-item-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.briefing-item-text {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
}

.categories-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: center;
}

.category-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f4f0;
    border: 1px solid #c8d8c8;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--green-dark);
    font-weight: 500;
}

/* ============================================
   QUESTION SCREEN
   ============================================ */

#screen-question {
    background: var(--bg-page);
    align-items: flex-start;
}

#screen-question .container {
    padding: 24px 0 40px;
}

/* Progress bar */
.progress-section {
    margin-bottom: 28px;
}

.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-indicator {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--green-dark);
}

.question-counter {
    font-size: 12px;
    color: var(--text-muted);
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: var(--orange);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-percent {
    font-size: 11px;
    color: var(--orange);
    font-weight: 600;
    text-align: right;
}

/* Question content */
.question-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.question-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.question-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.35;
    margin-bottom: 24px;
}

/* Answers container */
.answers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Standard radio answers */
.answer-option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    color: var(--text-main);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-family: inherit;
    width: 100%;
}

.answer-option:hover {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(212,101,44,0.1);
}

.answer-option.selected {
    border-color: var(--green-dark);
    background: #f0f4f0;
    box-shadow: 0 0 0 3px rgba(26,46,26,0.08);
}

.radio-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}

.answer-option.selected .radio-indicator {
    border-color: var(--green-dark);
    background: var(--green-dark);
    box-shadow: inset 0 0 0 3px #fff;
}

.answer-text {
    flex: 1;
    line-height: 1.4;
}

/* ============================================
   NUMERIC INPUTS (Q1 - Composition foyer)
   ============================================ */

.numeric-inputs-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.numeric-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 0;
}

.numeric-input-row:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.numeric-label {
    font-size: 14px;
    color: var(--text-main);
    flex: 1;
    line-height: 1.4;
}

.numeric-field {
    width: 72px;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    color: var(--green-dark);
    background: #fafafa;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.numeric-field::-webkit-outer-spin-button,
.numeric-field::-webkit-inner-spin-button {
    -webkit-appearance: auto;
}

.numeric-field:focus {
    outline: none;
    border-color: var(--orange);
    background: #fff;
}

/* ============================================
   INVENTORY CHECKLIST (Q5-Q7)
   ============================================ */

.inventory-checklist {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Numeric sub-input (litres / jours) */
.checklist-numeric-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.checklist-numeric-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-dark);
    flex: 1;
    min-width: 150px;
}

.checklist-numeric-field {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-family: inherit;
    font-weight: 700;
    text-align: center;
    color: var(--green-dark);
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.checklist-numeric-field::-webkit-outer-spin-button,
.checklist-numeric-field::-webkit-inner-spin-button {
    -webkit-appearance: auto;
}

.checklist-numeric-field:focus {
    outline: none;
    border-color: var(--orange);
}

.checklist-numeric-unit {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Checklist items */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    box-shadow: var(--shadow);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.checklist-item:hover {
    background: #f5f5f5;
}

.checklist-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
    background: #fafafa;
}

.checklist-item input[type="checkbox"]:checked ~ .checkmark {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.checklist-item input[type="checkbox"]:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 8px;
    height: 12px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.checklist-item-label {
    font-size: 14px;
    color: var(--text-main);
    flex: 1;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.points-badge {
    display: inline-block;
    background: #e8f5e8;
    color: var(--green-mid);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

/* ============================================
   COMMUNE INPUT
   ============================================ */

.commune-input-wrapper {
    position: relative;
}

.commune-field {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-white);
    transition: border-color 0.15s;
    box-shadow: var(--shadow);
}

.commune-field:focus {
    outline: none;
    border-color: var(--orange);
}

.commune-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
}

.commune-dropdown.visible {
    display: block;
}

.commune-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}

.commune-option:hover {
    background: #f5f5f5;
}

.commune-option:last-child {
    border-bottom: none;
}

.commune-option-name {
    font-weight: 600;
    color: var(--text-main);
    display: block;
    font-size: 14px;
}

.commune-option-details {
    font-size: 12px;
    color: var(--text-muted);
}

.commune-option.no-result {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}

.commune-selected {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f0f4f0;
    border: 1px solid #c8d8c8;
    border-radius: var(--radius);
    font-size: 14px;
}

.commune-selected.visible {
    display: flex;
}

.commune-check {
    color: var(--green-mid);
    font-weight: 700;
    font-size: 16px;
}

.commune-name {
    font-weight: 600;
    color: var(--green-dark);
}

.commune-code, .commune-pop {
    color: var(--text-muted);
    font-size: 13px;
}

.commune-loading {
    display: none;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.commune-loading.visible { display: block; }
.commune-loading.done .loading-done { color: var(--green-mid); font-style: normal; font-weight: 600; }
.commune-loading.error .loading-error { color: var(--mid-color); }

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */

.navigation-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--orange);
    color: #fff;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    background: var(--orange-hover);
    box-shadow: 0 4px 12px rgba(212,101,44,0.35);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #999;
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-main);
    border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--green-dark);
    color: var(--green-dark);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-large {
    padding: 16px 32px;
    font-size: 15px;
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 8px;
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

.btn-link:hover {
    color: var(--text-main);
}

/* ============================================
   LOADING SCREEN
   ============================================ */

#screen-loading {
    background: var(--green-dark);
    color: #fff;
    align-items: center;
}

#screen-loading .container {
    text-align: center;
    padding: 48px 24px;
}

.loading-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 32px;
    color: #fff;
}

.loading-bar {
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.loading-fill {
    height: 100%;
    background: var(--orange);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.loading-text {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 32px;
}

.loading-steps {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading-steps .step {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color 0.3s, background 0.3s;
}

.loading-steps .step::before {
    content: '○ ';
}

.loading-steps .step.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.loading-steps .step.active::before {
    content: '● ';
    color: var(--orange);
}

.loading-steps .step.complete {
    color: rgba(255,255,255,0.6);
}

.loading-steps .step.complete::before {
    content: '✓ ';
    color: #6fcf97;
}

/* ============================================
   EMAIL SCREEN
   ============================================ */

#screen-email {
    background: var(--bg-page);
    align-items: center;
}

#screen-email .container {
    padding: 48px 24px;
    text-align: center;
}

.email-icon-large {
    font-size: 48px;
    margin-bottom: 16px;
}

.email-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.email-text {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-white);
    transition: border-color 0.15s;
}

.input-field:focus {
    outline: none;
    border-color: var(--orange);
}

.input-field.error {
    border-color: var(--low-color);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--green-dark);
    margin-top: 2px;
}

/* ============================================
   RESULTS SCREEN
   ============================================ */

#screen-results {
    background: var(--bg-page);
    align-items: flex-start;
}

#screen-results .container {
    padding: 32px 0 60px;
}

.results-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Score circle */
.main-score-section {
    background: var(--green-dark);
    color: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.score-circle-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.score-circle-svg {
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.12);
    stroke-width: 10;
}

.score-circle-fill {
    fill: none;
    stroke: var(--orange);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.3;
    stroke-dashoffset: 339.3;
    transition: stroke-dashoffset 1.5s ease;
}

.score-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.score-max {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.score-level-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.score-level-badge.vulnerable   { background: rgba(229,62,62,0.2);  color: #fc8181; }
.score-level-badge.novice       { background: rgba(212,101,44,0.2); color: #fba97a; }
.score-level-badge.intermediate { background: rgba(212,101,44,0.15);color: #fba97a; }
.score-level-badge.prepared     { background: rgba(111,207,151,0.2);color: #6fcf97; }
.score-level-badge.expert       { background: rgba(111,207,151,0.25);color: #6fcf97; }

#score-message {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    margin-top: 6px;
}

/* Survival estimate */
.survival-estimate {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.survival-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.estimate-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--orange);
}

.estimate-context {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Category scores */
.category-scores {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.category-scores h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.category-score-item {
    margin-bottom: 14px;
}

.category-score-item:last-child {
    margin-bottom: 0;
}

.cat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.cat-icon { font-size: 16px; }

.cat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

.cat-percent {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.category-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.category-bar-fill.low    { background: var(--low-color); }
.category-bar-fill.medium { background: var(--orange); }
.category-bar-fill.high   { background: var(--high-color); }

/* ============================================
   TIER RECOMMENDATIONS
   ============================================ */

.tier-recommendations {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.tier-header {
    margin-bottom: 20px;
}

.tier-badge {
    display: inline-block;
    background: #fff3e0;
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.tier-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 6px;
}

.tier-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.tier-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.tier-product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s;
}

.tier-product-card:hover {
    border-color: var(--orange);
}

.tier-product-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tier-product-info {
    flex: 1;
}

.tier-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.tier-product-price {
    font-size: 13px;
    color: var(--orange);
    font-weight: 700;
    margin-top: 2px;
}

.btn-product-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-dark);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--green-dark);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.btn-product-link:hover {
    background: var(--green-dark);
    color: #fff;
}

.tier-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.tier-actions .btn {
    font-size: 13px;
    padding: 10px 20px;
}

/* Congrats */
.tier-congrats {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.tier-congrats-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.tier-congrats h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.tier-congrats p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Share / Restart */
.share-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

/* ============================================
   RISK DASHBOARD
   ============================================ */

.risk-dashboard {
    display: none;
    margin-top: 20px;
}

.risk-dashboard.visible {
    display: block;
}

.risk-header {
    background: var(--green-dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.risk-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.risk-commune-name {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
}

.risk-global-score {
    display: flex;
    align-items: center;
    gap: 12px;
}

.risk-score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

.risk-score-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
}

.risk-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.risk-score-value {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.risk-impact-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.risk-impact-badge.positive { background: rgba(111,207,151,0.2); color: #6fcf97; }
.risk-impact-badge.negative { background: rgba(229,62,62,0.2);  color: #fc8181; }

.risk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.risk-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease both;
}

.risk-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.risk-card-icon { font-size: 18px; }

.risk-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

.risk-card-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.risk-card-detail {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.risk-card-subdetail {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.risk-card-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.risk-card-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.risk-catnat {
    display: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.risk-catnat.visible { display: block; }

.catnat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.catnat-icon { font-size: 16px; }

.catnat-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    flex: 1;
}

.catnat-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--orange);
    background: #fff3e0;
    padding: 2px 8px;
    border-radius: 10px;
}

.catnat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.catnat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.catnat-type { color: var(--text-main); }
.catnat-date { color: var(--text-muted); }

.risk-recommendations {
    display: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.risk-recommendations.visible { display: block; }

.risk-recommendations h4 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.risk-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.risk-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 0.15s;
}

.risk-product-card:hover {
    border-color: var(--orange);
}

.risk-product-icon { font-size: 20px; }

.risk-product-name {
    font-size: 11px;
    color: var(--text-main);
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .intro-title { font-size: 36px; }

    .question-text { font-size: 17px; }

    .numeric-input-row {
        flex-wrap: wrap;
    }

    .numeric-label {
        flex-basis: 100%;
    }

    .survival-estimate {
        flex-direction: column;
        text-align: center;
    }

    .risk-cards {
        grid-template-columns: 1fr;
    }

    .risk-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
