/* ── Valeurs par défaut — écrasées par bootstrap.js ── */
:root {
  /* Couleur de marque */
  --color-primary:        #C5A028;
  --color-primary-hover:  #b08f20;
  --color-primary-faint:  rgba(197, 160, 40, 0.15);
  --color-primary-border: rgba(197, 160, 40, 0.35);

  /* Fonds personnalisables */
  --color-bg:         #111827;  /* fond général de la page    */
  --color-header-bg:  #111827;  /* fond du header / navbar    */
  --color-footer-bg:  #111827;  /* fond du footer             */
  --color-surface:    #1f2937;  /* cartes, dropdowns          */

  /* Texte sur fond de PAGE */
  --color-text:       #ffffff;
  --color-text-muted: #9ca3af;

  /* Texte sur fond de SURFACE (cartes) */
  --color-surface-title:      #ffffff;  /* titre principal des cartes            */
  --color-surface-accent:     #f87171;  /* accent/sous-titre visible sur surface */
  --color-surface-text-muted: #d1d5db;  /* texte courant à l'intérieur des cartes */

  /* Texte header / footer */
  --color-header-text: #ffffff;
  --color-footer-text: #9ca3af;
  /* (calculés dynamiquement par bootstrap.js) */

  /* Polices */
  --font-display: 'Teko',  sans-serif;
  --font-body:    'Roboto', sans-serif;
}

/* ── Typographie ────────────────────────────────────────────────────── */
body           { font-family: var(--font-body); color: var(--color-text); }
.club-display  { font-family: var(--font-display); }

/* ── Fonds dynamiques ───────────────────────────────────────────────── */
.page-bg    { background-color: var(--color-bg); }
.header-bg  { background-color: var(--color-header-bg); }
.footer-bg  { background-color: var(--color-footer-bg); }
.surface-bg { background-color: var(--color-surface); }

/* Texte themable */
.page-text          { color: var(--color-text); }
.muted-text         { color: var(--color-text-muted); }
.surface-title      { color: var(--color-surface-title); }
.surface-accent     { color: var(--color-surface-accent); }
.surface-text-muted { color: var(--color-surface-text-muted); }

/* ── Classes de marque dynamiques ──────────────────────────────────── */
.brand-text         { color: var(--color-primary); }
.brand-bg           { background-color: var(--color-primary); }
.brand-bg:hover     { background-color: var(--color-primary-hover); }
.brand-border-b     { border-bottom-color: var(--color-primary) !important; }
.brand-badge {
  background-color: var(--color-primary-faint);
  color:            var(--color-primary);
  border:           1px solid var(--color-primary-border);
}
.brand-gradient {
  background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, orange));
}

/* Texte header / footer */
.header-text { color: var(--color-header-text); }
.footer-text { color: var(--color-footer-text); }

/* Hover état lien nav */
.nav-link:hover         { color: var(--color-header-text); border-bottom-color: var(--color-primary) !important; }
.nav-link-mobile:hover  { color: var(--color-header-text); background-color: var(--color-surface); }

/* ── Slider logos partenaires ───────────────────────────────────────── */
.logos-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logos-track {
  display: flex;
  gap: 2rem;
  align-items: center;
  animation: scroll-logos 25s linear infinite;
  width: max-content;
}
.logos-track:hover { animation-play-state: paused; }

@keyframes scroll-logos {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Logo card — fond blanc pour logos UGC (JPEG fond blanc) ──────────── */
.logo-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.logo-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Slider Galerie Photos ─────────────────────────────────────────── */
.gallery-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.gallery-track {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  animation: scroll-gallery 40s linear infinite;
  width: max-content;
}
.gallery-track:hover { animation-play-state: paused; }

.gallery-card {
  width: 280px;
  height: 180px;
  border-radius: 1rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: transform 0.4s ease;
}
@media (min-width: 768px) {
  .gallery-card {
    width: 380px;
    height: 240px;
  }
}
.gallery-card:hover {
  transform: scale(1.05);
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes scroll-gallery {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Bouton avec profondeur & effet de lévitation ──────────────────────── */
.btn-lift {
  box-shadow: 0 4px 15px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.20);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.22);
}
.btn-lift:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.30);
}

/* ── Clamp texte long + bouton Lire la suite ────────────────────────────── */
.text-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-clamp.is-expanded {
  display: block;
  overflow: visible;
}
.lire-suite-btn {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}
.lire-suite-btn:hover { opacity: 0.75; }

/* ── Hero overlay (gradient géré en CSS, retiré du HTML) ─────────── */
#hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.40), rgba(0,0,0,0.60), rgba(0,0,0,0.88));
}

/* ── Filtres Hero Banner ─────────────────────────────────────────── */

/* duotone — teinte couleur de marque via mix-blend-mode */
#hero-section.hero-filter-duotone::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--color-primary);
  mix-blend-mode: color;
  opacity: 0.55;
  z-index: 5;
  pointer-events: none;
}

/* grain — texture film analogique */
#hero-section.hero-filter-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='300' height='300' filter='url(%23n)' opacity='1'/></svg>");
  background-size: 300px 300px;
  opacity: 0.18;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* zoom — Ken Burns */
#hero-section.hero-filter-zoom #hero-bg {
  animation: hero-ken-burns 18s ease-in-out infinite alternate;
}
@keyframes hero-ken-burns {
  from { transform: scale(1);    transform-origin: 50% 50%; }
  to   { transform: scale(1.12); transform-origin: 62% 42%; }
}

/* blur — fond abstrait */
#hero-section.hero-filter-blur #hero-bg {
  filter: blur(6px);
  transform: scale(1.1);
}

/* ── HUB D'ACCUEIL (ADMIN HUB VOTE WATT'POK) ── */
#hub-view {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #111625 0%, #030712 100%);
}

.hub-tile {
  cursor: pointer;
  perspective: 1000px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hub-tile-content {
  height: 100%;
  padding: 1.5rem 1.25rem;
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hub-tile:hover {
  transform: translateY(-8px) scale(1.02);
}

.hub-tile:hover .hub-tile-content {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.15);
}

.hub-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.hub-tile:hover .hub-icon {
  transform: scale(1.15) rotate(5deg);
}

.hub-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hub-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}



#btn-back-to-hub {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-right: 0.5rem;
  border-radius: 0.5rem;
}

#btn-back-to-hub:hover {
  background: var(--color-primary-faint, rgba(197, 160, 40, 0.15));
  border-color: var(--color-primary-border, rgba(197, 160, 40, 0.35));
  color: var(--color-primary, #C5A028);
}

@media (max-width: 768px) {
  .hub-tile-content {
    padding: 2rem 1.25rem;
  }
  .hub-icon {
    font-size: 2.2rem;
  }
}

/* ── MODALES PERSONNALISÉES (DE TYPE WATT'POK) ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-overlay.is-visible {
  display: flex;
}

.modal-content {
  background-color: #f3f4f6;
  padding: 1.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5), 0 10px 10px -5px rgba(0,0,0,0.5);
  width: 95%;
  max-width: 500px;
  text-align: left;
  color: #1f2937;
}

.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1rem;
}

.modal-content-scrollable {
  overflow-y: auto;
  max-height: 90vh;
}

/* ── CLASSEMENT / LEADERBOARD (ADMIN) ── */
.leaderboard-row {
  display: flex;
  align-items: center;
  background-color: #111827;
  border-bottom: 1px solid #1f2937;
  padding: 0.75rem 1rem;
  gap: 1rem;
  transition: background-color 0.2s;
}

.leaderboard-row:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.leaderboard-row:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom: none;
}

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  background-color: #1f2937;
  color: #9ca3af;
  border: 1px solid #374151;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FDB931);
  color: #8a6d0b;
  border: 2px solid #FDB931;
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
  color: #555;
  border: 2px solid #BDBDBD;
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #5a2d0c;
  border: 2px solid #A0522D;
}

.player-info {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.player-pseudo {
  font-weight: 700;
  color: white;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

.score-box {
  text-align: right;
  flex-shrink: 0;
}

.score-main {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.score-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #4b5563;
  font-weight: 600;
}

.score-kills {
  color: #ef4444;
}

@media (min-width: 768px) {
  .leaderboard-row {
    padding: 0.6rem 1.5rem;
    gap: 1.5rem;
  }
  .player-info {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .player-meta {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
  }
}

/* ── SUB TABS NAVIGATION ── */
.sub-tabs-nav {
  display: flex;
  background-color: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  overflow: hidden;
}

.sub-tabs-nav .sub-tab-btn {
  flex-grow: 1;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: center;
  min-width: fit-content;
  padding: 10px 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9ca3af;
  border-bottom: 2px solid transparent;
  background: transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.sub-tabs-nav .sub-tab-btn:hover {
  color: white;
  background-color: #1f2937;
}

.sub-tabs-nav .sub-tab-btn.active {
  color: var(--color-primary, #C5A028);
  border-bottom-color: var(--color-primary, #C5A028);
  background-color: rgba(197, 160, 40, 0.08);
}

/* ── WIZARD MODE SAISIE ── */
.ranked-item {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #3b82f6;
  padding: 0 0.5rem;
  border-radius: 6px;
  height: 48px;
  gap: 8px;
}

.rank-number {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1f2937;
  width: 30px;
  text-align: center;
}

.rank-1 .rank-number { color: #eab308; }
.rank-2 .rank-number { color: #9ca3af; }
.rank-3 .rank-number { color: #b45309; }

.ranked-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kill-input-wizard {
  width: 44px;
  height: 32px;
  text-align: center;
  background-color: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-weight: 700;
  color: #1d4ed8;
  font-size: 1rem;
}

.remove-rank-btn {
  width: 32px;
  height: 32px;
  color: #ef4444;
  background-color: rgba(254, 226, 226, 0.5);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-rank-slot {
  height: 40px;
  border-bottom: 1px dashed #e5e7eb;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  color: #9ca3af;
  font-size: 0.8rem;
}

.empty-rank-slot.next-target {
  background-color: #eff6ff;
  color: #2563eb;
  border-left: 4px solid #2563eb;
  border-bottom: 1px solid #bfdbfe;
  font-weight: 600;
}

.available-player-chip {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.available-player-chip:active {
  transform: scale(0.96);
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

#photo-menu-popover {
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.drag-handle {
  user-select: none;
}

.immersive-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: var(--admin-bg, #f3f4f6) !important;
  display: flex !important;
  flex-direction: column !important;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-marquee {
  animation: scrollMarquee linear infinite;
  will-change: transform;
}

.logo-card {
  filter: grayscale(100%) opacity(0.7);
  transition: all 0.3s ease;
}

.logo-card:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}
