/* ============================================================
   BOUSSOLE POLITIQUE — style.css
   Police : Inter (Google Fonts) ou système
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */

:root {
  --primary:       #1e3a5f;
  --primary-light: #2d5a9e;
  --accent:        #e63946;
  --bg:            #f8f9fa;
  --bg-card:       #ffffff;
  --text:          #1a1a2e;
  --text-muted:    #6c757d;
  --border:        #e0e0e0;
  --success:       #2d6a4f;

  --radius-card:   12px;
  --radius-btn:    8px;
  --radius-pill:   50px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);

  --transition: 0.2s ease;

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, canvas {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden {
  display: none !important;
}

/* ============================================================
   LAYOUT — CONTAINER
   ============================================================ */

.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container--narrow {
  max-width: 680px;
}

/* ============================================================
   NAVIGATION — SITE HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -.01em;
}

.nav__logo span:first-child {
  font-size: 1.4rem;
}

/* ---- Quiz page header ---- */

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.quiz-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.quiz-header__back {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.quiz-header__back:hover {
  color: var(--primary);
}

.quiz-header__logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.quiz-header__type {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  background-color: var(--primary);
  color: #fff;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-btn);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color var(--transition),
              color var(--transition),
              border-color var(--transition),
              transform var(--transition),
              box-shadow var(--transition);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(.98);
}

/* Primary */
.btn--primary {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn--primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

/* Secondary */
.btn--secondary {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--secondary:hover {
  background-color: rgba(30, 58, 95, .06);
  box-shadow: var(--shadow-sm);
}

/* Ghost */
.btn--ghost {
  background-color: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn--ghost:hover {
  background-color: rgba(0,0,0,.05);
  color: var(--text);
}

/* Sizes */
.btn--large {
  padding: .875rem 2rem;
  font-size: 1.0625rem;
  border-radius: 10px;
}

.btn--small {
  padding: .375rem .875rem;
  font-size: .8125rem;
}

/* Full width */
.btn--full {
  width: 100%;
}

/* Share variants */
.btn--share {
  font-size: .875rem;
  padding: .5rem 1.125rem;
}

.btn--twitter {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.btn--twitter:hover {
  background-color: #222;
  border-color: #222;
}

.btn--reddit {
  background-color: #FF4500;
  color: #fff;
  border-color: #FF4500;
}

.btn--reddit:hover {
  background-color: #e03d00;
  border-color: #e03d00;
}

.btn--copy {
  background-color: var(--border);
  color: var(--text);
  border-color: var(--border);
}

.btn--copy:hover {
  background-color: #d0d0d0;
  border-color: #d0d0d0;
}

.btn--download {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn--download:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

/* Toast notification */
.share-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e3a5f;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  max-width: 380px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}
.share-toast.share-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   HERO — PAGE D'ACCUEIL
   ============================================================ */

.hero {
  text-align: center;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  margin-top: 20px;
  background: linear-gradient(135deg, var(--primary) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

/* ============================================================
   QUIZ OPTIONS — GRILLE DE CARDS
   ============================================================ */

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding-bottom: 4rem;
}

/* Quiz card */
.quiz-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}

.quiz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.quiz-card--complete {
  border-color: var(--primary);
  background: linear-gradient(160deg, #fff 60%, rgba(30,58,95,.03) 100%);
}

/* Badge "Recommandé" */
.quiz-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .2rem .65rem;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background-color: var(--accent);
  color: #fff;
}

.quiz-card__icon {
  font-size: 2.5rem;
  line-height: 1;
}

.quiz-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.quiz-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.quiz-card__time,
.quiz-card__count {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .65rem;
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 500;
  background-color: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.quiz-card__desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */

.features {
  background-color: #f1f3f5;
  padding: 4rem 0;
}

.features__title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2.5rem;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-item__icon {
  font-size: 2.25rem;
  margin-bottom: .75rem;
  line-height: 1;
}

.feature-item__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .4rem;
}

.feature-item__desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

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

/* ============================================================
   QUIZ — PROGRESS BAR
   ============================================================ */

.quiz-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 4px;
  background-color: var(--border);
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   QUIZ — STEPS
   ============================================================ */

.step {
  min-height: calc(100vh - 52px);
  padding: 2.5rem 0 3rem;
  display: flex;
  flex-direction: column;
}

.step.hidden {
  display: none;
}

.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}

.step-header__subtitle {
  font-size: .95rem;
  color: var(--text-muted);
}

.step-footer {
  text-align: center;
  margin-top: 2rem;
}

/* ============================================================
   QUIZ — META (thème + compteur)
   ============================================================ */

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: .75rem;
}

.quiz-theme-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .85rem;
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 600;
  background-color: rgba(30,58,95,.1);
  color: var(--primary);
  border: 1px solid rgba(30,58,95,.15);
}

.quiz-counter {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   QUIZ — QUESTION CARD
   ============================================================ */

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.question-text {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.75rem;
}

/* ============================================================
   QUIZ — ANSWER OPTIONS
   ============================================================ */

.answer-options {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.answer-btn {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding: .875rem 1.25rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--transition),
              border-color var(--transition),
              color var(--transition),
              transform var(--transition),
              box-shadow var(--transition);
  font-family: inherit;
}

.answer-btn:hover {
  background-color: rgba(45, 90, 158, .06);
  border-color: var(--primary-light);
  transform: translateX(2px);
}

.answer-btn.selected {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.answer-btn.selected:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.answer-btn__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 1.75rem;
  text-align: center;
  line-height: 1;
}

.answer-btn__label {
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ============================================================
   QUIZ — NAVIGATION
   ============================================================ */

.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

/* ============================================================
   QUIZ — PRIORITY LIST (drag & drop)
   ============================================================ */

.priority-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  counter-reset: priority-counter;
}

.priority-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: grab;
  user-select: none;
  transition: background-color var(--transition),
              border-color var(--transition),
              box-shadow var(--transition),
              opacity var(--transition);
  box-shadow: var(--shadow-sm);
  counter-increment: priority-counter;
}

.priority-item:active {
  cursor: grabbing;
}

.priority-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.priority-item.dragging {
  opacity: .45;
  box-shadow: none;
}

.priority-item.drag-over {
  border-color: var(--primary);
  background-color: rgba(30,58,95,.05);
  box-shadow: 0 0 0 3px rgba(30,58,95,.12);
}

.priority-item__rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.priority-item__handle {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
  cursor: grab;
}

.priority-item__label {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

/* ============================================================
   RÉSULTATS — LOADING
   ============================================================ */

.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--bg);
  padding: 2rem;
  text-align: center;
}

.results-loading.hidden {
  display: none;
}

.loading-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 420px;
}

.loading-compass {
  font-size: 4rem;
  line-height: 1;
  animation: spin-compass 3s linear infinite;
  display: block;
}

.loading-bar {
  width: 100%;
  height: 6px;
  background-color: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.loading-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-pill);
  width: 0%;
  animation: fill-loading 2.5s ease-in-out forwards;
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  animation: pulse-text 1.4s ease-in-out infinite;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  margin-top: .5rem;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .875rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(8px);
  animation: fade-in-up .4s ease forwards;
}

.loading-step:nth-child(1) { animation-delay: .3s; }
.loading-step:nth-child(2) { animation-delay: .8s; }
.loading-step:nth-child(3) { animation-delay: 1.3s; }
.loading-step:nth-child(4) { animation-delay: 1.8s; }
.loading-step:nth-child(5) { animation-delay: 2.2s; }

/* ============================================================
   RÉSULTATS — CONTENT
   ============================================================ */

.results-content {
  padding: 0rem 0 4rem;
}

.results-content.hidden {
  display: none;
}

/* Header résultats */
.results-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.results-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 1rem;
}

.results-header__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

/* Zone exportable */
.results-exportable {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

/* ---- Profil ---- */
.result-profile {
  text-align: center;
  margin-bottom: 2rem;
}

.result-profile__label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.result-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}

.result-word {
  display: inline-flex;
  align-items: center;
  padding: .35rem 1rem;
  border-radius: var(--radius-pill);
  background-color: rgba(30,58,95,.08);
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ---- Stats de comparaison ---- */
.result-stats {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin: 1.2rem 0 1.6rem;
}

.result-stat-item {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: .95rem;
  flex-wrap: wrap;
}

.result-stat-item__label {
  color: var(--text-muted);
}

.result-stat-item__value {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---- Axes Bars ---- */
.axes-bars {
  max-width: 420px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.axes-bar__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.axes-bar__track {
  position: relative;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: visible;
}

.axes-bar__center-line {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 2px;
  height: 14px;
  background: rgba(0,0,0,0.22);
  transform: translateX(-50%);
  z-index: 1;
}

.axes-bar__fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1),
              left  0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.axes-bar__marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2.5px solid var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  z-index: 2;
  transition: left 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Boussole + Barres côte à côte ---- */
.compass-bars-row {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.compass-bars-row .compass-wrapper {
  margin-bottom: 0;
  flex-shrink: 0;
}

.compass-bars-row .axes-bars {
  margin: 0;
  max-width: 360px;
  flex: 1;
  min-width: 0;
}

/* ---- Boussole ---- */
.compass-wrapper {
  margin-bottom: 2rem;
}

.compass-wrapper__title {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .78rem;
}

.compass-container {
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

#compass-canvas {
  max-width: 100%;
  border-radius: var(--radius-card);
  display: block;
  margin: 0 auto;
}

/* ---- Badge parti (dans exportable) ---- */
.result-party-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-top: 1.5rem;
}

.party-badge-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background-color: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
}

.party-badge-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* ---- Image logo générique ---- */
.party-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   RÉSULTATS — ZONE PRIVÉE
   ============================================================ */

.results-private {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--border);
}

.results-private__title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Détail parti */
.party-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.party-detail__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.party-detail__logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background-color: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
}

.party-detail__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.party-detail__sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.party-detail__desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Note adhésion */
.adhesion-note {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background-color: #fffbe6;
  border-left: 4px solid #f5a623;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  font-size: .875rem;
}

.adhesion-note.hidden {
  display: none;
}

.adhesion-note__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

.adhesion-note__text {
  color: var(--text);
  line-height: 1.55;
}

.adhesion-note__link {
  color: whitesmoke;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Partis suivants (runner-up) ---- */
.runner-up-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.runner-up-section__title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.runner-up-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.runner-up-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: .7rem 1rem;
  position: relative;
  overflow: hidden;
}

.runner-up-card__strip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}

.runner-up-card__logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.runner-up-card__name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   RÉSULTATS — PARTAGE
   ============================================================ */

.results-share {
  text-align: center;
  padding: 2rem 0;
}

/* Variante haute (au-dessus des résultats) */
.results-share--top {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.results-share__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .75rem;
  color: var(--text-muted);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
}

/* ============================================================
   KEYFRAMES / ANIMATIONS
   ============================================================ */

@keyframes spin-compass {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.12); opacity: .8; }
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

@keyframes fill-loading {
  0%   { width: 0%; }
  60%  { width: 70%; }
  85%  { width: 88%; }
  100% { width: 98%; }
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */

@media (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-options {
    gap: 1rem;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 640px)
   ============================================================ */

@media (max-width: 640px) {

  /* Layout */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Hero */
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero__title {
    font-size: 2rem;
    letter-spacing: -.02em;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  /* Quiz options */
  .quiz-options {
    grid-template-columns: 1fr;
  }

  /* Features */
  .features__grid {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .btn--large {
    padding: .75rem 1.5rem;
    font-size: 1rem;
  }

  /* Quiz */
  .step {
    padding: 1.75rem 0 2rem;
  }

  .question-card {
    padding: 1.5rem 1.125rem 1.25rem;
  }

  .question-text {
    font-size: 1.05rem;
  }

  .answer-btn {
    padding: .75rem 1rem;
    gap: .65rem;
  }

  .answer-btn__label {
    font-size: .875rem;
  }

  .quiz-meta {
    flex-wrap: wrap;
    gap: .5rem;
  }

  /* Boussole + Barres */
  .compass-container {
    max-width: 100%;
  }

  .compass-bars-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .compass-bars-row .compass-wrapper {
    flex-shrink: 1;
  }

  .compass-bars-row .axes-bars {
    max-width: 100%;
    flex: none;
    margin-bottom: 0;
  }

  .axes-bars {
    max-width: 100%;
  }

  .axes-bar__track {
    overflow: visible;
  }

  .axes-bar__labels {
    font-size: .68rem;
  }

  /* Results exportable */
  .results-exportable {
    padding: 1.5rem 1.125rem;
  }

  .result-word {
    font-size: 1.3rem;
  }

  /* Runner-up list */
  .runner-up-card {
    padding: .6rem .85rem;
  }

  /* Share buttons */
  .share-buttons {
    gap: .5rem;
  }

  .share-buttons .btn--share {
    flex: 1 1 calc(50% - .25rem);
    min-width: 0;
    justify-content: center;
  }

  /* Party detail */
  .party-detail-card {
    padding: 1.25rem;
  }

  /* Loading */
  .loading-compass {
    font-size: 3rem;
  }

  /* Results header */
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  /* Nav */
  .nav {
    height: 56px;
  }

  .nav__logo {
    font-size: 1rem;
  }

  /* Priority list */
  .priority-item {
    padding: .75rem 1rem;
  }
}

/* ============================================================
   VERY SMALL SCREENS (≤ 380px)
   ============================================================ */

@media (max-width: 380px) {
  .features__grid {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .quiz-header .container {
    gap: .5rem;
  }

  .quiz-header__type {
    font-size: .68rem;
    padding: .2rem .55rem;
  }
}
