/* ==========================================================================
   Noctalia — couche visuelle (animations, profondeur, interactions)
   S'ajoute à style.css sans le remplacer. Tout est désactivé si l'utilisateur
   demande moins d'animations (prefers-reduced-motion).
   ========================================================================== */
:root {
  --fx-accent: #8b8cff;
  --fx-accent-2: #b794ff;
  --fx-glow: 139, 140, 255;
  --fx-ease: cubic-bezier(.22, .8, .24, 1);
}
html { scroll-behavior: smooth; }
::selection { background: rgba(var(--fx-glow), .35); color: #fff; }
:focus-visible { outline: 2px solid var(--fx-accent); outline-offset: 3px; border-radius: 6px; }

/* --- Couche de particules (braises/lucioles), derrière le contenu --- */
#fx-embers { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .75; }
main, section, footer { position: relative; z-index: 1; }
header { z-index: 50; } /* le positionnement de l'en-tête reste celui de style.css */

/* --- En-tête verre dépoli qui se condense au défilement --- */
header { transition: background-color .35s var(--fx-ease), box-shadow .35s var(--fx-ease), backdrop-filter .35s; }
html.fx header.fx-scrolled {
  background-color: rgba(14, 14, 24, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(var(--fx-glow), .18);
}
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -6px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--fx-accent), var(--fx-accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--fx-ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* --- Hero : titre en dégradé + entrée orchestrée (un seul moment fort) --- */
.hero-title {
  background: linear-gradient(180deg, #fff 30%, #c9caff 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 4px 28px rgba(var(--fx-glow), .35));
  letter-spacing: -.02em;
}
.hero-section { overflow: hidden; }
html.fx .hero-section > * { opacity: 0; transform: translateY(22px); animation: fx-rise .9s var(--fx-ease) forwards; }
html.fx .hero-section > *:nth-child(1) { animation-delay: .05s; }
html.fx .hero-section > *:nth-child(2) { animation-delay: .18s; }
html.fx .hero-section > *:nth-child(3) { animation-delay: .32s; }
html.fx .hero-section > *:nth-child(4) { animation-delay: .46s; }
html.fx .hero-section > *:nth-child(5) { animation-delay: .60s; }
@keyframes fx-rise { to { opacity: 1; transform: none; } }
.hero-section::after { /* halo lumineux lent derrière le texte */
  content: ""; position: absolute; width: 60vmin; height: 60vmin; left: 4%; top: 18%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(var(--fx-glow), .22), transparent 65%); filter: blur(10px);
  animation: fx-breathe 9s ease-in-out infinite alternate;
}
@keyframes fx-breathe { from { transform: scale(.9); opacity: .6; } to { transform: scale(1.12); opacity: 1; } }

/* --- Boutons : survol, appui, reflet --- */
.btn, .btn-shop, .copy-ip-btn, button.btn-primary {
  position: relative; overflow: hidden; transition: transform .25s var(--fx-ease), box-shadow .25s var(--fx-ease), filter .25s;
}
.btn:hover, .btn-shop:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(var(--fx-glow), .38); }
.btn:active, .btn-shop:active, .copy-ip-btn:active { transform: translateY(0) scale(.97); box-shadow: 0 3px 10px rgba(var(--fx-glow), .3); }
.btn::before, .btn-shop::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-20deg);
}
.btn:hover::before, .btn-shop:hover::before { left: 130%; transition: left .7s var(--fx-ease); }

/* --- Cartes / blocs : profondeur et survol discret --- */
.carousel, .card, .content-section > div[class*="card"], .server-status, .top-voters, .how-card, .join-steps {
  transition: transform .4s var(--fx-ease), box-shadow .4s var(--fx-ease), border-color .4s;
}
.card:hover, .server-status:hover, .top-voters:hover, .how-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(var(--fx-glow), .22); }
.carousel { box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(var(--fx-glow), .12); }

/* --- Apparition progressive au défilement --- */
html.fx .fx-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--fx-ease), transform .8s var(--fx-ease); transition-delay: var(--fx-delay, 0s); will-change: opacity, transform; }
html.fx .fx-reveal.fx-in { opacity: 1; transform: none; will-change: auto; }

/* --- Boutique & Wiki : entrée de page (rejouée à chaque affichage) + cartes --- */
html.fx #boutiquePage > h1, html.fx #boutiquePage > p, html.fx #wikiPage > .wiki-header, html.fx #wikiPage > .wiki-search-input {
  animation: fx-rise .9s var(--fx-ease) both;
}
html.fx #boutiquePage > p, html.fx #wikiPage > .wiki-search-input { animation-delay: .15s; }
.boutique-card, .wiki-content a, .wiki-content [class*="card"] { transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), border-color .35s; }
.boutique-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(0, 0, 0, .5), 0 0 0 1px rgba(var(--fx-glow), .35), 0 0 40px rgba(var(--fx-glow), .15); }
.boutique-add-btn { transition: transform .25s var(--fx-ease), box-shadow .25s var(--fx-ease), filter .25s; }
.boutique-add-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(var(--fx-glow), .4); }
.boutique-add-btn:active { transform: scale(.97); }

/* --- Bouton son --- */
#fx-sound {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #d7d8ff; background: rgba(20, 20, 34, .78); border: 1px solid rgba(var(--fx-glow), .35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .25s var(--fx-ease), background .25s, color .25s;
}
#fx-sound:hover { transform: scale(1.08); background: rgba(var(--fx-glow), .25); }
#fx-sound[aria-pressed="false"] { color: #7a7b96; }
#fx-sound svg { width: 20px; height: 20px; fill: currentColor; }
#fx-sound .fx-off { display: none; }
#fx-sound[aria-pressed="false"] .fx-on { display: none; }
#fx-sound[aria-pressed="false"] .fx-off { display: block; }
@media (max-width: 768px) { #fx-sound { bottom: 82px; left: auto; right: 3px; width: 28px; height: 28px; opacity: .6; } #fx-sound svg { width: 16px; height: 16px; } }

/* ==========================================================================
   Logo qui pulse, titres "pixel", aurore lente, bordures lumineuses, accroche
   ========================================================================== */

/* --- Logo : légère lueur qui pulse --- */
.logo img, footer img[src*="noctalia-logo-icon"] { animation: fx-logo-pulse 3.6s ease-in-out infinite; }
@keyframes fx-logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(var(--fx-glow), .35)); }
  50%      { filter: drop-shadow(0 0 11px rgba(var(--fx-glow), .85)); }
}

/* --- Titres : ombre dure façon Minecraft + petit motif de pixels --- */
.join-title, .boutique-title, .wiki-header h1 { text-shadow: 2px 2px 0 rgba(30, 22, 80, .95), 4px 4px 0 rgba(12, 8, 36, .45); letter-spacing: .01em; }
.hero-title { filter: drop-shadow(0 4px 28px rgba(var(--fx-glow), .35)) drop-shadow(3px 3px 0 rgba(34, 24, 92, .9)); }
.join-title::after, .boutique-title::after {
  content: ""; display: block; width: 8px; height: 8px; margin: 16px auto 0; background: var(--fx-accent);
  box-shadow: 16px 0 0 var(--fx-accent-2), -16px 0 0 var(--fx-accent-2), 32px 0 0 rgba(var(--fx-glow), .4), -32px 0 0 rgba(var(--fx-glow), .4);
  text-shadow: none;
}

/* --- Aurore : dégradés très lents derrière les sections --- */
#fx-aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#fx-aurora i { position: absolute; border-radius: 50%; will-change: transform; }
#fx-aurora i:nth-child(1) { width: 70vmax; height: 70vmax; left: -22vmax; top: -18vmax; background: radial-gradient(circle, rgba(110, 100, 255, .22), transparent 62%); animation: fx-drift-a 70s ease-in-out infinite alternate; }
#fx-aurora i:nth-child(2) { width: 60vmax; height: 60vmax; right: -20vmax; top: 22vh; background: radial-gradient(circle, rgba(170, 110, 255, .18), transparent 62%); animation: fx-drift-b 85s ease-in-out infinite alternate; }
#fx-aurora i:nth-child(3) { width: 55vmax; height: 55vmax; left: 18vw; bottom: -26vmax; background: radial-gradient(circle, rgba(60, 170, 220, .13), transparent 62%); animation: fx-drift-c 95s ease-in-out infinite alternate; }
@keyframes fx-drift-a { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes fx-drift-b { to { transform: translate(-16vmax, -12vmax) scale(.9); } }
@keyframes fx-drift-c { to { transform: translate(-14vmax, -10vmax) scale(1.2); } }
@media (max-width: 768px) { #fx-aurora i:nth-child(3) { display: none; } }

/* --- Bordures lumineuses qui suivent la souris --- */
.fx-glow { position: relative; }
.fx-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--fx-glow), .95), rgba(var(--fx-glow), .25) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .35s var(--fx-ease);
}
.fx-glow:hover::after { opacity: 1; }

/* --- Phrase d'accroche qui change --- */
html.fx .hero-section > .fx-done { animation: none; opacity: 1; transform: none; }
.hero-section [data-i18n="hero_desc"] { transition: opacity .45s var(--fx-ease), transform .45s var(--fx-ease); }
html.fx .hero-section > .fx-done.fx-swap { opacity: 0; transform: translateY(10px); }
@media (max-width: 768px) { .hero-section [data-i18n="hero_desc"] { min-height: 3em; } }

/* ==========================================================================
   Accueil : le bas du hero se fond dans la page (plus de ligne visible)
   ========================================================================== */
.hero-section { background: none !important; isolation: isolate; }
.hero-section::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,15,20,.55) 0%, rgba(15,15,20,.45) 25%, rgba(15,15,20,.8) 65%, rgba(15,15,20,.96) 100%),
              url('/assets/img/gallery/map-1.jpg') center var(--fx-bgy, 50%) / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0,0,0,.55) 78%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0,0,0,.55) 78%, transparent 100%);
}

/* ==========================================================================
   Boutique
   ========================================================================== */
#boutiquePage { max-width: 1120px; }
@media (min-width: 769px) { #boutiquePage { padding-top: 6.5rem; } }
#boutiquePage .boutique-title { text-shadow: 2px 2px 0 rgba(30,22,80,.9); }
.shop-buyer { display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap; margin: 0 auto 2.4rem; padding: .7rem 1.1rem; max-width: 560px;
  border-radius: 12px; font-size: 14px; color: #d1d5db; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); }
.shop-buyer.ok { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.07); }
.shop-buyer b { color: #fff; }
.shop-buyer-btn { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-weight: 700; font-size: 13px; padding: .45rem 1rem; border-radius: 8px; text-decoration: none; }
.shop-buyer-btn:hover { filter: brightness(1.12); }

#boutiquePage .boutique-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; padding-top: .8rem; max-width: 960px; margin-left: auto; margin-right: auto; }
#boutiquePage .boutique-card {
  display: flex; flex-direction: column; border-radius: 18px; padding: 2.1rem 1.1rem 1.2rem; overflow: visible;
  background: linear-gradient(180deg, rgba(50,50,70,.72), rgba(28,28,38,.78)); border: 1px solid rgba(255,255,255,.09);
}
#boutiquePage .boutique-card:hover { border-color: rgba(var(--fx-glow), .5); }
#boutiquePage .boutique-icon { margin-bottom: .4rem; }
#boutiquePage .boutique-icon img { width: 96px; height: 96px; animation: fx-float 4.8s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)) drop-shadow(0 0 16px rgba(255,80,90,.25)); }
#boutiquePage .boutique-card:nth-child(2) .boutique-icon img { animation-delay: -1.2s; }
#boutiquePage .boutique-card:nth-child(3) .boutique-icon img { animation-delay: -2.4s; }
#boutiquePage .boutique-card:nth-child(4) .boutique-icon img { animation-delay: -3.6s; }
@keyframes fx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
#boutiquePage .boutique-amount { font-size: 32px; letter-spacing: -.01em; text-shadow: 2px 2px 0 rgba(30,22,80,.85); }
#boutiquePage .boutique-unit { margin-bottom: .6rem; }
#boutiquePage .boutique-price { font-size: 26px; margin-bottom: .35rem; color: #fff; }
.shop-value { margin-bottom: 1rem; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.shop-ppe { font-size: 12.5px; color: #9ca3af; }
.shop-chip { font-size: 11.5px; font-weight: 800; padding: .22rem .65rem; border-radius: 999px; background: rgba(34,197,94,.14); color: #4ade80; border: 1px solid rgba(34,197,94,.35); }
.shop-chip.best { background: rgba(34,197,94,.24); border-color: rgba(74,222,128,.7); box-shadow: 0 0 14px rgba(34,197,94,.3); }
.shop-chip.empty { visibility: hidden; }
#boutiquePage .boutique-add-btn {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: .5rem; border: 0; color: #fff; padding: .9rem; border-radius: 12px; font-size: 15px; letter-spacing: .02em;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 8px 22px rgba(99,102,241,.35);
}
#boutiquePage .boutique-add-btn .icon-inline { width: 18px; height: 18px; fill: currentColor; }
#boutiquePage .boutique-add-btn:hover { background: linear-gradient(135deg, #7578ff, #9b6bff); }
#boutiquePage .boutique-add-btn:disabled { opacity: .7; cursor: wait; }

/* Pack mis en avant : cadre animé, halo, bouton qui pulse */
#boutiquePage .boutique-card.featured {
  background: linear-gradient(180deg, rgba(78,72,160,.6), rgba(34,32,72,.82)); border-color: transparent; translate: 0 -10px;
  box-shadow: 0 22px 55px rgba(var(--fx-glow), .28);
}
#boutiquePage .boutique-card.featured::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: linear-gradient(120deg, #6366f1, #c4b5fd, #8b5cf6, #6366f1); background-size: 300% 100%; animation: fx-border-flow 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@keyframes fx-border-flow { to { background-position: 300% 0; } }
#boutiquePage .boutique-card.featured .boutique-add-btn { animation: fx-cta-pulse 2.8s ease-in-out infinite; }
@keyframes fx-cta-pulse { 0%, 100% { box-shadow: 0 8px 22px rgba(99,102,241,.35); } 50% { box-shadow: 0 8px 34px rgba(139,92,246,.75); } }

/* Étiquettes (Populaire / Idéal) : pastille posée sur le bord haut de la carte */
#boutiquePage .boutique-card-tag {
  top: -13px; right: auto; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; letter-spacing: .06em; padding: .32rem .9rem; border-radius: 999px;
  background: #2a2c55; color: #c7d2fe; border: 1px solid rgba(var(--fx-glow), .5);
}
#boutiquePage .boutique-card.featured .boutique-card-tag { background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(139,92,246,.5); }

/* Comment ça marche */
.shop-steps-wrap { margin: 3.2rem auto 0; max-width: 900px; }
.shop-steps-title { font-size: 22px; font-weight: 800; margin: 0 0 1.4rem; text-shadow: 2px 2px 0 rgba(30,22,80,.85); }
.shop-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.shop-step { position: relative; padding: 1.3rem 1rem; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.shop-step span { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto .7rem; border-radius: 50%; font-weight: 800; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.shop-step p { margin: 0; color: #cbd0e0; font-size: 14px; line-height: 1.5; }
.shop-step + .shop-step::before { content: "›"; position: absolute; left: -.85rem; top: 50%; translate: 0 -50%; color: rgba(var(--fx-glow), .8); font-size: 22px; font-weight: 800; }

@media (max-width: 960px) { #boutiquePage .boutique-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  #boutiquePage { padding-left: .9rem; padding-right: .9rem; }
  #boutiquePage .boutique-grid { gap: .85rem; }
  #boutiquePage .boutique-card { padding: 1.7rem .7rem 1rem; border-radius: 16px; }
  #boutiquePage .boutique-icon img { width: 68px; height: 68px; }
  #boutiquePage .boutique-amount { font-size: 24px; }
  #boutiquePage .boutique-price { font-size: 21px; }
  #boutiquePage .boutique-add-btn { padding: .75rem; font-size: 14px; }
  #boutiquePage .boutique-card-tag { font-size: 10px; padding: .26rem .65rem; }
  .shop-chip { font-size: 10.5px; padding: .22rem .5rem; text-align: center; line-height: 1.25; }
    .shop-steps { grid-template-columns: 1fr; }
  .shop-step + .shop-step::before { content: "›"; left: 50%; top: -.95rem; translate: -50% 0; rotate: 90deg; }
  #boutiquePage .boutique-card.featured { translate: 0 0; }
}

/* ==========================================================================
   Boutique : saisie du pseudo + fenêtre de confirmation
   ========================================================================== */
.shop-buyer { flex-direction: column; align-items: stretch; gap: .55rem; max-width: 480px; padding: 1rem 1.2rem 1.1rem; text-align: left; border-radius: 16px;
  background: linear-gradient(180deg, rgba(60,60,110,.22), rgba(255,255,255,.04)); border: 1px solid rgba(var(--fx-glow), .3); }
.shop-buyer-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c7d2fe; }
.shop-buyer-field { position: relative; }
.shop-buyer-field svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; fill: #8b8fd8; pointer-events: none; }
.shop-buyer-field input { width: 100%; padding: .95rem 1rem .95rem 2.75rem; font-size: 16px; font-weight: 600; color: #fff; border-radius: 12px; background: rgba(10,10,24,.55); border: 1.5px solid rgba(255,255,255,.14); transition: border-color .25s, box-shadow .25s, background .25s; }
.shop-buyer-field input::placeholder { color: #6b7090; font-weight: 400; }
.shop-buyer-field input:focus { outline: none; border-color: var(--fx-accent); box-shadow: 0 0 0 4px rgba(var(--fx-glow), .22); background: rgba(20,20,48,.7); }
.shop-buyer-field input.invalid { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.18); }
.shop-buyer-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: #9ca3c0; }
.shop-buyer-error { margin: 0; font-size: 13px; font-weight: 600; color: #fca5a5; }
.shop-err-detail { display: block; margin-top: .45rem; padding: .45rem .6rem; font-size: 11.5px; font-weight: 500; line-height: 1.4; color: #cbd0e6; background: rgba(0,0,0,.3); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
@keyframes fx-shake { 10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; } 30%, 50%, 70% { translate: -6px 0; } 40%, 60% { translate: 6px 0; } }
.shake { animation: fx-shake .5s both; }

.shop-confirm-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; background: rgba(6,6,16,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.shop-confirm-overlay.open { opacity: 1; }
.shop-confirm { width: 100%; max-width: 400px; padding: 1.7rem 1.5rem 1.4rem; text-align: center; border-radius: 20px; scale: .94; transition: scale .3s var(--fx-ease);
  background: linear-gradient(180deg, #25285a, #15172f); border: 1px solid rgba(var(--fx-glow), .45); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(var(--fx-glow), .2); }
.shop-confirm-overlay.open .shop-confirm { scale: 1; }
.shop-confirm h3 { margin: 0 0 .7rem; font-size: 20px; color: #fff; text-shadow: 2px 2px 0 rgba(30,22,80,.9); }
.shop-confirm-text { margin: 0 0 .6rem; color: #c9cde6; font-size: 14.5px; }
.shop-confirm-player { margin: 0 auto .5rem; padding: .7rem 1rem; max-width: 100%; overflow-wrap: anywhere; font-size: 22px; font-weight: 800; color: #fff; border-radius: 12px; background: rgba(var(--fx-glow), .16); border: 1px dashed rgba(var(--fx-glow), .6); }
.shop-confirm-price { font-size: 26px; font-weight: 800; color: #4ade80; margin-bottom: .5rem; }
.shop-confirm-warn { margin: 0 0 1.2rem; font-size: 12.5px; color: #9ca3c0; }
.shop-confirm-actions { display: flex; gap: .7rem; }
.shop-confirm-actions button { flex: 1; padding: .85rem; font-size: 15px; font-weight: 800; border-radius: 12px; border: 0; cursor: pointer; transition: transform .2s var(--fx-ease), filter .2s; }
.shop-confirm-actions button:hover { transform: translateY(-2px); filter: brightness(1.1); }
.shop-confirm-cancel { color: #d1d5ee; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14) !important; }
.shop-confirm-ok { color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 8px 22px rgba(99,102,241,.4); }

/* ==========================================================================
   Connexion / inscription
   ========================================================================== */
.login-wrap { max-width: 480px; }
.login-wrap .card.section { position: relative; overflow: hidden; border-radius: 22px; padding: 2.2rem 1.9rem 1.8rem;
  background: linear-gradient(180deg, rgba(36,42,82,.84), rgba(18,22,46,.88)); border: 1px solid rgba(var(--fx-glow), .24);
  box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 70px rgba(var(--fx-glow), .10); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.login-wrap .card.section::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #6366f1, #c4b5fd, #8b5cf6); }
.login-wrap .card:hover { transform: none; }
.login-wrap .card h2 { font-size: 28px; margin-bottom: 1.5rem; text-shadow: 2px 2px 0 rgba(30,22,80,.9); }
.login-wrap .card h2::after { content: ""; display: block; width: 8px; height: 8px; margin-top: 14px; background: var(--fx-accent); box-shadow: 16px 0 0 var(--fx-accent-2), 32px 0 0 rgba(var(--fx-glow), .45); }
.login-wrap .form-group label { font-size: 12px; font-weight: 700; letter-spacing: .09em; color: #aab0d6; }
.login-wrap .form-group input { padding: 14px 16px; border-radius: 12px; font-size: 16px; background: rgba(8,8,22,.5); border: 1.5px solid rgba(255,255,255,.12); transition: border-color .25s, box-shadow .25s, background .25s; }
.login-wrap .form-group input:focus { border-color: var(--fx-accent); box-shadow: 0 0 0 4px rgba(var(--fx-glow), .2); background: rgba(20,20,52,.7); }
.login-wrap .btn { padding: 14px; border-radius: 12px; font-size: 15px; letter-spacing: .03em; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 10px 26px rgba(99,102,241,.35); }
.login-wrap .btn.is-loading, .settings-submit-btn.is-loading { pointer-events: none; opacity: .85; color: transparent !important; }
.login-wrap .btn.is-loading::after, .settings-submit-btn.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: fx-spin .7s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.login-wrap .message { border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.auth-alt { display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.08); color: #9ca3c0; font-size: 14px; }
.btn-ghost { cursor: pointer; padding: .55rem 1.1rem; font-size: 14px; font-weight: 700; color: #c7d2fe; border-radius: 10px; background: rgba(var(--fx-glow), .1); border: 1px solid rgba(var(--fx-glow), .45); transition: background .25s, transform .25s var(--fx-ease); }
.btn-ghost:hover { background: rgba(var(--fx-glow), .25); transform: translateY(-2px); }
.login-wrap .link { color: #a5b4fc; font-weight: 600; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #8b8fb8; cursor: pointer; transition: color .2s, background .2s; }
.pw-toggle:hover { color: #fff; background: rgba(255,255,255,.08); }
.pw-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.pw-meter { display: flex; gap: 5px; margin: 8px 0 0; }
.pw-meter i { flex: 1; height: 4px; border-radius: 3px; background: rgba(255,255,255,.1); transition: background .3s; }
.pw-meter[data-level="1"] i:nth-child(-n+1) { background: #ef4444; }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-level="3"] i:nth-child(-n+3) { background: #84cc16; }
.pw-meter[data-level="4"] i:nth-child(-n+4) { background: #22c55e; }

/* ==========================================================================
   Profil
   ========================================================================== */
html body .profile-wrap { max-width: 1000px; padding-top: 6.5rem; }
html body .profile-wrap .card { position: relative; border-radius: 20px; background: linear-gradient(180deg, rgba(34,40,78,.78), rgba(18,22,48,.82)); border: 1px solid rgba(var(--fx-glow), .2); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
html body .profile-wrap .card:hover { transform: none; }
html body .profile-wrap > #profileContent > .card:first-child, html body .profile-wrap #profileContent .card:first-child { overflow: hidden; border-color: rgba(var(--fx-glow), .4); box-shadow: 0 24px 60px rgba(var(--fx-glow), .18); }
html body .profile-wrap #profileContent .card:first-child::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -180px; pointer-events: none; background: radial-gradient(circle, rgba(var(--fx-glow), .28), transparent 65%); }
html body .profile-name { font-size: 32px; letter-spacing: -.01em; text-shadow: 2px 2px 0 rgba(30,22,80,.9); }
html body .profile-avatar { box-shadow: 0 0 0 3px rgba(var(--fx-glow), .55), 0 0 24px rgba(var(--fx-glow), .5); }
html body .profile-action-btn { border-radius: 12px; padding: .65rem 1.1rem; font-weight: 700; transition: transform .25s var(--fx-ease), box-shadow .25s var(--fx-ease), filter .25s; }
html body .profile-action-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(var(--fx-glow), .3); filter: brightness(1.1); }
html body .stats-grid .card { transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), border-color .35s; }
html body .stats-grid .card:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(0,0,0,.5), 0 0 0 1px rgba(var(--fx-glow), .35); }
html body .stat-card-value { font-size: 30px; letter-spacing: -.01em; text-shadow: 2px 2px 0 rgba(30,22,80,.8); }
html body .stat-card-icon { transition: transform .35s var(--fx-ease); }
html body .stats-grid .card:hover .stat-card-icon { transform: scale(1.12) rotate(-6deg); }
html body .stats-grid .card:nth-child(1) .stat-card-icon { background: rgba(34,197,94,.18); color: #4ade80; }
html body .stats-grid .card:nth-child(2) .stat-card-icon { background: rgba(139,92,246,.2); color: #c4b5fd; }
html body .stats-grid .card:nth-child(3) .stat-card-icon { background: rgba(245,158,11,.2); color: #fbbf24; }
html body .stats-grid .card:nth-child(4) .stat-card-icon { background: rgba(56,189,248,.18); color: #7dd3fc; }
html body .stats-grid .card:nth-child(5) .stat-card-icon { background: rgba(239,68,68,.18); color: #fca5a5; }
html body .stats-grid .card:nth-child(6) .stat-card-icon { background: rgba(20,184,166,.18); color: #5eead4; }
html body .info-row { padding: .8rem 0; }
html body .btn.logout { background: transparent; color: #fca5a5; border: 1.5px solid rgba(239,68,68,.5); box-shadow: none; border-radius: 14px; padding: 14px; transition: background .25s, color .25s, transform .25s var(--fx-ease); }
html body .btn.logout:hover { background: rgba(239,68,68,.16); color: #fff; box-shadow: none; transform: translateY(-2px); }
html body .settings-modal { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html body .settings-modal-content { border-radius: 20px; background: linear-gradient(180deg, #25285a, #15172f); border-color: rgba(var(--fx-glow), .4); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
html body .settings-input { border-radius: 12px; transition: border-color .25s, box-shadow .25s; }
html body .settings-input:focus { outline: none; border-color: var(--fx-accent); box-shadow: 0 0 0 4px rgba(var(--fx-glow), .2); }
html body .settings-submit-btn { position: relative; border-radius: 12px; }
html body .notif-card { padding: 1.2rem 1.4rem; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.notif-head h3 { margin: 0; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: #c7d2fe; display: flex; align-items: center; gap: .55rem; }
.notif-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ef4444, #f97316); }
.notif-markall { cursor: pointer; font-size: 12.5px; font-weight: 700; color: #c7d2fe; background: rgba(var(--fx-glow), .12); border: 1px solid rgba(var(--fx-glow), .4); border-radius: 8px; padding: .4rem .8rem; }
.notif-markall:hover { background: rgba(var(--fx-glow), .25); }
.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif-item { position: relative; padding: .75rem 1rem .75rem 1.2rem; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.notif-item.unread { background: rgba(var(--fx-glow), .1); border-color: rgba(var(--fx-glow), .4); }
.notif-item.unread::before { content: ""; position: absolute; left: .5rem; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: #818cf8; box-shadow: 0 0 8px #818cf8; }
.notif-item.notif-purchase { border-left: 3px solid #22c55e; }
.notif-item.notif-sanction_lifted { border-left: 3px solid #38bdf8; }
.notif-item.notif-new_device { border-left: 3px solid #f59e0b; }
.notif-text { font-size: 14px; color: #e5e7f5; line-height: 1.45; }
.notif-time { margin-top: .25rem; font-size: 11.5px; color: #8b90b0; }
.notif-empty { margin: 0; font-size: 14px; color: #8b90b0; font-style: italic; }
.purchase-card h3 { margin: 0 0 .8rem; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: #c7d2fe; }
.purchase-list { display: flex; flex-direction: column; gap: .5rem; }
.purchase-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-left: 3px solid #22c55e; }
.purchase-item.refunded { border-left-color: #f87171; opacity: .75; }
.purchase-main { min-width: 0; }
.purchase-name { font-size: 14px; color: #e5e7f5; line-height: 1.45; overflow-wrap: anywhere; }
.purchase-time { margin-top: .2rem; font-size: 11.5px; color: #8b90b0; }
.purchase-price { flex-shrink: 0; text-align: right; font-size: 14px; font-weight: 700; color: #86efac; }
.purchase-item.refunded .purchase-price { color: #fca5a5; text-decoration: line-through; }
.purchase-badge { display: inline-block; margin-top: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fca5a5; background: rgba(248,113,113,.15); text-decoration: none; }
@media (max-width: 640px) { html body .profile-name { font-size: 26px; } html body .stat-card-value { font-size: 24px; } .login-wrap .card.section { padding: 1.8rem 1.3rem 1.5rem; } }

/* ==========================================================================
   Boutique : grades puis points
   ========================================================================== */
.shop-section { margin: 0 auto 3rem; }
.shop-section-title { font-size: 26px; font-weight: 800; text-align: center; margin: 0 0 1.4rem; text-shadow: 2px 2px 0 rgba(30,22,80,.9); }
.shop-section-title::after { content: ""; display: block; width: 8px; height: 8px; margin: 14px auto 0; background: var(--fx-accent); box-shadow: 16px 0 0 var(--fx-accent-2), -16px 0 0 var(--fx-accent-2); }
.grade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; max-width: 700px; margin: 0 auto; }
.grade-card { min-width: 0; --tier: 143, 163, 255; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.6rem 1.1rem 1.3rem; border-radius: 20px;
  background: linear-gradient(180deg, rgba(var(--tier), .16), rgba(24,26,50,.82) 55%); border: 1px solid rgba(var(--tier), .4);
  box-shadow: 0 18px 44px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease); }
.grade-card[data-tier="2"] { --tier: 196, 162, 255; }
.grade-card[data-tier="3"] { --tier: 255, 214, 102; }
.grade-card[data-tier="4"] { --tier: 255, 122, 148; }
.grade-card:hover { transform: translateY(-5px); box-shadow: 0 24px 54px rgba(0,0,0,.5), 0 0 40px rgba(var(--tier), .22); }
.grade-name { margin: 0 0 .8rem; font-size: 20px; font-weight: 800; color: #fff; text-shadow: 2px 2px 0 rgba(30,22,80,.9); }
.grade-art { width: 120px; height: 120px; margin-bottom: 1rem; display: grid; place-items: center; position: relative; }
.grade-art::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--tier), .4), transparent 65%); animation: fx-breathe 6s ease-in-out infinite alternate; }
.grade-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); animation: fx-float 5s ease-in-out infinite; }
.grade-price { font-size: 28px; font-weight: 800; color: #fff; margin: -.2rem 0 .9rem; text-shadow: 2px 2px 0 rgba(30,22,80,.85); }
.grade-price sup { font-size: .55em; color: #b9bde0; }
.grade-card .boutique-add-btn { margin-top: 0; width: 100%; }
.grade-adv { width: 100%; margin-top: auto; margin-bottom: .9rem; padding: .85rem .8rem; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); }
.grade-adv-title { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--tier)); margin-bottom: .4rem; }
.grade-adv-empty { margin: 0; font-size: 13px; font-style: italic; color: #9ca3c0; }
#boutiquePage .boutique-add-btn.is-soon { background: rgba(255,255,255,.08); color: #9ca3c0; box-shadow: none; animation: none; cursor: not-allowed; }
@media (max-width: 960px) { #boutiquePage .boutique-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .shop-section-title { font-size: 22px; }
  .grade-grid { gap: .75rem; }
  .grade-card { padding: 1.2rem .6rem .9rem; border-radius: 16px; }
  .grade-name { font-size: 17px; margin-bottom: .6rem; }
  .grade-art { width: 76px; height: 76px; margin-bottom: .8rem; }
  .grade-adv { padding: .6rem .45rem; border-radius: 12px; }
  .grade-adv-title { font-size: 10.5px; letter-spacing: .07em; }
  .grade-adv-empty { font-size: 11.5px; line-height: 1.35; }
  .grade-price { font-size: 24px; margin-bottom: .7rem; }
  .grade-card .boutique-add-btn { padding: .7rem .3rem; font-size: 13px; gap: .3rem; min-width: 0; overflow: hidden; white-space: nowrap; }
  .grade-card .boutique-add-btn .icon-inline { width: 14px; height: 14px; }
  .grade-adv { margin-bottom: .6rem; }
}

/* --- Notification discrète (toast) et bouton Partager du wiki --- */
#siteToast { position: fixed; left: 50%; bottom: 96px; z-index: 300; translate: -50% 20px; opacity: 0; pointer-events: none; padding: .75rem 1.2rem; border-radius: 12px; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 12px 30px rgba(0,0,0,.5); transition: opacity .3s, translate .3s var(--fx-ease); }
#siteToast.show { opacity: 1; translate: -50% 0; }
.wiki-share-btn { display: inline-flex; align-items: center; gap: .45rem; }

/* ==========================================================================
   Wiki : même thème que le reste du site, sans photos de fond
   ========================================================================== */
#wikiPage { max-width: 1080px; }
#wikiPage .wiki-header { flex-direction: column; align-items: center; text-align: center; gap: .7rem; margin-bottom: 1.7rem; }
#wikiPage .wiki-header h1 { display: flex; align-items: center; justify-content: center; gap: .7rem; font-size: clamp(30px, 6vw, 46px); letter-spacing: -.01em;
  text-shadow: 2px 2px 0 rgba(30,22,80,.95), 4px 4px 0 rgba(12,8,36,.45); }
#wikiPage .wiki-header h1 svg { width: .75em; height: .75em; fill: var(--fx-accent); flex-shrink: 0; filter: drop-shadow(0 0 12px rgba(var(--fx-glow), .6)); }
.wiki-subtitle { margin: 0; max-width: 580px; font-size: 15.5px; line-height: 1.6; color: #aab0d6; }
.wiki-subtitle::before { content: ""; display: block; width: 8px; height: 8px; margin: 0 auto 16px; background: var(--fx-accent);
  box-shadow: 16px 0 0 var(--fx-accent-2), -16px 0 0 var(--fx-accent-2), 32px 0 0 rgba(var(--fx-glow), .4), -32px 0 0 rgba(var(--fx-glow), .4); }

/* Recherche */
#wikiPage .wiki-search-input { display: block; max-width: 660px; margin: 0 auto 1.1rem; padding: 1rem 1.2rem 1rem 3.1rem; font-size: 16px; border-radius: 16px; color: #fff;
  background: rgba(12,12,30,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b8fd8'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") no-repeat 1.05rem center / 20px;
  border: 1.5px solid rgba(var(--fx-glow), .25); transition: border-color .25s, box-shadow .25s, background-color .25s; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#wikiPage .wiki-search-input:focus { outline: none; border-color: var(--fx-accent); box-shadow: 0 0 0 4px rgba(var(--fx-glow), .2); background-color: rgba(20,20,52,.75); }
#wikiPage .wiki-search-input::placeholder { color: #6d7296; }
#wikiPage .wiki-search-results { max-width: 660px; margin: 0 auto 1.6rem; border-radius: 16px; background: rgba(20,22,48,.96); border: 1px solid rgba(var(--fx-glow), .35); box-shadow: 0 18px 44px rgba(0,0,0,.5); }
#wikiPage .wiki-search-result-item { padding: .85rem 1.2rem; font-size: 15px; transition: background .2s, padding-left .2s; }
#wikiPage .wiki-search-result-item small { margin-left: .5rem; font-size: 12px; color: #8b90b0; }
#wikiPage .wiki-search-result-item:hover { background: rgba(var(--fx-glow), .18); padding-left: 1.5rem; }

/* Contenu : plus de grand cadre, chaque élément a sa propre carte */
#wikiPage .wiki-content { background: none; border: 0; padding: 0; min-height: 260px; }
#wikiPage .wiki-back-link { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.05rem; margin-bottom: 1.3rem; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  color: #c7d2fe; background: rgba(var(--fx-glow), .1); border: 1px solid rgba(var(--fx-glow), .3); transition: transform .25s var(--fx-ease), background .25s; }
#wikiPage .wiki-back-link:hover { color: #fff; background: rgba(var(--fx-glow), .22); transform: translateX(-3px); }
#wikiPage .wiki-content-title { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(var(--fx-glow), .18); }
#wikiPage .wiki-content-title h2 { font-size: clamp(24px, 4.5vw, 32px); text-shadow: 2px 2px 0 rgba(30,22,80,.9); }

/* Accueil du wiki / catégories */
#wikiPage .wiki-cat-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.15rem; margin-top: 1.6rem; }
#wikiPage .wiki-cat-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 1.8rem 1rem 1.3rem; border-radius: 20px; background: linear-gradient(180deg, rgba(50,52,96,.62), rgba(20,22,48,.8));
  border: 1px solid rgba(var(--fx-glow), .22); box-shadow: 0 14px 34px rgba(0,0,0,.35); transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), border-color .35s; }
#wikiPage .wiki-cat-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% -10%, rgba(var(--fx-glow), .28), transparent 60%); opacity: .7; transition: opacity .35s; }
#wikiPage .wiki-cat-card:hover { transform: translateY(-6px); border-color: rgba(var(--fx-glow), .6); box-shadow: 0 22px 48px rgba(0,0,0,.5), 0 0 40px rgba(var(--fx-glow), .2); }
#wikiPage .wiki-cat-card:hover::before { opacity: 1; }
#wikiPage .wiki-cat-card-icon { position: relative; display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto .9rem; font-size: 34px; border-radius: 20px;
  background: rgba(var(--fx-glow), .14); border: 1px solid rgba(var(--fx-glow), .32); box-shadow: 0 0 26px rgba(var(--fx-glow), .25); transition: transform .35s var(--fx-ease); }
#wikiPage .wiki-cat-card:hover .wiki-cat-card-icon { transform: scale(1.1) rotate(-5deg); }
#wikiPage .wiki-cat-card-title { position: relative; font-size: 16.5px; font-weight: 800; color: #fff; }
.wiki-cat-card-count { position: relative; display: inline-block; margin-top: .45rem; padding: .16rem .6rem; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #c7d2fe; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
#wikiPage .wiki-cat-card-link { position: relative; margin-top: auto; padding-top: .8rem; font-size: 13px; font-weight: 700; color: #a5b4fc; transition: transform .3s var(--fx-ease), color .3s; }
#wikiPage .wiki-cat-card:hover .wiki-cat-card-link { color: #fff; transform: translateX(4px); }

/* Pages : blocs de texte et d'images */
#wikiPage .wiki-blocks-render { display: flex; flex-direction: column; gap: 1.1rem; }
#wikiPage .wiki-blocks-render.has-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.1rem; }
#wikiPage .wiki-block-width-full, #wikiPage .wiki-block-width-half { width: auto; }
#wikiPage .wiki-blocks-render.has-items > .wiki-block-text, #wikiPage .wiki-blocks-render.has-items > figure:not(.wiki-item-card) { grid-column: 1 / -1; }
#wikiPage .wiki-block-text { padding: 1.3rem 1.5rem; border-radius: 18px; font-size: 15.5px; line-height: 1.75; color: #d6d9ee;
  background: linear-gradient(180deg, rgba(34,38,78,.58), rgba(18,20,44,.74)); border: 1px solid rgba(var(--fx-glow), .18); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
#wikiPage .wiki-block-text strong { color: #fff; }
#wikiPage .wiki-block-image { border-radius: 18px; padding: 1.1rem .8rem .9rem; background: linear-gradient(180deg, rgba(40,44,90,.55), rgba(18,20,44,.74)); border: 1px solid rgba(var(--fx-glow), .2); }
#wikiPage .wiki-block-image img { max-width: 100%; border-radius: 12px; }
#wikiPage .wiki-block-image figcaption { color: #dfe2ff; font-size: 12.5px; letter-spacing: .07em; margin-top: .3rem; }

/* Fiches (image + nom) : tuiles cliquables */
#wikiPage .wiki-item-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .75rem; padding: 1.3rem .8rem 1.05rem; cursor: pointer;
  transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), border-color .35s; }
#wikiPage .wiki-item-card::before { content: ""; position: absolute; left: 50%; top: 38%; width: 120px; height: 120px; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--fx-glow), .3), transparent 68%); opacity: .6; transition: opacity .35s, scale .35s var(--fx-ease); }
#wikiPage .wiki-item-card img { position: relative; width: auto; max-width: 82%; max-height: 92px; margin: 0; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.5)); transition: transform .4s var(--fx-ease); }
#wikiPage .wiki-item-card figcaption { position: relative; }
#wikiPage .wiki-item-card:hover { transform: translateY(-6px); border-color: rgba(var(--fx-glow), .6); box-shadow: 0 20px 44px rgba(0,0,0,.5), 0 0 36px rgba(var(--fx-glow), .22); background: linear-gradient(180deg, rgba(52,56,112,.6), rgba(20,22,48,.8)); }
#wikiPage .wiki-item-card:hover::before { opacity: 1; scale: 1.2; }
#wikiPage .wiki-item-card:hover img { transform: scale(1.14) rotate(-4deg); }

/* Détail d'une fiche */
#wikiPage .wiki-item-detail { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.3rem; align-items: start; max-width: 860px; margin: 0 auto; }
#wikiPage .wiki-item-detail-image { position: relative; padding: 1.8rem 1rem 1.3rem; }
#wikiPage .wiki-item-detail-image:hover { transform: none; }
#wikiPage .wiki-item-detail-image::before { content: ""; position: absolute; left: 50%; top: 42%; width: 190px; height: 190px; translate: -50% -50%; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(var(--fx-glow), .35), transparent 68%); }
#wikiPage .wiki-item-detail-image img { position: relative; max-width: 150px; margin: 0 auto .7rem; filter: drop-shadow(0 12px 18px rgba(0,0,0,.55)); animation: fx-float 5s ease-in-out infinite; }
#wikiPage .wiki-item-detail-text { width: auto; font-size: 16px; padding: 1.5rem 1.7rem; }
.wiki-item-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 860px; margin: 1.5rem auto 0; }
.wiki-item-nav-btn { cursor: pointer; padding: .75rem 1.25rem; border-radius: 12px; font-size: 14px; font-weight: 700; color: #c7d2fe; background: rgba(var(--fx-glow), .1); border: 1px solid rgba(var(--fx-glow), .35); transition: background .25s, transform .25s var(--fx-ease); }
.wiki-item-nav-btn:hover:not(:disabled) { background: rgba(var(--fx-glow), .24); transform: translateY(-2px); }
.wiki-item-nav-btn:disabled { opacity: .3; cursor: default; }
.wiki-item-nav-pos { font-size: 13px; font-weight: 700; color: #8b90b0; }
#wikiPage .wiki-empty { padding: 3rem 0; color: #8b90b0; }

@media (max-width: 640px) {
  #wikiPage { padding-left: .9rem; padding-right: .9rem; }
  #wikiPage .wiki-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  #wikiPage .wiki-cat-card { padding: 1.3rem .6rem 1rem; border-radius: 16px; }
  #wikiPage .wiki-cat-card-icon { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
  #wikiPage .wiki-cat-card-title { font-size: 14.5px; }
  #wikiPage .wiki-blocks-render.has-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  #wikiPage .wiki-item-detail { grid-template-columns: 1fr; }
  #wikiPage .wiki-block-text { padding: 1.1rem 1.1rem; font-size: 15px; }
  .wiki-item-nav-btn { padding: .65rem .9rem; font-size: 13px; }
}

/* --- Réduction des animations demandée par le système --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.fx .hero-section > *, html.fx .fx-reveal, html.fx #boutiquePage > *, html.fx #wikiPage > * { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .hero-section::after { animation: none; }
  .btn::before, .btn-shop::before { display: none; }
  #fx-embers { display: none; }
  .logo img, footer img[src*="noctalia-logo-icon"], #fx-aurora i, #boutiquePage .boutique-icon img, .grade-art::before, .grade-art img, #boutiquePage .boutique-card.featured::before, #boutiquePage .boutique-card.featured .boutique-add-btn { animation: none; }
  .shake { animation: none; }
  #wikiPage .wiki-item-detail-image img { animation: none; }
  .fx-glow::after { transition: none; }
}

/* --- Boutique : même titre que le Wiki (blanc, même taille, même espace en haut) --- */
#boutiquePage { padding-top: 6.5rem; }
#boutiquePage .boutique-title { color: #fff; font-size: clamp(30px, 6vw, 46px); letter-spacing: -.01em;
  text-shadow: 2px 2px 0 rgba(30,22,80,.95), 4px 4px 0 rgba(12,8,36,.45); }
#boutiquePage .boutique-title span { color: #fff; }
#boutiquePage .boutique-desc { font-size: 15.5px; color: #aab0d6; }
