/* Styles personnalisés pour MysticOdyssey */

/* ========================================
   FONTS
   ======================================== */

/* Arturo - Titres & textes importants */
@font-face {
  font-family: "Arturo";
  src: url("/assets/ArturoLight-4ac0cf65.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Arturo";
  src: url("/assets/ArturoBold-623075ba.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Arturo";
  src: url("/assets/ArturoExtraBold-610bb1c6.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Arturo";
  src: url("/assets/ArturoLight-4ac0cf65.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Application globale des fonts */
body {
  font-family: "Nunito", sans-serif;
}

/* Les titres sont en Lexend. Arturo reste sur la navigation, les boutons-image
   et les labels de zones, où elle porte l'identité visuelle du site. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Lexend", sans-serif;
}

/* Classe utilitaire pour forcer Arturo */
.font-arturo {
  font-family: "Arturo", serif;
}

/* Classe utilitaire pour forcer Nunito */
.font-nunito {
  font-family: "Nunito", sans-serif;
}

/* Lexend, également disponible en classe utilitaire pour du texte hors titres.
   Attention : la règle globale ci-dessus cible les h1-h6 par leur nom d'élément.
   Pour imposer une AUTRE police à un titre, poser la classe directement dessus —
   l'héritage depuis un parent ne suffit jamais. */
.font-lexend {
  font-family: "Lexend", sans-serif;
}

/* ========================================
   NAVBAR BOUTONS
   ======================================== */

/* Décalage vertical du texte dans les boutons-image de la navbar.
   - padding-top : augmenter = texte descend davantage
   - Pour ajuster : modifier la valeur de padding-top ci-dessous */
.nav-btn-text {
  padding-bottom: 8px;
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Animation personnalisée pour les particules */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Barre de vote - shimmer animé */
@keyframes voteShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.vote-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 25%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.3) 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: voteShimmer 2.5s linear infinite;
}

/* Bouton Voter — transition ciblée sur la couleur uniquement */
.vote-btn {
  transition: color 0.3s;
}

.vote-progress-bar {
  transition: width 1s ease-in-out;
}

/* Étoiles / étincelles qui traversent la barre */
@keyframes voteSpark {
  0% {
    left: -5%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 105%;
    opacity: 0;
  }
}

.vote-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  box-shadow:
    0 0 4px 1px rgba(255, 255, 255, 0.5),
    0 0 8px 2px rgba(250, 204, 21, 0.3);
  animation: voteSpark 3s linear infinite;
  pointer-events: none;
}

/* Pulsation subtile de la bordure de la barre */
@keyframes voteBorderPulse {
  0%,
  100% {
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    border-color: rgba(250, 204, 21, 0.7);
    box-shadow:
      inset 0 2px 4px rgba(0, 0, 0, 0.3),
      0 0 10px rgba(250, 204, 21, 0.15);
  }
}

.vote-bar-container {
  animation: voteBorderPulse 3s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(250, 204, 21, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.8);
  }
}

/* Classe utilitaire pour l'animation flottante */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Classe utilitaire pour l'effet de lueur */
.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* Styles pour les messages flash */
.flash-message {
  animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Amélioration des gradients violets personnalisés */
.bg-mystic-purple {
  background: linear-gradient(
    135deg,
    #3b0764 0%,
    #581c87 25%,
    #7c3aed 50%,
    #581c87 75%,
    #3b0764 100%
  );
}

.bg-mystic-gold {
  background: linear-gradient(
    135deg,
    #f59e0b 0%,
    #fbbf24 25%,
    #fcd34d 50%,
    #fbbf24 75%,
    #f59e0b 100%
  );
}

/* Effet de particules scintillantes */
.sparkle::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(250, 204, 21, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(250, 204, 21, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(250, 204, 21, 0.2) 0%,
      transparent 50%
    );
  pointer-events: none;
  border-radius: inherit;
}

/* Style pour les bordures magiques */
.magic-border {
  position: relative;
  overflow: hidden;
}

.magic-border::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(250, 204, 21, 0.4),
    transparent
  );
  transition: left 0.5s;
}

.magic-border:hover::before {
  left: 100%;
}

/* Amélioration du scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #3b0764;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #fbbf24, #f59e0b);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #fcd34d, #fbbf24);
}

/* Styles pour les tooltips */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background: linear-gradient(135deg, #581c87, #3b0764);
  color: #fcd34d;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid rgba(250, 204, 21, 0.3);
  font-size: 14px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Animation pour les éléments au scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Styles pour les cartes avec effet de profondeur */
.depth-card {
  box-shadow:
    0 4px 6px -1px rgba(139, 69, 19, 0.1),
    0 2px 4px -1px rgba(139, 69, 19, 0.06);
  transition: all 0.3s ease;
}

.depth-card:hover {
  box-shadow:
    0 20px 25px -5px rgba(139, 69, 19, 0.1),
    0 10px 10px -5px rgba(139, 69, 19, 0.04),
    0 0 0 1px rgba(250, 204, 21, 0.2);
  transform: translateY(-2px);
}

/* Style pour les boutons avec effet de ripple */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ========================================
   BOUTIQUE — ONGLETS
   ======================================== */

/* Onglet inactif */
.shop-tab {
  color: #c4b5fd; /* purple-300 */
  background: transparent;
  cursor: pointer;
  border: none;
}

.shop-tab:hover {
  color: #fde68a; /* yellow-200 */
  background: rgba(139, 92, 246, 0.2);
}

/* Onglet actif */
.shop-tab.active {
  color: #fbbf24; /* yellow-400 */
  background: rgba(250, 204, 21, 0.15);
  border-bottom: 3px solid #fbbf24;
}

/* Animation fade-in du contenu des onglets */
.shop-tab-panel {
  opacity: 0;
  transform: translateY(8px);
  animation: shopTabFadeIn 0.3s ease-out forwards;
}

.shop-tab-panel.hidden {
  display: none;
}

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

.shop-tab-fade-in {
  animation: shopTabFadeIn 0.3s ease-out forwards;
}

/* ========================================
   RESPONSIVE — MOBILE MENU
   ======================================== */

/* Hero section : hauteur auto sur mobile au lieu de min-h-screen */
@media (max-width: 767px) {
  .hero-section-responsive {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }
}

/* Assets pixel art (badges de rang, icônes de ressources) : sans cette règle,
   le navigateur les lisse à l'agrandissement et le rendu devient flou. */
.image-render-pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ========================================
   WIKI MARKDOWN
   ======================================== */

.wiki-content {
  color: #e9d5ff;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.wiki-content > :first-child {
  margin-top: 0;
}

.wiki-content h1,
.wiki-content h2,
.wiki-content h3,
.wiki-content h4,
.wiki-content h5,
.wiki-content h6 {
  color: #ebcc5b;
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

.wiki-content h1 {
  font-size: 2rem;
}

.wiki-content h2 {
  font-size: 1.55rem;
  border-bottom: 1px solid rgba(235, 204, 91, 0.2);
  padding-bottom: 0.35rem;
}

.wiki-content h3 {
  font-size: 1.25rem;
}

.reglement-content h3 {
  color: #b173c3;
}

.wiki-content p,
.wiki-content ul,
.wiki-content ol,
.wiki-content blockquote,
.wiki-content table,
.wiki-content pre {
  margin: 1rem 0;
}

.wiki-content ul,
.wiki-content ol {
  padding-left: 1.5rem;
}

.wiki-content ul {
  list-style: disc;
}

.wiki-content ol {
  list-style: decimal;
}

.wiki-content li + li {
  margin-top: 0.3rem;
}

.wiki-content a {
  color: #f5d76e;
  text-decoration: underline;
  text-decoration-color: rgba(235, 204, 91, 0.45);
  text-underline-offset: 0.15rem;
}

.wiki-content a:hover {
  color: #ffffff;
  text-decoration-color: #ebcc5b;
}

.wiki-content strong {
  color: #ffffff;
}

.wiki-content blockquote {
  border-left: 3px solid #b173c3;
  color: #d8b4e8;
  padding-left: 1rem;
}

.wiki-content code {
  background: rgba(18, 22, 29, 0.8);
  border: 1px solid rgba(177, 115, 195, 0.25);
  border-radius: 0.3rem;
  color: #f5d76e;
  font-size: 0.9em;
  padding: 0.1rem 0.3rem;
}

.wiki-content pre {
  background: #12161d;
  border: 1px solid rgba(177, 115, 195, 0.25);
  border-radius: 0.6rem;
  overflow-x: auto;
  padding: 1rem;
}

.wiki-content pre code {
  background: transparent;
  border: 0;
  color: #f3e8ff;
  padding: 0;
}

.wiki-content table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
  width: max-content;
  min-width: 60%;
}

.wiki-content th,
.wiki-content td {
  border: 1px solid rgba(177, 115, 195, 0.28);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.wiki-content th {
  background: rgba(106, 0, 148, 0.35);
  color: #ebcc5b;
  font-weight: 700;
}

.wiki-content td {
  background: rgba(18, 22, 29, 0.25);
}

.wiki-audience-banner {
  align-items: center;
  border: 1px solid rgba(235, 204, 91, 0.25);
  border-radius: 1rem;
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.wiki-audience-banner::after {
  color: rgba(235, 204, 91, 0.12);
  content: "✦";
  font-size: 6rem;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: 1.5rem;
  top: -1.25rem;
  transform: rotate(18deg);
}

.wiki-audience-public {
  background: linear-gradient(105deg, rgba(70, 0, 97, 0.65), rgba(26, 34, 46, 0.96));
}

.wiki-audience-staff {
  background: linear-gradient(105deg, rgba(58, 73, 89, 0.86), rgba(26, 34, 46, 0.98));
  border-color: rgba(177, 115, 195, 0.45);
}

.wiki-audience-icon-wrap {
  align-items: center;
  background: rgba(18, 22, 29, 0.7);
  border: 1px solid rgba(235, 204, 91, 0.25);
  border-radius: 0.75rem;
  display: flex;
  flex: 0 0 3.5rem;
  height: 3.5rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.wiki-audience-icon {
  height: 2.5rem;
  object-fit: contain;
  width: 2.5rem;
}

.wiki-audience-label {
  color: #ebcc5b;
  font-family: "Arturo", serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  margin: 0 0 0.25rem;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.wiki-audience-action {
  margin-left: auto;
  position: relative;
  z-index: 1;
}

.wiki-audience-link {
  background: rgba(18, 22, 29, 0.62);
  border: 1px solid rgba(235, 204, 91, 0.4);
  border-radius: 0.6rem;
  color: #f5d76e;
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.wiki-audience-link:hover {
  background: rgba(106, 0, 148, 0.55);
  border-color: #ebcc5b;
  color: #ffffff;
}

.wiki-nav-group-title {
  color: #b173c3;
  font-family: "Arturo", serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.wiki-nav-link {
  align-items: center;
  border-radius: 0.55rem;
  color: #e9d5ff;
  display: flex;
  font-size: 0.88rem;
  gap: 0.55rem;
  min-height: 2.2rem;
  padding: 0.4rem 0.55rem;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.wiki-nav-link:hover {
  background: rgba(70, 0, 97, 0.6);
  color: #f5d76e;
  transform: translateX(2px);
}

.wiki-nav-link-active {
  background: rgba(106, 0, 148, 0.65);
  color: #f5d76e;
}

.wiki-nav-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 1.35rem;
  font-size: 1.05rem;
  justify-content: center;
}

@media (max-width: 767px) {
  .wiki-audience-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .wiki-audience-action {
    margin-left: 4.5rem;
  }

  .wiki-audience-link {
    white-space: normal;
  }
}

/* ========================================
   WIKI HUB
   ======================================== */

.wiki-hub-card {
  align-items: center;
  background: #1a222e;
  border: 1px solid rgba(235, 204, 91, 0.25);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 17rem;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.wiki-hub-card:hover {
  border-color: rgba(235, 204, 91, 0.7);
  box-shadow: 0 1rem 2.5rem rgba(18, 22, 29, 0.3);
  transform: translateY(-0.3rem);
}

.wiki-hub-card-public {
  background: linear-gradient(145deg, rgba(70, 0, 97, 0.72), #1a222e 72%);
}

.wiki-hub-card-staff {
  background: linear-gradient(145deg, rgba(58, 73, 89, 0.9), #1a222e 72%);
}

.wiki-hub-card-updates {
  background: linear-gradient(145deg, rgba(106, 0, 148, 0.48), #1a222e 72%);
}

.wiki-hub-icon {
  height: 3.5rem;
  margin-bottom: 0.6rem;
  object-fit: contain;
  width: 3.5rem;
}

.wiki-hub-emoji {
  align-items: center;
  display: flex;
  font-size: 3rem;
  height: 3.5rem;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.wiki-hub-label {
  color: #b173c3;
  font-family: "Arturo", serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
