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

:root {
  --bg: #FAF6F1;
  --bg-card: #FFFFFF;
  --primary: #5C3D2E;
  --primary-light: #8B6914;
  --accent: #C9A96E;
  --accent-light: #E8D9B8;
  --text: #2C1810;
  --text-mid: #5A4A3E;
  --text-light: #8A7A6E;
  --border: #E8DFD0;
  --error: #C0392B;
  --success: #27AE60;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(44,24,16,0.06);
  --shadow-md: 0 4px 20px rgba(44,24,16,0.10);
  --shadow-lg: 0 8px 40px rgba(44,24,16,0.14);
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== User Topbar ===== */
.user-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: rgba(92, 61, 46, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
}
.topbar-username {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-topbar-quit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.btn-topbar-quit:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.btn-topbar-quit svg {
  flex-shrink: 0;
}
/* Decaler le contenu quand la topbar est visible */
body.has-topbar .screen {
  padding-top: 36px;
}

/* ===== Screen System ===== */
.screen {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

.screen.fade-out {
  opacity: 0;
}

/* ===== Welcome Screen ===== */
.welcome-container {
  width: 100%;
  max-width: 520px;
  padding: 40px 24px;
  text-align: center;
}

.logo-area {
  margin-bottom: 36px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--accent-light);
  margin-bottom: 20px;
}

.welcome-container h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto;
}

/* Steps */
.how-it-works {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  padding: 20px 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-mid);
  white-space: nowrap;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-divider {
  width: 24px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* Auth area */
#auth-area,
#form-guest,
#logged-area {
  text-align: left;
  margin-bottom: 20px;
}

.google-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-light);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-mid);
  margin: 14px 0 0;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.btn-guest {
  display: block;
  width: 100%;
  padding: 12px 24px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-guest:hover {
  border-color: var(--accent);
  color: var(--primary);
  background: rgba(201,169,110,0.05);
}

.btn-text {
  display: inline-block;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition);
}

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

.logged-hello {
  text-align: center;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 24px;
}

.resume-banner {
  background: linear-gradient(135deg, #FFFCF5, var(--accent-light));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: center;
}

.resume-banner .resume-text {
  font-size: 0.92rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.resume-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.resume-actions .btn-primary {
  width: auto;
}

#btn-logout {
  display: block;
  text-align: center;
  margin: 16px auto 0;
}

/* Form */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

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

.error-msg {
  display: block;
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 4px;
  min-height: 1.2em;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.legal-note {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* ===== Compare Screen ===== */
.compare-container {
  width: 100%;
  max-width: 1280px;
  padding: 32px 24px;
}

.compare-header {
  text-align: center;
  margin-bottom: 28px;
}

.progress-area {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 360px;
  margin: 0 auto 16px;
}

.btn-undo {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0;
}

.btn-undo:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201,169,110,0.08);
}

.btn-undo:active {
  transform: scale(0.92);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  min-width: 48px;
}

.compare-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

/* Comparison Cards */
.comparison-area {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  user-select: none;
}

.photo-card.chosen {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.photo-card.rejected {
  opacity: 0.4;
  transform: scale(0.97);
}

.photo-visual {
  position: absolute;
  inset: 0;
  transition: opacity 0.4s ease;
}

.vs-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  flex-shrink: 0;
}

/* ===== Enquete demographique ===== */
.survey-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
}

.survey-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7B5A2E);
  color: var(--accent-light);
  margin-bottom: 20px;
}

.survey-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.survey-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 28px;
}

.survey-container .form-group {
  text-align: left;
  margin-bottom: 18px;
}

.survey-container select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A7A6E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.survey-container select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

.survey-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.survey-actions .btn-primary {
  width: 100%;
}

/* ===== Filtres de pieces ===== */
.filter-bar {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.btn-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-filter-toggle:hover,
.btn-filter-toggle.active {
  border-color: var(--accent);
  color: var(--primary);
  background: rgba(201,169,110,0.08);
}

.btn-filter-toggle svg {
  flex-shrink: 0;
}

.filter-panel {
  margin: 12px auto 0;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 600px;
  animation: filter-fade-in 0.2s ease;
}

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

.filter-rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-mid);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.filter-checkbox input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-separator {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.filter-same-room-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.filter-same-room-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ===== Boutons de choix (segmentes) ===== */
.choice-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
}

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
  min-height: 64px;
}

.choice-btn .choice-arrows {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1;
  transition: color var(--transition);
}

.choice-btn .choice-text {
  font-size: 0.78rem;
  white-space: nowrap;
}

.choice-btn:hover,
.choice-btn:focus-visible {
  border-color: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.choice-btn:hover .choice-arrows,
.choice-btn:focus-visible .choice-arrows {
  color: var(--accent);
}

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

.choice-strong-left,
.choice-strong-right {
  background: linear-gradient(135deg, #FFFCF8, #FFF8EC);
}

.choice-equal {
  background: var(--bg-card);
}

.choice-strong-left:hover .choice-arrows,
.choice-strong-right:hover .choice-arrows {
  color: var(--primary);
}

/* Bouton "Ni l'une ni l'autre" : ligne secondaire sous la grille principale */
.choice-neither-row {
  display: flex;
  justify-content: center;
  margin: 12px auto 0;
  max-width: 720px;
}

.choice-neither {
  min-height: 38px;
  padding: 6px 16px;
  font-size: 0.78rem;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-light);
  flex: 0 0 auto;
}

.choice-neither:hover,
.choice-neither:focus-visible {
  border-color: #c44;
  color: #b33;
  background: rgba(196, 68, 68, 0.04);
  transform: translateY(-1px);
}


/* ===== Results Screen ===== */
.results-container {
  width: 100%;
  max-width: 700px;
  padding: 48px 24px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.results-subtitle {
  font-size: 1rem;
  color: var(--text-mid);
}

/* Podium */
.results-podium {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.podium-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  animation: podium-in 0.5s ease forwards;
}

.podium-card:nth-child(1) { animation-delay: 0.1s; }
.podium-card:nth-child(2) { animation-delay: 0.25s; }
.podium-card:nth-child(3) { animation-delay: 0.4s; }
.podium-card:nth-child(4) { animation-delay: 0.55s; }
.podium-card:nth-child(5) { animation-delay: 0.7s; }

/* A partir du 4eme rang, on reduit l'emphase visuelle */
.podium-card:nth-child(n+4) {
  padding: 18px 20px;
  gap: 16px;
}

.podium-card:nth-child(n+4) .podium-swatch {
  width: 72px;
  height: 72px;
}

.podium-card:nth-child(n+4) .podium-name {
  font-size: 1.1rem;
}

.podium-card:nth-child(n+4) .podium-desc {
  font-size: 0.82rem;
}

.podium-card:nth-child(n+4) .podium-rank {
  font-size: 1.6rem;
}

@keyframes podium-in {
  to { opacity: 1; transform: translateY(0); }
}

.podium-card:first-child {
  border: 2px solid var(--accent);
}

.podium-rank {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 36px;
}

.podium-card:first-child .podium-rank {
  font-size: 2.5rem;
}

.podium-info {
  flex: 1;
}

.podium-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.podium-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 12px;
}

.podium-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.podium-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.podium-score {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 4px;
  text-align: right;
}

.podium-swatch {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
}

.podium-card:first-child .podium-swatch {
  width: 120px;
  height: 120px;
}

/* Full ranking */
.results-full-section {
  text-align: center;
  margin-bottom: 32px;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle:hover {
  border-color: var(--accent);
  color: var(--primary);
}

.btn-toggle.open svg {
  transform: rotate(180deg);
}

.btn-toggle svg {
  transition: transform var(--transition);
}

.results-full-list {
  margin-top: 20px;
  text-align: left;
}

.results-full-list.hidden {
  display: none;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-pos {
  font-size: 0.78rem;
  color: var(--text-light);
  min-width: 28px;
  text-align: right;
  font-weight: 500;
}

.rank-swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
}

.rank-name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

.rank-bar-track {
  width: 120px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.rank-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.6s ease;
}

.rank-pct {
  font-size: 0.78rem;
  color: var(--text-light);
  min-width: 36px;
  text-align: right;
}

.rank-hidden-note {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

/* Actions */
.results-actions {
  text-align: center;
}

.results-actions .btn-primary {
  width: auto;
  padding: 12px 36px;
}

/* Banniere d'affinement (en haut des resultats) */
.refine-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 36px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--primary), #7B5A2E);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(92,61,46,0.25);
  color: #fff;
  animation: refine-pulse 2s ease-in-out 1s 1;
}

@keyframes refine-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(92,61,46,0.25); }
  50% { box-shadow: 0 6px 32px rgba(201,169,110,0.45); }
}

.refine-banner.hidden {
  display: none;
}

.refine-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--accent-light);
  flex-shrink: 0;
}

.refine-content {
  flex: 1;
}

.refine-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.refine-text {
  font-size: 0.88rem;
  opacity: 0.85;
  line-height: 1.5;
  margin: 0;
}

.btn-refine-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-refine-cta:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Bandeau telechargement PDF */
.download-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  margin: 32px 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 360px;
  padding: 14px 18px;
  text-align: left;
  flex: 1 1 260px;
  /* hauteur minimale pour eviter le saut quand le label wrap a 2 lignes */
  min-height: 64px;
}

.btn-download-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
  /* deverrouille le wrap herite de .btn-secondary (nowrap) */
  white-space: normal;
  text-align: left;
}

.btn-download-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: normal;
}

.btn-download-sub {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 2px;
  white-space: normal;
  line-height: 1.3;
}

.btn-download--premium {
  background: linear-gradient(135deg, var(--primary), #3a2618);
  color: #fff;
  border-color: var(--primary);
}

.btn-download--premium:hover {
  background: linear-gradient(135deg, #3a2618, var(--primary));
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 520px) {
  .download-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .btn-download {
    max-width: none;
    width: 100%;
  }
}

/* ===== Premium gate ===== */

/* Contenu verrouille : masque via classe (jamais via display inline) */
.premium-hidden {
  display: none !important;
}

/* La gate : encart visible entre le podium et le reste */
.premium-gate {
  background: linear-gradient(135deg, #FFFCF8, var(--accent-light));
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  margin-bottom: 32px;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.premium-gate--unlocked {
  display: none !important;
}

.premium-gate--opening {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.premium-gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.premium-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  max-width: 360px;
  margin: 0;
}

.premium-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  max-width: 280px;
  width: 100%;
}

.premium-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-mid);
}

.premium-features li svg {
  flex-shrink: 0;
  color: var(--success);
}

.btn-premium-unlock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-md);
}

.btn-premium-unlock:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.premium-launch-note {
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 500;
  margin: 0;
}

/* Apercu flou des lignes de classement */
.premium-gate-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  filter: blur(3px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.premium-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.pprow-num {
  font-size: 0.82rem;
  color: var(--text-light);
  min-width: 20px;
}

.pprow-bar {
  flex: 1;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--border));
  border-radius: 4px;
  max-width: 180px;
}

.pprow-bar--short { max-width: 120px; }
.pprow-bar--xs    { max-width: 80px; }

.pprow-pct {
  width: 36px;
  height: 10px;
  background: var(--border);
  border-radius: 3px;
}

/* Contenu debloque : animation d'apparition */
@keyframes premium-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.premium-content:not(.premium-hidden) {
  animation: premium-reveal 0.4s ease forwards;
}

/* ===== Galerie de style (modal) ===== */
.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44,24,16,0.55);
  backdrop-filter: blur(4px);
}

.gallery-panel {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -8px 40px rgba(44,24,16,0.25);
  padding: 28px 28px 20px;
  overflow-y: auto;
  animation: gallery-slide-up 0.3s ease;
}

@keyframes gallery-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.gallery-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--border);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-close:hover {
  background: var(--primary);
  color: #fff;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
  padding-right: 40px;
}

.gallery-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.gallery-votes {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
}

.gallery-vote-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.gallery-vote-btn:hover {
  transform: scale(1.15);
}

.gallery-vote-btn.vote-up:hover,
.gallery-vote-btn.vote-up.active {
  background: rgba(39,174,96,0.85);
  border-color: #27AE60;
}

.gallery-vote-btn.vote-down:hover,
.gallery-vote-btn.vote-down.active {
  background: rgba(192,57,43,0.85);
  border-color: #C0392B;
}

.gallery-item.voted-up {
  outline: 3px solid #27AE60;
  outline-offset: -3px;
}

.gallery-item.voted-down {
  outline: 3px solid #C0392B;
  outline-offset: -3px;
}

.gallery-item.voted-down img {
  opacity: 0.45;
}

/* Rendre les cartes podium et rank rows cliquables */
.podium-card {
  cursor: pointer;
}

.podium-card:hover {
  box-shadow: var(--shadow-md);
}

.rank-row {
  cursor: pointer;
  transition: background var(--transition);
}

.rank-row:hover {
  background: rgba(201,169,110,0.08);
}

/* ===== Photo visual patterns ===== */
.photo-visual .pattern-layer {
  position: absolute;
  inset: 0;
  opacity: 0.12;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .comparison-area {
    gap: 20px;
  }
}

@media (max-width: 700px) {

  /* ---- Ecran de bienvenue : compact sans scroll ---- */
  #screen-welcome {
    align-items: flex-start;
    overflow-y: auto;
    min-height: 100dvh;
  }

  .welcome-container {
    padding: 24px 20px 20px;
  }

  .welcome-container h1 {
    font-size: 1.7rem;
  }

  .logo-area {
    margin-bottom: 20px;
  }

  .logo-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
  }

  .logo-icon svg {
    width: 28px;
    height: 28px;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .how-it-works {
    flex-direction: row;
    gap: 6px;
    padding: 12px 0;
    margin-bottom: 20px;
  }

  .step-item {
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    text-align: center;
    flex: 1;
    white-space: normal;
  }

  .step-divider {
    width: 1px;
    height: 32px;
    flex-shrink: 0;
  }

  #auth-area,
  #form-guest,
  #logged-area {
    margin-bottom: 12px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group input {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .btn-primary {
    padding: 12px 20px;
    font-size: 0.92rem;
  }

  .auth-divider {
    margin: 12px 0;
  }

  .legal-note {
    margin-top: 12px;
  }

  /* ---- Ecran de comparaison : tout dans le viewport ---- */
  #screen-compare {
    align-items: stretch;
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  .compare-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding: 8px 12px 6px;
    overflow: hidden;
  }

  body.has-topbar #screen-compare {
    height: calc(100dvh - 36px);
  }

  body.has-topbar .compare-container {
    height: calc(100dvh - 36px);
  }

  .compare-header {
    flex-shrink: 0;
    margin-bottom: 6px;
  }

  .progress-area {
    margin-bottom: 6px;
  }

  .compare-title {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .filter-bar {
    margin-top: 4px;
  }

  /* Photos : hauteur explicite calculee, evite tout probleme d'heritage */
  .comparison-area {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 6px;
  }

  /* Hauteur explicite : viewport - elements fixes (header ~90px, boutons ~52px,
     badge ~32px, gaps/padding ~40px) = ~214px. On prend 220px avec marge. */
  .photo-card {
    aspect-ratio: unset;
    height: calc((100dvh - 220px) / 2);
    min-height: 80px;
    width: 100%;
  }

  body.has-topbar .photo-card {
    height: calc((100dvh - 36px - 220px) / 2);
  }

  /* Remplacer absolute/inset par un layout normal sur mobile */
  .photo-card .photo-visual {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
  }

  .photo-card .photo-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Fond generatif : le div pattern-layer reste absolu dans le visual relatif */
  .photo-card .photo-visual .pattern-layer {
    position: absolute;
    inset: 0;
  }

  .vs-badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
    margin: 0 auto;
  }

  /* Boutons de choix : compacts, ligne fixe en bas */
  .choice-buttons {
    flex-shrink: 0;
    gap: 4px;
  }

  .choice-btn {
    padding: 7px 3px;
    min-height: 52px;
    font-size: 0.7rem;
  }

  .choice-btn .choice-text {
    font-size: 0.65rem;
  }

  /* Fleches verticales en mobile : haut = photo du haut, bas = photo du bas */
  .choice-strong-left .choice-arrows,
  .choice-soft-left .choice-arrows,
  .choice-strong-right .choice-arrows,
  .choice-soft-right .choice-arrows {
    display: inline-block;
  }
  .choice-strong-left .choice-arrows::after  { content: "\25B2\25B2"; }
  .choice-soft-left .choice-arrows::after    { content: "\25B2"; }
  .choice-soft-right .choice-arrows::after   { content: "\25BC"; }
  .choice-strong-right .choice-arrows::after { content: "\25BC\25BC"; }
  .choice-strong-left .choice-arrows,
  .choice-soft-left .choice-arrows,
  .choice-soft-right .choice-arrows,
  .choice-strong-right .choice-arrows {
    font-size: 0;
  }
  .choice-strong-left .choice-arrows::after,
  .choice-soft-left .choice-arrows::after,
  .choice-soft-right .choice-arrows::after,
  .choice-strong-right .choice-arrows::after {
    font-size: 1rem;
  }

  /* ---- Enquete : scrollable si necessaire ---- */
  .survey-container {
    padding: 24px 16px;
  }
  .survey-title {
    font-size: 1.2rem;
  }
  .survey-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }
  .survey-icon svg {
    width: 28px;
    height: 28px;
  }
  .survey-subtitle {
    font-size: 0.82rem;
    margin-bottom: 16px;
  }
  .survey-container .form-group {
    margin-bottom: 12px;
  }
  .survey-actions {
    margin-top: 16px;
  }

  /* ---- Resultats ---- */
  .refine-banner {
    flex-direction: column;
    text-align: center;
    padding: 16px 14px;
    gap: 12px;
  }

  .refine-icon {
    width: 40px;
    height: 40px;
  }

  .btn-refine-cta {
    width: 100%;
    justify-content: center;
  }

  /* ---- Divers ---- */
  .rank-bar-track {
    width: 60px;
  }

  .gallery-panel {
    max-height: 90vh;
    padding: 20px 16px 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-vote-btn {
    width: 36px;
    height: 36px;
  }

  .filter-panel {
    padding: 10px 12px;
  }

  .filter-rooms {
    gap: 4px 12px;
  }

  .filter-checkbox {
    font-size: 0.8rem;
  }
}

/* ============================================================
   UX REVAMP - Polish, micro-interactions, addictive feedback
   ============================================================ */

/* ---- Welcome screen : CTA invite proeminent ---- */
.btn-cta-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 28px 20px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(92, 61, 46, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-cta-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(92, 61, 46, 0.3);
}
.btn-cta-hero:active { transform: translateY(0); }
.btn-cta-hero .cta-line { display: block; line-height: 1.25; }
.btn-cta-hero .cta-sub {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.btn-cta-hero .cta-arrow {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}
.btn-cta-hero:hover .cta-arrow { transform: translateY(-50%) translateX(4px); }
/* Brillance subtile qui balaie le bouton au repos */
.btn-cta-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  pointer-events: none;
}
.btn-cta-hero:hover::before { animation: cta-shimmer 0.9s ease forwards; }
@keyframes cta-shimmer {
  to { transform: translateX(100%); }
}

/* ---- Auth : section pliable secondaire ---- */
.auth-collapse {
  margin-top: 6px;
  border: none;
}
.auth-collapse-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.92rem;
  list-style: none;
  user-select: none;
  transition: color 0.18s;
}
.auth-collapse-summary::-webkit-details-marker { display: none; }
.auth-collapse-summary:hover { color: var(--primary); }
.auth-collapse-chevron { transition: transform 0.22s ease; }
.auth-collapse[open] .auth-collapse-chevron { transform: rotate(180deg); }
.auth-collapse-body {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  animation: collapse-fade 0.25s ease-out;
}
@keyframes collapse-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Quiz : feedback visuel renforce sur le choix ---- */
.photo-card {
  cursor: default;
}
.photo-card.chosen {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transform: scale(1.025);
  box-shadow: 0 0 0 6px rgba(201, 169, 110, 0.18), var(--shadow-lg);
  animation: card-chosen-pulse 0.55s ease-out;
}
@keyframes card-chosen-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.55), var(--shadow-md); }
  60%  { box-shadow: 0 0 0 14px rgba(201, 169, 110, 0), var(--shadow-lg); }
  100% { box-shadow: 0 0 0 6px rgba(201, 169, 110, 0.18), var(--shadow-lg); }
}
.photo-card.rejected {
  opacity: 0.32;
  transform: scale(0.96);
  filter: saturate(0.5) brightness(0.95);
}

/* Choice button : feedback flash quand selectionne */
.choice-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(0.97);
}
.choice-btn.selected .choice-arrows,
.choice-btn.selected .choice-text { color: #fff; }
.choice-btn.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.6);
  animation: btn-ripple 0.5s ease-out;
}
@keyframes btn-ripple {
  to { box-shadow: 0 0 0 14px rgba(201, 169, 110, 0); }
}

/* ---- Progress bar : shimmer + milestones ---- */
.progress-bar {
  position: relative;
  height: 8px;
}
.progress-fill {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.progress-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  animation: progress-shimmer 2.5s linear infinite;
}
@keyframes progress-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-milestone {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--text-light);
  transform: translate(-50%, -50%);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.progress-milestone[data-pct="25"] { left: 25%; }
.progress-milestone[data-pct="50"] { left: 50%; }
.progress-milestone[data-pct="75"] { left: 75%; }
.progress-milestone.reached {
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.25);
}
.progress-text {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--primary);
}

/* ---- Podium : entree dramatique top 1 ---- */
.podium-card { will-change: transform, opacity; }
/* Inverser l'ordre : top 5 -> 4 -> 3 -> 2 -> 1 (le top arrive en dernier pour l'effet wow) */
.podium-card:nth-child(1) { animation-delay: 0.7s; }
.podium-card:nth-child(2) { animation-delay: 0.55s; }
.podium-card:nth-child(3) { animation-delay: 0.4s; }
.podium-card:nth-child(4) { animation-delay: 0.25s; }
.podium-card:nth-child(5) { animation-delay: 0.1s; }

.podium-card:first-child {
  border: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
  animation: podium-in-hero 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.25), var(--shadow-md);
}
@keyframes podium-in-hero {
  0%   { opacity: 0; transform: translateY(28px) scale(0.96); }
  60%  { opacity: 1; transform: translateY(-3px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* Halo pulsant subtil sur le top 1 */
.podium-card:first-child::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.4), transparent 50%, rgba(201, 169, 110, 0.4));
  opacity: 0;
  animation: podium-halo 3s ease-in-out 1.4s infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes podium-halo {
  0%, 100% { opacity: 0; }
  50%      { opacity: 0.7; }
}
/* Etoile/sparkle sur le top 1 */
.podium-card:first-child::after {
  content: "★";
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--accent);
  font-size: 1.2rem;
  opacity: 0;
  animation: sparkle-in 0.6s ease 1.2s forwards;
}
@keyframes sparkle-in {
  0%   { opacity: 0; transform: scale(0) rotate(-90deg); }
  60%  { opacity: 1; transform: scale(1.4) rotate(15deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---- PDF buttons : differentiation forte + loading state ---- */
.btn-download {
  position: relative;
  padding-right: 70px; /* place pour le tag */
}
.btn-download-icon { flex-shrink: 0; }
.btn-download-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn-download-tag--free {
  background: var(--bg-soft);
  color: var(--text-light);
  border: 1px solid var(--border);
}
.btn-download-tag--premium {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(201, 169, 110, 0.4);
}
.btn-download--premium {
  position: relative;
  overflow: hidden;
}
/* Brillance subtile qui balaie le bouton premium au repos */
.btn-download--premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.15) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: cta-shimmer 4s ease-in-out 1s infinite;
  pointer-events: none;
}

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
  flex-shrink: 0;
  opacity: 0.85;
}
.btn-download.is-loading {
  pointer-events: none;
  opacity: 0.85;
}
.btn-download.is-loading .btn-loader { display: inline-block; }
.btn-download.is-loading .btn-download-tag { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Bouton partager ---- */
#btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---- Toast / nudge global ---- */
.sn-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--primary);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
  line-height: 1.4;
}
.sn-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.sn-toast.is-success {
  background: linear-gradient(135deg, var(--accent), #b48c46);
}

/* ---- Mobile : tap targets >= 48px + lisibilite ---- */
@media (max-width: 600px) {
  /* Augmente la zone de tap sans elargir : padding vertical genereux,
     padding horizontal serre pour eviter le debordement. */
  .choice-btn { min-height: 54px; padding: 10px 4px; }
  .btn-undo { width: 44px; height: 44px; }
  .btn-filter-toggle { min-height: 42px; padding: 9px 14px; }
  .btn-cta-hero { padding: 20px 22px 18px; font-size: 1rem; }
  .btn-cta-hero .cta-arrow { right: 16px; }
  .sn-toast { bottom: 90px; padding: 12px 18px; font-size: 0.88rem; }
}
@media (max-width: 400px) {
  /* Tres petits ecrans : on ramene les paddings au minimum pour eviter
     que la rangee de 5 boutons ne deborde. */
  .choice-buttons { gap: 3px; }
  .choice-btn { padding: 8px 2px; min-height: 52px; }
  .choice-btn .choice-text { font-size: 0.62rem; line-height: 1.15; }
  .choice-btn .choice-arrows { font-size: 0.85rem; }
}

/* ============================================================
   Premium PDF preview : mini-galerie + incitations multiples
   ============================================================ */

/* 1re incitation : bandeau visible juste sous le greeting (avant le podium) */
.premium-teaser-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 16px 22px;
  margin-bottom: 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  background: linear-gradient(135deg, #fff 60%, rgba(201, 169, 110, 0.12));
  box-shadow: 0 6px 20px rgba(92, 61, 46, 0.08);
  overflow: hidden;
}
/* Etoile decorative discrete dans le coin */
.premium-teaser-top::before {
  content: "";
  position: absolute;
  top: -16px;
  right: -16px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, rgba(201, 169, 110, 0.25), transparent 70%);
  pointer-events: none;
}
.premium-teaser-top .ptt-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-mid);
  position: relative;
  z-index: 1;
}
.premium-teaser-top .ptt-text strong {
  color: var(--primary);
  display: block;
  margin-bottom: 3px;
  font-size: 1rem;
  font-weight: 700;
}
.premium-teaser-top .ptt-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 12px rgba(92, 61, 46, 0.25);
  position: relative;
  z-index: 1;
}
.premium-teaser-top .ptt-cta::after {
  content: "→";
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.18s ease;
}
.premium-teaser-top .ptt-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(92, 61, 46, 0.3);
}
.premium-teaser-top .ptt-cta:hover::after {
  transform: translateX(3px);
}
@media (max-width: 600px) {
  .premium-teaser-top {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 14px 16px;
  }
  .premium-teaser-top .ptt-cta {
    width: 100%;
    justify-content: center;
  }
}

/* Tagline sous le titre du gate */
.premium-tagline {
  font-size: 0.93rem;
  color: var(--text-mid);
  line-height: 1.5;
  max-width: 460px;
  margin: 0 0 6px;
}

/* Galerie des 9 mini-pages PDF */
.pdf-preview-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 8px auto 4px;
}

.pdf-preview-page {
  position: relative;
  aspect-ratio: 0.707;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(40, 30, 20, 0.05);
  overflow: hidden;
  font-size: 6px;
  text-align: left;
  padding: 6px;
  color: var(--text-mid);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pdf-preview-page:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 18px rgba(40, 30, 20, 0.12);
}
.pdf-preview-page::before {
  content: attr(data-num);
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 5.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-light);
}
.pdfp-title {
  font-size: 6.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 1px;
}
.pdfp-sub {
  font-size: 5px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 4px;
  line-height: 1.1;
}
.pdfp-rule {
  height: 0.5px;
  background: var(--accent);
  width: 14px;
  margin-bottom: 3px;
}

/* Page 1 : couverture - photo plein cadre + nom utilisateur */
.pdfp-cover .pdfp-photo-hero {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-color: var(--barBg, #f0eee8);
  border-radius: 2px;
}
.pdfp-cover .pdfp-cover-bottom {
  text-align: center;
  padding-top: 4px;
}
.pdfp-cover .pdfp-cover-name {
  font-size: 7px;
  font-weight: 700;
  color: var(--primary);
}
.pdfp-cover .pdfp-cover-style {
  font-size: 6px;
  color: var(--accent);
  font-style: italic;
}

/* Page 2 : style dominant - hero + texte */
.pdfp-style .pdfp-photo {
  height: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--barBg, #f0eee8);
  border-radius: 2px;
  margin-bottom: 4px;
}
.pdfp-style .pdfp-text-line {
  height: 1.5px;
  background: var(--border);
  border-radius: 1px;
  margin-bottom: 2px;
}
.pdfp-style .pdfp-text-line.short { width: 60%; }

/* Page 3 : top 5 - 5 lignes avec barres */
.pdfp-top5 .pdfp-rank-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
}
.pdfp-top5 .pdfp-rank-num {
  font-size: 6px;
  font-weight: 700;
  color: var(--text-light);
  width: 8px;
}
.pdfp-top5 .pdfp-rank-bar {
  flex: 1;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.pdfp-top5 .pdfp-rank-bar.medium { width: 75%; }
.pdfp-top5 .pdfp-rank-bar.short  { width: 55%; opacity: 0.7; }
.pdfp-top5 .pdfp-rank-bar.xs     { width: 38%; opacity: 0.5; }

/* Page 4 : palette - swatches en grille */
.pdfp-palette .pdfp-swatches-row {
  display: flex;
  gap: 2px;
  margin-bottom: 3px;
}
.pdfp-palette .pdfp-swatch {
  flex: 1;
  height: 14px;
  border-radius: 1px;
}

/* Page 5 : matieres - bullets */
.pdfp-mat .pdfp-bullet {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 2px;
}
.pdfp-mat .pdfp-dot {
  width: 1.5px;
  height: 1.5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.pdfp-mat .pdfp-line {
  flex: 1;
  height: 1.2px;
  background: var(--border);
  border-radius: 0.5px;
}

/* Page 6 : moodboard - 3-photo grid */
.pdfp-mood .pdfp-mood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  flex: 1;
}
.pdfp-mood .pdfp-mood-thumb {
  background-size: cover;
  background-position: center;
  background-color: var(--barBg, #f0eee8);
  border-radius: 1px;
}

/* Page 7 : plantes - 3 colonnes */
.pdfp-plant .pdfp-plant-hero {
  height: 35%;
  background-size: cover;
  background-position: center;
  background-color: #d6dec7;
  border-radius: 2px;
  margin-bottom: 3px;
}
.pdfp-plant .pdfp-plant-cols {
  display: flex;
  gap: 3px;
  flex: 1;
}
.pdfp-plant .pdfp-plant-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}
.pdfp-plant .pdfp-mini-line {
  height: 1px;
  background: var(--border);
  border-radius: 0.5px;
}

/* Page 8 : agencement - photo + bullets */
.pdfp-layout .pdfp-row {
  display: flex;
  gap: 3px;
  align-items: stretch;
  margin-bottom: 3px;
  height: 22px;
}
.pdfp-layout .pdfp-mini-photo {
  width: 22px;
  background-size: cover;
  background-position: center;
  background-color: var(--barBg, #f0eee8);
  border-radius: 1px;
}
.pdfp-layout .pdfp-mini-bullets {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5px;
}

/* Page 9 : touches deco - 5 rangs empiles, chacun avec rang + ruban couleur */
.pdfp-deco .pdfp-deco-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.pdfp-deco .pdfp-deco-row {
  display: flex;
  align-items: center;
  gap: 3px;
}
.pdfp-deco .pdfp-deco-rank-mini {
  font-size: 5.5px;
  font-weight: 700;
  color: var(--accent);
  width: 8px;
  flex-shrink: 0;
}
.pdfp-deco .pdfp-deco-strip-mini {
  flex: 1;
  height: 4px;
  display: flex;
  gap: 0;
  border-radius: 1px;
  overflow: hidden;
}
.pdfp-deco .pdfp-deco-strip-seg { flex: 1; }
/* Anciennes classes (compat) - peuvent etre supprimees plus tard */
.pdfp-deco .pdfp-deco-cols {
  display: flex;
  gap: 4px;
  flex: 1;
}
.pdfp-deco .pdfp-deco-col { flex: 1; }
.pdfp-deco .pdfp-deco-rank {
  font-size: 6px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1px;
}
.pdfp-deco .pdfp-deco-strip {
  height: 1.5px;
  margin: 2px 0 3px;
  display: flex;
  gap: 0;
}

@media (max-width: 600px) {
  .pdf-preview-gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pdf-preview-page { font-size: 5px; padding: 4px; gap: 2px; }
  .pdfp-title { font-size: 5.5px; }
  .premium-teaser-top { flex-direction: column; align-items: stretch; text-align: left; }
  .premium-teaser-top .ptt-cta { width: 100%; }
}

/* Barre flottante d'incitation (visible apres scroll passe le gate, avant unlock) */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(140%);
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
}
.sticky-cta.is-visible {
  transform: translateX(-50%) translateY(0);
}
.sticky-cta:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}
.sticky-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  flex-shrink: 0;
}
.sticky-cta strong {
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 600px) {
  .sticky-cta {
    left: 12px;
    right: 12px;
    transform: translateY(140%);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 0.86rem;
  }
  .sticky-cta.is-visible {
    transform: translateY(0);
  }
}

/* ============================================================
   Page resultats : hero du style dominant + cards compactes
   ============================================================ */

/* Hero block du style #1 */
.results-hero {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(40, 30, 20, 0.10), 0 2px 6px rgba(40, 30, 20, 0.05);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: hero-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.results-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(40, 30, 20, 0.16), 0 2px 6px rgba(40, 30, 20, 0.05);
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.results-hero .hero-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
  min-height: 360px;
}
.results-hero .hero-photo--fallback {
  background: linear-gradient(135deg, var(--accent), var(--primary));
}
.results-hero .hero-photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0,0,0,0.18) 100%);
  pointer-events: none;
}
.results-hero .hero-gallery-cue {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.18s;
}
.results-hero:hover .hero-gallery-cue {
  opacity: 1;
  transform: translateY(0);
}
.results-hero .hero-gallery-cue:hover {
  background: #fff;
}

.results-hero .hero-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.results-hero .hero-rank-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent);
}
.results-hero .hero-name {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.05;
  margin: 0;
}
.results-hero .hero-pct-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.results-hero .hero-pct {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.results-hero .hero-pct-unit {
  font-size: 1.4rem;
  margin-left: 2px;
  color: var(--accent);
}
.results-hero .hero-pct-label {
  font-size: 0.95rem;
  color: var(--text-mid);
  font-style: italic;
}
.results-hero .hero-bar-track {
  height: 5px;
  background: var(--barBg, #f0eee8);
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0 6px;
}
.results-hero .hero-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  width: 0%;
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}
.results-hero .hero-desc {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin: 0;
}
.results-hero .hero-palette {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.results-hero .hero-swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Stats discretes au-dessus des autres rangs */
.results-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding: 0 4px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(201, 169, 110, 0.10);
  font-size: 0.85rem;
  color: var(--text-mid);
}
.stat-pill-num {
  font-weight: 700;
  color: var(--primary);
}
.stat-pill-label {
  color: var(--text-mid);
}
.stat-pill--muted {
  background: var(--bg-soft);
  color: var(--text-mid);
  font-style: italic;
}

/* Cards compactes pour rangs 2-5 */
.results-podium--compact {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.compact-card {
  display: grid;
  grid-template-columns: auto 60px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(40, 30, 20, 0.04);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  opacity: 0;
  transform: translateX(-8px);
  animation: compact-in 0.4s ease forwards;
}
.compact-card:nth-child(1) { animation-delay: 0.25s; }
.compact-card:nth-child(2) { animation-delay: 0.35s; }
.compact-card:nth-child(3) { animation-delay: 0.45s; }
.compact-card:nth-child(4) { animation-delay: 0.55s; }
@keyframes compact-in {
  to { opacity: 1; transform: translateX(0); }
}
.compact-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(40, 30, 20, 0.10);
}
.compact-card:hover .compact-chevron {
  color: var(--accent);
  transform: translateX(3px);
}

.compact-rank {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.02em;
}
.compact-swatch {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.compact-body {
  min-width: 0;
}
.compact-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 3px;
}
.compact-desc {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compact-bar-track {
  height: 3px;
  background: var(--barBg, #f0eee8);
  border-radius: 2px;
  overflow: hidden;
  max-width: 240px;
}
.compact-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}
.compact-pct {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.compact-pct span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  margin-left: 1px;
}
.compact-chevron {
  color: var(--text-light);
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Mobile : hero stack vertical, compact cards plus condensees */
@media (max-width: 720px) {
  .results-hero {
    grid-template-columns: 1fr;
  }
  .results-hero .hero-photo {
    min-height: 240px;
  }
  .results-hero .hero-body {
    padding: 22px 20px 24px;
  }
  .results-hero .hero-name {
    font-size: 1.7rem;
  }
  .results-hero .hero-pct {
    font-size: 2rem;
  }
}
@media (max-width: 520px) {
  .compact-card {
    grid-template-columns: auto 44px 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }
  .compact-swatch {
    width: 44px;
    height: 44px;
  }
  .compact-rank {
    font-size: 1.05rem;
  }
  .compact-name {
    font-size: 0.98rem;
  }
  .compact-desc {
    display: none;
  }
  .compact-bar-track {
    max-width: 120px;
  }
  .compact-pct {
    font-size: 1rem;
  }
  .compact-chevron {
    display: none;
  }
  .results-hero .hero-gallery-cue {
    opacity: 1;
    transform: translateY(0);
    bottom: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}
