/* ============================================
   PRIMEBET - CSS MOBILE FIRST RÉUTILISABLE
   Version : 2.0
   Date : 2025-12-05
   ============================================ */

/* ------------------------------
   RESET & VARIABLES MOBILE FIRST
------------------------------ */
:root {
  /* Couleurs */
  --c-bg: #0b0f14;
  --c-bg-light: rgba(255, 255, 255, 0.03);
  --c-bg-dark: rgba(11, 15, 20, 0.95);
  --c-card: rgba(17, 24, 35, 0.95);
  --c-card-alt: rgba(255, 255, 255, 0.05);
  --c-accent: #63c3ff;
  --c-accent-2: #0e0766;
  --c-accent-glow: rgba(99, 195, 255, 0.4);
  
  /* Textes adaptatifs */
  --c-text: #eef3f7;
  --c-text-dim: #b7c3cf;
  --c-text-dim-1: #6d7481;
  --c-text-dark: #1a1a1a;
  --c-text-light: #eef3f7;
  --nav-text-color: var(--c-text-light);
  
  /* Dimensions et effets */
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px var(--c-accent-glow);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --transition: all 0.3s ease;
  
  /* Tailles responsive */
  --header-height: 60px;
  --nav-height: 50px;
  --container-padding: 16px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --line-height: 1.5;
}

@media (min-width: 768px) {
  :root {
    --container-padding: 24px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --header-height: 75px;
    --nav-height: 60px;
  }
}

/* ------------------------------
   RESET & BASE STYLES
------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: var(--line-height);
  overflow-x: hidden;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Empêche le débordement horizontal */
body, 
.container,
.appbar-inner,
.glass-nav,
.hero-central,
section {
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(99, 195, 255, 0.3);
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

/* ------------------------------
   LAYOUT & CONTAINERS MOBILE
------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  min-height: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  box-sizing: border-box;
}

.section {
  width: 100%;
  padding: 60px 0;
  position: relative;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 100px 0;
  }
}

/* ------------------------------
   APP BAR MOBILE
------------------------------ */
.appbar {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(11, 15, 20, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.appbar.scrolled {
  background: rgba(11, 15, 20, 0.98);
  box-shadow: var(--shadow);
}

.appbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
  max-width: 100%;
}

.brand img {
  height: 32px;
  width: auto;
  transition: var(--transition);
}

.brand:hover img {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .brand img {
    height: 40px;
  }
}

/* ------------------------------
   BOUTONS D'ACTION
------------------------------ */
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  cursor: pointer;
}

.action-btn:hover,
.action-btn:active {
  background: rgba(99, 195, 255, 0.15);
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

.action-btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

@media (min-width: 768px) {
  .action-btn {
    width: 40px;
    height: 40px;
  }
  
  .action-btn img {
    width: 20px;
    height: 20px;
  }
}

/* ------------------------------
   SÉLECTEUR DE LANGUE
------------------------------ */

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--c-text);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.lang-trigger:hover {
  background: rgba(99, 195, 255, 0.15);
  border-color: var(--c-accent);
}

.lang-trigger img {
  height: 14px;
  border-radius: 2px;
}

.lang-trigger svg {
  width: 10px;
  height: 10px;
}

.lang-list {
  position: fixed;
  top: calc(50px + var(--header-height) + 8px);
  right: var(--container-padding);
  min-width: 140px;
  background: var(--c-card);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 1002;
}

.langbox[aria-expanded="true"] .lang-list {
  display: block;
}

.lang-list li {
  list-style: none;
}

.lang-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--c-text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 0.9rem;
}

.lang-list button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-list img {
  height: 14px;
  border-radius: 2px;
}

/* Masquer le texte FR/EN sur mobile */
@media (max-width: 480px) {
  .lang-trigger span {
    display: none;
  }
}

/* ------------------------------
   NAVIGATION MOBILE OPTIMISÉE
------------------------------ */
.glass-nav {
  position: fixed;
  top: var(--header-height);
  left: var(--container-padding);
  right: var(--container-padding);
  z-index: 999;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  width: calc(100% - (var(--container-padding) * 2));
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--nav-text-color);
}

/* Navigation principale - 4 boutons en ligne */
.nav-primary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  min-height: 45px;
  max-height: 45px;
  position: relative;
  overflow: hidden;
}

.nav-link.primary {
  background: rgba(99, 195, 255, 0.2);
  border-color: rgba(99, 195, 255, 0.4);
}

.nav-link:hover,
.nav-link:active {
  background: rgba(99, 195, 255, 0.15);
  border-color: var(--c-accent);
}

/* Menu déroulant des pays */
.nav-expanded {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
  padding: 0;
  width: 100%;
}

.glass-nav.expanded .nav-expanded {
  max-height: 300px;
  opacity: 1;
  margin-top: 12px;
  padding: 8px;
}

.expanded-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  min-height: 40px;
}

.expanded-item:hover,
.expanded-item:active {
  background: rgba(99, 195, 255, 0.15);
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

/* Adaptations tablette */
@media (min-width: 768px) {
  .glass-nav {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 300px;
    max-width: 400px;
  }
  
  .nav-primary {
    grid-template-columns: repeat(4, auto);
    gap: 8px;
  }
  
  .nav-link {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 55px;
  }
  
  .nav-expanded {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .expanded-item {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
}

/* Adaptations desktop */
@media (min-width: 1024px) {
  .glass-nav {
    top: calc(var(--header-height) + 10px);
    max-width: 450px;
  }
  
  .nav-expanded {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------
   COULEURS ADAPTATIVES DE NAVIGATION
------------------------------ */
.glass-nav.over-light-section {
  --nav-text-color: var(--c-text-dark);
  background: rgba(255, 255, 255, 0.15);
}

.glass-nav.over-light-section .nav-link:hover,
.glass-nav.over-light-section .expanded-item:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--c-text-dark);
}

.glass-nav.over-dark-section {
  --nav-text-color: var(--c-text-light);
  background: rgba(255, 255, 255, 0.05);
}

.glass-nav.over-dark-section .nav-link:hover,
.glass-nav.over-dark-section .expanded-item:hover {
  background: rgba(99, 195, 255, 0.15);
  color: var(--c-text-light);
}

/* ------------------------------
   HERO CENTRAL MOBILE
------------------------------ */
.hero-central {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--header-height) var(--container-padding) 60px;
  text-align: center;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(99, 195, 255, 0.1) 0%, rgba(14, 7, 102, 0.2) 100%);
  border-bottom: 1px solid rgba(99, 195, 255, 0.15);
}

.hero-content {
  width: 100%;
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-logo img {
  height: 60px;
  width: auto;
  margin: 0 auto 20px;
  filter: brightness(0) invert(1);
}

.hero-title {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--c-accent), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 4vw, 1.2rem);
  color: var(--c-text-dim);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.btn {
  position: relative;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  color: white;
  box-shadow: 0 8px 25px rgba(99, 195, 255, 0.3);
}

.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(99, 195, 255, 0.4);
}

.btn-secondary {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--c-text);
}

.btn-secondary:hover,
.btn-secondary:active {
  border-color: var(--c-accent);
  transform: translateY(-3px);
}

@media (min-width: 480px) {
  .cta-grid {
    flex-direction: row;
    justify-content: center;
  }
  
  .btn {
    width: auto;
    min-width: 180px;
  }
}

@media (min-width: 768px) {
  .hero-logo img {
    height: 80px;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 40px;
  }
}

/* ------------------------------
   SECTIONS & CONTENU
------------------------------ */
.section-light {
  background: rgba(255, 255, 255, 0.95);
  color: var(--c-text-dark);
}

.section-light .section-title,
.section-light .section-subtitle,
.section-light .ranking-title,
.section-light .team-name,
.section-light .more-info-link,
.section-light .info-btn,
.section-light .tooltip,
.section-light .feature-title-refined,
.section-light .feature-description-refined {
  color: var(--c-text-dark);
}

.section-light .section-subtitle,
.section-light .feature-description-refined {
  color: #4a5568;
}

.section-dark {
  background: var(--c-bg-dark);
}

.section-accent {
  background: linear-gradient(135deg, rgba(99, 195, 255, 0.08) 0%, rgba(14, 7, 102, 0.15) 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
  width: 100%;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--c-accent);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--c-text-dim);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 60px;
  }
  
  .section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
  }
  
  .section-subtitle {
    font-size: 1.1rem;
  }
}

/* ------------------------------
   CLASSEMENT SHARP RANKING
------------------------------ */
.sharp-ranking-simple {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.ranking-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.section-light .ranking-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ranking-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-accent);
}

.ranking-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-btn {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.info-btn:hover {
  background: rgba(99, 195, 255, 0.2);
  border-color: var(--c-accent);
}

.tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-card);
  backdrop-filter: blur(20px);
  color: var(--c-text);
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--glass-border);
  z-index: 1000;
}

.info-btn:hover .tooltip {
  opacity: 1;
}

.more-info-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-accent);
  transition: var(--transition);
  text-decoration: none;
}

.more-info-link:hover {
  text-decoration: underline;
}

.ranking-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.ranking-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.ranking-item:hover {
  border-color: var(--c-accent);
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.rank-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1rem;
  color: white;
}

.team-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.team-score {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-accent);
}

@media (max-width: 480px) {
  .ranking-item {
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 12px;
  }
  
  .rank-number {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .team-name {
    font-size: 0.9rem;
  }
  
  .team-score {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .ranking-header {
    flex-direction: row;
    text-align: left;
  }
}

/* ------------------------------
   FEATURES / POURQUOI CHOISIR
------------------------------ */
.features-refined {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
}

.feature-card-refined {
  padding: 24px 20px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.feature-card-refined::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2));
  opacity: 0;
  transition: var(--transition);
}

.feature-card-refined:hover::before {
  opacity: 1;
}

.feature-card-refined:hover {
  border-color: var(--c-accent);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon-refined {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 8px 20px rgba(99, 195, 255, 0.3);
}

.feature-title-refined {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--c-accent);
  line-height: 1.3;
}

.feature-description-refined {
  color: var(--c-text-dim);
  line-height: 1.5;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .features-refined {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  .feature-card-refined {
    padding: 30px 25px;
    min-height: 280px;
  }
  
  .feature-icon-refined {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
  
  .feature-title-refined {
    font-size: 1.4rem;
  }
  
  .feature-description-refined {
    font-size: 1rem;
  }
}

/* ------------------------------
   FOOTER MOBILE
------------------------------ */
.footer-modern {
  position: relative;
  padding: 40px 0 20px;
  background: rgba(11, 15, 20, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  width: 100%;
}

.footer-content {
  text-align: center;
  width: 100%;
}

.footer-content p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-content a {
  color: var(--c-accent);
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
  margin: 8px 0;
}

.footer-content a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

/* ------------------------------
   CORRECTIONS RÉSEAUX SOCIAUX
------------------------------ */

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center; /* Centre horizontalement et verticalement */
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  color: var(--c-text);
  text-align: center;
}

.social-link:hover {
  background: var(--c-accent);
  transform: translateY(-2px);
  color: white;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .footer-modern {
    padding: 50px 0 30px;
  }
  
  .social-links {
    gap: 16px;
  }
  
  .social-link {
    width: 44px;
    height: 44px;
  }
  
  .social-link svg {
    width: 22px;
    height: 22px;
  }
}

/* ------------------------------
   ANIMATIONS & TRANSITIONS
------------------------------ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.stagger-animation > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

/* ------------------------------
   UTILITAIRES & ACCESSIBILITÉ
------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-accent { color: var(--c-accent); }
.text-dim { color: var(--c-text-dim); }
.text-dark { color: var(--c-text-dark); }
.text-light { color: var(--c-text-light); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

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

::-webkit-scrollbar-track {
  background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--c-accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-accent-2);
}

/* ------------------------------
   MEDIA QUERIES SPÉCIFIQUES
------------------------------ */

/* Très petits écrans */
@media (max-width: 360px) {
  :root {
    --container-padding: 12px;
  }
  
  .nav-primary {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  
  .nav-link {
    min-height: 45px;
    font-size: 0.75rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
}

/* Hauteur réduite */
@media (max-height: 600px) {
  .hero-central {
    min-height: 600px;
    padding-top: 80px;
  }
}

/* Orientation paysage sur mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .hero-central {
    min-height: auto;
    padding: 80px var(--container-padding) 40px;
  }
  
  .glass-nav {
    max-height: 200px;
    overflow-y: auto;
  }
}

/* Support de l'apparence de safari iOS */
@supports (-webkit-touch-callout: none) {
  .hero-central {
    min-height: -webkit-fill-available;
  }
}

/* Mode sombre/clair automatique */
@media (prefers-color-scheme: light) {
  :root {
    --c-text: #1a1a1a;
    --c-text-dim: #4a5568;
    --c-bg: #f5f7fa;
    --c-bg-dark: rgba(245, 247, 250, 0.95);
    --c-card: rgba(255, 255, 255, 0.95);
  }
  
  .glass-nav {
    background: rgba(0, 0, 0, 0.05);
  }
  
  .action-btn img {
    filter: brightness(0) invert(0);
  }
  
  .brand img {
    filter: none;
  }
}

/* Réduction des animations pour accessibilité */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus visible pour accessibilité */
.focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ------------------------------
   BACKGROUND ANIMÉ & PARTICULES
   (Optimisé pour mobile)
------------------------------ */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 195, 255, 0.15) 0%, transparent 100%),
    radial-gradient(ellipse 50% 80% at 100% 100%, rgba(14, 7, 102, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #0d131b 30%, #0a0f18 100%);
}

.floating-ball {
  position: absolute;
  width: min(60vmin, 300px);
  aspect-ratio: 1;
  top: 10vh;
  left: -10vw;
  opacity: 0.1;
  filter: drop-shadow(0 0 20px var(--c-accent-glow));
  animation: floatBall 20s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatBall {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, -10px) rotate(5deg); }
  50% { transform: translate(-5px, 5px) rotate(-3deg); }
  75% { transform: translate(10px, 3px) rotate(2deg); }
}

.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 50%;
  opacity: 0.2;
  animation: floatParticle 15s infinite linear;
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.2; }
  90% { opacity: 0.1; }
  100% { transform: translateY(-100px) translateX(20px); opacity: 0; }
}

/* Optimisation pour les performances sur mobile */
@media (max-width: 768px) {
  .floating-ball {
    animation: floatBall 30s ease-in-out infinite;
  }
  
  .particle {
    animation: floatParticle 20s infinite linear;
  }
  
  /* Réduire les effets de flou sur mobile pour les performances */
  .glass-nav,
  .appbar,
  .feature-card-refined,
  .ranking-item {
    backdrop-filter: blur(10px);
  }
}

/* Support de backdrop-filter pour Safari */
@supports not (backdrop-filter: blur(10px)) {
  .glass-nav,
  .appbar,
  .feature-card-refined,
  .ranking-item {
    background: rgba(17, 24, 35, 0.95);
  }
}

    .appbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      background: rgba(11, 15, 20, 0.8);
      backdrop-filter: blur(30px) saturate(200%);
      border-bottom: 1px solid var(--glass-border);
      transition: var(--transition);
    }

    .appbar.scrolled {
      background: rgba(11, 15, 20, 0.95);
      box-shadow: var(--shadow);
    }

    .appbar-inner {
      max-width: 1400px;
      margin: 0 auto;
      padding: 12px 24px;
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand img {
      height: 40px;
      transition: var(--transition);
    }

    .brand:hover img {
      transform: scale(1.05);
    }

    .spacer {
      flex: 1;
    }

    /* Actions */
    .actions {
      display: flex;
      gap: 8px;
    }

    .action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      background: var(--glass);
      backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .action-btn:hover {
      background: rgba(99, 195, 255, 0.15);
      border-color: var(--c-accent);
      transform: translateY(-2px);
    }

    .action-btn img {
      width: 20px;
      height: 20px;
      filter: brightness(0) invert(1);
    }



    .lang-trigger {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      background: var(--glass);
      backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      color: var(--c-text);
      cursor: pointer;
      transition: var(--transition);
    }

    .lang-trigger:hover {
      background: rgba(99, 195, 255, 0.15);
      border-color: var(--c-accent);
    }

    .lang-trigger img {
      height: 16px;
      border-radius: 3px;
    }

    .lang-list {
      position: absolute;
      top: 100%;
      right: 0;
      margin-top: 8px;
      min-width: 160px;
      background: var(--c-card);
      backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius);
      padding: 8px;
      display: none;
      box-shadow: var(--shadow);
      z-index: 1001;
    }

    .langbox[aria-expanded="true"] .lang-list {
      display: block;
    }

    .lang-list li {
      list-style: none;
    }

    .lang-list button {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border: 0;
      background: transparent;
      color: var(--c-text);
      cursor: pointer;
      border-radius: var(--radius-sm);
      transition: var(--transition);
    }

    .lang-list button:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    .lang-list img {
      height: 16px;
      border-radius: 3px;
    }

        .bg-stage {
      position: fixed;
      inset: 0;
      z-index: -2;
      pointer-events: none;
      overflow: hidden;
      background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 195, 255, 0.15) 0%, transparent 100%),
        radial-gradient(ellipse 50% 80% at 100% 100%, rgba(14, 7, 102, 0.2) 0%, transparent 60%),
        linear-gradient(180deg, #0b0f14 0%, #0d131b 30%, #0a0f18 100%);
    }

    .floating-ball {
      position: absolute;
      width: min(60vmin, 600px);
      aspect-ratio: 1;
      top: 15vh;
      left: -15vw;
      opacity: 0.1;
      filter: drop-shadow(0 0 30px var(--c-accent-glow));
      animation: floatBall 20s ease-in-out infinite;
      will-change: transform;
    }

    .floating-ball svg {
      width: 100%;
      height: 100%;
    }

    .floating-ball path {
      fill: none;
      stroke: var(--c-accent);
      stroke-width: 2;
      stroke-linecap: round;
    }

#pourquoi-pb {
  min-height: 90vh;
}

#pkpb {
  margin:auto;
  margin-top:15%;
}


/* ------------------------------
   CORRECTIONS LANGUE & HEADER
------------------------------ */

/* ------------------------------
   CORRECTIONS LANGUE - LISTE EXTERNE
------------------------------ */

/* Conteneur du sélecteur de langue */
.langbox {
  position: relative;
  height: 40px;
}

/* Le bouton reste dans le header */
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--c-text);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  height: 40px;
  white-space: nowrap;
}

/* La liste est positionnée en FIXED par rapport à la fenêtre */
.lang-list {
  position: fixed; /* Changé de absolute à fixed */
  top: calc(var(--header-height) + 8px); /* Sous le header */
  right: var(--container-padding);
  min-width: 140px;
  background: var(--c-card);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 1002;
  /* S'assurer qu'elle ne dépasse pas de l'écran */
  max-height: calc(100vh - var(--header-height) - 20px);
  overflow-y: auto;
}

/* Afficher la liste quand active */
.langbox[aria-expanded="true"] .lang-list {
  display: block;
}

/* Positionnement fixe du header pour contexte */
.appbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
}

/* Masquer le logo ET le langbox sur petits écrans */
@media (max-width: 768px) {
  .brand,
  .langbox {
    display: none !important;
  }
  
  /* Ajuster l'espacement du header sur mobile */
  .appbar-inner {
    justify-content: flex-end;
    padding: 0 var(--container-padding);
  }
  
  .actions {
    gap: 6px;
  }
  
  .action-btn {
    width: 36px;
    height: 36px;
  }

  .action-btn p {
    font-size: 1.1rem;
    color: #ffffff !important;
  }
}

/* Sur très petits écrans, ajuster encore */
@media (max-width: 480px) {
  .actions {
    gap: 4px;
  }
  
  .action-btn {
    width: 34px;
    height: 34px;
  }
}

/* S'assurer que la navigation reste sous le header */
.glass-nav {
  top: var(--header-height);
  margin-top: 8px;
}

.action-btn p {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  padding: 0;
  line-height: 1;
}

/* ------------------------------
   CORRECTIONS FOOTER MOBILE
------------------------------ */

@media (max-width: 768px) {
  /* Texte du footer en blanc sur mobile */
  .footer-modern {
    background: rgba(11, 15, 20, 0.95);
  }
  
  .footer-content p,
  .footer-content a {
    color: #ffffff !important; /* Force le texte en blanc */
  }
  
  /* Boutons de la boutique en blanc sur mobile */
  .offer-button,
  .offer-button.secondary,
  .toggle-special-offer {
    color: #ffffff !important;
  }
  
  /* Texte des boutons de la boutique */
  .offer-title,
  .offer-subtitle,
  .price-amount,
  .price-currency {
    color: var(--c-text) !important; /* Utilise la couleur du thème */
  }
}

/* ------------------------------
   CORRECTIONS SHARP RANKING MOBILE
------------------------------ */

@media (max-width: 768px) {
  /* Cacher le point d'interrogation dans le Sharp Ranking sur mobile */
  .info-btn {
    display: none !important;
  }
  
  /* Optionnel : ajuster l'espacement si le ? est caché */
  .ranking-actions {
    gap: 0;
  }
  
  /* Assure que "En savoir plus" soit visible et centré */
  .more-info-link {
    display: inline-block;
    text-align: center;
    width: 100%;
  }
}

/* ============================================
   CENTRAGE PARFAIT SVG RÉSEAUX SOCIAUX
   ============================================ */

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

/* Conteneur du lien social - grille pour centrage parfait */
.social-link {
  width: 40px;
  height: 40px;
  display: grid; /* Changé de flex à grid pour centrage parfait */
  place-items: center; /* Centre horizontalement ET verticalement */
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  color: var(--c-text);
  padding: 0;
  text-decoration: none;
}

/* SVG centré parfaitement */
.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
  margin: 0; /* Pas besoin de margin avec grid place-items */
}

.social-link:hover {
  background: var(--c-accent);
  transform: translateY(-2px);
  color: white;
}

/* Mobile - petites tailles */
@media (max-width: 480px) {
  .social-links {
    gap: 10px;
  }
  
  .social-link {
    width: 36px;
    height: 36px;
  }
  
  .social-link svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================
   SOLUTION ALTERNATIVE SI GRID NON SUPPORTÉ
   ============================================ */

/* Version de secours avec flexbox */
.social-link.flex-fallback {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.social-link.flex-fallback svg {
  display: block !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

/* ============================================
   SOLUTION CSS SIMPLE - ALIGNEMENT PARFAIT
   ============================================ */

.langbox {
  position: relative;
  display: inline-block;
}

/* Liste de langue avec positionnement dynamique */
.lang-list {
  position: fixed !important;
  top: calc(var(--header-height) + 8px) !important;
  right: 0 !important;
  min-width: 140px;
  background: var(--c-card);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 1002;
  /* Marge sera calculée par JS */
  margin-right: 0;
}

/* Pour les écrans plus larges */
@media (min-width: 1200px) {
  .lang-list {
    right: calc((100vw - 1200px) / 2 + 24px); /* Centrage avec le container */
  }
}

/* Pour desktop moyen */
@media (min-width: 769px) and (max-width: 1199px) {
  .lang-list {
    right: var(--container-padding);
  }
}

/* Afficher la liste */
.langbox[aria-expanded="true"] .lang-list {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Masquer sur mobile */
@media (max-width: 768px) {
  .langbox {
    display: none !important;
  }
}

footer a svg {
  margin-top: 23% !important;
  color: #ffffff !important;
}