/* ============================================================
   DIAGNOSTIC EXPORT COSMÉTIQUE — Styles
   Charte visuelle Export Distrib : Saira + Rubik · #5271FF · #FF914D
   ============================================================ */

/* ── Fonts Export Distrib ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Saira:wght@400;600;700;800;900&family=Rubik:wght@400;500;600;700&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
:root {
  /* Couleurs Export Distrib */
  --color-primary:       #5271FF;
  --color-primary-light: #7B94FF;
  --color-primary-dark:  #3A56E0;
  --color-primary-bg:    #F2F6FF;

  --color-accent:        #FF914D;
  --color-accent-light:  #FFAB75;
  --color-accent-dark:   #E0732E;

  --color-fort:          #059669;
  --color-fort-bg:       #ECFDF5;
  --color-fort-border:   #A7F3D0;

  --color-moyen:         #D97706;
  --color-moyen-bg:      #FFFBEB;
  --color-moyen-border:  #FDE68A;

  --color-faible:        #DC2626;
  --color-faible-bg:     #FEF2F2;
  --color-faible-border: #FECACA;

  --color-text:          #21212B;
  --color-text-secondary:#5A5E6B;
  --color-bg:            #F2F6FF;   /* fond bleu clair Export Distrib */
  --color-white:         #FFFFFF;
  --color-border:        #DDE4FF;
  --color-surface:       #FFFFFF;

  /* Rayons : boutons très arrondis (style site) */
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  20px;
  --radius-xl:  25px;
  --radius-pill: 25px;

  --shadow-sm:  0 1px 4px rgba(82,113,255,.10), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 18px rgba(82,113,255,.15), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 36px rgba(82,113,255,.20), 0 4px 12px rgba(0,0,0,.08);

  /* Polices */
  --font-heading: 'Saira', system-ui, sans-serif;
  --font:         'Rubik', system-ui, -apple-system, sans-serif;
  --transition: 200ms cubic-bezier(.4,0,.2,1);

  --max-width: 480px;
  --side-pad: 20px;

  /* Alias polices (évite le flash de police système sur certains widgets) */
  --font-body: var(--font);
  --font-head: var(--font-heading);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .start-headline, .lead-title, .results-headline, .quiz-question {
  font-family: var(--font-heading);
}

input, select, textarea, button {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── App container ──────────────────────────────────────────── */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* ── Loading ────────────────────────────────────────────────── */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Fade transition ────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 250ms ease both;
}

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

/* ══════════════════════════════════════════════════════════════
   START SCREEN
   ══════════════════════════════════════════════════════════════ */
.start-screen {
  padding: var(--side-pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.start-brand {
  margin-bottom: 40px;
}

.start-brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.start-hero {
  margin-bottom: 32px;
}

.start-headline {
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--color-text);
  margin-bottom: 12px;
}

.start-headline span {
  color: var(--color-primary);
}

.start-sub {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.start-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.stat-pill-icon {
  font-size: 15px;
}

.start-flags {
  margin-bottom: 36px;
}

.start-flags-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.flags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.flag-chip {
  font-size: 22px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.btn-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 18px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(255,145,77,.40);
  letter-spacing: .01em;
  margin-bottom: 16px;
}

.btn-start:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,145,77,.50);
}

.btn-start:active {
  transform: translateY(0);
}

.btn-start-arrow {
  font-size: 20px;
}

.start-legal {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   QUIZ SCREEN (questions)
   ══════════════════════════════════════════════════════════════ */
.quiz-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
}

.quiz-header {
  padding: 16px var(--side-pad) 0;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
  padding-bottom: 16px;
}

.quiz-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 6px 0;
  transition: color var(--transition);
}

.btn-back:hover {
  color: var(--color-text);
}

.quiz-progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.progress-bar-track {
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 350ms cubic-bezier(.4,0,.2,1);
}

.quiz-body {
  flex: 1;
  padding: 32px var(--side-pad) 24px;
  display: flex;
  flex-direction: column;
}

.quiz-question {
  font-size: clamp(20px, 5.5vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--color-text);
  margin-bottom: 28px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  min-height: 56px;
}

.option-btn:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.option-btn:active {
  transform: translateY(0);
}

.option-btn.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  box-shadow: 0 0 0 3px rgba(82,113,255,.15);
}

.option-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.option-label {
  flex: 1;
  line-height: 1.3;
}

.option-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.option-btn.selected .option-check {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.option-check::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-white);
  opacity: 0;
  transition: opacity var(--transition);
}

.option-btn.selected .option-check::after {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   LEAD FORM SCREEN
   ══════════════════════════════════════════════════════════════ */
.lead-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.lead-header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  padding: 40px var(--side-pad) 36px;
  color: var(--color-white);
}

.lead-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.lead-title {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.lead-subtitle {
  font-size: 15px;
  opacity: .85;
  line-height: 1.5;
}

.lead-body {
  flex: 1;
  padding: 28px var(--side-pad) 120px;
  overflow-y: auto;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.form-label .required {
  color: var(--color-faible);
  margin-left: 2px;
}

.form-input {
  height: 48px;
  padding: 0 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-size: 15px;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: #9CA3AF;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(82,113,255,.15);
}

.form-input.error {
  border-color: var(--color-faible);
}

.form-select {
  height: 48px;
  padding: 0 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-size: 15px;
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(82,113,255,.15);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.form-divider-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.form-divider-text {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.consent-block {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.consent-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--color-primary);
}

.consent-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.consent-text a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-error-msg {
  font-size: 12px;
  color: var(--color-faible);
  font-weight: 500;
}

/* ── Sticky CTA on lead screen ── */
.lead-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px var(--side-pad) env(safe-area-inset-bottom, 16px);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS (shared)
   ══════════════════════════════════════════════════════════════ */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 24px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-heading);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(255,145,77,.38);
  letter-spacing: .01em;
  text-align: center;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255,145,77,.50);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #FFCBA8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-rdv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 24px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-heading);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(255,145,77,.38);
  letter-spacing: .01em;
  text-decoration: none;
  text-align: center;
}

.btn-rdv:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255,145,77,.50);
}

.btn-rdv:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   RESULTS SCREEN
   ══════════════════════════════════════════════════════════════ */
.results-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 100px; /* space for sticky CTA */
  position: relative;
  z-index: 100; /* above rocket-launch-wrapper (z-index: 50) */
}

.results-header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  padding: 36px var(--side-pad) 32px;
  color: var(--color-white);
}

.results-headline {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.results-subline {
  font-size: 14px;
  opacity: .80;
}

.results-disclaimer {
  font-size: 12px;
  opacity: .65;
  margin-top: 10px;
  font-style: italic;
}

/* ── Scroll hint ── */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  margin-top: 18px;
  padding-bottom: 4px;
}
.scroll-hint-arrow {
  display: block;
  font-size: 18px;
  line-height: 1;
  color: rgba(255,255,255,0.45);
  transform: rotate(90deg);
  animation: scrollBounce 1.6s ease-in-out infinite;
}
.scroll-hint-arrow:nth-child(1) { animation-delay: 0s;    opacity: 0.30; }
.scroll-hint-arrow:nth-child(2) { animation-delay: 0.18s; opacity: 0.55; }
.scroll-hint-arrow:nth-child(3) { animation-delay: 0.36s; opacity: 0.80; }
@keyframes scrollBounce {
  0%, 100% { transform: rotate(90deg) translateX(0);    opacity: inherit; }
  50%       { transform: rotate(90deg) translateX(5px);  opacity: 1; }
}

.scroll-hint--below {
  padding: 10px 0 6px;
}
.scroll-hint--below .scroll-hint-arrow {
  color: rgba(100,120,200,0.45);
}

/* ── Top 3 ── */
.top3-section {
  padding: 28px var(--side-pad) 0;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.top3-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.top3-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.top3-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  border-radius: 0 2px 2px 0;
}

.top3-card:nth-child(1) {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-color: #C7D2FE;
  box-shadow: 0 6px 24px rgba(82,113,255,.18), 0 2px 8px rgba(0,0,0,.06);
}
.top3-card:nth-child(1)::before { background: var(--color-primary); width: 5px; }
.top3-card:nth-child(2)::before { background: #6B7280; width: 5px; }
.top3-card:nth-child(3)::before { background: #D97706; width: 5px; }
.top3-card:nth-child(1) .top3-score-badge {
  font-size: 28px;
  color: var(--color-primary-dark);
}
.top3-card:nth-child(1) .top3-rank-label {
  color: var(--color-primary);
}

.top3-rank-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.top3-country-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.top3-country-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.top3-flag {
  font-size: 26px;
}

.top3-score-badge {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
}

.top3-score-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.top3-score-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary), var(--color-accent));
  transition: width 800ms cubic-bezier(.4,0,.2,1);
}

.top3-bullets {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top3-bullet {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.top3-bullet-dot {
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.top3-improve {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.top3-improve-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.top3-improve-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ── All countries list ── */
.all-countries-section {
  padding: 0 var(--side-pad);
}

.countries-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

/* ── Country row (accordion) ── */
.country-row {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.country-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
/* Colored left accent bar */
.country-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 0;
}
.country-row.fort::before   { background: var(--color-fort); }
.country-row.moyen::before  { background: var(--color-accent); }
.country-row.faible::before { background: var(--color-faible); }

.country-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 13px 18px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.country-row-header:hover {
  background: var(--color-bg);
}

.country-flag {
  font-size: 22px;
  flex-shrink: 0;
}

.country-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.score-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.score-label.fort {
  background: var(--color-fort);
  color: white;
}

.score-label.moyen {
  background: var(--color-accent);
  color: white;
}

.score-label.faible {
  background: var(--color-faible);
  color: white;
}

.score-value {
  font-size: 15px;
  font-weight: 800;
  min-width: 38px;
  text-align: right;
  flex-shrink: 0;
}
.country-row.fort  .score-value { color: var(--color-fort); }
.country-row.moyen .score-value { color: var(--color-accent); }
.country-row.faible .score-value { color: var(--color-faible); }

.accordion-chevron {
  color: var(--color-text-secondary);
  font-size: 12px;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.country-row.open .accordion-chevron {
  transform: rotate(180deg);
}

.country-score-bar-mini {
  height: 3px;
  background: var(--color-border);
  margin: 0 16px;
}

.country-score-bar-mini-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 600ms cubic-bezier(.4,0,.2,1);
}

.score-label.fort ~ .country-name ~ .country-score-bar-mini-fill,
.country-row.fort .country-score-bar-mini-fill {
  background: var(--color-fort);
}
.country-row.moyen .country-score-bar-mini-fill {
  background: var(--color-moyen);
}
.country-row.faible .country-score-bar-mini-fill {
  background: var(--color-faible);
}

.country-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(.4,0,.2,1);
}

.country-row.open .country-accordion-body {
  max-height: 400px;
}

.accordion-content {
  padding: 16px 16px 18px;
  border-top: 1px solid var(--color-border);
}

.accordion-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}

.accordion-section-label.why {
  color: var(--color-primary);
}

.accordion-section-label.improve {
  color: var(--color-fort);
  margin-top: 14px;
}

.accordion-bullets {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.accordion-bullet {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.accordion-bullet-dot {
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 14px;
}

/* ── RDV Pitch Section ── */
.rdv-pitch-section {
  margin: 8px var(--side-pad) 32px;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #6B8EFF 100%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  color: white;
  box-shadow: 0 8px 32px rgba(82,113,255,.35);
  position: relative;
  overflow: hidden;
}
.rdv-pitch-section::before {
  content: '🚀';
  position: absolute;
  right: -8px;
  top: -12px;
  font-size: 80px;
  opacity: .10;
  pointer-events: none;
}
.rdv-pitch-tag {
  display: inline-block;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.30);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.rdv-pitch-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.rdv-pitch-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.rdv-pitch-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}
.rdv-pitch-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.btn-rdv-pitch {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white !important;
  color: var(--color-primary-dark) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.20) !important;
  font-size: 15px !important;
}
.btn-rdv-pitch:hover {
  background: #f0f4ff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25) !important;
}
.rdv-pitch-body {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,.90);
  margin: 0 0 14px;
}
.rdv-pitch-lever {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,.80);
  background: rgba(255,255,255,.10);
  border-left: 3px solid rgba(255,145,77,.80);
  border-radius: 0 8px 8px 0;
  padding: 9px 12px;
  margin: 0 0 18px;
}
.rdv-pitch-footer {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  letter-spacing: 0.02em;
  margin: 14px 0 4px;
}
.rdv-pitch-note {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  margin-top: 6px;
}

/* ── Sticky CTA (results) ── */
.results-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px var(--side-pad) env(safe-area-inset-bottom, 14px);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.10);
  z-index: 100;
}

.results-sticky-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.results-cta-note {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  text-align: center;
  margin-top: 4px;
}

.btn-secondary:hover {
  background: var(--color-primary-bg);
}

/* ── Spinner on submit ── */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (min-width: 480px) {
  .start-screen {
    padding: 48px var(--side-pad);
  }

  .results-sticky-cta,
  .lead-sticky-cta {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: var(--max-width);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Logo ───────────────────────────────────────────────────── */
.app-logo {
  display: block;
  object-fit: contain;
}
.app-logo--lg {
  width: 180px;
  height: 180px;
  margin: 0 auto;
}
.app-logo--md {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
}
.app-logo--sm {
  width: 60px;
  height: 60px;
}

.quiz-logo-bar {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

/* ── Capacité Export — Mission Control ─────────────────────── */
.export-cap-section {
  padding: 0 var(--side-pad) 24px;
}
.cap-dark-card {
  background: linear-gradient(135deg, #0d1433 0%, #1b2a6b 55%, #162050 100%);
  border-radius: var(--radius-xl);
  padding: 22px 20px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(82,113,255,.30), 0 2px 8px rgba(0,0,0,.25);
}
.cap-dark-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(82,113,255,.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cap-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.cap-kpi-tag {
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
}
/* ── Titre Potentiel export ── */
.cap-title-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cap-title-eyebrow {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
}
.cap-title-main {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 20px rgba(82,113,255,.45);
}
.cap-title-accent {
  color: #FF914D;
  text-shadow: 0 2px 16px rgba(255,145,77,.50);
}
.cap-rocket-corner {
  width: 117px; height: 117px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(255,255,255,.25));
  animation: rocketFloat 3.5s ease-in-out infinite;
}
@keyframes rocketFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  40%       { transform: translateY(-7px) rotate(1deg); }
  60%       { transform: translateY(-5px) rotate(-1deg); }
}
.cap-main-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.cap-big-score {
  font-family: var(--font-heading);
  font-size: 80px; font-weight: 900;
  line-height: 0.9; letter-spacing: -3px;
  color: #ffffff;
  text-shadow: 0 0 30px rgba(120,150,255,.70), 0 0 70px rgba(82,113,255,.35);
}
.cap-big-score span {
  font-size: 26px; font-weight: 600;
  color: rgba(255,255,255,.50);
  letter-spacing: 0; margin-left: 3px;
}
.cap-level-pill {
  background: linear-gradient(135deg, var(--color-accent), #d9621e);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: white; margin-bottom: 10px;
  box-shadow: 0 3px 14px rgba(255,145,77,.50);
  white-space: nowrap;
}
/* ── Potentiel export — éléments additionnels ── */
.cap-score-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 10px;
}
.cap-pct-badge {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: #10B981;
  letter-spacing: -0.3px;
  text-shadow: 0 0 16px rgba(16,185,129,.45);
}
.cap-disclaimer {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  line-height: 1.45;
  margin-top: 12px;
  position: relative; z-index: 1;
}
.cap-bullet-icon-plus {
  color: rgba(255,255,255,0.55);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── 5-segment fuel gauge ── */
.cap-segments-row {
  display: flex; gap: 6px;
  margin-bottom: 18px;
  position: relative; z-index: 1;
}
.cap-seg-new {
  flex: 1; height: 48px;
  border-radius: 11px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: flex-end;
  justify-content: center;
  padding-bottom: 7px;
  position: relative; overflow: hidden;
  transform-origin: bottom;
}
.cap-seg-new.active {
  background: linear-gradient(to top, #FF914D 0%, #5271FF 100%);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 4px 18px rgba(82,113,255,.45);
  animation: segAppear 0.5s cubic-bezier(0.34,1.4,0.64,1) both;
  will-change: transform, opacity;
}
.cap-seg-new.active.top {
  box-shadow: 0 4px 28px rgba(82,113,255,.70), inset 0 0 0 1.5px rgba(255,255,255,.20);
}
/* Décalés de +300ms pour démarrer après la fin du fadeIn (250ms) */
.cap-seg-new:nth-child(1).active { animation-delay: 0.30s; }
.cap-seg-new:nth-child(2).active { animation-delay: 0.40s; }
.cap-seg-new:nth-child(3).active { animation-delay: 0.50s; }
.cap-seg-new:nth-child(4).active { animation-delay: 0.60s; }
.cap-seg-new:nth-child(5).active { animation-delay: 0.70s; }
@keyframes segAppear {
  from { transform: scaleY(0.2); opacity: 0; }
  to   { transform: scaleY(1);   opacity: 1; }
}
.seg-num {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.28);
  position: relative; z-index: 1; line-height: 1;
}
.cap-seg-new.active .seg-num { color: rgba(255,255,255,.80); }
/* ── Bullets list on dark bg ── */
.cap-bullets-list {
  display: flex; flex-direction: column;
  gap: 7px;
  position: relative; z-index: 1;
}
.cap-bullet-dark {
  display: flex; align-items: flex-start;
  gap: 10px; padding: 10px 13px;
  border-radius: 11px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.07);
}
.cap-bullet-icon-plus {
  color: #4ade80; font-size: 13px; font-weight: 800;
  flex-shrink: 0; margin-top: 1px; width: 14px;
}
.cap-bullet-icon-moins {
  color: #fbbf24; font-size: 13px; font-weight: 800;
  flex-shrink: 0; margin-top: 1px; width: 14px;
}
.cap-bullet-text {
  font-size: 12.5px; color: rgba(255,255,255,.82); line-height: 1.45;
}
/* ── Bouton téléchargement PDF ── */
.pdf-download-bar {
  padding: 0 var(--side-pad) 12px;
  display: flex;
  justify-content: flex-end;
}
.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-pdf:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-pdf-icon { font-size: 15px; }

/* ── Margin note in top3 cards ── */
.top3-margin-note {
  display: flex; align-items: flex-start;
  gap: 8px; padding: 10px 12px;
  border-radius: 10px; margin-top: 10px;
  font-size: 12.5px; line-height: 1.45;
}
.top3-margin-note.marge-warning {
  background: rgba(251,191,36,.10);
  border: 1px solid rgba(251,191,36,.28);
  color: #92400e;
}
.top3-margin-note.marge-bonus {
  background: rgba(82,113,255,.08);
  border: 1px solid rgba(82,113,255,.22);
  color: var(--color-primary-dark);
}

/* ── Logo fusée (résultats uniquement) ──────────────────────── */
.app-logo--rocket {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(255,255,255,.35));
}

/* ── Rocket fly-across animation ─────────────────────────────── */
.rocket-launch-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;   /* below .results-screen (z-index: 100) */
  overflow: hidden;
}
:root {
  --rocket-fly-angle:         45deg;  /* fallback animation 1 */
  --rocket-fly-reverse-angle: 135deg; /* fallback animation 3 */
}

/* ── Animation 2 : droite milieu → gauche milieu ── */
.rocket-fly-left-img {
  position: fixed;
  width: 230px;
  height: auto;
  top: calc(50vh - 75px);
  left: calc(100vw + 130px);
  animation: rocketFlyLeft 3.6s cubic-bezier(0.3, 0.0, 0.55, 1.0) forwards;
  will-change: transform, opacity;
}
@keyframes rocketFlyLeft {
  0%   { transform: translateX(0) rotate(-90deg) scale(0.65); opacity: 0; }
  6%   { transform: translateX(0) rotate(-90deg) scale(1);    opacity: 1; }
  93%  { opacity: 1; }
  100% { transform: translateX(calc(-100vw - 260px)) rotate(-90deg) scale(1); opacity: 0; }
}

/* ── Animation 3 : haut-gauche → bas-droite ── */
.rocket-fly-reverse-img {
  position: fixed;
  width: 230px;
  height: auto;
  top: 0;
  left: 0;
  animation: rocketFlyReverse 3.6s cubic-bezier(0.3, 0.0, 0.55, 1.0) forwards;
  will-change: transform, opacity;
}
@keyframes rocketFlyReverse {
  0%   { transform: translate(-260px, -260px) rotate(var(--rocket-fly-reverse-angle)) scale(0.65); opacity: 0; }
  6%   { transform: translate(-80px,  -80px)  rotate(var(--rocket-fly-reverse-angle)) scale(1);    opacity: 1; }
  93%  { opacity: 1; }
  100% { transform: translate(calc(100vw + 260px), calc(100vh + 260px)) rotate(var(--rocket-fly-reverse-angle)) scale(1); opacity: 0; }
}

.rocket-fly-img {
  position: fixed;
  width: 230px;  /* 2× plus grande */
  height: auto;
  bottom: 0;
  left: 0;
  animation: rocketFlyAcross 3.6s cubic-bezier(0.3, 0.0, 0.55, 1.0) forwards;
  will-change: transform, opacity;
}
@keyframes rocketFlyAcross {
  0%   { transform: translate(-260px, 260px) rotate(var(--rocket-fly-angle)) scale(0.65); opacity: 0; }
  6%   { transform: translate(-100px, 100px) rotate(var(--rocket-fly-angle)) scale(1);    opacity: 1; }
  93%  { opacity: 1; }
  100% {
    transform: translate(calc(100vw + 260px), calc(-100vh - 260px)) rotate(var(--rocket-fly-angle)) scale(1);
    opacity: 0;
  }
}
.smoke-puff-trail {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,180,60,0.9) 0%, rgba(220,100,20,0.6) 30%, rgba(160,160,160,0.3) 60%, rgba(200,200,200,0) 100%);
  filter: blur(9px);
  pointer-events: none;
  z-index: 9999;
  animation: smokePuffFade 1.6s ease-out forwards;
  will-change: transform, opacity;
}
.smoke-puff-trail.puff-gray {
  background: radial-gradient(circle, rgba(230,230,230,0.88) 0%, rgba(180,180,180,0.5) 40%, rgba(150,150,150,0) 80%);
  filter: blur(12px);
}
@keyframes smokePuffFade {
  0%   { transform: scale(0.35); opacity: 0.95; }
  20%  { transform: scale(1.2);  opacity: 0.85; }
  100% { transform: scale(4.5);  opacity: 0;    }
}

/* ── Rocket : desktop uniquement (animations désactivées en JS sur mobile) ── */

/* ── Time-to-Market widget ─────────────────────────────────── */
.ttm-widget {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 18px;
  padding: 18px 20px 14px;
  margin: 18px 0 10px;
  backdrop-filter: blur(10px);
}
.ttm-top-label {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.ttm-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.ttm-number {
  font-family: var(--font-head);
  font-size: 46px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -1.5px;
}
.ttm-unit {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255,255,255,0.70);
  letter-spacing: 0;
}
.ttm-tag {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.ttm-bar-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: visible;
}
.ttm-bar-fill {
  height: 100%;
  border-radius: 6px;
  min-width: 6px;
}
.ttm-bar-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid #fff;
}
.ttm-scale-row {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: rgba(255,255,255,0.40);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   IMPRESSION / PDF EXPORT
   ══════════════════════════════════════════════════════════════ */
@media print {
  @page { margin: 12mm 14mm; size: A4; }

  /* Fond blanc partout */
  body, #app, .screen, .results-screen { background: white !important; }

  /* Masquer les éléments non utiles au PDF */
  .rdv-pitch-section,
  .results-sticky-cta,
  .pdf-download-bar,
  .accordion-chevron { display: none !important; }

  /* En-tête impression */
  .results-header {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    border-radius: 0 !important;
  }

  /* Pas de padding-bottom excessif */
  .results-screen { padding-bottom: 0 !important; }

  /* Ouvrir tous les accordéons */
  .country-accordion-body {
    max-height: none !important;
    overflow: visible !important;
  }
  .country-row { break-inside: avoid; }
  .top3-card   { break-inside: avoid; }

  /* Carte cap dark : forcer les couleurs */
  .cap-dark-card {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .cap-seg-new.active {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Éviter les coupures de page sur les sections importantes */
  .export-cap-section,
  .top3-section,
  .all-countries-section { break-inside: avoid; }
}
