/* ==========================================================================
   AKUMA-SHOP — Page d'accueil
   Thème commun avec dex.akuma-shop.fr et inventaire.akuma-shop.fr
   (palette Ectoplasma · Cinzel + Outfit · Bootstrap Icons)
   ========================================================================== */

:root {
  --bg-deep:      #080612;
  --bg-card:      #0f0a1e;
  --bg-surface:   #140f24;
  --bg-elevated:  #1c1430;
  --bg-hover:     #241b3a;

  --accent:        #9b5de5;
  --accent-light:  #c084fc;
  --accent-dim:    rgba(155, 93, 229, 0.15);
  --accent-border: rgba(155, 93, 229, 0.35);
  --accent-glow:   rgba(155, 93, 229, 0.2);
  --mauve:         #d4aaff;
  --success:       #40c080;

  --text-primary: #f0ecff;
  --text-muted:   #8878b0;
  --text-dim:     #4a3d6a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-glow: 0 0 30px rgba(155, 93, 229, 0.18);
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-h: 64px;
  --container: 1080px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip; /* clip ne casse pas le position: sticky de la navbar */
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(155, 93, 229, 0.1), transparent),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(100, 50, 180, 0.06), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239b5de5' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent-light); text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--text-muted); }
.accent-text { color: var(--accent-light); }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  min-height: var(--nav-h);
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
  background: rgba(8, 6, 18, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--accent-border);
}
.navbar-brand {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em;
  color: var(--accent-light); transition: color var(--transition);
}
.navbar-brand:hover { color: #fff; }
.navbar-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.navbar-sep { width: 1px; height: 28px; background: var(--accent-border); flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-link-item {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 0.85rem; white-space: nowrap;
  transition: color var(--transition);
}
.nav-link-item:hover { color: var(--accent-light); }

.nav-end { flex: 1 1 0; display: flex; justify-content: flex-end; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 0.4rem 1rem; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent-light); font-weight: 500; font-size: 0.82rem;
  transition: var(--transition);
}
.btn-nav:hover { background: rgba(155, 93, 229, 0.28); color: #fff; box-shadow: 0 0 16px var(--accent-glow); }

@media (max-width: 767.98px) {
  .navbar { --nav-h: 56px; padding: 0.5rem 0.8rem; padding-top: calc(0.5rem + env(safe-area-inset-top, 0px)); }
  .nav-links { display: none; }
  .navbar-brand { font-size: 1rem; gap: 7px; }
  .navbar-logo { width: 36px; height: 36px; }
  .navbar-sep { height: 22px; }
  .btn-nav { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 1.05rem; }
  .btn-nav span { display: none; }
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0.85rem 1.6rem; border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit; font-weight: 500; font-size: 0.92rem; white-space: nowrap;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, #9b5de5, #7b3fbf); color: #fff;
  box-shadow: 0 4px 20px rgba(155, 93, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(155, 93, 229, 0.5); color: #fff; }
.btn-secondary { background: rgba(155, 93, 229, 0.08); border-color: rgba(155, 93, 229, 0.25); color: var(--accent-light); }
.btn-secondary:hover { background: rgba(155, 93, 229, 0.15); }

/* ===== HERO ===== */
/* Chaque section passe au-dessus du halo du hero, qui déborde librement (pas de coupure nette) */
main > section { position: relative; z-index: 1; }
.hero {
  display: flex; justify-content: center;
  padding: 2.5rem 1.25rem 2rem;
  text-align: center;
}
.hero-glow {
  position: absolute; top: -10%; left: 50%; z-index: 0;
  width: min(900px, 100%); aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(155, 93, 229, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--container);
  display: flex; flex-direction: column; align-items: center;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 1.5rem; padding: 0.35rem 0.9rem; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--mauve); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-light); box-shadow: 0 0 10px var(--accent-light);
  animation: pulse 2s ease-in-out infinite;
}
.hero-title, .section-title { text-wrap: balance; }
.hero-title {
  max-width: 680px; margin-bottom: 1.6rem;
  font-family: 'Cinzel', serif; font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; line-height: 1.25;
}
.hero-subtitle { max-width: 540px; margin-bottom: 2rem; color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

@media (max-width: 767.98px) {
  .hero { padding: 1.75rem 1rem 1.5rem; }
  .hero-title { margin-bottom: 1.2rem; }
  .status-pill { margin-bottom: 1.2rem; }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.6rem; }
}
@media (max-width: 479.98px) {
  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; gap: 0.7rem; }
}

/* ===== CHANTIER (dans le hero) ===== */
.worksite {
  width: 100%; max-width: 960px; margin-bottom: 1.8rem; overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}
/* Le SVG est en "slice" : sur petit écran on recadre au centre au lieu de rétrécir,
   les trois Pokémon restent dans la zone visible */
.worksite-svg { display: block; width: 100%; height: auto; aspect-ratio: 900 / 420; }
@media (max-width: 767.98px) {
  .worksite { margin-bottom: 1.6rem; border-radius: var(--radius-md); }
}
@media (max-width: 599.98px) {
  .worksite-svg { aspect-ratio: 4 / 3; }
}

.worksite .sprite { image-rendering: pixelated; }

/* Animations de la scène */
.sign-swing  { transform-box: view-box; transform-origin: 460px 62px; animation: sway 4s ease-in-out infinite; }
.board-sway  { transform-box: view-box; transform-origin: 81px 300px; animation: sway 3.5s ease-in-out infinite; }
.crane-light { animation: blink 1.6s steps(1) infinite; }
.sprite-bob  { animation: bob 0.8s steps(2) infinite; }
.sprite-float { animation: hover 3s ease-in-out infinite; }
/* Ectoplasma : traverse le ciel (x 680 → 120) puis revient, en se retournant à chaque bout */
.ghost-path   { --ease-sine: cubic-bezier(0.37, 0, 0.63, 1); animation: ghost-fly 18s var(--ease-sine) infinite; }
.ghost-alt    { animation: ghost-alt 7.7s var(--ease-sine) infinite alternate; }
.ghost-wobble { animation: ghost-wobble 3.1s var(--ease-sine) infinite alternate; }
.ghost-flip { transform-box: fill-box; transform-origin: center; animation: ghost-flip 18s linear infinite; }
.sparks circle { opacity: 0; animation: spark 1.2s ease-out infinite; }
.dust circle {
  opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: dust 2s ease-out infinite;
}

.crew-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid rgba(155, 93, 229, 0.12);
}
.crew-chip {
  padding: 0.3rem 0.8rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid rgba(155, 93, 229, 0.15);
  color: var(--text-muted); font-size: 0.78rem;
}
.crew-chip b { color: var(--text-primary); font-weight: 500; }
@media (max-width: 599.98px) {
  .crew-legend { gap: 0.35rem; padding: 0.7rem 0.6rem 0.8rem; }
  .crew-chip { padding: 0.25rem 0.6rem; font-size: 0.72rem; }
  .crew-role { display: none; }
}

/* ===== SECTIONS ===== */
.section { padding: 3.5rem 0 1rem; }
@media (max-width: 767.98px) { .section { padding-top: 2.5rem; } .section-title { font-size: 1.5rem; } }
.section-head { margin-bottom: 1.8rem; text-align: center; }
.section-title { margin-bottom: 0.5rem; font-family: 'Cinzel', serif; font-size: 1.8rem; line-height: 1.3; }
.section-subtitle { color: var(--text-muted); font-size: 0.92rem; }

/* ===== OUTILS ===== */
.tool-card {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.5rem 1.6rem;
  background: var(--bg-elevated); color: inherit;
  border: 1px solid rgba(155, 93, 229, 0.12); border-radius: var(--radius-md);
  transition: var(--transition);
}
.tool-card:hover { border-color: var(--accent-border); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(155, 93, 229, 0.12); }
.tool-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; background: rgba(155, 93, 229, 0.1); color: var(--accent-light); font-size: 1.6rem;
}
.tool-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.tool-kicker { color: var(--mauve); opacity: 0.75; font-size: 0.75rem; letter-spacing: 0.02em; }
.tool-name { font-family: 'Cinzel', serif; font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.tool-desc { max-width: 620px; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.tool-go {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent-light); font-size: 1.1rem; transition: var(--transition);
}
.tool-card:hover .tool-go { background: var(--accent); color: #fff; }

@media (max-width: 560px) {
  .tool-card { flex-wrap: wrap; padding: 1.3rem; }
  .tool-go { display: none; }
}

/* ===== RÉSEAUX ===== */
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.social-card {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 1.5rem;
  background: var(--bg-elevated); color: inherit;
  border: 1px solid rgba(155, 93, 229, 0.12); border-radius: var(--radius-md);
  transition: var(--transition);
}
.social-card:hover { border-color: var(--accent-border); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(155, 93, 229, 0.12); }
.social-icon {
  width: 48px; height: 48px; margin-bottom: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(155, 93, 229, 0.1); color: var(--accent-light); font-size: 1.4rem;
}
.social-name { font-weight: 600; font-size: 1.05rem; color: var(--text-primary); }
.social-handle { color: var(--mauve); opacity: 0.8; font-size: 0.8rem; }
.social-desc { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

@media (max-width: 767.98px) {
  .social-grid { grid-template-columns: 1fr; gap: 0.7rem; }
  .social-card { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; }
  .social-icon { grid-row: 1 / 4; margin: 0; }
  .social-desc { margin-top: 0.1rem; }
}

/* ===== DERNIERS POSTS INSTAGRAM ===== */
.feeds { margin-top: 1rem; }

.feed-panel {
  display: flex; flex-direction: column;
  padding: 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(155, 93, 229, 0.12); border-radius: var(--radius-md);
}
.feed-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.feed-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: rgba(155, 93, 229, 0.1); color: var(--accent-light); font-size: 1.2rem;
}
.feed-title { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.feed-sub { color: var(--mauve); opacity: 0.8; font-size: 0.8rem; }
.feed-sub:hover { opacity: 1; }

/* Grille : une ligne de 6 sur ordinateur, 3 colonnes sur mobile */
.ig-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 767.98px) { .ig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; } }
.ig-grid.is-empty { display: flex; }

.ig-post, .ig-skeleton {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: 10px; background: var(--bg-card);
}
.ig-skeleton { animation: pulse 1.4s ease-in-out infinite; }
.ig-post img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.ig-post::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1px solid rgba(155, 93, 229, 0.15); transition: var(--transition);
}
.ig-post:hover img { transform: scale(1.05); }
.ig-post:hover::after { border-color: var(--accent-border); background: rgba(155, 93, 229, 0.12); }
.ig-badge {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  color: #fff; font-size: 0.95rem; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.feed-more { align-self: center; margin-top: 1.1rem; }
.ig-grid.is-empty + .feed-more { display: none; } /* le placeholder a déjà son bouton */

/* Si le flux est indisponible */
.feed-empty {
  flex: 1; min-height: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  padding: 2rem 1.2rem; text-align: center;
  border: 1px dashed rgba(155, 93, 229, 0.25); border-radius: 10px;
  color: var(--text-muted); font-size: 0.88rem; line-height: 1.6;
}
.feed-empty > i { font-size: 2rem; color: var(--accent-light); }
.feed-empty p { max-width: 320px; }

@media (max-width: 479.98px) {
  .feed-panel { padding: 1rem; }
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 4.5rem; padding: 2.5rem 1.5rem 1.5rem;
  background: var(--bg-surface);
  border-top: 1px solid rgba(155, 93, 229, 0.15);
}
.footer-inner {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.05em; color: var(--accent-light);
}
.footer-logo { width: 36px; height: 36px; object-fit: contain; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.footer-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.35rem 0.8rem; border-radius: 999px;
  border: 1px solid rgba(155, 93, 229, 0.12);
  color: var(--text-muted); font-size: 0.8rem;
  transition: var(--transition);
}
.footer-link:hover { color: var(--accent-light); border-color: var(--accent-border); background: var(--accent-dim); }
.footer-copy {
  width: 100%; padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim); font-size: 0.7rem; line-height: 1.7;
}
.footer-copy span { display: block; margin-top: 0.3rem; font-size: 0.65rem; }

/* ===== ANIMATIONS ===== */
@keyframes sway {
  0%, 100% { transform: rotate(-2.5deg); }
  50%      { transform: rotate(2.5deg); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.15; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
/* Ectoplasma — trois mouvements continus, sans palier ni arrêt.
   Courbe « sinus » (--ease-sine) : vitesse qui varie en douceur, jamais de cassure.
   Durées 18 s / 7,7 s / 3,1 s : les cycles ne tombent jamais juste → trajet toujours différent. */
@keyframes ghost-fly {          /* traverse le ciel puis revient, demi-tour en douceur aux extrémités */
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-560px); }
}
@keyframes ghost-alt {          /* grandes vagues d'altitude */
  0%   { transform: translateY(-46px); }
  100% { transform: translateY(40px); }
}
@keyframes ghost-wobble {       /* petite ondulation rapide par-dessus */
  0%   { transform: translateY(-12px); }
  100% { transform: translateY(12px); }
}
@keyframes ghost-flip {
  0%, 49.9%  { transform: scaleX(1); }   /* regard à gauche (sens du sprite) */
  50%, 99.9% { transform: scaleX(-1); }  /* demi-tour pour le retour */
  100%       { transform: scaleX(1); }
}
@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes spark {
  0%   { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(var(--dx, 6px), -16px); }
}
@keyframes dust {
  0%   { opacity: 0.45; transform: scale(0.4); }
  100% { opacity: 0;    transform: scale(2.2) translateY(-4px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
