/* Polices chargées via <link> non-bloquant dans public/index.html pour éviter le blocage du rendu mobile */

/* ================================================
   VARIABLES CSS CRITIQUES - CHARGEMENT PRIORITAIRE
   ================================================ */
:root {
  /* Variables essentielles - définies en premier pour éviter les erreurs */
  --spotify-green: #1db954;
  --accent-blue: #00a8ff;
  --primary-blue: #1e3a8a;
  --dark-blue: #1e40af;
  --text-muted: #b3b3b3;
  --light-gray: #f0f0f0;
  --border-color: rgba(29, 185, 84, 0.3);
  --glow-green: rgba(29, 185, 84, 0.4);
  --glow-blue: rgba(0, 168, 255, 0.4);
  
  /* Variables de fond */
  --card-bg: rgba(16, 34, 63, 0.8);
  --card-bg-hover: rgba(29, 185, 84, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Poppins', 'Arial', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #0A1E3F; /* Bleu nuit comme fond principal */
  color: #f0f0f0;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  /* Padding ajusté pour le header (64px) + la banderole (18px) */
  padding-top: calc(64px + 18px); /* Header + bannière intégrée */
}

/* Variables CSS pour cohérence - Palette Spotifights */
:root {
  /* Couleurs primaires du logo Spotifights */
  --spotifight-green-start: #1DB954;  /* Vert Spotify du "Sp" */
  --spotifight-green-end: #00D4AA;    /* Vert turquoise du "Sp" */
  --spotifight-orange-start: #FF6B35; /* Orange du "tifight" */
  --spotifight-orange-mid: #F7931E;   /* Orange-jaune du "tifight" */
  --spotifight-orange-end: #FFD23F;   /* Jaune du "tifight" */
  
  /* Variables principales basées sur le logo */
  --primary-color: var(--spotifight-green-start);
  --secondary-color: var(--spotifight-orange-start);
  --accent-color: var(--spotifight-green-end);
  --highlight-color: var(--spotifight-orange-end);
  
  /* Couleurs de fond - tons sombres pour contraste */
  --primary-blue: #0A1E3F;
  --dark-blue: #050D1F;
  --background-gradient-start: #0A1E3F;
  --background-gradient-mid: #1A2A4F;
  --background-gradient-end: #121212;
  
  /* Couleurs de texte et interface */
  --light-gray: #f0f0f0;
  --text-muted: #b3b3b3;
  --text-primary: #ffffff;
  
  /* Bordures et cartes avec couleurs Spotifights */
  --border-color: rgba(29, 185, 84, 0.3);
  --border-color-orange: rgba(255, 107, 53, 0.3);
  --card-bg: rgba(16, 34, 63, 0.8);
  --card-bg-hover: rgba(29, 185, 84, 0.1);
  
  /* Effets de glow basés sur les couleurs du logo */
  --glow-green: rgba(29, 185, 84, 0.4);
  --glow-turquoise: rgba(0, 212, 170, 0.4);
  --glow-orange: rgba(255, 107, 53, 0.4);
  --glow-yellow: rgba(255, 210, 63, 0.4);
  
  /* Couleurs héritées renommées pour compatibilité */
  --spotify-green: var(--primary-color);
  --accent-blue: var(--accent-color);
  --purple: var(--secondary-color);
  
  /* Nouveaux dégradés Spotifights */
  --gradient-spotifight-primary: linear-gradient(135deg, var(--spotifight-green-start), var(--spotifight-green-end));
  --gradient-spotifight-secondary: linear-gradient(135deg, var(--spotifight-orange-start), var(--spotifight-orange-mid), var(--spotifight-orange-end));
  --gradient-spotifight-mixed: linear-gradient(135deg, var(--spotifight-green-start), var(--spotifight-orange-start));
  --gradient-background: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-mid) 50%, var(--background-gradient-end) 100%);
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

button, input, select, textarea {
  font-family: 'Poppins', sans-serif;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #050D1F;
  background: var(--dark-blue);
}

::-webkit-scrollbar-thumb {
  background: #1DB954;
  background: var(--spotify-green);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1ed760;
}

/* Classes utilitaires */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid {
  display: grid;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.4);
    box-shadow: 0 0 0 0 var(--glow-green);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(29, 185, 84, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(29, 185, 84, 0);
  }
}

/* Styles pour les focus et accessibilité */
*:focus {
  outline: 2px solid #1DB954;
  outline: 2px solid var(--spotify-green);
  outline-offset: 2px;
}

/* Liens globaux */
a {
  color: #1DB954;
  color: var(--spotify-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1ed760;
}

/* Media queries responsives pour mobile */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  body {
    font-size: 14px;
    /* Padding ajusté pour le header mobile (56px) + la banderole (18px) */
    padding-top: calc(56px + 18px); /* Header mobile + bannière intégrée */
  }
  
  .container {
    padding: 0 15px;
  }

  /* Amélioration des boutons pour mobile */
  button {
    min-height: 44px; /* Taille minimum recommandée pour le touch */
    font-size: 1rem;
  }

  /* Amélioration des inputs pour mobile */
  input, select, textarea {
    min-height: 44px;
    font-size: 16px; /* Empêche le zoom sur iOS */
  }

  /* Espacement mobile */
  .mobile-spacing {
    padding: 1rem 0.5rem;
  }

  /* Grid responsive */
  .responsive-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Navigation mobile */
  .mobile-nav-item {
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
  }

  /* Cards mobile */
  .mobile-card {
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  /* Text responsive */
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.2rem !important; }
  
  /* Touch targets */
  .touch-target {
    min-height: 44px;
    min-width: 44px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
  
  body {
    font-size: 13px;
  }
  
  .container {
    padding: 0 10px;
  }

  /* Amélioration pour petits écrans */
  button {
    min-height: 48px;
    padding: 12px 16px;
  }

  input, select, textarea {
    min-height: 48px;
    padding: 12px;
  }

  /* Spacing pour petits écrans */
  .small-mobile-spacing {
    padding: 0.5rem 0.25rem;
  }

  /* Typography pour petits écrans */
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.3rem !important; }
  h3 { font-size: 1.1rem !important; }
  
  /* Stack mobile */
  .stack-mobile {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  /* Full width mobile */
  .full-width-mobile {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Media query pour orientation paysage sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
  body {
    font-size: 12px;
  }
  
  .landscape-compact {
    padding: 0.5rem !important;
  }
}

/* Media query pour très grands écrans */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #1DB954;
  color: white;
}

.btn-primary:hover {
  background: #1ed760;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #191414;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: #1DB954;
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Utilitaires */
.text-green {
  color: #1DB954;
  color: var(--spotify-green);
}

.text-muted {
  color: #b3b3b3;
  color: var(--text-muted);
}

.bg-card {
  background: rgba(16, 34, 63, 0.8);
  background: var(--card-bg);
}

.border-green {
  border: 1px solid rgba(29, 185, 84, 0.3);
  border: 1px solid var(--border-color);
}

.shadow-green {
  box-shadow: 0 4px 15px rgba(29, 185, 84, 0.4);
  box-shadow: 0 4px 15px var(--glow-green);
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
} 
@keyframes react-loading-skeleton {
  100% {
    transform: translateX(100%);
  }
}

.react-loading-skeleton {
  --base-color: #ebebeb;
  --highlight-color: #f5f5f5;
  --animation-duration: 1.5s;
  --animation-direction: normal;
  --pseudo-element-display: block; /* Enable animation */

  background-color: var(--base-color);

  width: 100%;
  border-radius: 0.25rem;
  display: inline-flex;
  line-height: 1;

  position: relative;
  -webkit-user-select: none;
          user-select: none;
  overflow: hidden;
}

.react-loading-skeleton::after {
  content: ' ';
  display: var(--pseudo-element-display);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-repeat: no-repeat;
  background-image: linear-gradient(
      90deg,
      var(--base-color) 0%,
      var(--highlight-color) 50%,
      var(--base-color) 100%
    );
  background-image: var(
    --custom-highlight-background,
    linear-gradient(
      90deg,
      var(--base-color) 0%,
      var(--highlight-color) 50%,
      var(--base-color) 100%
    )
  );
  transform: translateX(-100%);

  animation-name: react-loading-skeleton;
  animation-direction: var(--animation-direction);
  animation-duration: var(--animation-duration);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@media (prefers-reduced-motion) {
  .react-loading-skeleton {
    --pseudo-element-display: none; /* Disable animation */
  }
}

/* globals.css - Styles globaux pour Spotifights */

/* Réinitialisation de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Variables globales */
:root {
  --primary-color: #1DB954;
  --primary-dark: #1aa34a;
  --primary-light: #3ecb6a;
  --secondary-color: #ff6b35;
  --dark-bg: #121212;
  --dark-bg-lighter: #181818;
  --dark-bg-lighter-2: #282828;
  --text-color: #f0f0f0;
  --text-secondary: #b3b3b3;
  --border-color: rgba(255, 255, 255, 0.1);
  --transition-speed: 0.3s;
  --border-radius: 8px;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Optimisations de performance */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Amélioration de l'accessibilité pour le focus */
:focus {
  outline: 2px solid #1DB954;
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #121212;
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Classes d'optimisation */
.lazy-load-image-background {
  display: block !important;
}

/* Animations optimisées */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Classes d'optimisation pour les chargements lents */
.reduced-motion * {
  animation-duration: 0.01s !important;
  animation-delay: 0s !important;
  transition-duration: 0.01s !important;
  scroll-behavior: auto !important;
}

/* Ajout de classes pour l'optimisation des performances */
.optimized-image {
  max-width: 100%;
  height: auto;
  object-fit: cover;
} 
