/* ==========================================================================
   CARNET DE VOYAGE - TAROT & DESIGN THINKING
   Feuille de styles principale (100dvh Fit + Vue Détail Split-Screen)
   ========================================================================== */

/* --- Variables Globales --- */
:root {
  --color-bg: #090a10;
  --color-surface: #121420;
  --color-surface-trans: rgba(18, 20, 32, 0.85);
  --color-gold: #e5b95f;
  --color-gold-bright: #ffe699;
  --color-gold-dark: #9e7930;
  --color-text-main: #f5f6fa;
  --color-text-muted: #a0a6c0;

  /* Dimensions des cartes sur la table d'accueil (Agrandies pour plus de majesté) */
  --card-height: clamp(190px, 32vh, 290px);
  --card-width: calc(var(--card-height) * 0.63);
  --card-radius: 14px;
  --card-border-gold: rgba(229, 185, 95, 0.45);

  /* Dimensions de la carte agrandie dans la vue détail */
  --detail-card-height: clamp(310px, 66vh, 480px);
  --detail-card-width: calc(var(--detail-card-height) * 0.62);

  --font-display: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
  
  --transition-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Anti-Scroll Global --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}

/* --- Ambiance Cosmique d'arrière-plan --- */
.cosmic-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars-layer {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 150px 120px, #e5b95f, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 280px 210px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 400px 90px, #82b1ff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 520px 340px, #ffd54f, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 680px 190px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 850px 420px, #b388ff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 980px 250px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 1150px 130px, #e5b95f, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.35;
}

.aura-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(94, 53, 177, 0.16) 0%, rgba(229, 185, 95, 0.06) 45%, transparent 70%);
  filter: blur(65px);
}

/* --- Wrapper Principal --- */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  height: 100dvh;
  padding: clamp(0.6rem, 2vh, 1.2rem) clamp(1rem, 3vw, 2.2rem);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* --- En-tête de la table d'accueil --- */
.table-header {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 0.3rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.9rem;
  background: rgba(229, 185, 95, 0.08);
  border: 1px solid rgba(229, 185, 95, 0.25);
  border-radius: 999px;
  font-size: clamp(0.7rem, 1.3vh, 0.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 0.35rem;
}

.badge-sparkle {
  color: var(--color-gold);
  font-size: 0.7rem;
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vh, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ffffff 30%, var(--color-gold-bright) 70%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.2rem;
  text-shadow: 0 4px 18px rgba(229, 185, 95, 0.2);
}

.tagline {
  color: var(--color-text-muted);
  font-size: clamp(0.8rem, 1.4vh, 0.95rem);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.35;
  font-weight: 300;
}

/* --- Zone de la Table de Tirage --- */
.tarot-table {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.4rem 0;
  position: relative;
  overflow: visible;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Grille des 10 Cartes (Disposition en 2 rangées de 5) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, var(--card-width));
  gap: clamp(0.6rem, 1.4vw, 1.2rem);
  justify-content: center;
  align-content: center;
  width: 100%;
  max-width: 100%;
  position: relative;
}

@media (max-width: 980px) {
  :root {
    --card-height: clamp(150px, 23vh, 215px);
  }
  .cards-grid {
    grid-template-columns: repeat(5, var(--card-width));
    gap: 0.6rem;
  }
}

@media (max-width: 680px) {
  :root {
    --card-height: clamp(120px, 15vh, 150px);
  }
  .cards-grid {
    grid-template-columns: repeat(2, var(--card-width));
    gap: 0.5rem;
  }
}

@media (max-width: 400px) {
  :root {
    --card-height: clamp(105px, 13.5vh, 130px);
  }
  .cards-grid {
    grid-template-columns: repeat(2, var(--card-width));
    gap: 0.35rem;
  }
}

/* Composant Carte de Tarot */
.tarot-card {
  width: var(--card-width);
  height: var(--card-height);
  perspective: 1200px;
  cursor: pointer;
  user-select: none;
  --mouse-tx: 0px;
  --mouse-ty: 0px;
  --mouse-rot: 0deg;
  transition: transform 0.85s var(--transition-smooth), box-shadow 0.4s ease;
  will-change: transform;
}

.cards-grid.is-scattered .tarot-card {
  transform: translate3d(
    calc(var(--tx, 0px) + var(--mouse-tx, 0px)), 
    calc(var(--ty, 0px) + var(--mouse-ty, 0px)), 
    0
  ) rotate(calc(var(--rot, 0deg) + var(--mouse-rot, 0deg)));
  z-index: var(--z, 1);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.cards-grid.is-scattered .tarot-card.is-repelled {
  z-index: 50 !important;
}

.cards-grid.is-scattered .tarot-card.is-repelled .card-inner {
  box-shadow: 
    0 14px 28px rgba(0, 0, 0, 0.65), 
    0 0 16px rgba(229, 185, 95, 0.3);
  transform: rotateY(0deg) scale(1.05);
}

.cards-grid.is-scattered .tarot-card:hover {
  z-index: 60 !important;
}

.cards-grid.is-scattered .tarot-card:hover .card-inner {
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.75), 
    0 0 24px rgba(229, 185, 95, 0.45);
  transform: rotateY(0deg) scale(1.07);
}

.cards-grid.is-animating .tarot-card {
  transition: transform 0.85s var(--transition-smooth) !important;
}

.cards-grid:not(.is-scattered) .tarot-card {
  transform: translate3d(0, 0, 0) rotate(0deg);
  z-index: 1;
  transition-delay: calc(var(--index, 0) * 40ms);
}

.cards-grid:not(.is-scattered) .tarot-card:hover {
  transform: translateY(-10px) scale(1.05) rotate(0deg);
  z-index: 20;
  transition-delay: 0ms !important;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--transition-smooth), box-shadow 0.3s ease;
  border-radius: var(--card-radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 2px 5px rgba(0, 0, 0, 0.3);
}

.cards-grid.is-scattered .card-inner {
  transform: rotateY(0deg);
}

.cards-grid:not(.is-scattered) .card-inner {
  transform: rotateY(180deg);
  transition-delay: calc(var(--index, 0) * 40ms + 100ms);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* Dos de la carte */
.card-back {
  background: #0d1224 url('../CARTES/DOS_CARTE.webp') center / cover no-repeat;
  border: 1px solid var(--card-border-gold);
  padding: 0;
  overflow: hidden;
}

.card-back-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  border-radius: inherit;
  transition: transform 0.4s var(--transition-smooth);
}

.tarot-card:hover .card-back-img {
  transform: scale(1.04);
}

.card-back-frame {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(229, 185, 95, 0.35);
  border-radius: calc(var(--card-radius) - 3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, rgba(229, 185, 95, 0.08) 0%, transparent 60%);
}

.back-ornament {
  width: clamp(28px, 4.5vh, 42px);
  height: clamp(28px, 4.5vh, 42px);
  border: 1px solid var(--color-gold);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 10px rgba(229, 185, 95, 0.2);
}

.back-symbol {
  transform: rotate(-45deg);
  color: var(--color-gold-bright);
  font-size: clamp(0.9rem, 2vh, 1.25rem);
}

.back-corners {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(229, 185, 95, 0.2);
  pointer-events: none;
}

/* Face avant de la carte */
.card-front {
  transform: rotateY(180deg);
  background-color: var(--card-color, #5e35b1);
  padding: clamp(5px, 1vh, 8px);
  text-align: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: filter 0.3s ease;
}

.card-front.has-custom-image {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--card-border-gold);
  background: #0d1224;
}

.card-front-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  border-radius: inherit;
  transition: transform 0.4s var(--transition-smooth);
}

.tarot-card:hover .card-front-img {
  transform: scale(1.04);
}

.card-custom-numeral {
  position: absolute;
  top: 6px;
  left: 6px;
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.6vh, 0.85rem);
  font-weight: 700;
  color: var(--color-gold-bright);
  background: rgba(10, 13, 24, 0.82);
  border: 1px solid rgba(229, 185, 95, 0.6);
  border-radius: 4px;
  padding: 1px 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.card-front-border {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: calc(var(--card-radius) - 3px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.3rem, 1vh, 0.6rem) 0.3rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 40%, rgba(0,0,0,0.25) 100%);
}

.card-numeral {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.2vh, 1.25rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-center-icon {
  font-size: clamp(1.1rem, 2.8vh, 1.6rem);
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 1.8vh, 1rem);
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.card-desc {
  font-size: clamp(0.65rem, 1.4vh, 0.78rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Barre d'action inférieure */
.action-bar {
  flex-shrink: 0;
  text-align: center;
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.oracle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: clamp(0.55rem, 1.4vh, 0.8rem) clamp(1.4rem, 2.5vw, 2.2rem);
  background: linear-gradient(135deg, #1f2336 0%, #10121d 100%);
  border: 1.5px solid var(--color-gold);
  border-radius: 999px;
  color: var(--color-gold-bright);
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 1.6vh, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 18px rgba(229, 185, 95, 0.2),
    0 6px 18px rgba(0, 0, 0, 0.4);
  transition: all 0.35s var(--transition-smooth);
}

.oracle-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--color-gold-bright);
  box-shadow: 
    0 0 28px rgba(229, 185, 95, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.btn-symbol {
  font-size: 0.85rem;
  color: var(--color-gold);
  transition: transform 0.4s var(--transition-spring);
}

.oracle-btn:hover .btn-symbol {
  transform: rotate(90deg) scale(1.2);
}

.action-hint {
  font-size: clamp(0.72rem, 1.3vh, 0.82rem);
  color: var(--color-text-muted);
  max-width: 520px;
  line-height: 1.3;
}

/* ==========================================================================
   VUE 2 : DÉTAIL DE LA CARTE (SPLIT-SCREEN SANS SCROLL GLOBAL)
   ========================================================================== */

.detail-view {
  position: absolute;
  inset: 0;
  z-index: 100;
  padding: clamp(0.6rem, 2vh, 1.2rem) clamp(1rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.45s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0.45s ease;
}

/* État actif : la vue détail s'affiche */
.page-wrapper.is-detail-active .detail-view {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: scale(1);
}

/* Quand la vue détail est ouverte, l'accueil s'estompe élégamment */
.page-wrapper.is-detail-active .table-header,
.page-wrapper.is-detail-active .tarot-table,
.page-wrapper.is-detail-active .action-bar {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  visibility: hidden;
}

/* Barre supérieure de la vue détail */
.detail-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(229, 185, 95, 0.2);
}

.back-oracle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.2rem;
  background: rgba(229, 185, 95, 0.1);
  border: 1px solid var(--color-gold);
  border-radius: 999px;
  color: var(--color-gold-bright);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-oracle-btn:hover {
  background: rgba(229, 185, 95, 0.22);
  color: #ffffff;
  transform: translateX(-3px);
  box-shadow: 0 0 15px rgba(229, 185, 95, 0.3);
}

.back-arrow {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.back-oracle-btn:hover .back-arrow {
  transform: translateX(-3px);
}

.detail-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(229, 185, 95, 0.3);
  color: var(--color-gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-arrow-btn:hover {
  background: var(--color-gold);
  color: #090a10;
  box-shadow: 0 0 12px rgba(229, 185, 95, 0.4);
}

.detail-counter {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

/* Layout Split-Screen : 2 Colonnes */
.detail-split-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.8rem);
  align-items: stretch;
  overflow: hidden;
}

/* Colonne GAUCHE : Carte agrandie */
.detail-card-column {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-card-showcase {
  width: var(--detail-card-width);
  height: var(--detail-card-height);
  position: relative;
  border-radius: 16px;
  padding: 1.2rem;
  background-color: var(--showcase-color, #4A148C);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.7), 
    0 0 35px var(--showcase-glow, rgba(229, 185, 95, 0.35));
  transition: transform 0.4s var(--transition-smooth), background-color 0.4s ease;
  animation: cardFloat 6s ease-in-out infinite alternate;
}

@keyframes cardFloat {
  0% { transform: translateY(0px) rotate(-0.5deg); }
  100% { transform: translateY(-8px) rotate(0.8deg); }
}

.detail-card-showcase.has-custom-image {
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--card-border-gold);
  background-color: transparent;
  cursor: zoom-in;
}

.showcase-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: inherit;
  overflow: hidden;
}

.showcase-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  transition: transform 0.5s var(--transition-smooth);
}

.detail-card-showcase.has-custom-image:hover .showcase-card-img {
  transform: scale(1.03);
}

.showcase-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(10, 13, 24, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.detail-card-showcase.has-custom-image:hover .showcase-image-overlay {
  opacity: 1;
}

.showcase-zoom-hint {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  background: rgba(13, 18, 36, 0.85);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--color-gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.showcase-inner-frame {
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 45%, rgba(0,0,0,0.3) 100%);
}

.showcase-numeral {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vh, 2rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.showcase-glyph {
  font-size: clamp(2.4rem, 6vh, 4rem);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.showcase-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.showcase-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vh, 1.4rem);
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.showcase-arcane-name {
  font-size: clamp(0.85rem, 1.8vh, 1rem);
  color: var(--color-gold-bright);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Colonne DROITE : Le Journal de bord (Sans cadre, texte libre et épuré) */
.detail-story-column {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(0.4rem, 1vh, 0.8rem) clamp(0.6rem, 1.5vw, 1.2rem) 2.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  scrollbar-gutter: stable;
}

/* Espacement de sécurité pour garantir que le dernier encadré est toujours 100% visible */
.detail-story-column::after {
  content: '';
  display: block;
  min-height: 5rem;
  width: 100%;
  flex-shrink: 0;
}

/* Personnalisation de la barre de défilement dorée */
.detail-story-column::-webkit-scrollbar {
  width: 6px;
}

.detail-story-column::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.detail-story-column::-webkit-scrollbar-thumb {
  background: rgba(229, 185, 95, 0.4);
  border-radius: 8px;
}

.detail-story-column::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* Contenu du Récit */
.story-header {
  border-bottom: 1px solid rgba(229, 185, 95, 0.2);
  padding-bottom: 0.8rem;
}

.story-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 0.3rem;
}

.story-heading {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vh, 2.05rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
}

.heading-title {
  color: #ffffff;
  letter-spacing: 0.02em;
}

.story-date-badge {
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 1.4vh, 0.9rem);
  font-weight: 500;
  color: var(--color-gold-bright);
  background: rgba(229, 185, 95, 0.1);
  border: 1px solid rgba(229, 185, 95, 0.28);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.story-date-badge .date-icon {
  font-size: 0.78rem;
  color: var(--color-gold);
}

.story-quote {
  font-style: italic;
  font-size: clamp(1.12rem, 1.8vh, 1.28rem);
  color: var(--color-gold-bright);
  opacity: 0.95;
  border-left: 3px solid var(--color-gold);
  padding-left: 0.9rem;
  margin: 0.7rem 0 0.5rem;
  line-height: 1.55;
}

/* Sections du Récit (alignées sur la grille d'évaluation) */
.story-section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex-shrink: 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2vh, 1.38rem);
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.04em;
}

.section-label-icon {
  font-size: 1.4rem;
}

.section-text {
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  line-height: 1.8;
  color: #e5e9f7;
  font-weight: 350;
  white-space: pre-line;
}

/* Listes à puces dorées dans le récit */
.section-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  white-space: normal;
}

.section-list li {
  position: relative;
  padding-left: 1.45rem;
  line-height: 1.65;
}

.section-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.05rem;
  color: var(--color-gold);
  font-size: 0.9rem;
}

.section-list li strong {
  color: var(--color-gold-bright);
  font-weight: 600;
}

/* Sous-titres internes pour structurer une section multi-thèmes */
.section-subheading {
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 1.75vh, 1.16rem);
  font-weight: 600;
  color: var(--color-gold-bright);
  letter-spacing: 0.03em;
  margin: 1.15rem 0 0.45rem;
  white-space: normal;
}

.section-subheading:first-child {
  margin-top: 0.2rem;
}

/* Adaptation Responsive de la vue détail */
@media (max-width: 860px) {
  .detail-split-layout {
    flex-direction: column;
    overflow-y: auto;
  }
  .detail-card-column {
    display: none; /* Sur mobile / petit écran, on focalise sur le récit pour une lisibilité maximale */
  }
  .detail-story-column {
    height: auto;
    overflow-y: visible;
  }
}

/* --- Diagramme / Carte Mentale inséré dans le fil du texte (AUCUN CADRE, 100% PUR ET TRANSPARENT) --- */
.mindmap-flow-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.mindmap-flow-img {
  max-width: 100%;
  max-height: 440px;
  width: auto;
  height: auto;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.mindmap-flow-img:hover {
  opacity: 0.92;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Fond parchemin clair pour les PNG transparents à typographie sombre (ex: nuage de brainstorming) */
.mindmap-flow-img.has-light-surface,
.modal-full-img.has-light-surface {
  background: linear-gradient(180deg, #fcfaf5 0%, #f5efe2 100%) !important;
  padding: 1.05rem !important;
  border-radius: 14px !important;
  border: 1.5px solid rgba(229, 185, 95, 0.48) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(229, 185, 95, 0.12) !important;
  box-sizing: border-box;
}

.mindmap-flow-img.has-light-surface:hover {
  opacity: 0.98;
  border: 1.5px solid var(--color-gold-bright) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 22px rgba(229, 185, 95, 0.25) !important;
}

.mindmap-caption {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.55;
  text-align: center;
  max-width: 90%;
  border: none !important;
  background: transparent !important;
}

/* --- Galerie Multi-Photos de terrain (ex: Musée du Saut du Tarn) --- */
.story-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.9rem 0 0.4rem;
}

.story-gallery-item {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 18, 32, 0.72);
  border: 1px solid rgba(229, 185, 95, 0.28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.story-gallery-item:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 185, 95, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(229, 185, 95, 0.16);
}

.story-gallery-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0b0d18;
}

.story-gallery-frame .story-gallery-img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.45s var(--transition-smooth), opacity 0.25s ease;
}

.story-gallery-item:hover .story-gallery-frame .story-gallery-img {
  transform: scale(1.04) !important;
  opacity: 0.96;
}

.story-gallery-caption {
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.45;
  text-align: center;
  border-top: 1px solid rgba(229, 185, 95, 0.14);
}

/* --- Grille Profil Client : Jobs / Gains / Pains (Value Proposition Design) --- */
.vpd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
  margin: 0.85rem 0 0.35rem;
  white-space: normal;
}

.vpd-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.05rem 1.1rem;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(22, 24, 42, 0.85) 0%, rgba(12, 13, 24, 0.92) 100%);
  border: 1px solid rgba(229, 185, 95, 0.25);
  border-top: 3px solid var(--vpd-accent, var(--color-gold));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.vpd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 185, 95, 0.5);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48), 0 0 16px rgba(229, 185, 95, 0.12);
}

.vpd-card--jobs {
  --vpd-accent: var(--color-gold);
}

.vpd-card--gains {
  --vpd-accent: #5ce1a8;
}

.vpd-card--pains {
  --vpd-accent: #f08c7d;
}

.vpd-card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vpd-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.vpd-card-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--vpd-accent, var(--color-gold-bright));
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.vpd-card-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  margin-top: 0.1rem;
}

.vpd-ordered-list {
  list-style: none;
  counter-reset: vpd-rank;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}

.vpd-ordered-list li {
  counter-increment: vpd-rank;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.96rem;
  line-height: 1.48;
  color: #e8ecf9;
}

.vpd-ordered-list li::before {
  content: counter(vpd-rank);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--vpd-accent, var(--color-gold-bright));
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--vpd-accent, var(--color-gold));
  margin-top: 0.1rem;
}

/* --- Variantes VPD (listes non ordonnées & disposition asymétrique pour Personae riches) --- */
.vpd-grid--two-top {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vpd-card--wide {
  grid-column: 1 / -1;
}

.vpd-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}

.vpd-bullet-list--cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.2rem;
}

@media (max-width: 1080px) {
  .vpd-grid,
  .vpd-grid--two-top {
    grid-template-columns: 1fr;
  }
  .vpd-bullet-list--cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .story-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.vpd-bullet-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e8ecf9;
}

.vpd-bullet-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0.06rem;
  font-size: 0.78rem;
  color: var(--vpd-accent, var(--color-gold));
}

.vpd-bullet-list li strong {
  color: #ffffff;
  font-weight: 600;
}

/* --- Onglets Interactifs de Personae (ex: Lucas & Claire) --- */
.persona-tabs {
  margin: 0.9rem 0 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  white-space: normal;
}

.persona-tablist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.persona-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: rgba(18, 20, 36, 0.85);
  border: 1px solid rgba(229, 185, 95, 0.3);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.28s var(--transition-smooth);
}

.persona-tab-btn:hover {
  border-color: var(--color-gold);
  color: #ffffff;
  transform: translateY(-1px);
}

.persona-tab-btn.is-active {
  background: linear-gradient(135deg, rgba(229, 185, 95, 0.22) 0%, rgba(74, 20, 140, 0.32) 100%);
  border-color: var(--color-gold-bright);
  color: var(--color-gold-bright);
  box-shadow: 0 4px 16px rgba(229, 185, 95, 0.2);
}

.persona-tab-panel {
  animation: personaFadeIn 0.32s var(--transition-smooth);
}

.persona-tab-panel[hidden] {
  display: none;
}

@keyframes personaFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.persona-intro {
  font-size: 0.96rem;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 0.55rem;
  line-height: 1.55;
}

/* --- Encadré de mise en exergue (Conclusion générale) --- */
.story-callout {
  margin: 0.85rem 0 0.4rem;
  padding: 1.15rem 1.35rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26, 28, 52, 0.82) 0%, rgba(14, 15, 28, 0.92) 100%);
  border: 1px solid rgba(229, 185, 95, 0.32);
  border-left: 4px solid var(--color-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  white-space: normal;
}

.story-callout-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 0.5rem;
}

.story-callout-text {
  font-size: 1.06rem;
  line-height: 1.7;
  color: #f4f6ff;
  font-style: italic;
}

/* --- Mise en majesté centrée de la Phrase Produit Finale (sans boîte rectangulaire) --- */
.product-statement-banner {
  position: relative;
  margin: 1.2rem 0 1rem;
  padding: 1.45rem 1.6rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(229, 185, 95, 0.11) 0%, rgba(74, 20, 140, 0.08) 48%, transparent 78%);
  white-space: normal;
}

.product-statement-banner::before,
.product-statement-banner::after {
  content: '';
  display: block;
  width: 72%;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent 0%, rgba(229, 185, 95, 0.75) 50%, transparent 100%);
}

.product-statement-banner::before {
  margin-bottom: 1.05rem;
}

.product-statement-banner::after {
  margin-top: 1.05rem;
}

.product-statement-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.7rem;
}

.product-statement-quote {
  font-family: var(--font-display);
  font-size: clamp(1.04rem, 1.85vh, 1.22rem);
  font-weight: 600;
  line-height: 1.65;
  color: var(--color-gold-bright);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(229, 185, 95, 0.22);
  max-width: 92%;
  margin: 0 auto;
}

/* --- Formule méthodologique (Value Proposition Statement) --- */
.formula-box {
  margin: 0.75rem 0;
  padding: 0.9rem 1.15rem;
  border-radius: 10px;
  background: rgba(12, 14, 26, 0.78);
  border: 1px dashed rgba(229, 185, 95, 0.38);
  font-size: 0.98rem;
  line-height: 1.65;
  color: #dbe0f5;
  white-space: normal;
}

.formula-pill {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  margin: 0 0.1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-gold-bright);
  background: rgba(229, 185, 95, 0.14);
  border: 1px solid rgba(229, 185, 95, 0.32);
}

/* --- Composants Phase d'Imagination : Règles du Brainstorming, Catégories Couleurs & Entonnoir --- */
.brainstorm-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.8rem 0 0.9rem;
  white-space: normal;
}

.brainstorm-rule-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: rgba(22, 24, 42, 0.85);
  border: 1px solid rgba(229, 185, 95, 0.32);
  font-size: 0.92rem;
  font-weight: 500;
  color: #eef1ff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s var(--transition-smooth), border-color 0.25s ease;
}

.brainstorm-rule-pill:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold-bright);
}

.brainstorm-rule-pill strong {
  color: var(--color-gold-bright);
  font-weight: 600;
}

/* Grille des 4 catégories colorées du brainstorming */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.85rem 0 0.4rem;
  white-space: normal;
}

.category-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(22, 24, 42, 0.86) 0%, rgba(12, 13, 24, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--cat-color, var(--color-gold));
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.32);
  transition: transform 0.28s var(--transition-smooth), box-shadow 0.28s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.44);
}

.category-card--red { --cat-color: #f06e6e; }
.category-card--blue { --cat-color: #5ca9f8; }
.category-card--green { --cat-color: #5ce1a8; }
.category-card--orange { --cat-color: #f58a3d; }

.category-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cat-color);
  box-shadow: 0 0 10px var(--cat-color);
  margin-top: 0.25rem;
}

.category-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.category-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--cat-color);
  letter-spacing: 0.03em;
}

.category-desc {
  font-size: 0.92rem;
  line-height: 1.48;
  color: #dfe4f8;
}

/* Frise d'entonnoir de convergence (Brainstorming -> 3 Fiches Scénarios) */
.convergence-funnel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.9rem 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(12, 14, 26, 0.78);
  border: 1px solid rgba(229, 185, 95, 0.25);
  white-space: normal;
}

.funnel-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(229, 185, 95, 0.11);
  border: 1px solid rgba(229, 185, 95, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
  color: #f2f4ff;
}

.funnel-step--final {
  background: linear-gradient(135deg, rgba(229, 185, 95, 0.25) 0%, rgba(74, 20, 140, 0.35) 100%);
  border-color: var(--color-gold-bright);
  color: var(--color-gold-bright);
}

.funnel-arrow {
  color: var(--color-gold);
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.85;
}

@media (max-width: 680px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Grille compacte des 6 concepts initiaux (avant tri) --- */
.concepts-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0.85rem;
  white-space: normal;
}

.concept-mini-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(16, 18, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.25s ease, transform 0.25s var(--transition-smooth);
}

.concept-mini-item:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 185, 95, 0.4);
}

.concept-mini-item.is-selected {
  background: linear-gradient(145deg, rgba(229, 185, 95, 0.13) 0%, rgba(16, 18, 34, 0.9) 100%);
  border-color: rgba(229, 185, 95, 0.48);
}

.concept-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.concept-mini-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.concept-mini-item.is-selected .concept-mini-title {
  color: var(--color-gold-bright);
}

.concept-mini-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  color: #0b0d18;
  background: var(--color-gold-bright);
}

.concept-mini-desc {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #cfd6ef;
}

/* --- Fiche Scénario Synthétique (dans les onglets interactifs) --- */
.scenario-sheet {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(22, 24, 42, 0.88) 0%, rgba(12, 13, 24, 0.94) 100%);
  border: 1px solid rgba(229, 185, 95, 0.3);
  border-top: 3px solid var(--color-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  white-space: normal;
}

.scenario-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scenario-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gold-bright);
  background: rgba(229, 185, 95, 0.12);
  border: 1px solid rgba(229, 185, 95, 0.32);
}

.scenario-block-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-bright);
  margin-bottom: 0.55rem;
}

.scenario-block-title--warn {
  color: #f08c7d;
}

/* Timeline verticale épurée pour les étapes du déroulé */
.scenario-timeline {
  list-style: none;
  counter-reset: step-num;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.scenario-timeline li {
  counter-increment: step-num;
  position: relative;
  padding-left: 2.15rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #e8ecf9;
}

.scenario-timeline li::before {
  content: counter(step-num);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  color: #0b0d18;
  background: var(--color-gold-bright);
  box-shadow: 0 0 10px rgba(229, 185, 95, 0.35);
}

.scenario-timeline li strong {
  color: #ffffff;
  font-weight: 600;
}

/* Bandeau bas Freins & Points d'attention */
.scenario-watchouts {
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(240, 140, 125, 0.32);
}

.scenario-watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scenario-watch-list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #dbe1f7;
}

.scenario-watch-list li::before {
  content: "•";
  position: absolute;
  left: 0.15rem;
  top: 0;
  color: #f08c7d;
  font-weight: 700;
}

.scenario-watch-list li strong {
  color: #f7b2a6;
  font-weight: 600;
}

@media (max-width: 760px) {
  .concepts-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Sources & Ressources Externes (Références cliquables par séance) --- */
.story-references-section {
  margin-top: 0.4rem;
  gap: 0.65rem;
}

.story-references-title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.story-references-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(229, 185, 95, 0.35) 0%, transparent 100%);
}

.story-references-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.story-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  background: rgba(229, 185, 95, 0.08);
  border: 1px solid rgba(229, 185, 95, 0.32);
  color: var(--color-gold-bright);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  transition: transform 0.25s var(--transition-smooth), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.story-ref-chip:hover,
.story-ref-chip:focus-visible {
  background: rgba(229, 185, 95, 0.18);
  border-color: var(--color-gold-bright);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(229, 185, 95, 0.2);
  outline: none;
}

.story-ref-arrow {
  font-size: 0.85rem;
  color: var(--color-gold);
  transition: transform 0.25s var(--transition-smooth);
}

.story-ref-chip:hover .story-ref-arrow {
  transform: translate(2px, -2px);
}

/* --- Cadre Explicatif : Résonance du Tarot (Parfaitement visible et inamovible) --- */
.story-tarot-box {
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  padding: 1.5rem 1.7rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(74, 20, 140, 0.28) 0%, rgba(20, 16, 35, 0.8) 100%);
  border: 1px solid rgba(229, 185, 95, 0.4);
  border-left: 4px solid var(--color-gold);
  box-shadow: 0 4px 20px rgba(74, 20, 140, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.tarot-box-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tarot-box-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.tarot-box-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.1vh, 1.42rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-gold-bright);
}

.tarot-box-text {
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  line-height: 1.8;
  color: #f0f2ff;
  font-weight: 350;
  word-break: break-word;
  white-space: pre-line;
}

/* --- Cadre Explicatif : Expérience Inspirante (Encadré Chaleureux, Stellaire & Doré) --- */
.story-inspiring-box {
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  padding: 1.5rem 1.7rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(229, 185, 95, 0.12) 0%, rgba(26, 21, 40, 0.8) 100%);
  border: 1px solid rgba(229, 185, 95, 0.4);
  border-left: 4px solid var(--color-gold-bright);
  box-shadow: 0 4px 22px rgba(229, 185, 95, 0.12), 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.inspiring-box-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.inspiring-box-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.inspiring-box-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.1vh, 1.42rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-gold-bright);
  flex: 1;
}

.inspiring-box-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(229, 185, 95, 0.2);
  color: var(--color-gold-bright);
  border: 1px solid rgba(229, 185, 95, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.inspiring-box-text {
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  line-height: 1.8;
  color: #f3f5ff;
  font-weight: 350;
  word-break: break-word;
  white-space: pre-line;
}

/* --- Placeholder Expérience Inspirante --- */
.inspiring-placeholder {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.15rem;
  border-radius: 8px;
  border: 1px dashed rgba(229, 185, 95, 0.4);
  background: rgba(229, 185, 95, 0.04);
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.inspiring-placeholder:hover {
  border-color: var(--color-gold);
  background: rgba(229, 185, 95, 0.07);
}

.placeholder-sparkle {
  font-size: 1.3rem;
  color: var(--color-gold-bright);
  line-height: 1;
}

.placeholder-body {
  flex: 1;
}

.placeholder-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.placeholder-text {
  font-size: 1.02rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.placeholder-badge {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(229, 185, 95, 0.15);
  color: var(--color-gold-bright);
  border: 1px solid rgba(229, 185, 95, 0.3);
  white-space: nowrap;
}

/* --- Modal Lightbox pour zoom carte mentale --- */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 12, 0.88);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close-btn {
  position: absolute;
  top: -42px;
  right: 0;
  background: rgba(229, 185, 95, 0.15);
  border: 1px solid rgba(229, 185, 95, 0.35);
  color: #ffffff;
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--color-gold);
  color: #0c0a15;
  transform: rotate(90deg);
}

.modal-body {
  background: #0d0b16;
  border: 1px solid rgba(229, 185, 95, 0.4);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 185, 95, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 84vh;
}

.modal-full-img {
  max-width: 86vw;
  max-height: 74vh;
  object-fit: contain;
  display: block;
}

.modal-caption {
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: #d1d5e5;
  background: rgba(14, 11, 24, 0.95);
  border-top: 1px solid rgba(229, 185, 95, 0.2);
  text-align: center;
  font-style: italic;
  max-width: 86vw;
}

/* ==========================================================================
   BOUTON FLOTTANT D'INFORMATION & MODAL DE DÉMARCHE
   ========================================================================== */

/* --- Bouton d'Information Flottant (En bas à droite : Bulle "i" épurée) --- */
.floating-info-btn {
  position: fixed;
  bottom: clamp(14px, 2.5vh, 24px);
  right: clamp(14px, 2.5vw, 28px);
  z-index: 150;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 17, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(229, 185, 95, 0.45);
  color: var(--color-gold-bright);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 0 14px rgba(229, 185, 95, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
}

.floating-info-btn:hover {
  background: rgba(26, 21, 40, 0.95);
  border-color: var(--color-gold-bright);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65), 0 0 22px rgba(229, 185, 95, 0.45);
}

.floating-info-btn:active {
  transform: translateY(0) scale(0.96);
}

.floating-info-btn .info-icon-svg {
  width: 19px;
  height: 19px;
  display: block;
  color: var(--color-gold-bright);
  filter: drop-shadow(0 0 6px rgba(229, 185, 95, 0.45));
  transition: all 0.3s ease;
}

.floating-info-btn:hover .info-icon-svg {
  color: #ffffff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 16px var(--color-gold-bright));
}

/* --- Modal d'Information : Genèse & Démarche --- */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
}

.info-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.info-modal-dialog {
  position: relative;
  z-index: 2;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #121020 0%, #0a0914 100%);
  border: 1.5px solid rgba(229, 185, 95, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(229, 185, 95, 0.2);
  animation: modalPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.info-modal-header {
  padding: 1.6rem 2rem 1.2rem;
  border-bottom: 1px solid rgba(229, 185, 95, 0.2);
  background: linear-gradient(180deg, rgba(229, 185, 95, 0.08) 0%, transparent 100%);
  text-align: center;
}

.info-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 0.5rem;
}

.info-modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vh, 1.7rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.info-modal-tagline {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 620px;
  margin: 0 auto;
  font-style: italic;
}

.info-modal-body {
  padding: 1.6rem 2rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-gutter: stable;
}

.info-modal-body::-webkit-scrollbar {
  width: 6px;
}

.info-modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.info-modal-body::-webkit-scrollbar-thumb {
  background: rgba(229, 185, 95, 0.4);
  border-radius: 8px;
}

.info-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

.info-modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-section-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.04em;
}

.info-section-icon {
  font-size: 1.3rem;
}

.info-section-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #dbe0f2;
  font-weight: 350;
}

.info-section-text strong {
  color: var(--color-gold-bright);
  font-weight: 600;
}

.info-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-left: 0.3rem;
}

.info-modal-list li {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #dbe0f2;
  position: relative;
  padding-left: 1.5rem;
}

.info-modal-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 0.8rem;
  top: 1px;
}

.info-modal-list li strong {
  color: #ffffff;
}

.info-modal-footer-quote {
  margin-top: 0.5rem;
  padding: 1.2rem 1.4rem;
  border-radius: 10px;
  background: rgba(229, 185, 95, 0.06);
  border-left: 3px solid var(--color-gold);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.info-quote-text {
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-gold-bright);
  letter-spacing: 0.03em;
}

.info-quote-author {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 680px) {
  .floating-info-btn {
    bottom: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }
  .floating-info-btn .info-icon-svg {
    width: 16px;
    height: 16px;
  }
  .info-modal {
    padding: 0.8rem;
  }
  .info-modal-header {
    padding: 1.2rem 1.2rem 0.9rem;
  }
  .info-modal-body {
    padding: 1.2rem 1.2rem 1.5rem;
    gap: 1.2rem;
  }
}

/* ==========================================================================
   PORTE D'ENTRÉE : ÉCRAN DE BIENVENUE (OUVERTURE COULISSANTE FLUIDE GPU)
   ========================================================================== */

/* Effet de parallaxe doux : la table de Tarot respire vers l'avant à l'ouverture */
body.is-gate-locked .page-wrapper {
  transform: scale(0.96);
  opacity: 0.25;
  pointer-events: none;
}

body.is-gate-revealing .page-wrapper {
  transform: scale(1);
  opacity: 1;
  transition:
    transform 1.08s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.9s ease;
  will-change: transform, opacity;
}

.welcome-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.2rem);
  overflow: hidden;
  pointer-events: auto;
}

.welcome-gate.is-dismissing-card,
.welcome-gate.is-opening-doors {
  pointer-events: none;
}

.welcome-gate.is-opened {
  display: none;
  visibility: hidden;
  pointer-events: none;
}

/* Conteneur des deux battants coulissants (100 % GPU translate3d) */
.welcome-doors {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}

.welcome-door {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(94, 53, 177, 0.15) 0%, transparent 62%),
    linear-gradient(165deg, #0d0e1c 0%, #080911 55%, #120f22 100%);
  transform: translate3d(0, 0, 0);
  transition: transform 1.08s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Poussière d'étoiles subtile sur les battants */
.welcome-door::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 18% 22%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 72% 16%, rgba(229, 185, 95, 0.7), transparent),
    radial-gradient(1px 1px at 40% 78%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 84% 68%, rgba(179, 136, 255, 0.55), transparent),
    radial-gradient(1px 1px at 26% 52%, rgba(229, 185, 95, 0.5), transparent);
  opacity: 0.45;
  pointer-events: none;
}

.welcome-door--left {
  box-shadow: inset -18px 0 40px rgba(0, 0, 0, 0.65), 8px 0 32px rgba(0, 0, 0, 0.7);
}

.welcome-door--right {
  box-shadow: inset 18px 0 40px rgba(0, 0, 0, 0.65), -8px 0 32px rgba(0, 0, 0, 0.7);
}

/* Cadres dorés gravés sur chaque battant */
.door-ornament-frame {
  position: absolute;
  top: clamp(16px, 3vh, 32px);
  bottom: clamp(16px, 3vh, 32px);
  border: 1px solid rgba(229, 185, 95, 0.22);
  pointer-events: none;
}

.welcome-door--left .door-ornament-frame {
  left: clamp(16px, 3vw, 34px);
  right: 12px;
  border-radius: 16px 0 0 16px;
}

.welcome-door--right .door-ornament-frame {
  left: 12px;
  right: clamp(16px, 3vw, 34px);
  border-radius: 0 16px 16px 0;
}

/* Filet doré net à la jonction centrale des deux battants */
.door-inner-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(229, 185, 95, 0.28) 18%,
    rgba(255, 230, 153, 0.78) 50%,
    rgba(229, 185, 95, 0.28) 82%,
    transparent 100%
  );
}

.welcome-door--left .door-inner-seam {
  right: 0;
}

.welcome-door--right .door-inner-seam {
  left: 0;
}

/* Lueur centrale légère (sans filtre blur animé pour un rendu 60fps parfait) */
.welcome-seam-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translate3d(-50%, 0, 0);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 230, 153, 0.45) 0%,
    rgba(229, 185, 95, 0.14) 38%,
    transparent 72%
  );
  opacity: 0.4;
  pointer-events: none;
  will-change: opacity;
}

/* Temps 2 : Animation coulissante pure et soyeuse des deux battants (après disparition du modal) */
.welcome-gate.is-opening-doors .welcome-door--left {
  transform: translate3d(-102%, 0, 0);
}

.welcome-gate.is-opening-doors .welcome-door--right {
  transform: translate3d(102%, 0, 0);
}

.welcome-gate.is-opening-doors .welcome-seam-glow {
  animation: seamUnlock 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes seamUnlock {
  0% {
    opacity: 0.45;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Médaillon central de bienvenue (sans backdrop-filter lourd pour une fluidité maximale) */
.welcome-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  padding: clamp(1.7rem, 4vh, 2.7rem) clamp(1.4rem, 4vw, 3rem);
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(16, 15, 31, 0.97) 0%, rgba(9, 10, 20, 0.98) 100%);
  border: 1.5px solid rgba(229, 185, 95, 0.42);
  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.85),
    0 0 42px rgba(229, 185, 95, 0.14),
    inset 0 0 28px rgba(229, 185, 95, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: welcomeReveal 0.75s var(--transition-smooth) backwards;
  will-change: transform, opacity;
}

/* Temps 1 : Le modal disparaît complètement avant l'ouverture des portes */
.welcome-gate.is-dismissing-card .welcome-content,
.welcome-gate.is-opening-doors .welcome-content {
  animation: welcomeDismiss 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes welcomeDismiss {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    visibility: visible;
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(0.975);
    visibility: hidden;
  }
}

@keyframes welcomeReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.welcome-crest {
  color: var(--color-gold-bright);
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 0 12px rgba(229, 185, 95, 0.45));
  animation: crestPulse 4.5s ease-in-out infinite alternate;
}

@keyframes crestPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.95rem;
  background: rgba(229, 185, 95, 0.09);
  border: 1px solid rgba(229, 185, 95, 0.3);
  border-radius: 999px;
  font-size: clamp(0.68rem, 1.25vh, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 0.9rem;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vh, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 25%, var(--color-gold-bright) 70%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.9rem;
}

.welcome-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: min(260px, 70%);
  margin-bottom: 1.15rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229, 185, 95, 0.55), transparent);
}

.divider-star {
  color: var(--color-gold);
  font-size: 0.85rem;
}

.welcome-message {
  display: flex;
  flex-direction: column;
  gap: 0.82rem;
  font-size: clamp(0.94rem, 1.72vh, 1.06rem);
  line-height: 1.7;
  color: #e2e6f5;
  font-weight: 300;
  margin-bottom: 1.2rem;
  user-select: text;
  -webkit-user-select: text;
}

.welcome-message strong {
  color: var(--color-gold-bright);
  font-weight: 500;
}

.welcome-message-highlight {
  font-style: italic;
  color: var(--color-gold-bright);
  font-weight: 400;
  margin-top: 0.15rem;
}

.welcome-signature {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1.45rem;
}

/* Bouton principal d'ouverture des portes */
.welcome-enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: clamp(0.75rem, 1.7vh, 0.95rem) clamp(1.6rem, 3.2vw, 2.5rem);
  background: linear-gradient(135deg, rgba(229, 185, 95, 0.22) 0%, rgba(28, 24, 48, 0.95) 55%, rgba(229, 185, 95, 0.16) 100%);
  border: 1.5px solid var(--color-gold);
  border-radius: 999px;
  color: var(--color-gold-bright);
  font-family: var(--font-display);
  font-size: clamp(0.84rem, 1.6vh, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 24px rgba(229, 185, 95, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Reflet doré traversant au survol */
.welcome-enter-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 75%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 230, 153, 0.28), transparent);
  transform: skewX(-22deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.welcome-enter-btn:hover::after {
  left: 145%;
}

.welcome-enter-btn:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--color-gold-bright);
  color: #ffffff;
  box-shadow:
    0 0 36px rgba(229, 185, 95, 0.5),
    0 10px 28px rgba(0, 0, 0, 0.65);
}

.welcome-enter-btn:hover .btn-symbol {
  transform: rotate(90deg) scale(1.2);
}

.welcome-enter-btn:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .welcome-content {
    padding: 1.45rem 1.2rem;
    border-radius: 16px;
  }
  .welcome-crest-svg {
    width: 40px;
    height: 40px;
  }
  .welcome-message {
    gap: 0.68rem;
    line-height: 1.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-gate-locked .page-wrapper {
    transform: none;
  }
  .welcome-door,
  .welcome-content,
  .welcome-seam-glow,
  body.is-gate-revealing .page-wrapper {
    transition: opacity 0.3s ease !important;
    animation: none !important;
  }
  .welcome-gate.is-dismissing-card .welcome-content,
  .welcome-gate.is-opening-doors .welcome-content {
    opacity: 0;
    visibility: hidden;
  }
  .welcome-gate.is-opening-doors .welcome-door--left,
  .welcome-gate.is-opening-doors .welcome-door--right {
    transform: none;
    opacity: 0;
  }
}

/* ==========================================================================
   JEU DU TOTEM (SÉANCE 06) : TOGGLE ANIMAUX / QUALITÉS & CARTES INTERACTIVES
   ========================================================================== */

.totem-mount {
  white-space: normal;
  margin: 1.05rem 0 1.35rem;
}

.totem-showcase {
  container-type: inline-size;
  white-space: normal;
  padding: 1.25rem 1.2rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(18, 21, 39, 0.86) 0%, rgba(10, 12, 24, 0.94) 100%);
  border: 1px solid rgba(229, 185, 95, 0.3);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 230, 153, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.totem-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
}

/* Bouton Toggle segmenté avec curseur doré coulissant */
.totem-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  padding: 4px;
  border-radius: 999px;
  background: rgba(8, 10, 20, 0.92);
  border: 1px solid rgba(229, 185, 95, 0.35);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.totem-toggle-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(229, 185, 95, 0.28) 0%, rgba(88, 48, 165, 0.52) 100%);
  border: 1px solid var(--color-gold-bright);
  box-shadow: 0 0 16px rgba(229, 185, 95, 0.28);
  transition: transform 0.38s var(--transition-spring);
  pointer-events: none;
}

.totem-showcase[data-active-mode="qualities"] .totem-toggle-slider {
  transform: translateX(100%);
}

.totem-toggle-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.52rem 1.15rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease;
}

.totem-toggle-btn:hover {
  color: #ffffff;
}

.totem-toggle-btn.is-active {
  color: var(--color-gold-bright);
  text-shadow: 0 0 12px rgba(229, 185, 95, 0.35);
}

.totem-toggle-btn:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 2px;
}

.totem-toggle-svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
  transition: transform 0.28s var(--transition-spring);
}

.totem-toggle-btn.is-active .totem-toggle-svg {
  transform: scale(1.08);
  filter: drop-shadow(0 0 6px rgba(229, 185, 95, 0.55));
}

/* Note explicative de l'ordre d'affinité */
.totem-ranking-note {
  font-size: 0.94rem;
  line-height: 1.5;
  color: #dbe0f5;
  max-width: 640px;
}

/* Frise visuelle d'affinité (du plus proche au moins proche) */
.totem-affinity-scale {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.15rem;
}

.totem-scale-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.totem-scale-label--high {
  color: var(--color-gold-bright);
}

.totem-scale-label--low {
  color: var(--color-text-muted);
}

.totem-scale-bar {
  position: relative;
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-gold-bright) 0%, rgba(229, 185, 95, 0.45) 55%, rgba(160, 166, 192, 0.22) 100%);
}

.totem-scale-bar::after {
  content: '▸';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-54%);
  font-size: 0.72rem;
  color: rgba(160, 166, 192, 0.65);
}

/* Panneaux d'onglets */
.totem-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.totem-panel[hidden] {
  display: none;
}

/* Grille des 5 cartes Totem */
.totem-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.78rem;
  align-items: stretch;
}

/* Carte individuelle au ratio Tarot 2:3 */
.totem-card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  animation: totemCardDeal 0.42s var(--transition-smooth) both;
  animation-delay: calc(var(--totem-delay, 0) * 55ms);
  transition: transform 0.32s var(--transition-smooth), box-shadow 0.32s ease;
}

@keyframes totemCardDeal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.totem-card-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: #0d1224;
  border: 1.5px solid rgba(229, 185, 95, 0.48);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.totem-card:hover,
.totem-card:focus-visible,
.totem-card.is-revealed {
  transform: translateY(-5px);
}

.totem-card:hover .totem-card-frame,
.totem-card:focus-visible .totem-card-frame,
.totem-card.is-revealed .totem-card-frame {
  border-color: var(--color-gold-bright);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.68),
    0 0 20px rgba(229, 185, 95, 0.32);
}

.totem-card:focus-visible .totem-card-frame {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 2px;
}

.totem-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s var(--transition-smooth), filter 0.35s ease;
}

.totem-card:hover .totem-card-img {
  transform: scale(1.04);
}

/* Médaillon de classement (1 à 5) */
.totem-rank-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-gold-bright);
  background: rgba(9, 11, 24, 0.86);
  border: 1px solid rgba(229, 185, 95, 0.72);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.totem-rank-badge.is-top-rank {
  background: linear-gradient(135deg, #e5b95f 0%, #b5842c 100%);
  color: #0b0d18;
  border-color: var(--color-gold-bright);
  box-shadow: 0 0 12px rgba(229, 185, 95, 0.6);
}

/* Petit indice lumineux discret en haut à droite des cartes Animaux */
.totem-reveal-cue {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  color: var(--color-gold-bright);
  background: rgba(9, 11, 24, 0.75);
  border: 1px solid rgba(229, 185, 95, 0.45);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.totem-card--animal:hover .totem-reveal-cue,
.totem-card--animal:focus-visible .totem-reveal-cue,
.totem-card--animal.is-revealed .totem-reveal-cue {
  opacity: 0;
  transform: scale(0.7);
}

/* Voile ésotérique révélant le texte des cartes Animaux au survol ou au clic */
.totem-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 1.5rem 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  background: linear-gradient(165deg, rgba(10, 12, 26, 0.89) 0%, rgba(26, 17, 50, 0.93) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
  overflow-y: auto;
}

.totem-card--animal:hover .totem-card-overlay,
.totem-card--animal:focus-visible .totem-card-overlay,
.totem-card--animal.is-revealed .totem-card-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.totem-card--animal:hover .totem-rank-badge,
.totem-card--animal:focus-visible .totem-rank-badge,
.totem-card--animal.is-revealed .totem-rank-badge {
  opacity: 0;
  transform: scale(0.8);
}

.totem-overlay-rank {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.totem-overlay-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-gold-bright);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.totem-overlay-divider {
  display: block;
  width: 34px;
  height: 1px;
  margin: 0.1rem 0 0.15rem;
  background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

.totem-overlay-desc {
  font-size: 0.78rem;
  line-height: 1.42;
  color: #f4f6ff;
  font-weight: 400;
}

/* Petit bouton discret d'agrandissement Lightbox sur l'overlay des cartes Animaux */
.totem-zoom-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(229, 185, 95, 0.45);
  background: rgba(12, 14, 28, 0.85);
  color: var(--color-gold-bright);
  font-size: 0.78rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.totem-zoom-btn:hover {
  background: var(--color-gold);
  color: #090a10;
  transform: scale(1.1);
}

/* Bandeau d'agrandissement discret au survol des cartes Qualités */
.totem-quality-hover-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(9, 11, 24, 0.86) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.totem-card--quality:hover .totem-quality-hover-bar,
.totem-card--quality:focus-visible .totem-quality-hover-bar {
  opacity: 1;
}

.totem-quality-zoom-label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  background: rgba(12, 15, 30, 0.88);
  border: 1px solid rgba(229, 185, 95, 0.65);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* Indication discrète sous les cartes */
.totem-interaction-hint {
  text-align: center;
  font-size: 0.84rem;
  font-style: italic;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.totem-interaction-hint span {
  color: var(--color-gold);
  font-style: normal;
  font-size: 0.72rem;
}

/* Responsivité fluide basée sur la largeur réelle du panneau de récit */
@container (max-width: 720px) {
  .totem-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .totem-overlay-name {
    font-size: 0.94rem;
  }
  .totem-overlay-desc {
    font-size: 0.84rem;
  }
}

@container (max-width: 460px) {
  .totem-showcase {
    padding: 1rem 0.85rem;
  }
  .totem-toggle-track {
    grid-template-columns: repeat(2, minmax(112px, 1fr));
  }
  .totem-toggle-btn {
    padding: 0.48rem 0.85rem;
    font-size: 0.8rem;
  }
  .totem-affinity-scale {
    gap: 0.45rem;
  }
  .totem-scale-label {
    font-size: 0.64rem;
  }
  .totem-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .totem-card,
  .totem-toggle-slider,
  .totem-card-overlay {
    animation: none !important;
    transition: opacity 0.2s ease !important;
  }
}
