/* ============================================================
   NicheScope — direction « Studio de nuit »
   ------------------------------------------------------------
   Mode sombre travaillé : charbon chaud (pas de noir plat),
   texte crème, halos lumineux discrets, rouge YouTube.
   Éléments coulissants :
     - bandeau des niches qui défile sur l'accueil
     - rangée de critères à faire glisser (chevrons), façon
       rangées de miniatures YouTube
   Typographie :
     Bricolage Grotesque  → titres (display)
     Instrument Sans      → texte courant
     Spline Sans Mono     → chiffres, notes, données
   Signature : le score global est une barre de lecture vidéo.
   ============================================================ */

/* Palette et typographie issues de ui-ux-pro-max :
   style « Dark Mode (OLED) » + palette dark navy, duo Space Grotesk / DM Sans. */
:root {
  --fond: #09090F;          /* near-black spatial (moins bleu) */
  --fond-bas: #050508;
  --carte: #14141C;
  --carte-haute: #1E1E28;
  --ligne: rgba(255, 255, 255, 0.09);
  --ligne-forte: rgba(255, 255, 255, 0.16);
  --texte: #F8FAFC;
  --texte-doux: #94A3B8;
  --rouge: #EF2A2A;
  --rouge-clair: #FF5A5A;
  --bleu: #2563EB;
  --vert: #22C55E;
  --ambre: #F59E0B;
  --alerte: #F87171;
  --radius: 14px;
  --transition: 0.22s ease;
  --police-display: "Inter Tight", "Segoe UI", sans-serif;
  --police-texte: "Inter", "Segoe UI", sans-serif;
  --police-mono: "JetBrains Mono", Consolas, monospace;
}

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

body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 20px 24px;
  overflow-x: hidden;
}

/* Effet espace : planète sombre au centre (rim rouge/violet), champ
   d'étoiles, et voile de lisibilité qui garde le cœur bien noir. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    /* Voile de lisibilité : centre profond, où vivent texte et recherche */
    radial-gradient(1150px 720px at 50% 38%, var(--fond) 20%, color-mix(in srgb, var(--fond) 78%, transparent) 50%, transparent 78%),
    /* Sphère / planète : corps sombre + fin liseré lumineux */
    radial-gradient(circle at 50% 42%,
      transparent 30%,
      rgba(239, 42, 42, 0.20) 33.4%,
      rgba(150, 80, 255, 0.14) 34.6%,
      transparent 37%),
    /* Reflet doux en haut de la sphère (lumière rasante) */
    radial-gradient(circle at 44% 32%, rgba(255, 255, 255, 0.05), transparent 16%),
    /* Halo de marque diffus derrière la planète */
    radial-gradient(760px 760px at 50% 42%, rgba(239, 42, 42, 0.08), transparent 62%),
    linear-gradient(180deg, transparent 50%, var(--fond-bas) 100%);
}

/* Champ d'étoiles scintillant, très discret */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.1px 1.1px at 78% 12%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.6px 1.6px at 88% 62%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.1px 1.1px at 22% 72%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.3px 1.3px at 64% 84%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 34% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 92% 34%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 6% 52%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.2px 1.2px at 52% 8%, rgba(255,255,255,0.55), transparent);
  animation: scintille 5.5s ease-in-out infinite;
}

@keyframes scintille {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* ====== MUR DE VIDÉOS (fond d'accueil) ====== */
.video-wall {
  position: fixed;
  inset: -6% -3% -3%;
  z-index: -2;
  pointer-events: none;
  display: flex;
  gap: 14px;
  justify-content: center;
  overflow: hidden;
  /* Trou circulaire central : les vignettes orbitent autour de la sphère */
  opacity: 0.42;
  transition: opacity 0.6s ease;
  /* Voile de désaturation appliqué UNE fois ici (au lieu de chaque tuile) */
  filter: saturate(0.7) brightness(0.82);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, transparent 35%, #000 74%);
  mask-image: radial-gradient(circle at 50% 42%, transparent 35%, #000 74%);
}

/* Sur une fiche niche, la mosaïque teintée prend le relais : on cache le mur */
body.sur-niche .video-wall { opacity: 0; }

.vw-col {
  flex: 0 0 clamp(150px, 15vw, 220px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: vwDefile var(--dur, 60s) linear infinite;
  will-change: transform;   /* couche de compositing dédiée → défilement fluide */
}

.vw-col.vers-bas { animation-direction: reverse; }

@keyframes vwDefile {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

.vw-tile {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background-size: cover;
  background-position: center;
  background-color: hsl(var(--h, 220) 40% 20%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* Ombre et désaturation par-tuile retirées : trop coûteuses à repeindre à
     chaque frame. Le voile est appliqué une seule fois sur le conteneur. */
}

@media (prefers-reduced-motion: reduce) {
  .vw-col { animation: none; }
}

.hidden { display: none !important; }

:focus-visible {
  outline: 2px solid var(--rouge-clair);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ====== EN-TÊTE ====== */
.site-header { text-align: center; margin-bottom: 28px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--police-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--texte);
  text-decoration: none;
}

.logo-play {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 29px;
  background: var(--rouge);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(239, 42, 42, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* respiration discrète pour signaler que c'est cliquable */
  animation: viseur-pulse 2.6s ease-in-out infinite;
}

.logo-play svg {
  width: 17px;
  height: 17px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* survol : le viseur « verrouille » — zoom, halo intense, rotation nette */
.logo:hover .logo-play {
  transform: scale(1.12);
  box-shadow: 0 8px 26px rgba(239, 42, 42, 0.7), 0 0 0 4px rgba(239, 42, 42, 0.18);
  animation: none;
}
.logo:hover .logo-play svg { transform: rotate(45deg); }
.logo:active .logo-play { transform: scale(0.96); }

@keyframes viseur-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(239, 42, 42, 0.4); }
  50%      { box-shadow: 0 6px 22px rgba(239, 42, 42, 0.4), 0 0 0 5px rgba(239, 42, 42, 0.14); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-play { animation: none; }
  .logo:hover .logo-play svg { transform: none; }
}

.logo-text strong { font-weight: 700; }

/* ====== HÉROS ====== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--texte-doux);
  margin-bottom: 22px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vert);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.05); }
}

.hero-title {
  font-family: var(--police-display);
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 auto 18px;
  max-width: 700px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--rouge-clair), #FF9A62 55%, var(--ambre));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--texte-doux);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 570px;
  margin: 0 auto 30px;
}

/* ====== VOLATILITÉ DU DÉ ALÉATOIRE ====== */
.volatilite {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.volatilite-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-right: 2px;
}

.vol-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  color: var(--texte-doux);
  font-family: var(--police-texte);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition),
              background var(--transition);
}

.vol-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.vol-vert   { --vol-couleur: var(--vert); }
.vol-orange { --vol-couleur: var(--ambre); }
.vol-rouge  { --vol-couleur: var(--alerte); }

.vol-pill .vol-dot { color: var(--vol-couleur); }

.vol-pill:hover { border-color: var(--ligne-forte); color: var(--texte); }

.vol-pill.actif {
  color: var(--texte);
  border-color: var(--vol-couleur);
  background: color-mix(in srgb, var(--vol-couleur) 14%, transparent);
}

.vol-pill.actif .vol-dot {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--vol-couleur) 22%, transparent);
}

.volatilite-aide {
  color: var(--texte-doux);
  font-size: 0.82rem;
  margin-top: 10px;
  min-height: 1.2em;
}

/* Chiffres clés sous la recherche */
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin-top: 26px;
}

.hero-stats div { text-align: center; }

.hero-stats dt {
  font-family: var(--police-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--texte);
}

.hero-stats dd {
  color: var(--texte-doux);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ====== RECHERCHE ====== */
.search-section { width: 100%; max-width: 980px; }

/* Ligne : barre de recherche + bouton aléatoire à côté.
   Le contenu du héros reste resserré pour rester lisible. */
.search-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  max-width: 660px;
  margin: 0 auto;
}
.search-row #search-form { flex: 1; min-width: 0; }

.btn-random {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 58px;
  border: 1px solid var(--ligne);
  background: var(--carte);
  border-radius: 999px;
  color: var(--texte-doux);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
              color var(--transition), transform var(--transition);
}

/* Le dé prend la couleur du niveau de volatilité sélectionné */
.btn-random[data-vol="global"] { color: var(--vert);   border-color: color-mix(in srgb, var(--vert) 45%, transparent); }
.btn-random[data-vol="moyen"]  { color: var(--ambre);  border-color: color-mix(in srgb, var(--ambre) 45%, transparent); }
.btn-random[data-vol="niche"]  { color: var(--alerte); border-color: color-mix(in srgb, var(--alerte) 45%, transparent); }

.btn-random:hover {
  background: var(--carte-haute);
  transform: rotate(-12deg);
}

.btn-random:active { transform: rotate(8deg) scale(0.95); }

/* Héros : accroche + recherche, centrés */
.hero {
  text-align: center;
  padding: 18px 0 8px;
  animation: heroIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 7px 7px 7px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: rgba(255, 82, 82, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 31, 31, 0.12);
}

.search-icon { color: var(--texte-doux); flex-shrink: 0; }

#search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.05rem;
  min-width: 0;
}

#search-input::placeholder { color: var(--texte-doux); }

#search-btn {
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 24px;
  font-family: var(--police-texte);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

#search-btn:hover {
  background: var(--rouge-clair);
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.35);
}

/* ====== BANDEAU COULISSANT DES NICHES ====== */
.marquee-label {
  margin-top: 34px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.marquee {
  position: relative;
  overflow: hidden;
  /* fondu sur les bords pour l'effet de défilement infini */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: defilement 32s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes defilement {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.chip {
  flex-shrink: 0;
  margin-right: 10px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  color: var(--texte);
  padding: 8px 16px;
  font-family: var(--police-texte);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.chip:hover { border-color: var(--rouge-clair); background: var(--carte-haute); }

/* Chips statiques (écran « introuvable ») */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.suggestions .chip { margin-right: 0; }

.suggestions-label { color: var(--texte-doux); font-size: 0.9rem; }

/* ====== COMMENT ÇA MARCHE ====== */
.etapes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 46px;
}

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

.etape {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.etape:hover {
  border-color: var(--ligne-forte);
  background: var(--carte-haute);
  transform: translateY(-3px);
}

.etape-icone {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(239, 42, 42, 0.12);
  color: var(--rouge-clair);
  margin-bottom: 14px;
}

.etape-icone svg { width: 20px; height: 20px; }

.etape h3 {
  font-family: var(--police-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}

.etape p {
  color: var(--texte-doux);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Les étapes sont des boutons : elles ouvrent une page d'explication */
.etape {
  font-family: var(--police-texte);
  color: var(--texte);   /* les <button> n'héritent pas de la couleur : à forcer */
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.etape h3 { color: var(--texte); }

.etape-lien {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rouge-clair);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
}

.etape:hover .etape-lien,
.etape:focus-visible .etape-lien { opacity: 1; transform: translateX(0); }

/* ====== PAGES D'EXPLICATION ====== */
.explication-section {
  width: 100%;
  max-width: 800px;
  animation: glisseDroite 0.45s ease;
}

.expli-etiquette {
  font-family: var(--police-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rouge-clair);
  margin-bottom: 10px;
}

.expli-titre {
  font-family: var(--police-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.expli-chapo {
  color: var(--texte-doux);
  font-size: 1.04rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.expli-bloc {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
}

.expli-bloc h3 {
  font-family: var(--police-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.expli-bloc p { color: var(--texte-doux); line-height: 1.62; font-size: 0.95rem; }

.expli-bloc p + p { margin-top: 10px; }

.expli-bloc code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.3);
}

/* Bloc « contexte 2026 » : liseré rouge, ambiance prospective */
.expli-bloc--ctx {
  border-left: 3px solid var(--rouge);
  background: linear-gradient(100deg,
              color-mix(in srgb, var(--rouge) 8%, var(--carte)), var(--carte) 55%);
}

.expli-bloc--ctx h3::before {
  content: "↗ ";
  color: var(--rouge-clair);
}

/* Tableau des critères (étape 2) */
.expli-criteres { display: flex; flex-direction: column; gap: 10px; }

.expli-critere {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--ligne);
}

.expli-critere:last-child { border-bottom: 0; }

.expli-poids {
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  padding: 4px 0;
  border-radius: 7px;
  background: rgba(239, 42, 42, 0.14);
  color: var(--rouge-clair);
}

.expli-critere-nom {
  font-weight: 600;
  font-size: 0.96rem;
  margin-bottom: 3px;
}

.expli-critere-desc { color: var(--texte-doux); font-size: 0.88rem; line-height: 1.55; }

.expli-secondaire { font-size: 0.74rem; color: var(--texte-doux); font-weight: 500; }

/* Échelle de volatilité (étape 1) */
.expli-echelle { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.expli-niveau {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.92rem;
}

.expli-niveau b { min-width: 118px; }
.expli-niveau span { color: var(--texte-doux); }

.expli-puce {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  transform: translateY(-1px);
}

/* ====== FAVORIS & HISTORIQUE (accueil) ====== */
.home-liste { margin-top: 34px; }

.home-liste-entete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.home-liste-titre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-bottom: 12px;
}

.home-liste-titre svg { width: 14px; height: 14px; flex-shrink: 0; }

.home-liste-entete .home-liste-titre { margin-bottom: 0; }

.home-liste-entete { margin-bottom: 12px; }

.btn-effacer {
  background: none;
  border: none;
  color: var(--texte-doux);
  font-family: var(--police-texte);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-effacer:hover { color: var(--alerte); }

.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.home-chips .chip { margin-right: 0; }

/* ====== NICHES POPULAIRES (révélées au défilement) ====== */
.populaires { margin-top: 72px; padding-bottom: 20px; }

.populaires-titre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--police-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
}

.populaires-titre svg { width: 22px; height: 22px; color: var(--rouge-clair); }

.populaires-soustitre {
  color: var(--texte-doux);
  text-align: center;
  margin: 6px 0 24px;
  font-size: 0.95rem;
}

.populaires-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.pop-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  color: var(--texte);
  font-family: var(--police-texte);
  transition: border-color var(--transition), background var(--transition),
              opacity 0.55s ease, transform 0.55s ease;
  /* état initial avant révélation au défilement */
  opacity: 0;
  transform: translateY(26px);
}

.pop-card.revele { opacity: 1; transform: translateY(0); }

.pop-card:hover { border-color: var(--rouge-clair); background: var(--carte-haute); }

.pop-thumb {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 66px;
  height: 44px;
  font-size: 1.4rem;
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 7px;
}

.pop-infos { flex: 1; min-width: 0; }

.pop-nom {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

.pop-detail {
  display: block;
  color: var(--texte-doux);
  font-size: 0.82rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop-score {
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.pop-score small { color: var(--texte-doux); font-weight: 500; font-size: 0.72rem; }

/* ====== ÉTOILE (niche exceptionnelle, moyenne > 9,4) ====== */
.etoile { color: #FFC93D; }

/* ====== ANALYSE — SCANNER DE NICHE ======
   Balayage laser rouge (YouTube) + lignes de scan vertes (imagerie d'analyse),
   anneaux en rotation, grille en perspective et réticule HUD. */
/* Plein écran : le scan prend toute la page, comme un hook de vidéo */
.loader-section {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background:
    radial-gradient(1100px 700px at 50% 42%, rgba(239, 42, 42, 0.14), transparent 62%),
    rgba(11, 17, 32, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: loaderEntre 0.4s ease;
}

/* Flash d'ouverture : le coup de projecteur qui accroche l'œil */
.loader-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255,255,255,0.5), transparent 40%);
  animation: flashScan 0.55s ease-out forwards;
  pointer-events: none;
  mix-blend-mode: screen;
}

@keyframes flashScan {
  0%   { opacity: 0.9; transform: scale(0.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

@keyframes loaderEntre {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ====== FONDU LIQUIDE (accueil ⇄ page niche) ======
   Les widgets se brouillent et se fondent dans un dégradé coulant,
   qui se résout ensuite en la page de destination. */
.morph {
  position: fixed;
  inset: 0;
  z-index: 62;          /* au-dessus du radar (60) pour le recouvrir */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
  --m: 6; /* teinte, pilotée par JS */
  background:
    radial-gradient(58% 60% at 28% 30%, hsl(var(--m) 85% 56% / 0.95), transparent 62%),
    radial-gradient(56% 58% at 74% 66%, hsl(calc(var(--m) + 36) 80% 46% / 0.9), transparent 60%),
    radial-gradient(70% 70% at 55% 48%, hsl(calc(var(--m) - 24) 70% 40% / 0.8), transparent 66%),
    radial-gradient(circle at 50% 50%, hsl(var(--m) 65% 22%), hsl(var(--m) 55% 7%));
  background-size: 180% 180%, 200% 200%, 190% 190%, 140% 140%;
  filter: blur(38px) saturate(1.25);
  animation: morphFlow 3.4s ease-in-out infinite;
}

.morph.visible { opacity: 1; }

@keyframes morphFlow {
  0%   { background-position: 0% 0%,     100% 100%, 30% 70%, 50% 50%; }
  50%  { background-position: 60% 40%,   40% 60%,   70% 30%, 55% 45%; }
  100% { background-position: 0% 0%,     100% 100%, 30% 70%, 50% 50%; }
}

/* Fusion des widgets : ils se brouillent et leurs couleurs bavent */
.melt {
  animation: meltWidgets 0.55s cubic-bezier(0.6, 0, 0.9, 0.3) forwards;
  pointer-events: none;
}

@keyframes meltWidgets {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0)    saturate(1); }
  100% { opacity: 0; transform: scale(1.08); filter: blur(22px) saturate(1.8); }
}

@media (prefers-reduced-motion: reduce) {
  .morph { animation: none; }
  .melt  { animation: none; opacity: 0; }
}

/* Sortie « warp » : la vue active file vers l'extérieur avant le scan */
.sortie-scan {
  animation: sortieScan 0.5s cubic-bezier(0.55, 0, 0.85, 0.2) forwards;
  pointer-events: none;
}

@keyframes sortieScan {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0); }
  100% { opacity: 0; transform: scale(1.5);  filter: blur(8px); }
}

/* Le radar « grandit » à l'apparition, dans la continuité du warp */
.loader-section .scanner {
  animation: scannerArrive 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes scannerArrive {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Repli du radar : il se contracte vers le centre et fond dans la fiche
   qui s'implante en même temps → transition continue radar → page niche. */
.loader-section.loader-sortie {
  animation: loaderSortie 0.62s cubic-bezier(0.7, 0, 0.84, 0) forwards;
  pointer-events: none;
}

@keyframes loaderSortie {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.loader-section.loader-sortie .scanner {
  animation: scannerSortie 0.62s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes scannerSortie {
  from { transform: scale(1);    opacity: 1; filter: blur(0); }
  to   { transform: scale(0.22); opacity: 0; filter: blur(5px); }
}

.loader-section.loader-sortie .scanner-readout,
.loader-section.loader-sortie .scanner-log {
  animation: fadeOut 0.32s ease forwards;
}

@keyframes fadeOut { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .sortie-scan { animation: none; opacity: 0; }
  .loader-section .scanner,
  .loader-section.loader-sortie,
  .loader-section.loader-sortie .scanner { animation: none; }
}

.scanner {
  position: relative;
  width: min(420px, 84vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  /* Profondeur de champ pour le globe 3D */
  perspective: 900px;
  /* Halo général du scanner */
  filter: drop-shadow(0 0 46px rgba(239, 42, 42, 0.3));
}

/* Couronne de graduations en rotation (côté mécanique/futuriste) */
.scanner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(34, 197, 94, 0.55) 0deg 0.7deg,
    transparent 0.7deg 9deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 46%, #000 47%, #000 50%, transparent 51%);
  mask-image: radial-gradient(circle, transparent 46%, #000 47%, #000 50%, transparent 51%);
  animation: tourne 14s linear infinite;
}

/* Second cercle de graduations, plus fines, en sens inverse */
.scanner::after {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(239, 42, 42, 0.5) 0deg 0.4deg,
    transparent 0.4deg 4.5deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 47%, #000 48%, #000 50%, transparent 51%);
  mask-image: radial-gradient(circle, transparent 47%, #000 48%, #000 50%, transparent 51%);
  animation: tourne 9s linear infinite reverse;
}

/* --- Grille en perspective --- */
.scanner-grid {
  position: absolute;
  inset: 12% 0 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(420px) rotateX(64deg);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 62%);
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 62%);
  animation: grilleDefile 2.4s linear infinite;
  opacity: 0.85;
}

@keyframes grilleDefile {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 34px, 0 0; }
}

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

/* --- Globe filaire 3D --- */
.globe-wrap {
  position: absolute;
  inset: 11%;
  transform-style: preserve-3d;
  animation: globeFlotte 6.5s ease-in-out infinite;
}

.globe {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: globeTourne 22s linear infinite;
}

/* Rotation lente sur son axe, légèrement incliné vers l'observateur */
@keyframes globeTourne {
  from { transform: rotateX(-16deg) rotateY(0deg); }
  to   { transform: rotateX(-16deg) rotateY(360deg); }
}

/* Flottement vertical */
@keyframes globeFlotte {
  0%, 100% { transform: translateY(-7px); }
  50%      { transform: translateY(7px); }
}

.meridien,
.parallele {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
}

/* Atmosphère : halo sphérique qui donne du volume au filaire */
.globe-wrap::before {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%,
              rgba(34, 197, 94, 0.16),
              rgba(239, 42, 42, 0.08) 55%,
              transparent 72%);
  pointer-events: none;
}

/* Méridiens : cercles pivotés autour de l'axe vertical */
.meridien {
  border: 1px solid rgba(34, 197, 94, 0.38);
  transform: rotateY(calc(var(--a) * 1deg));
}

/* Parallèles : cercles couchés à l'horizontale, rayon décroissant
   vers les pôles (s = √(1 − y²) pour rester sur la sphère) */
.parallele {
  border: 1px solid rgba(239, 42, 42, 0.34);
  transform: translateY(calc(var(--y) * 1%)) rotateX(90deg) scale(var(--s));
}

/* Équateur mis en avant, en rouge YouTube */
.parallele.equateur {
  border-color: rgba(239, 42, 42, 0.6);
  box-shadow: 0 0 22px rgba(239, 42, 42, 0.4);
}

/* --- Balayage laser rouge (radar) --- */
.sweep {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(239, 42, 42, 0.55) 0deg,
    rgba(239, 42, 42, 0.12) 26deg,
    transparent 62deg
  );
  animation: tourne 1.7s linear infinite;
  -webkit-mask-image: radial-gradient(circle, transparent 16%, #000 18%);
  mask-image: radial-gradient(circle, transparent 16%, #000 18%);
}

/* --- Rayons laser croisés --- */
.laser {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--rouge), transparent);
  box-shadow: 0 0 12px rgba(239, 42, 42, 0.8);
  opacity: 0.55;
}

.laser-h { left: 0; right: 0; height: 1px; animation: laserPulse 2.1s ease-in-out infinite; }
.laser-v {
  top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--rouge), transparent);
  animation: laserPulse 2.1s ease-in-out infinite 1.05s;
}

@keyframes laserPulse {
  0%, 100% { opacity: 0.15; transform: scale(0.94); }
  50%      { opacity: 0.7;  transform: scale(1); }
}

/* --- Ligne de scan verte --- */
.scanline {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--vert), transparent);
  box-shadow: 0 0 16px 2px rgba(34, 197, 94, 0.65);
  animation: scanVertical 2.3s ease-in-out infinite;
}

@keyframes scanVertical {
  0%, 100% { top: 10%; opacity: 0; }
  10%      { opacity: 1; }
  50%      { top: 88%; opacity: 1; }
  60%      { opacity: 0; }
}

/* --- Points détectés --- */
.blip {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vert);
  box-shadow: 0 0 12px 2px rgba(34, 197, 94, 0.8);
  opacity: 0;
  animation: blipApparait 1.7s ease-in-out infinite;
}

.blip-1 { top: 26%; left: 68%; animation-delay: 0.2s; }
.blip-2 { top: 62%; left: 30%; animation-delay: 0.7s; }
.blip-3 { top: 72%; left: 64%; animation-delay: 1.1s; background: var(--rouge); box-shadow: 0 0 12px 2px rgba(239, 42, 42, 0.85); }
.blip-4 { top: 36%; left: 22%; animation-delay: 1.4s; background: var(--rouge); box-shadow: 0 0 12px 2px rgba(239, 42, 42, 0.85); }
.blip-5 { top: 18%; left: 44%; animation-delay: 0.95s; }

@keyframes blipApparait {
  0%, 70%, 100% { opacity: 0; transform: scale(0.4); }
  12%           { opacity: 1; transform: scale(1.5); }
  30%           { opacity: 0.8; transform: scale(1); }
}

/* --- Réticule HUD --- */
.hud {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(34, 197, 94, 0.75);
  animation: hudRespire 2.3s ease-in-out infinite;
}

.hud-tl { top: 2%; left: 2%; border-right: 0; border-bottom: 0; }
.hud-tr { top: 2%; right: 2%; border-left: 0; border-bottom: 0; }
.hud-bl { bottom: 2%; left: 2%; border-right: 0; border-top: 0; }
.hud-br { bottom: 2%; right: 2%; border-left: 0; border-top: 0; }

@keyframes hudRespire {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.12); }
}

/* --- Cœur : play YouTube --- */
.scanner-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  border-radius: 11px;
  background: var(--rouge);
  color: #fff;
  z-index: 2;
  animation: coeurPulse 1.4s ease-in-out infinite;
}

.scanner-core svg { width: 22px; height: 22px; }

@keyframes coeurPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(239, 42, 42, 0.55); }
  50%      { transform: scale(1.07); box-shadow: 0 0 0 18px rgba(239, 42, 42, 0); }
}

/* --- Lecture : message, barre, pourcentage --- */
.scanner-readout {
  width: 100%;
  max-width: 380px;
  text-align: center;
  margin-top: 6px;
}

.loader-text {
  font-family: var(--police-mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--vert);
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.45);
}

.scanner-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 8px;
}

.scanner-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rouge), #FF8A3D);
  box-shadow: 0 0 14px rgba(239, 42, 42, 0.7);
}

.scanner-pct {
  font-family: var(--police-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--texte);
}

.scanner-pct small { font-size: 0.8rem; color: var(--texte-doux); margin-left: 2px; }

/* --- Journal d'analyse --- */
.scanner-log {
  list-style: none;
  width: 100%;
  max-width: 380px;
  margin-top: 18px;
  font-family: var(--police-mono);
  font-size: 0.76rem;
}

.scanner-log li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  animation: ligneEntre 0.3s ease both;
}

@keyframes ligneEntre {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.log-cle { color: var(--texte-doux); white-space: nowrap; }

.log-pointille {
  flex: 1;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.log-statut { font-weight: 700; letter-spacing: 0.06em; }
.log-good   { color: var(--vert); text-shadow: 0 0 10px rgba(34, 197, 94, 0.5); }
.log-medium { color: var(--ambre); }
.log-bad    { color: var(--alerte); text-shadow: 0 0 10px rgba(248, 113, 113, 0.5); }

/* ====== MOSAÏQUE DE VIGNETTES EN FOND (page niche) ====== */
.niche-backdrop {
  position: fixed;
  inset: -10% -8%;
  z-index: -1;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  grid-auto-rows: min-content;
  gap: 18px;
  align-content: center;
  /* Légère inclinaison + fondu vers les bords pour ne jamais gêner la lecture */
  transform: rotate(-7deg) scale(1.18);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 42%, #000 35%, transparent 88%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 42%, #000 35%, transparent 88%);
  animation: fondApparait 0.9s ease both;
}

@keyframes fondApparait {
  from { opacity: 0; transform: rotate(-7deg) scale(1.28); }
  to   { opacity: 1; transform: rotate(-7deg) scale(1.18); }
}

.bg-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  opacity: var(--o, 0.28);
  background: linear-gradient(155deg,
              hsl(var(--hue) 72% 54%),
              hsl(var(--hue) 66% 26%));
  border: 1px solid hsl(var(--hue) 70% 70% / 0.4);
  /* Ombre portée + glow sombre coloré par la niche */
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.7),
    0 0 34px -6px hsl(var(--hue) 78% 55% / 0.75);
  animation: flotteVignette 9s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  will-change: transform;
}

@keyframes flotteVignette {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* Variante « vraie miniature YouTube » : l'image remplace le dégradé,
   le glow et l'ombre de la niche sont conservés. */
.bg-thumb--photo {
  background-size: cover;
  background-position: center;
  /* Flou par-tuile retiré (coûteux à chaque frame pendant le flottement) ;
     la mosaïque reste discrète grâce à l'opacité et au masque du conteneur. */
  filter: saturate(0.95);
  transition: opacity 0.6s ease;
}

/* ====== RÉSULTATS ====== */
.results-section {
  width: 100%;
  max-width: 960px;
}

/* Assemblage : chaque bloc de la fiche arrive de gauche/droite, en cascade,
   et se met en place — les widgets « s'emboîtent » pour former la page. */
.results-section > * {
  animation: bloc-assemble 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.results-section > *:nth-child(odd)  { --dx: -52px; }
.results-section > *:nth-child(even) { --dx:  52px; }
.results-section > *:nth-child(1) { animation-delay: 0.00s; }
.results-section > *:nth-child(2) { animation-delay: 0.10s; }
.results-section > *:nth-child(3) { animation-delay: 0.19s; }
.results-section > *:nth-child(4) { animation-delay: 0.27s; }
.results-section > *:nth-child(5) { animation-delay: 0.34s; }
.results-section > *:nth-child(6) { animation-delay: 0.40s; }
.results-section > *:nth-child(7) { animation-delay: 0.45s; }
.results-section > *:nth-child(8) { animation-delay: 0.50s; }

@keyframes bloc-assemble {
  from { opacity: 0; transform: translate(var(--dx, 0), 22px) scale(0.94); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Dans l'en-tête, les 4 tuiles de stats convergent de coins différents */
.results-section .stat-tuile {
  animation: tuile-assemble 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.results-section .stat-tuile:nth-child(1) { --tx: -34px; --ty: -18px; animation-delay: 0.22s; }
.results-section .stat-tuile:nth-child(2) { --tx:  34px; --ty: -22px; animation-delay: 0.28s; }
.results-section .stat-tuile:nth-child(3) { --tx: -30px; --ty:  22px; animation-delay: 0.34s; }
.results-section .stat-tuile:nth-child(4) { --tx:  34px; --ty:  18px; animation-delay: 0.40s; }

@keyframes tuile-assemble {
  from { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.88); }
  to   { opacity: 1; transform: none; }
}

/* Envol des widgets d'accueil avant l'assemblage */
.widgets-envol .hero   { animation: envolHaut 0.4s cubic-bezier(0.6, 0, 0.9, 0.3) forwards; }
.widgets-envol .etapes { animation: envolBas  0.4s cubic-bezier(0.6, 0, 0.9, 0.3) forwards; }
.widgets-envol .marquee,
.widgets-envol .home-liste,
.widgets-envol .populaires { animation: fadeOut 0.3s ease forwards; }

@keyframes envolHaut { to { opacity: 0; transform: translateY(-42px) scale(1.05); filter: blur(6px); } }
@keyframes envolBas  { to { opacity: 0; transform: translateY(42px)  scale(0.96); filter: blur(6px); } }

@media (prefers-reduced-motion: reduce) {
  .results-section > *,
  .results-section .stat-tuile,
  .widgets-envol .hero,
  .widgets-envol .etapes { animation: none; }
}

@keyframes glisseDroite {
  from { opacity: 0; transform: translateX(46px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.results-header {
  background: linear-gradient(160deg, var(--carte-haute), var(--carte) 55%);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 26px 28px 30px;
  margin-bottom: 16px;
}

.results-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.results-title-textes { flex: 1; min-width: 0; }

/* — Bouton favori — */
.btn-favori {
  flex-shrink: 0;
  align-self: flex-start;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  color: var(--texte);
  padding: 9px 18px;
  font-family: var(--police-texte);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-favori:hover { border-color: var(--rouge-clair); }

.btn-favori.actif {
  color: var(--rouge-clair);
  border-color: rgba(255, 82, 82, 0.5);
  background: rgba(255, 31, 31, 0.08);
}

/* — Statistiques détaillées — */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.stat-tuile {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  padding: 12px 14px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-bottom: 4px;
}

.stat-valeur {
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 0.98rem;
}

/* L'emoji de la niche, présenté comme une miniature vidéo */
.results-emoji {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 92px;
  height: 60px;
  font-size: 1.9rem;
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 8px;
}

.results-title h2 {
  font-family: var(--police-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.results-subtitle { color: var(--texte-doux); margin-top: 6px; max-width: 560px; }

/* — Signature : score global en barre de lecture vidéo — */
.score-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.score-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.score-time {
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 1.15rem;
}

.score-sur { color: var(--texte-doux); font-weight: 500; font-size: 0.95rem; }

.score-verdict {
  font-family: var(--police-texte);
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 10px;
}

.score-fourchette {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--texte-doux);
}
.score-fourchette b { font-family: var(--police-mono); color: var(--texte); font-weight: 600; }

.fourchette-aide {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--ligne-forte);
  background: transparent;
  color: var(--texte-doux);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition);
}
.fourchette-aide:hover { border-color: var(--rouge-clair); color: var(--texte); }

/* FAQ (réutilise la mise en page des pages d'explication) */
.faq-item { margin-bottom: 22px; }
.faq-q {
  font-family: var(--police-texte);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #EDF1F6;
  margin-bottom: 7px;
}
/* Texte clair et gras peu contrasté : lecture douce, pas de blanc qui « saute » */
.faq-a {
  color: #C4CDDA;
  font-family: var(--police-texte);
  font-size: 1rem;
  line-height: 1.75;
}
.faq-a b { color: #DEE5EE; font-weight: 600; }
.faq-badge {
  display: inline-block;
  font-family: var(--police-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 6px;
  margin-right: 6px;
}
.faq-badge.reel { background: rgba(34,197,94,0.14); color: var(--vert); }
.faq-badge.estime { background: rgba(245,158,11,0.14); color: var(--ambre); }

.footer-liens { margin-top: 12px; }
.footer-liens button {
  background: none; border: none; color: var(--rouge-clair);
  font-family: var(--police-texte); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

.player-bar {
  position: relative;
  height: 5px;
  background: var(--ligne);
  border-radius: 999px;
  transition: height var(--transition);
}

.results-header:hover .player-bar { height: 8px; }

.player-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--rouge);
  border-radius: 999px;
  transition: width 1.2s ease;
}

.player-head {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 15px;
  height: 15px;
  background: var(--rouge);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(255, 31, 31, 0.55);
  transition: left 1.2s ease;
}

/* — Points clés (fort / faible) — */
.points-cles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.point-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  font-size: 0.92rem;
}

.point-label {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.point-fort .point-label { background: rgba(61, 220, 132, 0.14); color: var(--vert); }
.point-faible .point-label { background: rgba(255, 92, 92, 0.14); color: var(--alerte); }

.point-texte { color: var(--texte); }
.point-texte b { font-family: var(--police-mono); }

/* — Rangée coulissante des critères — */
.carousel-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.carousel-titre {
  font-family: var(--police-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.carousel-fleches { display: flex; align-items: center; gap: 8px; }

.btn-secondaires {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  color: var(--texte-doux);
  font-family: var(--police-texte);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn-secondaires:hover { border-color: var(--rouge-clair); color: var(--texte); }

.fleche {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 50%;
  color: var(--texte);
  font-size: 1.4rem;
  line-height: 1;
  padding-bottom: 3px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.fleche:hover { border-color: var(--rouge-clair); background: var(--carte-haute); }

.criteria-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;              /* Firefox */
}

.criteria-row::-webkit-scrollbar { display: none; }  /* Chrome/Edge */

.criteria-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 18px 20px;
  opacity: 0;
  transform: translateX(24px);
  animation: carteGlisse 0.45s ease forwards;
  transition: border-color var(--transition), background var(--transition);
}

.criteria-card:hover { border-color: #3D3D49; background: var(--carte-haute); }

/* La carte de critère est un bouton : reset des styles natifs + indice cliquable */
button.criteria-card {
  font-family: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.criteria-plus {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rouge-clair);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
}

.criteria-card:hover .criteria-plus,
.criteria-card:focus-visible .criteria-plus { opacity: 1; transform: translateX(0); }

/* Note agrandie sur la page de détail d'un critère */
.critere-note-grande {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.critere-note-grande > .note-good,
.critere-note-grande > .note-medium,
.critere-note-grande > .note-bad {
  font-family: var(--police-mono);
  font-size: 2.4rem;
  font-weight: 700;
}

.critere-note-grande small { font-size: 1rem; color: var(--texte-doux); }

.critere-valeur-grande {
  font-family: var(--police-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.critere-coef-grand {
  margin-left: auto;
  font-family: var(--police-mono);
  font-size: 0.85rem;
  color: var(--texte-doux);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 5px 10px;
}

/* Liste des marques sponsors */
.sponsor-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sponsor-chip {
  background: color-mix(in srgb, var(--vert) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--vert) 35%, transparent);
  color: var(--texte);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Tuiles de stats cliquables */
button.stat-tuile {
  font-family: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

button.stat-tuile:hover { border-color: var(--ligne-forte); background: rgba(0,0,0,0.28); }

.stat-plus {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rouge-clair);
  opacity: 0;
  transition: opacity var(--transition);
}

button.stat-tuile:hover .stat-plus,
button.stat-tuile:focus-visible .stat-plus { opacity: 1; }

.stat-valeur-grande {
  font-family: var(--police-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--texte);
  margin-bottom: 12px;
}

/* Liste de vraies chaînes YouTube */
.chaines-etat { color: var(--texte-doux); font-size: 0.9rem; margin-bottom: 14px; }
.chaines-etat a { color: var(--rouge-clair); font-weight: 600; }

.chaines-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.chaine-item {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--texte);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.chaine-item:hover {
  border-color: var(--rouge-clair);
  background: var(--carte-haute);
  transform: translateY(-2px);
}

.chaine-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.chaine-avatar--vide { background: var(--carte-haute); }

.chaine-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chaine-nom {
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chaine-meta {
  font-family: var(--police-mono);
  font-size: 0.72rem;
  color: var(--texte-doux);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chaine-type {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.type-pastille {
  font-family: var(--police-texte);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.type-format {
  background: rgba(239, 42, 42, 0.14);
  color: var(--rouge-clair);
}
.type-angle {
  background: rgba(255, 255, 255, 0.07);
  color: var(--texte-doux);
  border: 1px solid var(--ligne);
}

.chaine-fleche { color: var(--texte-doux); flex-shrink: 0; align-self: center; }

/* Barre de tri des chaînes */
.chaines-compte { display: block; margin-bottom: 10px; }
.chaines-tris {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.chaine-tri {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--police-texte);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--texte-doux);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.chaine-tri:hover { border-color: var(--ligne-forte); color: var(--texte); }
.chaine-tri.actif {
  border-color: var(--rouge-clair);
  color: #fff;
  background: rgba(239, 42, 42, 0.16);
}
.tri-estime {
  font-family: var(--police-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--ambre);
}

/* Filtre par format (secondaire, sous la barre de tri) */
.chaines-filtres {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: -4px 0 14px;
}
.filtre-label {
  font-size: 0.78rem;
  color: var(--texte-doux);
  margin-right: 2px;
}
.chaine-fmt {
  background: transparent;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 4px 11px;
  font-family: var(--police-texte);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--texte-doux);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.chaine-fmt:hover { border-color: var(--ligne-forte); color: var(--texte); }
.chaine-fmt.actif {
  border-color: var(--rouge-clair);
  color: #fff;
  background: rgba(239, 42, 42, 0.14);
}
.chaines-vide {
  color: var(--texte-doux);
  font-size: 0.9rem;
  padding: 10px 2px;
  grid-column: 1 / -1;
}

/* Critères secondaires : masqués tant que la rangée n'est pas dépliée */
.criteria-card--secondaire { display: none; }
.criteria-row.montre-secondaires .criteria-card--secondaire { display: block; }

/* Badge de coefficient (poids du critère dans le score) */
.criteria-coef {
  display: inline-block;
  margin-left: 4px;
  background: rgba(255, 31, 31, 0.12);
  color: var(--rouge-clair);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: var(--police-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
}

@keyframes carteGlisse { to { opacity: 1; transform: translateX(0); } }

.criteria-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.criteria-name {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.criteria-note {
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 1rem;
}
.criteria-note small { color: var(--texte-doux); font-weight: 500; font-size: 0.75rem; }

.note-good { color: var(--vert); }
.note-medium { color: var(--ambre); }
.note-bad { color: var(--alerte); }

.criteria-value {
  font-family: var(--police-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.criteria-bar {
  height: 3px;
  background: var(--ligne);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.criteria-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.9s ease 0.25s;
}

.bar-good { background: var(--vert); }
.bar-medium { background: var(--ambre); }
.bar-bad { background: var(--alerte); }

.criteria-comment {
  color: var(--texte-doux);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Badge de verdict par critère */
.criteria-tag {
  display: inline-block;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-good { background: rgba(61, 220, 132, 0.14); color: var(--vert); }
.tag-medium { background: rgba(255, 176, 32, 0.14); color: var(--ambre); }
.tag-bad { background: rgba(255, 92, 92, 0.14); color: var(--alerte); }

/* ====== À EXPLORER ====== */
.explorer {
  margin-top: 26px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.explorer-titre {
  font-family: var(--police-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.explorer-grille {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}

.explorer-sous {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-bottom: 10px;
}

.explorer-liste {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explorer-liste li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.explorer-liste li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--rouge-clair);
}

.explorer-note {
  color: var(--texte-doux);
  font-size: 0.9rem;
  line-height: 1.6;
}

.explorer-note b { color: var(--texte); }

@media (max-width: 640px) {
  .explorer-grille { grid-template-columns: 1fr; gap: 18px; }
}

/* ====== BOUTON MON ESPACE (en-tête) ====== */
.site-header { position: relative; }

.btn-espace {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.btn-espace svg { width: 16px; height: 16px; }
.btn-espace:hover { border-color: var(--rouge-clair); background: var(--carte-haute); }

@media (max-width: 640px) {
  .btn-espace { position: static; margin: 14px auto 0; display: inline-flex; }
  .site-header { text-align: center; }
}

/* ====== MON ESPACE ====== */
.espace-section {
  width: 100%;
  max-width: 960px;
  animation: glisseDroite 0.4s ease;
}

.espace-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.espace-titre {
  font-family: var(--police-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.espace-onglets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--ligne);
  padding-bottom: 12px;
  margin-bottom: 22px;
}

.espace-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--texte-doux);
  font-family: var(--police-texte);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.espace-tab:hover { color: var(--texte); }
.espace-tab.actif {
  color: var(--texte);
  background: color-mix(in srgb, var(--rouge) 14%, transparent);
  border-color: color-mix(in srgb, var(--rouge) 40%, transparent);
}

.espace-vide { color: var(--texte-doux); font-size: 0.95rem; }
.espace-hist-entete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* Mini-paywall dans un onglet premium */
.gate {
  text-align: center;
  padding: 34px 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rouge) 8%, var(--carte)), var(--carte) 60%);
  border: 1px solid color-mix(in srgb, var(--rouge) 28%, var(--ligne));
  border-radius: var(--radius);
}
.gate svg { width: 32px; height: 32px; color: var(--rouge-clair); margin-bottom: 10px; }
.gate h3 { font-family: var(--police-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.gate p { color: var(--texte-doux); font-size: 0.92rem; max-width: 440px; margin: 0 auto 16px; line-height: 1.5; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Formulaire profil */
.profil-groupe { margin-bottom: 22px; }
.profil-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-bottom: 10px;
}
.profil-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.profil-opt {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  color: var(--texte-doux);
  font-family: var(--police-texte);
  font-size: 0.88rem;
  padding: 8px 15px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.profil-opt:hover { color: var(--texte); }
.profil-opt.actif {
  color: var(--texte);
  border-color: var(--rouge-clair);
  background: color-mix(in srgb, var(--rouge) 12%, transparent);
}
.profil-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.profil-valider {
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--police-texte);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background var(--transition);
}
.profil-valider:hover { background: var(--rouge-clair); }

/* Cartes de recommandation */
.reco-intro { color: var(--texte-doux); font-size: 0.95rem; margin-bottom: 16px; }
.reco-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.reco-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 15px 17px;
  cursor: pointer;
  text-align: left;
  color: var(--texte);
  font-family: var(--police-texte);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.reco-card:hover { border-color: var(--rouge-clair); background: var(--carte-haute); transform: translateY(-2px); }
.reco-thumb {
  flex-shrink: 0; display: grid; place-items: center;
  width: 46px; height: 46px; font-size: 1.4rem;
  background: var(--fond); border: 1px solid var(--ligne); border-radius: 10px;
}
.reco-infos { flex: 1; min-width: 0; }
.reco-nom { font-weight: 600; font-size: 0.96rem; }
.reco-pourquoi { color: var(--texte-doux); font-size: 0.82rem; margin-top: 3px; line-height: 1.4; }
.reco-fit {
  flex-shrink: 0; text-align: center;
  font-family: var(--police-mono);
}
.reco-fit b { font-size: 1.2rem; font-weight: 700; color: var(--vert); }
.reco-fit small { display: block; font-size: 0.62rem; color: var(--texte-doux); letter-spacing: 0.06em; }

/* ====== ANALYSE PREMIUM ====== */
.premium {
  margin-top: 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rouge) 8%, var(--carte)), var(--carte) 60%);
  border: 1px solid color-mix(in srgb, var(--rouge) 30%, var(--ligne));
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow: hidden;
}

.premium-entete {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.premium-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--rouge), #FF8A3D);
  color: #fff;
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 6px;
  margin-top: 3px;
}

.premium-titre {
  font-family: var(--police-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.premium-sous { color: var(--texte-doux); font-size: 0.92rem; margin-top: 4px; line-height: 1.5; }

/* Zone contenu + paywall superposé */
.premium-zone { position: relative; }

/* Verrouillé : le contenu est flouté et non interactif, le paywall par-dessus */
.premium.verrouille .premium-contenu {
  filter: blur(7px) brightness(0.7);
  pointer-events: none;
  user-select: none;
  height: 600px;
  max-height: 600px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}

.premium-paywall {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 28px 20px;
  overflow-y: auto;
}
/* Sur petit écran les deux formules s'empilent : plus de hauteur pour le fond */
@media (max-width: 720px) {
  .premium.verrouille .premium-contenu { height: 920px; max-height: 920px; }
}

.premium-cadenas { width: 34px; height: 34px; color: var(--rouge-clair); }

.premium-pitch {
  font-family: var(--police-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.premium-liste-benef {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--texte-doux);
  max-width: 460px;
}

.premium-liste-benef li { position: relative; padding-left: 22px; }
.premium-liste-benef li::before {
  content: "✓"; position: absolute; left: 0; color: var(--vert); font-weight: 700;
}
.premium-liste-benef b { color: var(--texte); }

.premium-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

.premium-cta {
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--police-texte);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(239, 42, 42, 0.35);
  transition: background var(--transition), transform var(--transition);
}
.premium-cta:hover { background: var(--rouge-clair); transform: translateY(-2px); }

.premium-demo {
  background: transparent;
  border: 1px solid var(--ligne);
  color: var(--texte-doux);
  border-radius: 999px;
  padding: 12px 20px;
  font-family: var(--police-texte);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.premium-demo:hover { border-color: var(--rouge-clair); color: var(--texte); }

.premium-note-eco { color: var(--texte-doux); font-size: 0.8rem; margin-top: 4px; }

/* --- Deux formules d'abonnement --- */
.pw-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 6px 0 2px;
  width: 100%;
  max-width: 560px;
}
.pw-plan {
  position: relative;
  flex: 1 1 210px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 18px;
  background: var(--carte);
  border: 1px solid var(--ligne-forte);
  border-radius: 16px;
  text-align: left;
}
.pw-plan--phare {
  border-color: var(--rouge-clair);
  box-shadow: 0 0 0 1px var(--rouge-clair), 0 14px 40px rgba(239, 42, 42, 0.22);
}
.pw-plan-ruban {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--rouge);
  color: #fff;
  font-family: var(--police-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}
.pw-plan-nom {
  font-family: var(--police-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.pw-plan-prix {
  font-family: var(--police-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.pw-plan-prix span { font-size: 0.9rem; font-weight: 500; color: var(--texte-doux); }
.pw-plan-desc { font-size: 0.86rem; color: var(--texte-doux); line-height: 1.5; flex: 1; }
.pw-plan-desc b { color: var(--texte); }
.pw-choix { width: 100%; margin-top: 4px; padding: 11px 18px; font-size: 0.92rem; }
.pw-plan:not(.pw-plan--phare) .pw-choix {
  background: transparent;
  border: 1px solid var(--ligne-forte);
  color: var(--texte);
  box-shadow: none;
}
.pw-plan:not(.pw-plan--phare) .pw-choix:hover { border-color: var(--rouge-clair); background: rgba(239,42,42,.08); }

.pw-quota { font-size: 0.92rem; color: var(--texte-doux); max-width: 440px; }
.pw-quota b { color: var(--texte); }

.pw-lien {
  background: none; border: none; padding: 0;
  color: var(--rouge-clair); font-family: var(--police-texte);
  font-size: inherit; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pw-demo { color: var(--texte-doux); font-size: 0.8rem; margin-top: 2px; }

/* Contenu premium débloqué */
.pr-sec { padding: 16px 0; border-top: 1px solid var(--ligne); }
.pr-sec:first-child { border-top: 0; padding-top: 0; }

.pr-sec h4 {
  font-family: var(--police-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.pr-intro { color: var(--texte-doux); font-size: 0.9rem; line-height: 1.55; }

.pr-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 640px) { .pr-duo { grid-template-columns: 1fr; } }

.pr-carte {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  padding: 14px 16px;
}
.pr-carte h5 { font-weight: 600; margin-bottom: 8px; }
.pr-carte ul { padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.pr-carte li { font-size: 0.88rem; line-height: 1.5; color: var(--texte-doux); }
.pr-carte li b, .pr-carte a { color: var(--texte); }
.pr-carte a { color: var(--rouge-clair); }

.pr-prompt {
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 8px;
  padding: 11px 13px;
  font-family: var(--police-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--texte-doux);
  margin: 8px 0 10px;
}

.pr-copier {
  background: var(--carte-haute);
  border: 1px solid var(--ligne);
  color: var(--texte);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.pr-copier:hover { border-color: var(--rouge-clair); }

.pr-plan { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.pr-plan li { font-size: 0.9rem; line-height: 1.55; color: var(--texte-doux); }
.pr-plan li b { color: var(--texte); }

.pr-idees { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 12px; }
.pr-idees-titre { font-size: 0.82rem; color: var(--texte-doux); font-weight: 600; }
.pr-idee {
  background: var(--carte-haute);
  border: 1px solid var(--ligne);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 0.84rem;
}

.pr-formule {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid color-mix(in srgb, var(--vert) 30%, transparent);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: var(--police-mono);
  font-size: 0.86rem;
  color: var(--texte);
  margin-top: 8px;
}

/* ====== DIVERS ====== */
.disclaimer {
  color: var(--texte-doux);
  font-size: 0.84rem;
  text-align: center;
  margin: 24px 0 16px;
}

.btn-secondary {
  display: block;
  margin: 0 auto;
  background: var(--carte);
  border: 1px solid var(--ligne);
  color: var(--texte);
  border-radius: 999px;
  padding: 10px 24px;
  font-family: var(--police-texte);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition);
}

.btn-secondary:hover { border-color: var(--rouge-clair); }

.notfound-section {
  text-align: center;
  margin-top: 36px;
  max-width: 640px;
  animation: glisseDroite 0.4s ease;
}

.notfound-emoji { font-size: 2.6rem; margin-bottom: 12px; }

.notfound-section h2 {
  font-family: var(--police-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.notfound-section p { color: var(--texte-doux); line-height: 1.6; }

.notfound-section .suggestions { margin: 20px 0 24px; }

code {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: var(--police-mono);
  font-size: 0.82em;
}

.site-footer {
  margin-top: auto;
  padding-top: 44px;
  color: var(--texte-doux);
  font-size: 0.82rem;
}

.footer-legal {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.55;
  opacity: 0.85;
}
.footer-legal b { color: var(--texte-doux); font-weight: 600; }

/* ====== ACCESSIBILITÉ & RESPONSIVE ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .criteria-card { opacity: 1; transform: none; }
  .pop-card { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

@media (max-width: 600px) {
  body { padding-top: 32px; }
  .logo { font-size: 1.4rem; }

  /* Laisse le titre se couper naturellement plutôt qu'au <br> forcé */
  .hero-title br { display: none; }
  .hero-sub { font-size: 0.98rem; }

  /* Bouton compact pour libérer de la place au champ de saisie */
  .search-bar { padding-left: 14px; gap: 8px; }
  #search-btn { padding: 11px 15px; font-size: 0.9rem; }
  #search-input { font-size: 0.98rem; }
  .btn-random { width: 48px; }

  .hero-stats { gap: 12px 22px; }
  .hero-stats dt { font-size: 1.35rem; }
  .hero-stats dd { font-size: 0.7rem; }
  .results-header { padding: 20px 18px 24px; }
  .results-title { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-favori { align-self: stretch; text-align: center; }
  .results-title h2 { font-size: 1.5rem; }
  .score-topline { flex-direction: column; gap: 4px; }
  .processing-card { flex-direction: column; align-items: stretch; }
  .processing-thumb { width: 100%; height: 110px; }
  .criteria-card { flex-basis: 260px; }
}

/* ============================================================
   MOTION / DOPAMINE — pression tactile, onde de clic, particules
   ============================================================ */
:root {
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-soft: cubic-bezier(.22, .61, .36, 1);
}

/* Boutons : pression élastique + confinement de l'onde.
   On anime `scale` (indépendant de `transform`) pour ne pas écraser les
   translations de survol existantes. */
.fx {
  position: relative;
  overflow: hidden;
  transition:
    scale .18s var(--spring),
    transform .2s var(--ease-soft),
    background-color .2s var(--ease-soft),
    border-color .2s var(--ease-soft),
    color .2s var(--ease-soft),
    box-shadow .2s var(--ease-soft);
}
.fx:active { scale: .95; }

/* Onde partant du point de clic */
.fx-ink {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  transform: scale(0);
  pointer-events: none;
  animation: fx-ink .6s ease-out forwards;
}
@keyframes fx-ink { to { transform: scale(1); opacity: 0; } }

/* Particules d'éclat (favori, score, déblocage) */
.fx-particle {
  position: fixed;
  z-index: 9999;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

/* Focus clavier lisible partout */
:focus-visible { outline: 2px solid var(--rouge-clair); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .fx { transition: background-color .2s, border-color .2s, color .2s; }
  .fx:active { scale: 1; }
  .fx-ink { display: none; }
}

/* ============================================================
   ABONNEMENTS — listes de fonctionnalités, aperçu-démo, export
   ============================================================ */
.pw-feats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 2px;
  text-align: left;
  font-size: 0.82rem;
  color: var(--texte-doux);
}
.pw-feats li { position: relative; padding-left: 20px; line-height: 1.4; }
.pw-feats li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--vert); font-weight: 700;
}
.pw-feat-plus { color: var(--texte); font-weight: 500; }
.pw-feat-plus::before { content: "★"; color: var(--rouge-clair); }

/* Bannière + voile de l'aperçu-démo */
.apercu-banniere {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--texte);
}
.apercu-tag {
  font-family: var(--police-mono);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 6px;
  background: var(--ambre); color: #1a1205;
}
.apercu-flou {
  filter: blur(4px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.pr-prompt {
  font-family: var(--police-mono); font-size: 0.82rem;
  background: rgba(0,0,0,0.28); border: 1px solid var(--ligne);
  border-radius: 10px; padding: 14px; color: var(--texte-doux);
  margin-top: 10px;
}
.apercu-cta {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
  margin-top: 8px; padding: 24px 16px;
  border-top: 1px solid var(--ligne);
}
.apercu-cta-titre { font-family: var(--police-display); font-size: 1.15rem; font-weight: 700; }

/* Bouton export (avantage Illimité) */
.pr-export-sec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-export-note { color: var(--texte-doux); font-size: 0.82rem; }

/* Badge « avantage Illimité » sur les gates */
.gate-badge {
  display: inline-block;
  font-family: var(--police-mono);
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(239, 42, 42, 0.16); color: var(--rouge-clair);
  vertical-align: middle;
}

/* ============================================================
   COMPARATEUR DE NICHES (avantage Illimité)
   ============================================================ */
.cmp-intro { color: var(--texte-doux); font-size: 0.92rem; margin-bottom: 14px; }
.cmp-choix { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cmp-chip {
  background: var(--carte); border: 1px solid var(--ligne-forte); border-radius: 999px;
  padding: 8px 15px; font-family: var(--police-texte); font-size: 0.86rem; font-weight: 600;
  color: var(--texte-doux); cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.cmp-chip:hover:not(:disabled) { border-color: var(--ligne-forte); color: var(--texte); }
.cmp-chip.actif { border-color: var(--rouge-clair); color: #fff; background: rgba(239,42,42,0.16); }
.cmp-chip:disabled { opacity: 0.4; cursor: not-allowed; }

.cmp-scroll { overflow-x: auto; }
.cmp-table {
  width: 100%; border-collapse: collapse; min-width: 420px;
  font-variant-numeric: tabular-nums;
}
.cmp-table th, .cmp-table td {
  padding: 11px 12px; text-align: center; border-bottom: 1px solid var(--ligne);
}
.cmp-table thead th {
  vertical-align: bottom; border-bottom: 1px solid var(--ligne-forte);
}
.cmp-emoji { display: block; font-size: 1.5rem; margin-bottom: 4px; }
.cmp-nom { display: block; font-family: var(--police-display); font-weight: 700; font-size: 0.9rem; }
.cmp-critere {
  text-align: left; color: var(--texte-doux); font-weight: 500; font-size: 0.86rem; white-space: nowrap;
}
.cmp-table td { color: var(--texte); font-family: var(--police-mono); font-size: 0.9rem; }
.cmp-ligne-score td { font-size: 1.05rem; font-weight: 700; }
.cmp-ligne-score small, .cmp-scoreligne small { color: var(--texte-doux); font-size: 0.7rem; font-weight: 500; }
.cmp-best {
  background: rgba(34, 197, 94, 0.14);
  color: var(--vert) !important;
  border-radius: 6px; font-weight: 700;
}
.cmp-note { color: var(--texte-doux); font-size: 0.8rem; margin-top: 12px; }
.cmp-best-inline { background: rgba(34,197,94,0.16); color: var(--vert); padding: 1px 6px; border-radius: 5px; }

/* ============================================================
   RÉPARTITION DES VUES — barres des 10 vidéos phares
   ============================================================ */
.vbar-liste { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.vbar-row { display: flex; align-items: center; gap: 12px; }
.vbar-rank {
  flex-shrink: 0; width: 22px; text-align: center;
  font-family: var(--police-mono); font-size: 0.8rem; font-weight: 700; color: var(--num, #6A6A7A);
}
.vbar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vbar-nom {
  font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--texte); text-decoration: none;
}
a.vbar-nom:hover { color: var(--rouge-clair); text-decoration: underline; text-underline-offset: 2px; }
.vbar-verrou { color: var(--texte-doux); font-family: var(--police-mono); letter-spacing: 0.08em; }
.vbar-cadenas { font-size: 0.8rem; }
.vbar-track {
  height: 9px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.vbar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #16A34A, #22C55E 70%, #4ADE80);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
  transform-origin: left center;
  animation: vbar-grow 0.8s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes vbar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.vbar-vues {
  flex-shrink: 0; width: 74px; text-align: right;
  font-family: var(--police-mono); font-size: 0.78rem; color: var(--texte-doux);
  font-variant-numeric: tabular-nums;
}
.vbar-gate { margin-top: 16px; font-size: 0.88rem; color: var(--texte-doux); }
@media (prefers-reduced-motion: reduce) { .vbar-fill { animation: none; } }

/* ============================================================
   PARTAGE — bouton + toast + lien profond
   ============================================================ */
.results-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-partager {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--ligne-forte); border-radius: 999px;
  padding: 9px 16px; font-family: var(--police-texte); font-size: 0.9rem; font-weight: 600;
  color: var(--texte); cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.btn-partager:hover { border-color: var(--rouge-clair); background: rgba(239,42,42,0.08); }
.btn-partager svg { flex-shrink: 0; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: var(--carte-haute, #1E1E2A); color: var(--texte);
  border: 1px solid var(--ligne-forte); border-radius: 12px;
  padding: 12px 20px; font-size: 0.92rem; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; z-index: 10000;
  transition: opacity .25s ease, transform .25s var(--spring, cubic-bezier(.34,1.56,.64,1));
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 620px) {
  .results-actions { margin-left: 0; width: 100%; }
  .btn-partager, .btn-favori { flex: 1; justify-content: center; }
}

/* ============================================================
   MASQUER DES NICHES
   ============================================================ */
.fiche-bas-actions {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.btn-masquer {
  background: transparent; border: 1px solid var(--ligne); border-radius: 999px;
  padding: 10px 18px; font-family: var(--police-texte); font-size: 0.85rem; font-weight: 600;
  color: var(--texte-doux); cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-masquer:hover { border-color: var(--rouge-clair); color: var(--texte); }
.chip-masquee { display: inline-flex; align-items: center; gap: 7px; }
.chip-x { color: var(--rouge-clair); font-weight: 700; font-size: 1.05rem; line-height: 1; }

/* ============================================================
   DÉ 3D — bouton aléatoire
   ============================================================ */
.btn-random:hover { transform: none; }
.btn-random:active { transform: scale(0.94); }
.btn-random:hover .dice3d { animation-duration: 3s; }

.dice3d-scene {
  width: 30px; height: 30px; display: grid; place-items: center;
  perspective: 260px;
}
.dice3d {
  position: relative; width: 26px; height: 26px;
  transform-style: preserve-3d;
  animation: dice-idle 9s linear infinite;
  will-change: transform;
}
.dice-face {
  position: absolute; inset: 0;
  display: grid;
  grid-template-areas: "a . c" "e g f" "d . b";
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px; gap: 1px;
  background: rgba(14, 14, 20, 0.9);
  border: 1.5px solid currentColor;
  border-radius: 5px;
  box-shadow: inset 0 0 7px rgba(0, 0, 0, 0.45), 0 0 6px color-mix(in srgb, currentColor 35%, transparent);
}
.dice-face i {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; align-self: center; justify-self: center;
}
.df-1 i { grid-area: g; }
.df-2 i:nth-child(1) { grid-area: a; } .df-2 i:nth-child(2) { grid-area: b; }
.df-3 i:nth-child(1) { grid-area: a; } .df-3 i:nth-child(2) { grid-area: g; } .df-3 i:nth-child(3) { grid-area: b; }
.df-4 i:nth-child(1) { grid-area: a; } .df-4 i:nth-child(2) { grid-area: c; } .df-4 i:nth-child(3) { grid-area: d; } .df-4 i:nth-child(4) { grid-area: b; }
.df-5 i:nth-child(1) { grid-area: a; } .df-5 i:nth-child(2) { grid-area: c; } .df-5 i:nth-child(3) { grid-area: g; } .df-5 i:nth-child(4) { grid-area: d; } .df-5 i:nth-child(5) { grid-area: b; }
.df-6 i:nth-child(1) { grid-area: a; } .df-6 i:nth-child(2) { grid-area: c; } .df-6 i:nth-child(3) { grid-area: e; } .df-6 i:nth-child(4) { grid-area: f; } .df-6 i:nth-child(5) { grid-area: d; } .df-6 i:nth-child(6) { grid-area: b; }
.df-1 { transform: translateZ(13px); }
.df-6 { transform: rotateY(180deg) translateZ(13px); }
.df-2 { transform: rotateY(90deg) translateZ(13px); }
.df-5 { transform: rotateY(-90deg) translateZ(13px); }
.df-3 { transform: rotateX(90deg) translateZ(13px); }
.df-4 { transform: rotateX(-90deg) translateZ(13px); }

@keyframes dice-idle {
  0%   { transform: rotateX(-15deg) rotateY(0deg); }
  50%  { transform: rotateX(15deg) rotateY(180deg); }
  100% { transform: rotateX(-15deg) rotateY(360deg); }
}
@media (prefers-reduced-motion: reduce) { .dice3d { animation: none; transform: rotateX(-15deg) rotateY(24deg); } }

/* ============================================================
   TARIFS — section abonnements de l'accueil
   ============================================================ */
.tarifs { margin-top: 64px; text-align: center; }
.tarifs-titre {
  font-family: var(--police-display); font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px;
}
.tarifs-soustitre { color: var(--texte-doux); font-size: 0.95rem; margin-bottom: 28px; }
.tarifs-grille {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; max-width: 920px; margin: 0 auto; align-items: stretch;
}
.tarif-carte {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  text-align: left; padding: 26px 22px 22px;
  background: var(--carte); border: 1px solid var(--ligne-forte); border-radius: 18px;
}
.tarif-carte--phare { border-color: var(--rouge-clair); box-shadow: 0 0 0 1px var(--rouge-clair), 0 18px 50px rgba(239,42,42,.18); }
.tarif-gratuit { border-color: color-mix(in srgb, var(--vert) 45%, transparent); }
.tarif-badge {
  position: absolute; top: -11px; right: 18px;
  background: var(--rouge); color: #fff; font-family: var(--police-mono);
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 10px; border-radius: 999px;
}
.tarif-badge--actif { background: var(--vert); color: #06231a; }
.tarif-carte .pw-feats { flex: 1; }
.tarif-actuel { background: transparent !important; border: 1px solid var(--ligne-forte); color: var(--texte-doux) !important; box-shadow: none !important; cursor: default; opacity: 0.9; }
.tarif-gratuit .tarif-actuel { border-color: color-mix(in srgb, var(--vert) 50%, transparent); color: var(--vert) !important; }

/* Widget « Passer à l'Illimité » (gates de Mon espace) */
.gate-illimite-widget { max-width: 560px; margin: 0 auto; }
.gate-entete { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.gate-pitch { margin-top: 6px; color: var(--texte-doux); }
.gate-feats { max-width: 420px; margin: 12px auto 4px; text-align: left; }

/* ============================================================
   FICHE NICHE — DA unique par niche + widget principal agrandi
   ============================================================ */
.results-emoji {
  width: 106px; height: 74px; font-size: 2.4rem;
  background: hsl(var(--hue, 0) 42% 11%);
  border: 1px solid hsl(var(--hue, 0) 55% 34%);
  border-radius: 14px;
  box-shadow: 0 0 32px hsl(var(--hue, 0) 65% 34% / 0.4),
              inset 0 0 20px hsl(var(--hue, 0) 60% 22% / 0.5);
}
#niche-name { font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.05; }

/* Score global : chiffre héroïque */
.score-time { display: inline-flex; align-items: baseline; gap: 5px; }
#score-number {
  font-family: var(--police-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.score-sur { font-size: 1rem; }
.score-verdict { font-size: 1.02rem; }

/* Barre de progression plus présente */
.player-bar { height: 7px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 4px rgba(0,0,0,.3); }
.results-header:hover .player-bar { height: 10px; }
.player-head { width: 17px; height: 17px; }

/* Indicateurs (stats) teintés par la niche */
.stats-strip > * {
  border-top: 2px solid hsl(var(--hue, 0) 60% 45% / 0.55) !important;
}

/* ============================================================
   À EXPLORER — mots-clés tendances + astuce algorithme
   ============================================================ */
.explorer-bloc--tendances { margin-bottom: 18px; }
.explorer-live {
  font-family: var(--police-mono); font-size: 0.7rem; font-weight: 700;
  color: var(--vert); letter-spacing: 0.03em;
}
.explorer-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.explorer-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(34, 197, 94, 0.10); border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 999px; padding: 6px 13px;
  font-family: var(--police-texte); font-size: 0.86rem; font-weight: 600;
  color: #86efac; text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.explorer-tag:hover { background: rgba(34,197,94,0.2); border-color: var(--vert); transform: translateY(-2px); }
.tag-fleche { opacity: 0.6; font-size: 0.75rem; }
.explorer-astuce {
  margin-top: 20px; padding: 14px 18px;
  background: rgba(90, 155, 255, 0.08); border: 1px solid rgba(90, 155, 255, 0.28);
  border-radius: 12px; font-size: 0.9rem; line-height: 1.6; color: var(--texte-doux);
}
.explorer-astuce b { color: var(--texte); }

/* ============================================================
   SOUS-NICHES — ce qui découle de la niche
   ============================================================ */
.sous-niches { margin: 4px 0 8px; }
.sous-niches-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px;
  padding: 13px 18px; cursor: pointer; color: var(--texte);
  font-family: var(--police-texte); font-size: 0.95rem; font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}
.sous-niches-toggle:hover { border-color: var(--ligne-forte); background: var(--carte-haute); }
.sn-titre { flex: 1; text-align: left; }
.sn-count {
  font-family: var(--police-mono); font-size: 0.78rem; font-weight: 700;
  background: rgba(34,197,94,.14); color: var(--vert); padding: 2px 9px; border-radius: 999px;
}
.sn-chevron { color: var(--texte-doux); transition: transform var(--transition); }
.sous-niches-toggle[aria-expanded="true"] .sn-chevron { transform: rotate(180deg); }
.sous-niches-liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px; margin-top: 10px;
}
.sn-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.22); border: 1px solid var(--ligne); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; color: var(--texte); text-align: left;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.sn-chip:hover { border-color: var(--rouge-clair); background: var(--carte-haute); transform: translateY(-2px); }
.sn-emoji { font-size: 1.15rem; flex-shrink: 0; }
.sn-nom { flex: 1; min-width: 0; font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-score { font-family: var(--police-mono); font-size: 0.82rem; font-weight: 700; color: var(--texte-doux); }

/* Aperçu chaînes (stat gratuite) : une visible, le reste flouté */
.chaine-floue {
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}
.chaine-floue .chaine-nom { color: var(--texte-doux); letter-spacing: 2px; }

/* Sous-niches : aperçu (3 visibles, reste flouté + CTA premium) */
.sn-floue { filter: blur(4px); opacity: 0.5; pointer-events: none; user-select: none; }
.sn-floue .sn-nom { color: var(--texte-doux); letter-spacing: 1px; }
.sn-cta {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(239, 42, 42, 0.08); border: 1px dashed var(--rouge-clair);
  border-radius: 10px; padding: 11px; margin-top: 2px;
  font-family: var(--police-texte); font-size: 0.88rem; font-weight: 600;
  color: var(--texte); cursor: pointer;
  transition: background var(--transition);
}
.sn-cta:hover { background: rgba(239, 42, 42, 0.16); }
.sn-cta b { color: var(--rouge-clair); }

/* ============================================================
   MODE DÉCOUVERTE — bouton + overlay swipe (Tinder/TikTok)
   ============================================================ */
.btn-decouverte {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px auto 0; padding: 8px 16px;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 999px;
  cursor: pointer; color: var(--texte-doux);
  font-family: var(--police-texte); font-size: 0.85rem; font-weight: 600;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.btn-decouverte:hover { border-color: var(--ligne-forte); color: var(--texte); background: var(--carte-haute); }
.dec-flamme { font-size: 0.95rem; filter: grayscale(.15); }
.btn-decouverte .dec-sub { color: var(--texte-doux); font-weight: 500; }
.btn-decouverte:hover .dec-sub { color: var(--texte-doux); }

.decouverte {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(120% 90% at 50% 0%, #16111c, #09090F 70%);
}
.decouverte.hidden { display: none; }
.dec-topbar {
  width: 100%; max-width: 520px; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; color: var(--texte);
}
.dec-titre { font-family: var(--police-display); font-weight: 800; font-size: 1.2rem; }
.dec-compteur { font-family: var(--police-mono); font-size: 0.85rem; color: var(--texte-doux); }
.dec-fermer {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ligne-forte);
  background: transparent; color: var(--texte); font-size: 1rem; cursor: pointer;
}
.dec-fermer:hover { border-color: var(--rouge-clair); }

.dec-stack {
  position: relative; flex: 1; width: 100%; max-width: 440px;
  display: flex; align-items: center; justify-content: center; padding: 6px 20px;
}
.dec-stack::before, .dec-stack::after {
  content: ""; position: absolute; width: min(88%, 380px); height: 74%;
  border-radius: 22px; background: var(--carte); border: 1px solid var(--ligne);
}
.dec-stack::before { transform: rotate(-4deg) translateY(8px); opacity: .35; }
.dec-stack::after  { transform: rotate(3deg) translateY(4px); opacity: .55; }

.dec-carte {
  position: relative; z-index: 2;
  width: min(92%, 380px); min-height: 62vh; max-height: 74vh;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 30px 26px; border-radius: 22px;
  background: linear-gradient(160deg, hsl(var(--hue,0) 42% 15%), hsl(var(--hue,0) 46% 8%));
  border: 1px solid hsl(var(--hue,0) 55% 42% / .45);
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 50px hsl(var(--hue,0) 60% 40% / .25);
  cursor: grab; touch-action: none; user-select: none;
  will-change: transform;
}
.dec-carte:active { cursor: grabbing; }
.dec-emoji {
  font-size: 4.6rem; line-height: 1; margin-top: 8px;
  filter: drop-shadow(0 0 26px hsl(var(--hue,0) 70% 50% / .6));
}
.dec-nom { font-family: var(--police-display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.dec-resume { color: var(--texte-doux); font-size: 0.98rem; line-height: 1.5; max-width: 320px; }
.dec-score {
  font-family: var(--police-display); font-weight: 800; font-size: 1.05rem; margin-top: auto;
}
.dec-score b { font-size: 2.4rem; }
.dec-score span { color: var(--texte-doux); font-weight: 500; font-size: 1rem; }
.dec-score-good b { color: var(--vert); } .dec-score-medium b { color: var(--ambre); } .dec-score-bad b { color: #FF5C5C; }
.dec-stats { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.dec-stat {
  font-family: var(--police-texte); font-size: 0.86rem; font-weight: 600;
  padding: 7px 12px; border-radius: 10px; background: rgba(0,0,0,.28);
}
.dec-stat-fort { color: var(--vert); } .dec-stat-faible { color: #FF7A7A; }
.dec-meta { font-family: var(--police-mono); font-size: 0.8rem; color: var(--texte-doux); }

.dec-stamp {
  position: absolute; top: 26px; padding: 6px 16px; border-radius: 10px;
  font-family: var(--police-display); font-size: 1.3rem; font-weight: 800;
  opacity: 0; pointer-events: none; letter-spacing: .02em;
}
.dec-stamp-like { left: 22px; color: #22C55E; border: 3px solid #22C55E; transform: rotate(-16deg); }
.dec-stamp-pass { right: 22px; color: #FF4444; border: 3px solid #FF4444; transform: rotate(16deg); }

.dec-actions { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px 0 6px; }
.dec-btn {
  border-radius: 50%; border: 1px solid var(--ligne-forte); background: var(--carte);
  cursor: pointer; display: grid; place-items: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.dec-btn:hover { transform: translateY(-3px) scale(1.06); }
.dec-btn:active { transform: scale(.92); }
.dec-pass { width: 60px; height: 60px; font-size: 1.4rem; color: #FF4444; }
.dec-pass:hover { border-color: #FF4444; box-shadow: 0 0 22px rgba(255,68,68,.4); }
.dec-voir { width: 50px; height: 50px; font-size: 1.15rem; }
.dec-voir:hover { border-color: var(--texte); }
.dec-like { width: 68px; height: 68px; font-size: 1.7rem; color: #22C55E; }
.dec-like:hover { border-color: #22C55E; box-shadow: 0 0 26px rgba(34,197,94,.45); }
.dec-aide { color: var(--texte-doux); font-size: 0.82rem; padding: 4px 0 20px; text-align: center; }

/* Carte gate du mode découverte (après 10 swipes) */
.dec-carte-gate { justify-content: center; }
.dec-carte-gate .dec-emoji { filter: drop-shadow(0 0 24px rgba(239,42,42,.5)); }
.dec-gate-plans { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.dec-gate-plans .pw-choix { width: 100%; }

/* ============================================================
   PAGE ABONNEMENTS dédiée
   ============================================================ */
.abonnements-section { width: 100%; max-width: 1000px; margin: 0 auto; }
.abo-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.abo-etiquette { font-family: var(--police-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rouge-clair); }
.abo-titre { font-family: var(--police-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
.abo-intro { color: var(--texte-doux); font-size: 1.02rem; line-height: 1.6; max-width: 720px; margin: 6px 0 28px; }
.abo-intro b { color: var(--texte); }
.abo-grille { max-width: 100%; margin-bottom: 46px; }

.abo-soustitre { font-family: var(--police-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 20px; }
.abo-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.abo-detail {
  display: flex; gap: 14px; padding: 18px;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px;
}
.abo-detail-emoji { font-size: 1.8rem; flex-shrink: 0; line-height: 1.2; }
.abo-detail-txt { min-width: 0; }
.abo-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.abo-detail-head h4 { font-family: var(--police-display); font-size: 1.05rem; font-weight: 700; }
.abo-palier {
  font-family: var(--police-mono); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 6px;
}
.abo-palier-standard { background: rgba(255,255,255,.08); color: var(--texte-doux); }
.abo-palier-illimite { background: rgba(239,42,42,.16); color: var(--rouge-clair); }
.abo-quoi { color: var(--texte); font-size: 0.92rem; line-height: 1.55; margin-bottom: 6px; }
.abo-pourquoi { color: var(--texte-doux); font-size: 0.9rem; line-height: 1.55; }
.abo-pourquoi b { color: var(--vert); }

.abo-final { text-align: center; margin: 44px 0 10px; padding: 30px; background: var(--carte); border: 1px solid var(--ligne-forte); border-radius: 18px; }
.abo-final-titre { font-family: var(--police-display); font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.abo-note { color: var(--texte-doux); font-size: 0.84rem; margin-top: 14px; }
.footer-sep { color: var(--texte-doux); margin: 0 4px; }

/* ============================================================
   AFFORDANCE CLIQUABLE + HOVER ABOS + MODE SWIPE MOBILE
   ============================================================ */

/* 1) Signal « cliquable » discret : petite flèche ↗ au repos, vive au survol */
button.stat-tuile, .etape { position: relative; }
button.stat-tuile::after, .etape::after {
  content: "↗";
  position: absolute; top: 12px; right: 14px;
  font-size: 0.85rem; font-weight: 700; line-height: 1;
  color: var(--texte-doux); opacity: 0.32;
  transition: opacity .22s var(--ease-soft), transform .24s var(--spring), color .22s;
  pointer-events: none;
}
button.stat-tuile:hover, button.stat-tuile:focus-visible { transform: translateY(-3px); }
button.stat-tuile:hover::after, .etape:hover::after,
button.stat-tuile:focus-visible::after, .etape:focus-visible::after {
  opacity: 1; color: var(--rouge-clair); transform: translate(3px, -3px);
}
button.stat-tuile:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32); }

/* 2) Cartes d'abonnement : mini-zoom fluide + halo (effet « motion design ») */
.tarif-carte, .pw-plan, .abo-detail {
  transition: transform .3s var(--spring), box-shadow .3s var(--ease-soft), border-color .3s var(--ease-soft);
}
.tarif-carte:hover, .pw-plan:hover {
  transform: translateY(-6px) scale(1.025);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(239, 42, 42, 0.12);
  border-color: var(--rouge-clair);
}
.abo-detail:hover { transform: translateY(-3px); border-color: var(--ligne-forte); }
.tarif-carte:hover .tarif-badge, .pw-plan:hover .pw-plan-ruban { animation: badge-pop .5s var(--spring); }
@keyframes badge-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.13); } }

/* Halo qui respire sur la carte « phare » (attire l'œil, filme bien) */
.tarif-carte--phare, .pw-plan--phare { animation: phare-glow 3s ease-in-out infinite; }
@keyframes phare-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--rouge-clair), 0 14px 40px rgba(239, 42, 42, 0.18); }
  50%      { box-shadow: 0 0 0 1px var(--rouge-clair), 0 18px 54px rgba(239, 42, 42, 0.36); }
}
.tarif-carte--phare:hover, .pw-plan--phare:hover { animation: none; }

/* 3) Mode découverte (swipe) : plus d'air sur mobile */
@media (max-width: 560px) {
  .dec-topbar { padding: 13px 16px; }
  .dec-stack { padding: 4px 14px; }
  .dec-carte { min-height: 52vh; max-height: 64vh; padding: 22px 18px; gap: 9px; border-radius: 20px; }
  .dec-emoji { font-size: 3.4rem; margin-top: 2px; }
  .dec-nom { font-size: 1.45rem; }
  .dec-resume { font-size: 0.88rem; line-height: 1.45; }
  .dec-score b { font-size: 1.9rem; }
  .dec-stat { font-size: 0.8rem; padding: 6px 10px; }
  .dec-actions { gap: 18px; padding: 14px 0 6px; }
  .dec-pass { width: 54px; height: 54px; font-size: 1.25rem; }
  .dec-voir { width: 46px; height: 46px; font-size: 1.05rem; }
  .dec-like { width: 62px; height: 62px; font-size: 1.5rem; }
  .dec-aide { padding: 2px 14px 16px; font-size: 0.76rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tarif-carte--phare, .pw-plan--phare { animation: none; }
}
