/**
 * Art Mots Sphère — Couche poétique globale
 * Atmosphère, animations, glass cosmique, sphères flottantes
 */

/* ——— Ciel étoilé & brume ——— */
.ambient-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(248, 215, 138, 0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 50%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(126, 240, 224, 0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 15%, rgba(212, 165, 255, 0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 90%, rgba(255, 255, 255, 0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 85%, rgba(255, 138, 184, 0.55) 0%, transparent 100%);
  background-size: 100% 100%;
  opacity: 0.55;
  animation: stars-twinkle 8s ease-in-out infinite alternate;
}
.ambient-stars--layer2 {
  background-image:
    radial-gradient(1px 1px at 15% 45%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 15%, rgba(212, 165, 255, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 55%, rgba(255, 255, 255, 0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 75%, rgba(126, 240, 224, 0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 95%, rgba(248, 215, 138, 0.5) 0%, transparent 100%);
  opacity: 0.35;
  animation-delay: -4s;
  animation-duration: 12s;
}
.ambient-mist {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 30% 60%, var(--violet-mist) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 70% 30%, var(--rose-mist) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 90%, var(--mint-mist) 0%, transparent 60%);
  opacity: 0.9;
  animation: mist-drift 25s var(--ease) infinite alternate;
}
.ambient-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ambient-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}
.ambient-particle--sphere {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5) 0%, rgba(212, 165, 255, 0.35) 40%, transparent 70%);
  box-shadow: 0 0 12px rgba(212, 165, 255, 0.25);
}
.ambient-particle--dust {
  background: radial-gradient(circle, rgba(248, 215, 138, 0.6) 0%, transparent 70%);
  filter: blur(0.5px);
}
.ambient-particle--star {
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

@keyframes stars-twinkle {
  0% { opacity: 0.4; }
  50% { opacity: 0.65; }
  100% { opacity: 0.5; }
}
@keyframes mist-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-20px, 15px) scale(1.03); }
}

/* ——— Header céleste ——— */
.site-header {
  background: linear-gradient(
    135deg,
    rgba(14, 16, 28, 0.82) 0%,
    rgba(22, 18, 38, 0.75) 50%,
    rgba(14, 20, 32, 0.82) 100%
  );
  border-color: rgba(212, 165, 255, 0.12);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 80px rgba(212, 165, 255, 0.06);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 60%
  );
  pointer-events: none;
  animation: header-shimmer 12s ease-in-out infinite;
}
@keyframes header-shimmer {
  0%, 85% { opacity: 0; transform: translateX(-100%); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

.nav-link {
  position: relative;
  overflow: hidden;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width 0.4s var(--ease-poetic), left 0.4s var(--ease-poetic);
  transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  width: 70%;
}
.nav-link.is-active {
  text-shadow: 0 0 20px rgba(212, 165, 255, 0.35);
}

/* ——— Boutons lumineux ——— */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-3) 0%, var(--gold) 45%, var(--accent) 100%);
  background-size: 200% 200%;
  animation: btn-gradient-flow 6s ease infinite;
  box-shadow:
    0 4px 28px rgba(126, 240, 224, 0.3),
    0 0 40px rgba(212, 165, 255, 0.15);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}
.btn-primary:hover::before {
  transform: translateX(120%);
}
.btn-primary:hover {
  box-shadow:
    0 8px 40px rgba(126, 240, 224, 0.45),
    0 0 60px rgba(212, 165, 255, 0.25);
  transform: translateY(-2px);
}
.btn-outline {
  border-color: rgba(212, 165, 255, 0.25);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(212, 165, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(212, 165, 255, 0.2);
}

@keyframes btn-gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ——— Hero poétique ——— */
.hero {
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 165, 255, 0.06) 0%, transparent 65%);
  pointer-events: none;
  animation: hero-aura-breathe 6s ease-in-out infinite;
}
@keyframes hero-aura-breathe {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.95); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}
.eyebrow {
  position: relative;
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(212, 165, 255, 0.08);
  border: 1px solid rgba(212, 165, 255, 0.2);
  letter-spacing: 0.25em;
  animation: eyebrow-glow 4s ease-in-out infinite;
}
@keyframes eyebrow-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(126, 240, 224, 0.1); }
  50% { box-shadow: 0 0 24px rgba(212, 165, 255, 0.2); }
}
.hero h1 {
  letter-spacing: 0.01em;
  text-shadow: 0 0 80px rgba(212, 165, 255, 0.15);
}
.hero h1 em {
  position: relative;
  background: linear-gradient(
    120deg,
    var(--accent-3) 0%,
    var(--accent) 35%,
    var(--accent-2) 65%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hero-em-shimmer 5s linear infinite;
}
@keyframes hero-em-shimmer {
  to { background-position: 200% center; }
}
.hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 300;
}
.hero-stats li {
  position: relative;
  padding: 0.5rem 0;
  transition: transform 0.35s var(--ease-poetic);
}
.hero-stats li:hover {
  transform: translateY(-3px);
}
.hero-stats strong {
  background: linear-gradient(180deg, var(--gold) 0%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.75rem;
}

/* Sphère hero — intensité */
.sphere-halo {
  animation: sphere-halo-pulse 3.5s ease-in-out infinite;
  filter: blur(22px);
}
.sphere-core {
  border-radius: 50%;
}
.sphere-core-border {
  box-shadow:
    0 0 48px rgba(199, 125, 255, 0.25),
    inset 0 0 32px rgba(94, 234, 212, 0.08),
    0 0 80px rgba(212, 165, 255, 0.35),
    0 0 120px rgba(126, 240, 224, 0.15),
    inset 0 -8px 24px rgba(0, 0, 0, 0.4),
    inset 0 4px 16px rgba(255, 255, 255, 0.12);
}
.sphere-core-forum {
  -webkit-tap-highlight-color: transparent;
}
.sphere-core-forum:focus-visible {
  outline: 2px solid rgba(126, 240, 224, 0.55);
  outline-offset: 3px;
}
.orbit-sphere-body {
  box-shadow:
    0 0 20px currentColor,
    inset 0 -2px 8px rgba(0, 0, 0, 0.3),
    inset 0 2px 6px rgba(255, 255, 255, 0.2);
}

/* ——— Titres de section ——— */
.section-title {
  position: relative;
  display: inline-block;
}
.section-title--shine {
  background: linear-gradient(
    100deg,
    var(--text) 0%,
    var(--accent-3) 25%,
    var(--gold) 45%,
    var(--accent) 60%,
    var(--accent-2) 75%,
    var(--text) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: section-title-flow 8s linear infinite;
}
.section-title--shine::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-3), transparent);
  border-radius: 2px;
  animation: title-underline-grow 1.2s var(--ease-poetic) forwards;
}
@keyframes section-title-flow {
  to { background-position: 200% center; }
}
@keyframes title-underline-grow {
  from { width: 0; opacity: 0; }
  to { width: 3rem; opacity: 1; }
}
.section-head {
  margin-bottom: 2rem;
}
.home-spotlight-lead,
.content-types-lead {
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ——— Cartes & surfaces ——— */
.type-card,
.home-featured-showcase,
.post-card,
.forum-topic-card,
.collab-space-card,
.auth-shell,
.page-header {
  transition:
    transform 0.45s var(--ease-poetic),
    box-shadow 0.45s var(--ease-poetic),
    border-color 0.35s ease;
}
.type-card:hover,
.home-featured-showcase:hover {
  transform: translateY(-6px);
  box-shadow:
    var(--shadow),
    0 0 50px rgba(212, 165, 255, 0.12);
}
.grid-post-link {
  transition: transform 0.4s var(--ease-poetic), box-shadow 0.4s var(--ease-poetic);
}
.grid-post:hover .grid-post-link--thumb {
  transform: scale(1.02);
}
.grid-post::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 165, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.grid-post:hover::after {
  opacity: 1;
}

/* ——— Page headers ——— */
.page-header h1 {
  font-family: var(--font-display);
  background: linear-gradient(
    100deg,
    var(--text) 0%,
    #e8d4ff 30%,
    var(--accent-3) 50%,
    var(--text) 70%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: page-title-shimmer 10s linear infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 40px rgba(212, 165, 255, 0.15));
}
@keyframes page-title-shimmer {
  to { background-position: 200% center; }
}
.page-header .eyebrow {
  margin-bottom: 0.75rem;
}

/* ——— Liens flèche ——— */
.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.3s var(--ease-poetic), color 0.25s ease;
}
.link-arrow:hover {
  gap: 0.5rem;
  color: var(--accent-3);
  text-shadow: 0 0 20px rgba(126, 240, 224, 0.3);
}

/* ——— Footer poétique ——— */
.site-footer {
  text-align: center;
  padding: 2rem var(--gutter) 5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.site-footer p {
  margin: 0;
  position: relative;
  display: inline-block;
}
.site-footer p::before,
.site-footer p::after {
  content: "✦";
  margin: 0 0.75rem;
  font-size: 0.6rem;
  color: var(--accent);
  opacity: 0.6;
  animation: footer-star-pulse 3s ease-in-out infinite;
}
.site-footer p::after {
  animation-delay: -1.5s;
}
@keyframes footer-star-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ——— Dock mobile ——— */
.mobile-dock {
  background: linear-gradient(
    180deg,
    rgba(14, 16, 28, 0.92) 0%,
    rgba(10, 11, 20, 0.98) 100%
  );
  border-top: 1px solid rgba(212, 165, 255, 0.12);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}
.dock-link.is-active .dock-icon {
  filter: drop-shadow(0 0 8px rgba(212, 165, 255, 0.5));
}

/* ——— Poème sphère ——— */
.home-sphere-poem {
  position: relative;
}
.home-sphere-poem::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at center, rgba(212, 165, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: poem-aura 8s ease-in-out infinite alternate;
}
@keyframes poem-aura {
  from { opacity: 0.5; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.02); }
}

/* ——— Auth ——— */
.layout-auth .auth-shell {
  border: 1px solid rgba(212, 165, 255, 0.15);
  box-shadow:
    var(--shadow),
    0 0 100px rgba(212, 165, 255, 0.08);
}
.layout-auth .brand-center {
  animation: auth-brand-float 5s ease-in-out infinite;
}
@keyframes auth-brand-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ——— Animations scroll enrichies ——— */
[data-animate="fade-in"] {
  opacity: 0;
  transform: scale(0.96);
}
[data-animate="fade-in"].is-visible {
  opacity: 1;
  transform: scale(1);
}
[data-animate="scale-up"] {
  opacity: 0;
  transform: scale(0.88) translateY(20px);
}
[data-animate="scale-up"].is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}
[data-animate="blur-in"] {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(16px);
}
[data-animate="blur-in"].is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
[data-animate="float-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s var(--ease-poetic),
    transform 0.9s var(--ease-poetic);
}
[data-animate="float-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger enfants */
[data-animate-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--ease-poetic),
    transform 0.6s var(--ease-poetic);
}
[data-animate-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-animate-stagger].is-visible > *:nth-child(2) { transition-delay: 80ms; }
[data-animate-stagger].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-animate-stagger].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-animate-stagger].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-animate-stagger].is-visible > *:nth-child(6) { transition-delay: 400ms; }
[data-animate-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Empty states ——— */
.empty-state {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* ——— Inputs ——— */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(212, 165, 255, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(212, 165, 255, 0.12), 0 0 24px rgba(212, 165, 255, 0.08);
}

/* ——— Curseur poétique sur liens principaux ——— */
a:not(.btn):not(.nav-link):not(.dock-link):hover {
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* ——— Fil, forum, profil ——— */
.page-feed .page-header,
.page-forum .page-header,
.page-profile .profile-hero,
.page-search .page-header,
.page-messages .page-header,
.page-collab .page-header,
.page-publish .page-header,
.page-story .page-header {
  position: relative;
}
.auth-card,
.publish-card,
.forum-compose,
.messages-thread {
  background: linear-gradient(
    145deg,
    rgba(14, 16, 28, 0.75) 0%,
    rgba(20, 18, 36, 0.7) 100%
  );
  border-color: rgba(212, 165, 255, 0.1);
  backdrop-filter: blur(16px);
}
.auth-card:hover,
.forum-topic-card:hover {
  border-color: rgba(212, 165, 255, 0.18);
}
.instagram-grid {
  gap: var(--grid-thumb-gap);
}
.feed-toolbar {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: rgba(14, 16, 28, 0.5);
  border: 1px solid rgba(212, 165, 255, 0.08);
}
.profile-hero {
  position: relative;
  overflow: hidden;
}
.profile-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-3), var(--accent), transparent);
  opacity: 0.4;
}
.feed-hero.profile-hero::after {
  display: none;
}
.odyssey-hero h1,
.page-odyssey .feed-hero-title {
  text-shadow: 0 0 80px rgba(126, 240, 224, 0.2);
}

/* Contenu types — orbes plus vivants */
.ct-orb {
  filter: blur(40px);
  animation-duration: 14s !important;
}
.content-types-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212, 165, 255, 0.06) 0%, transparent 70%);
  animation: content-types-glow 10s ease-in-out infinite alternate;
}
@keyframes content-types-glow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ——— Phase 2 : verre mystique & poésie immersive ——— */
:root {
  --poetic-glass: linear-gradient(
    145deg,
    rgba(15, 18, 32, 0.78) 0%,
    rgba(26, 22, 44, 0.68) 55%,
    rgba(16, 24, 38, 0.74) 100%
  );
  --poetic-border: rgba(212, 165, 255, 0.16);
  --poetic-glow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 0 48px rgba(212, 165, 255, 0.08);
}

.site-main::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 34% 28% at 18% 12%, rgba(126, 240, 224, 0.06), transparent 72%),
    radial-gradient(ellipse 38% 32% at 82% 18%, rgba(212, 165, 255, 0.08), transparent 70%),
    radial-gradient(ellipse 44% 36% at 52% 100%, rgba(255, 138, 184, 0.06), transparent 68%);
}

.nav-link {
  border-radius: 999px;
  transition:
    background-color 0.32s var(--ease-poetic),
    color 0.28s ease,
    box-shadow 0.32s var(--ease-poetic),
    transform 0.28s var(--ease-poetic);
}
.nav-link:hover,
.nav-link.is-active {
  background: rgba(212, 165, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(212, 165, 255, 0.15), 0 0 24px rgba(212, 165, 255, 0.13);
  transform: translateY(-1px);
}

.chip,
.tag-chip,
.btn-ghost {
  border-color: rgba(212, 165, 255, 0.18);
  transition:
    transform 0.24s var(--ease-poetic),
    box-shadow 0.24s var(--ease-poetic),
    border-color 0.24s ease,
    background-color 0.24s ease;
}
.chip:hover,
.tag-chip:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 165, 255, 0.38);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 22px rgba(212, 165, 255, 0.16);
}

.auth-card,
.publish-card,
.feed-toolbar,
.feed-suggestions,
.forum-form-card,
.forum-aside-card,
.forum-reply-card,
.forum-topic-op,
.forum-board-card,
.search-user-card,
.story-chapters-section,
.odyssey-hud,
.odyssey-map-shell,
.odyssey-level-card,
.admin-post-card,
.admin-report-card {
  background: var(--poetic-glass);
  border: 1px solid var(--poetic-border);
  box-shadow: var(--poetic-glow);
  backdrop-filter: blur(18px) saturate(120%);
}

.forum-board-card,
.search-user-card,
.type-card,
.story-card-link,
.thread-card {
  transition:
    transform 0.36s var(--ease-poetic),
    box-shadow 0.36s var(--ease-poetic),
    border-color 0.3s ease;
}
.forum-board-card:hover,
.search-user-card:hover,
.type-card:hover,
.story-card-link:hover,
.thread-card:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 240, 224, 0.28);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34), 0 0 36px rgba(126, 240, 224, 0.14);
}

.page-feed .feed-hero-title,
.page-feed .page-header h1,
.page-romans .page-header h1,
.page-forum .forum-hero-title,
.page-search .feed-hero-title,
.page-search .page-header h1,
.page-profile .profile-hero-title,
.page-odyssey .feed-hero-title {
  text-shadow: 0 0 36px rgba(212, 165, 255, 0.2), 0 0 10px rgba(126, 240, 224, 0.08);
}

.page-feed .feed-hero.page-header,
.page-search .feed-hero.page-header,
.page-profile .feed-hero.page-header,
.page-odyssey .feed-hero.page-header {
  border-color: rgba(126, 240, 224, 0.24);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(126, 240, 224, 0.14);
}
.page-search .feed-hero--search.page-header {
  border-color: rgba(126, 184, 255, 0.26);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(126, 184, 255, 0.12);
}
.page-profile .feed-hero--profile.page-header {
  border-color: rgba(212, 165, 255, 0.28);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(212, 165, 255, 0.14);
}
.page-odyssey .feed-hero--odyssey.page-header {
  border-color: rgba(199, 125, 255, 0.3);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(199, 125, 255, 0.14);
}
.page-messages .feed-hero-title {
  text-shadow: 0 0 36px rgba(126, 240, 224, 0.22), 0 0 10px rgba(255, 138, 184, 0.1);
}
.page-messages .feed-hero.page-header,
.page-messages .feed-hero--messages.page-header {
  border-color: rgba(126, 240, 224, 0.26);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(126, 240, 224, 0.13);
}
.page-collab .feed-hero.page-header,
.page-collab .feed-hero--collab.page-header {
  border-color: rgba(199, 125, 255, 0.28);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(199, 125, 255, 0.14);
}
.page-discussions .feed-hero--discussions.page-header {
  border-color: rgba(94, 234, 212, 0.26);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(94, 234, 212, 0.12);
}
.page-publish .feed-hero-title {
  text-shadow: 0 0 36px rgba(248, 215, 138, 0.22), 0 0 10px rgba(212, 165, 255, 0.1);
}
.page-publish .feed-hero.page-header,
.page-publish .feed-hero--publish.page-header {
  border-color: rgba(248, 215, 138, 0.26);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 44px rgba(248, 215, 138, 0.13);
}
.page-feed .page-header:not(.feed-hero) {
  border-color: rgba(126, 240, 224, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 34px rgba(126, 240, 224, 0.12);
}

.page-romans .page-header {
  border-color: rgba(248, 215, 138, 0.24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 34px rgba(248, 215, 138, 0.14);
}

.page-forum .forum-hero {
  border: 1px solid rgba(212, 165, 255, 0.25);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38), 0 0 44px rgba(199, 125, 255, 0.16);
}

.page-forum .forum-board-card-icon,
.page-forum .forum-topic-pin,
.page-forum .forum-topic-lock {
  filter: drop-shadow(0 0 10px rgba(212, 165, 255, 0.35));
}

.page-auth .auth-card,
.page-auth-gateway .auth-card {
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(126, 240, 224, 0.11),
    0 0 18px rgba(212, 165, 255, 0.12) inset;
}

.site-footer {
  background: linear-gradient(180deg, var(--ams-fade-0) 0%, var(--ams-fade-1) 35%, var(--ams-fade-2) 100%);
  border-top: 1px solid rgba(212, 165, 255, 0.14);
}

/* Thèmes poétiques : Nuit / Crépuscule / Aube */
body[data-poetic-theme="night"] {
  --poetic-glass: linear-gradient(145deg, rgba(15, 18, 32, 0.78) 0%, rgba(26, 22, 44, 0.68) 55%, rgba(16, 24, 38, 0.74) 100%);
  --poetic-border: rgba(212, 165, 255, 0.16);
  --violet-mist: rgba(199, 125, 255, 0.2);
  --rose-mist: rgba(255, 107, 157, 0.17);
  --mint-mist: rgba(94, 234, 212, 0.16);
}

body[data-poetic-theme="dusk"] {
  --poetic-glass: linear-gradient(145deg, rgba(32, 16, 28, 0.78) 0%, rgba(48, 26, 40, 0.68) 55%, rgba(34, 24, 40, 0.74) 100%);
  --poetic-border: rgba(255, 158, 124, 0.24);
  --violet-mist: rgba(255, 138, 184, 0.22);
  --rose-mist: rgba(255, 167, 109, 0.2);
  --mint-mist: rgba(248, 215, 138, 0.14);
}

body[data-poetic-theme="dawn"] {
  --poetic-glass: linear-gradient(145deg, rgba(24, 26, 42, 0.78) 0%, rgba(30, 44, 60, 0.68) 55%, rgba(26, 34, 50, 0.74) 100%);
  --poetic-border: rgba(126, 240, 224, 0.24);
  --violet-mist: rgba(156, 187, 255, 0.18);
  --rose-mist: rgba(255, 196, 156, 0.18);
  --mint-mist: rgba(126, 240, 224, 0.2);
}

html[data-appearance="light"] body[data-poetic-theme="night"] {
  --poetic-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(242, 238, 252, 0.9) 55%, rgba(236, 244, 252, 0.92) 100%);
  --poetic-border: rgba(123, 61, 184, 0.2);
  --violet-mist: rgba(123, 61, 184, 0.12);
  --rose-mist: rgba(201, 74, 122, 0.1);
  --mint-mist: rgba(26, 143, 125, 0.1);
}

html[data-appearance="light"] body[data-poetic-theme="dusk"] {
  --bg-deep: #faf3f0;
  --accent: #a84878;
  --accent-2: #c45c38;
  --poetic-glass: linear-gradient(145deg, rgba(255, 252, 250, 0.94) 0%, rgba(255, 240, 232, 0.9) 55%, rgba(252, 244, 248, 0.92) 100%);
  --poetic-border: rgba(196, 92, 58, 0.22);
  --violet-mist: rgba(201, 74, 122, 0.14);
  --rose-mist: rgba(220, 120, 72, 0.14);
  --mint-mist: rgba(184, 148, 48, 0.1);
}

html[data-appearance="light"] body[data-poetic-theme="dawn"] {
  --bg-deep: #f2f8fa;
  --accent-3: #148f7a;
  --poetic-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 248, 252, 0.9) 55%, rgba(240, 248, 255, 0.93) 100%);
  --poetic-border: rgba(26, 143, 125, 0.22);
  --violet-mist: rgba(100, 140, 220, 0.12);
  --rose-mist: rgba(220, 160, 100, 0.1);
  --mint-mist: rgba(26, 143, 125, 0.14);
}

.poetic-controls {
  position: fixed;
  left: max(0.55rem, env(safe-area-inset-left));
  right: auto;
  bottom: calc(0.65rem + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.32rem;
  pointer-events: none;
}
.poetic-controls .poetic-ui-toggle {
  pointer-events: auto;
}

.poetic-ui-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--ams-ui-toggle-border);
  background: var(--ams-ui-toggle-bg);
  color: var(--text);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28), 0 0 10px rgba(212, 165, 255, 0.1);
  opacity: 0.72;
  cursor: pointer;
  transition: transform 0.25s var(--ease-poetic), box-shadow 0.25s var(--ease-poetic), border-color 0.25s ease;
}
.poetic-ui-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 240, 224, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 14px rgba(126, 240, 224, 0.12);
  opacity: 0.95;
}
.poetic-ui-toggle-icon {
  font-size: 0.8rem;
  line-height: 1;
}
.poetic-ui-toggle-label {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

@media (min-width: 1025px) {
  .mobile-bottom-chrome {
    display: block;
    position: static;
    height: 0;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    pointer-events: none;
  }
  .mobile-bottom-chrome .mobile-quick-bar,
  .mobile-bottom-chrome .mobile-dock,
  .mobile-bottom-chrome .mobile-quick-search {
    display: none !important;
  }
  .mobile-bottom-chrome .mobile-toolbar {
    display: block !important;
    position: static;
    height: 0;
    overflow: visible;
    padding: 0;
    border: none;
    min-height: 0;
  }
  .mobile-bottom-chrome .poetic-controls {
    pointer-events: auto;
    position: fixed;
    left: max(0.55rem, env(safe-area-inset-left));
    right: auto;
    bottom: calc(0.65rem + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: flex-start;
    gap: 0.32rem;
    width: auto;
    padding: 0;
    border: none;
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  .mobile-bottom-chrome .mobile-toolbar .poetic-controls {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: flex;
    flex: 1 1 50%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.1rem;
    min-width: 0;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
    pointer-events: auto;
    border-bottom: none;
    background: transparent;
  }
  .mobile-bottom-chrome .poetic-ui-toggle {
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-width: 0;
    min-height: 0;
    padding: 0.15rem 0.05rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    opacity: 1;
  }
  .mobile-bottom-chrome .poetic-ui-toggle:hover,
  .mobile-bottom-chrome .poetic-ui-toggle:focus-visible {
    transform: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: transparent;
    box-shadow: none;
  }
  .mobile-bottom-chrome .poetic-ui-toggle-icon {
    font-size: 0.85rem;
    line-height: 1;
  }
  .mobile-bottom-chrome .poetic-ui-toggle-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: auto;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.5rem;
    letter-spacing: 0.02em;
    text-transform: none;
    font-weight: 500;
  }
  /* Pages sans chrome mobile (ex. auth) */
  body:not(:has(.mobile-bottom-chrome)) .poetic-controls {
    bottom: calc(0.85rem + env(safe-area-inset-bottom));
    left: max(0.5rem, env(safe-area-inset-left));
    right: max(0.5rem, env(safe-area-inset-right));
    z-index: 90;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.28rem;
  }
  body:not(:has(.mobile-bottom-chrome)) .poetic-ui-toggle {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0.28rem 0.38rem;
  }
}

@media (max-width: 380px) {
  .mobile-bottom-chrome .poetic-ui-toggle-label,
  .mobile-bottom-chrome .mobile-quick-label {
    font-size: 0.45rem;
  }
  body:not(:has(.mobile-bottom-chrome)) .poetic-controls .poetic-ui-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  body:not(:has(.mobile-bottom-chrome)) .poetic-controls .poetic-ui-toggle {
    padding: 0.35rem 0.42rem;
  }
}

/* Signature visuelle premium sur cartes éditoriales */
.post-card,
.grid-post-link,
.story-card-link,
.forum-topic-list-item,
.forum-reply-card {
  position: relative;
  overflow: hidden;
}
.post-card::before,
.grid-post-link::before,
.story-card-link::before,
.forum-topic-list-item::before,
.forum-reply-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.06) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-poetic);
}
.post-card:hover::before,
.grid-post-link:hover::before,
.story-card-link:hover::before,
.forum-topic-list-item:hover::before,
.forum-reply-card:hover::before {
  transform: translateX(120%);
}

/* Phase 4 — direction plus artistique (fil/forum/romans) */
.site-main {
  position: relative;
}
.site-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 26%, rgba(248, 215, 138, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 72%, rgba(126, 240, 224, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 66% 84%, rgba(212, 165, 255, 0.1) 0%, transparent 100%);
  opacity: 0.3;
  mix-blend-mode: screen;
}

.page-header h1 {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.page-sub {
  max-width: 72ch;
  text-wrap: pretty;
}
.page-header::before {
  content: "";
  position: absolute;
  left: clamp(0.8rem, 2vw, 1.4rem);
  right: clamp(0.8rem, 2vw, 1.4rem);
  bottom: 0.1rem;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(126, 240, 224, 0.45) 28%, rgba(212, 165, 255, 0.75) 50%, rgba(255, 138, 184, 0.45) 72%, transparent 100%);
  opacity: 0.62;
}

.page-feed .post-card,
.page-feed .grid-post-link {
  border: 1px solid rgba(212, 165, 255, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), 0 0 24px rgba(212, 165, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.page-feed .post-card:hover,
.page-feed .grid-post-link:hover {
  border-color: rgba(126, 240, 224, 0.34);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38), 0 0 28px rgba(126, 240, 224, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.page-feed .filter-chips .chip.is-active {
  background: linear-gradient(135deg, rgba(126, 240, 224, 0.18), rgba(212, 165, 255, 0.18));
  border-color: rgba(126, 240, 224, 0.46);
  box-shadow: 0 0 18px rgba(126, 240, 224, 0.2);
}

.page-forum .forum-hero {
  background: radial-gradient(circle at 12% 10%, rgba(126, 240, 224, 0.14), transparent 42%), radial-gradient(circle at 85% 18%, rgba(255, 138, 184, 0.14), transparent 46%), linear-gradient(140deg, rgba(16, 18, 32, 0.8), rgba(30, 20, 40, 0.72));
}
.page-forum .forum-board-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.5vw, 1.36rem);
  letter-spacing: 0.01em;
}
.page-forum .forum-topic-list-item {
  border: 1px solid rgba(212, 165, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(14, 16, 28, 0.66), rgba(24, 20, 38, 0.62));
}
.page-forum .forum-topic-list-item:hover {
  border-color: rgba(248, 215, 138, 0.34);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), 0 0 22px rgba(248, 215, 138, 0.14);
}
.page-forum .forum-post-body {
  line-height: 1.72;
}

.page-romans .grid-post-link,
.page-romans .story-card-link {
  border: 1px solid rgba(248, 215, 138, 0.2);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), 0 0 24px rgba(248, 215, 138, 0.09);
}
.page-romans .grid-post-link:hover,
.page-romans .story-card-link:hover {
  border-color: rgba(248, 215, 138, 0.42);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38), 0 0 30px rgba(248, 215, 138, 0.18);
}

@media (max-width: 700px) {
  .page-header h1 {
    letter-spacing: 0;
    line-height: 1.14;
  }
}

/* Luxury polish — formulaires, profil, galerie romans */
.auth-form label,
.publish-form label,
.forum-field > span,
.search-page-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--text) 72%, var(--accent-3) 28%);
}

.auth-form input,
.auth-form textarea,
.publish-form input,
.publish-form textarea,
.publish-form select,
.forum-form input[type="text"],
.forum-form textarea,
.search-page-input {
  background: linear-gradient(140deg, rgba(12, 15, 26, 0.74), rgba(22, 18, 35, 0.64));
  border: 1px solid rgba(212, 165, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s var(--ease-poetic);
}

.auth-form input:focus,
.auth-form textarea:focus,
.publish-form input:focus,
.publish-form textarea:focus,
.publish-form select:focus,
.forum-form input[type="text"]:focus,
.forum-form textarea:focus,
.search-page-input:focus {
  border-color: rgba(126, 240, 224, 0.48) !important;
  box-shadow:
    0 0 0 3px rgba(126, 240, 224, 0.12),
    0 0 26px rgba(126, 240, 224, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.form-errors li {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.14), rgba(255, 138, 155, 0.08));
  border: 1px solid rgba(255, 138, 155, 0.28);
  border-radius: 10px;
  padding: 0.48rem 0.65rem;
  margin-bottom: 0.5rem;
  color: #ffc3d0;
}

.page-profile .profile-hero,
.page-profile .feed-hero.profile-hero {
  border: 1px solid rgba(212, 165, 255, 0.24);
  background:
    radial-gradient(circle at 12% 18%, rgba(126, 240, 224, 0.15), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(255, 138, 184, 0.14), transparent 45%),
    linear-gradient(145deg, rgba(16, 18, 30, 0.78), rgba(26, 20, 40, 0.72));
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.4),
    0 0 44px rgba(212, 165, 255, 0.14);
}

.page-profile .profile-hero h1,
.page-profile .profile-hero-title,
.page-profile .profile-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  letter-spacing: 0.01em;
  text-shadow: 0 0 24px rgba(212, 165, 255, 0.2);
}

.page-profile .profile-grid .grid-post-link,
.page-profile .profile-grid .grid-post {
  border: 1px solid rgba(212, 165, 255, 0.16);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 165, 255, 0.1);
}

.page-romans .story-card-cover,
.page-romans .grid-media {
  border: 1px solid rgba(248, 215, 138, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(248, 215, 138, 0.12);
}

.page-romans .story-card-badge {
  background: linear-gradient(135deg, rgba(248, 215, 138, 0.24), rgba(212, 165, 255, 0.2));
  border: 1px solid rgba(248, 215, 138, 0.42);
  color: color-mix(in srgb, var(--text) 88%, #fff 12%);
}

.page-romans .story-card-title,
.page-romans .grid-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  line-height: 1.28;
}

@media (max-width: 700px) {
  .auth-form label,
  .publish-form label,
  .forum-field > span,
  .search-page-label {
    font-size: 0.67rem;
  }

  .page-profile .profile-hero h1,
  .page-profile .profile-name {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
  }
}

/* Phase 5 — édition collector */
.section-title,
.page-header h1,
.forum-hero-title {
  position: relative;
}

.section-title::after,
.page-header h1::after {
  content: "✦";
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.6em;
  opacity: 0.45;
  transform: translateY(-0.1em);
  color: color-mix(in srgb, var(--gold) 62%, var(--accent-3) 38%);
}

.page-header {
  isolation: isolate;
}
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.06), transparent 38%),
    radial-gradient(circle at 88% 80%, rgba(126, 240, 224, 0.06), transparent 42%);
  mix-blend-mode: screen;
  opacity: 0.65;
}

.post-card .post-title,
.grid-post-link .grid-title,
.story-card-link .story-card-title,
.forum-topic-row-title {
  letter-spacing: 0.008em;
  text-wrap: balance;
}

.post-card,
.grid-post-link,
.story-card-link,
.forum-board-card,
.search-user-card {
  position: relative;
}

.post-card::after,
.grid-post-link::after,
.story-card-link::after,
.forum-board-card::after,
.search-user-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 255, 0.55), transparent);
  opacity: 0.4;
  pointer-events: none;
}

.page-feed .post-card:hover .post-title,
.page-feed .grid-post-link:hover .grid-title,
.page-romans .story-card-link:hover .story-card-title,
.page-forum .forum-topic-list-item:hover .forum-topic-row-title {
  text-shadow: 0 0 16px rgba(212, 165, 255, 0.24);
}

.page-profile .profile-hero .profile-name,
.page-profile .profile-hero h1 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.tag-chip {
  background: linear-gradient(135deg, rgba(212, 165, 255, 0.1), rgba(126, 240, 224, 0.08));
}
.tag-chip:hover {
  background: linear-gradient(135deg, rgba(212, 165, 255, 0.2), rgba(126, 240, 224, 0.14));
}

.site-footer p {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.73rem;
  opacity: 0.78;
}

/* Micro-animations discrètes collector */
@media (prefers-reduced-motion: no-preference) {
  body:not([data-poetic-motion="sober"]) .page-header h1,
  body:not([data-poetic-motion="sober"]) .section-title {
    animation: collector-title-breathe 6.5s ease-in-out infinite;
  }

  body:not([data-poetic-motion="sober"]) .forum-board-card,
  body:not([data-poetic-motion="sober"]) .story-card-link,
  body:not([data-poetic-motion="sober"]) .grid-post-link {
    animation: collector-card-idle 9s ease-in-out infinite;
    animation-delay: calc(var(--forum-i, 0) * 50ms);
  }

  body[data-poetic-motion="cinematic"] .page-header h1,
  body[data-poetic-motion="cinematic"] .section-title {
    animation-duration: 4.5s;
  }

  body[data-poetic-motion="cinematic"] .forum-board-card,
  body[data-poetic-motion="cinematic"] .story-card-link,
  body[data-poetic-motion="cinematic"] .grid-post-link {
    animation-duration: 6s;
  }
}

@keyframes collector-title-breathe {
  0%, 100% { text-shadow: 0 0 16px rgba(212, 165, 255, 0.12); }
  50% { text-shadow: 0 0 26px rgba(126, 240, 224, 0.16); }
}

@keyframes collector-card-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

body[data-poetic-theme="dawn"] .poetic-theme-toggle {
  border-color: rgba(126, 240, 224, 0.4);
  background: rgba(16, 26, 34, 0.74);
}
body[data-poetic-theme="dusk"] .poetic-theme-toggle {
  border-color: rgba(255, 158, 124, 0.4);
  background: rgba(34, 18, 26, 0.74);
}

/* Presets d'animation — Sobre / Équilibré / Cinématique */
body[data-poetic-motion="sober"] .ambient-stars,
body[data-poetic-motion="sober"] .ambient-mist {
  animation: none;
  opacity: 0.28;
}
body[data-poetic-motion="sober"] .ambient-particles {
  opacity: 0.35;
}
body[data-poetic-motion="sober"] .site-header::before,
body[data-poetic-motion="sober"] .hero::before,
body[data-poetic-motion="sober"] .eyebrow,
body[data-poetic-motion="sober"] .hero h1 em,
body[data-poetic-motion="sober"] .section-title--shine,
body[data-poetic-motion="sober"] .btn-primary,
body[data-poetic-motion="sober"] .layout-auth .brand-center {
  animation: none !important;
}
body[data-poetic-motion="sober"] .post-card,
body[data-poetic-motion="sober"] .grid-post-link,
body[data-poetic-motion="sober"] .story-card-link,
body[data-poetic-motion="sober"] .forum-board-card {
  transition-duration: 0.15s;
}
body[data-poetic-motion="sober"] .post-card:hover,
body[data-poetic-motion="sober"] .grid-post-link:hover,
body[data-poetic-motion="sober"] .story-card-link:hover {
  transform: none;
}

body[data-poetic-motion="cinematic"] .ambient-stars {
  opacity: 0.72;
  animation-duration: 5s;
}
body[data-poetic-motion="cinematic"] .ambient-stars--layer2 {
  animation-duration: 7s;
}
body[data-poetic-motion="cinematic"] .ambient-mist {
  animation-duration: 16s;
  opacity: 1;
}
body[data-poetic-motion="cinematic"] .ambient-particle {
  filter: saturate(1.15);
}
body[data-poetic-motion="cinematic"] .site-header::before {
  animation-duration: 7s;
}
body[data-poetic-motion="cinematic"] .hero::before {
  animation-duration: 4s;
}
body[data-poetic-motion="cinematic"] .page-header::after {
  opacity: 0.85;
}
body[data-poetic-motion="cinematic"] .post-card:hover .post-title,
body[data-poetic-motion="cinematic"] .page-feed .grid-post-link:hover .grid-title,
body[data-poetic-motion="cinematic"] .page-romans .story-card-link:hover .story-card-title {
  text-shadow: 0 0 22px rgba(212, 165, 255, 0.38);
}

body[data-poetic-motion="cinematic"] .poetic-motion-toggle {
  border-color: rgba(248, 215, 138, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), 0 0 14px rgba(248, 215, 138, 0.14);
}

/* ——— Select / dropdown natifs — mode sombre ——— */
html:not([data-appearance="light"]) {
  color-scheme: dark;
}

html:not([data-appearance="light"]) select {
  color: var(--text);
}

html:not([data-appearance="light"]) select option,
html:not([data-appearance="light"]) select optgroup {
  background-color: var(--bg-elevated);
  color: var(--text);
}

html:not([data-appearance="light"]) .publish-form select,
html:not([data-appearance="light"]) .auth-form select,
html:not([data-appearance="light"]) .forum-form select {
  color: var(--text);
}

/* ——— prefers-reduced-motion : confort & lisibilité (WCAG 2.3.3) ——— */
@media (prefers-reduced-motion: reduce) {
  .ambient-stars,
  .ambient-stars--layer2,
  .ambient-mist,
  .ambient-particle,
  .site-header::before,
  .btn-primary,
  .hero::before,
  .eyebrow,
  .hero h1 em,
  .sphere-halo,
  .section-title--shine,
  .section-title--shine::after,
  .page-header h1,
  .site-footer p::before,
  .site-footer p::after,
  .home-sphere-poem::before,
  .layout-auth .brand-center,
  .content-types-bg::before,
  .ct-orb {
    animation: none !important;
  }

  .hero h1 em,
  .section-title--shine,
  .page-header h1 {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: var(--text) !important;
    filter: none !important;
  }

  .hero::before,
  .home-sphere-poem::before {
    transform: translate(-50%, -50%) !important;
  }

  .hero-stats li:hover,
  .link-arrow:hover {
    transform: none !important;
  }

  .post-card,
  .grid-post-link,
  .story-card-link,
  .forum-board-card,
  .nav-link,
  .btn-primary,
  .poetic-theme-toggle,
  .poetic-motion-toggle {
    transition-duration: 0.01ms !important;
  }

  [data-animate],
  [data-animate-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* Particules ambient (CSP : pas de <style> injecté par JS) */
@keyframes poetic-float {
  0% { transform: translate(0, 0) scale(1); }
  50% {
    transform: translate(calc(var(--drift-x, 20px) * 0.5), calc(var(--drift-y, -30px) * 0.5)) scale(1.08);
  }
  100% { transform: translate(var(--drift-x, 20px), var(--drift-y, -30px)) scale(0.95); }
}
