/* ==========================================================================
   # VARIABLES & THEMES
   ========================================================================== */

:root {
  /* Couleurs principales */
  --primary-color: #2C3E50;
  --secondary-color: #2ecc71;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --danger-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --primary-hover: #3098f9;

  /* Couleurs par catégorie */
  --politics-color: #6f42c1;
  --artist-color: #fd7e14;
  --sport-color: #20c997;
  --business-color: #6610f2;
  --science-color: #d63384;
  --tech-color: #0dcaf0;
  --education-color: #198754;
  --health-color: #dc3545;
  --media-color: #777d3d;
  --acteur-color: #a30b0b;
  --humouriste-color: #7A6D07;
  --people-color: #264A3F;
  --webblogger-color: #797BF2;
  --other-color: #ab1a62;

  /* Valeurs par défaut (light theme) */
  --bg-color: #ffffff;
  --text-color: #333333;
  --card-bg: #f8f9fa;
  --border-color: #ddd;
  --mute-txt: dark;
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #ffffff;
  --card-bg: #1e1e1e;
  --border-color: #333;
  --mute-txt: white;
}

/* ==========================================================================
   # BASE STYLES
   ========================================================================== */

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding-top: 56px;
  transition: all 0.3s ease;
}

main {
  flex: 1;
}

footer {
  background: var(--dark-color);
  color: white;
  padding: 20px;
  margin-top: 2rem;
  text-align: center;
}

/* ==========================================================================
   # COMPONENTS
   ========================================================================== */

/* Navigation */
.navbar {
  background-color: var(--dark-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  transition: background-color 0.3s ease !important;
}

.navbar .badge {
  font-size: 0.6em;
  vertical-align: middle;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
} 

.navbar-glass {
    /* Fond transparent au départ */
    background-color: rgba(25, 25, 35, 0.2) !important; /* Fond sombre semi-transparent */
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    /* Pour que le texte reste bien lisible */
    color: white;
}

/* Quand on scroll, on renforce légèrement l'opacité */
.navbar-glass.scrolled {
    background-color: rgba(25, 25, 35, 0.8) !important; /* Un peu plus opaque */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Couleur du texte de la navbar au repos */
.navbar-glass .nav-link,
.navbar-glass .navbar-brand,
.navbar-glass .dropdown-toggle,
.navbar-glass #theme-label {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Couleur blanche quand on scroll */
.navbar-glass.scrolled .nav-link,
.navbar-glass.scrolled .navbar-brand,
.navbar-glass.scrolled .dropdown-toggle,
.navbar-glass.scrolled #theme-label {
    color: white !important;
}

/* Optionnel : effet sur les liens au hover */
.navbar-glass .nav-link:hover,
.navbar-glass .dropdown-item {
    color: var(--primary-hover) !important;
}

.navbar-glass.scrolled .nav-link:hover {
    color: #f8f9fa !important; /* blanc léger au hover */
}

[data-theme="dark"] .navbar-glass {
    background-color: rgba(15, 15, 25, 0.2) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar-glass.scrolled {
    background-color: rgba(15, 15, 25, 0.85) !important;
}

.hashicon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-body {
    color: var(--mute-txt);
}

.card-subtitle {
    color: var(--mute-txt) !important;
}


/* ==========================================================================
   # CANDIDATE CARDS
   ========================================================================== */

.row-cols-lg-3 .col {
  transition: all 0.3s ease;
}

.candidate-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--card-bg);
}

.candidate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card Image */
.candidate-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.candidate-card:hover img {
  transform: scale(1.02);
}

/* Card Body */
.candidate-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: calc(100% - 250px);
}

.candidate-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.candidate-card .card-subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-color);
  opacity: 0.7;
}

.candidate-card .card-text {
  flex-grow: 1;
  margin: 1rem 0;
  color: var(--text-color);
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Card Footer */
.candidate-card .card-footer {
  background: transparent;
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* Badge Category */
.candidate-card .badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.5rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  color: white;
}

/* Button Group */
.candidate-card .btn-group {
  display: flex;
  gap: 0.5rem;
}

.candidate-card .btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.candidate-card .btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.candidate-card .btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.candidate-card .btn-outline-secondary {
  border-color: var(--border-color);
  color: var(--text-color);
}

.candidate-card .btn-outline-secondary:hover {
  background-color: var(--border-color);
}

/* Vote Button Animation */
.vote-btn {
  position: relative;
  overflow: hidden;
}

.vote-btn:hover::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(30deg);
  animation: shine 1.5s infinite;
}

@keyframes shine {
  100% {
    left: 150%;
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .candidate-card img {
    height: 200px;
  }

  .candidate-card .card-body {
    height: calc(100% - 200px);
  }
}

@media (max-width: 768px) {
  .candidate-card {
    margin-bottom: 1.5rem;
  }
}
/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.vote-btn:hover {
  animation: pulse 1s infinite;
}

/* Dropdowns */
.dropdown-menu {
  min-width: 200px;
}

.dropdown-item {
  padding: 0.5rem 1.5rem;
}

/* Badges */
.badge-category {
  font-size: 0.8rem;
  padding: 0.35em 0.65em;
  margin-right: 0.5rem;
}

.badge-POLITICS { background-color: var(--politics-color); }
.badge-ARTIST { background-color: var(--artist-color); }
.badge-SPORT { background-color: var(--sport-color); }
.badge-BUSINESS { background-color: var(--business-color); }
.badge-SCIENCE { background-color: var(--science-color); }
.badge-TECH { background-color: var(--tech-color); }
.badge-EDUCATION { background-color: var(--education-color); }
.badge-HEALTH { background-color: var(--health-color); }
.badge-MEDIA { background-color: var(--media-color); }
.badge-ACTEUR {background-color : var(--acteur-color);}
.badge-HUMOURISTE {background-color : var(--humouriste-color);}
.badge-PEOPLE {background-color : var(--people-color);}
.badge-WEBBLOGGER {background-color : var(--webblogger-color);}
.badge-OTHER { background-color: var(--other-color); }


/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;

}


.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
  color: var(--mute-txt) !important;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* ==========================================================================
   # UTILITIES
   ========================================================================== */

.adflog {
  width: 35px;
  height: 35px;
  margin-right: 12px;
}


.mute-vs {
    color: var(--mute-txt);
}

/* ==========================================================================
   # ANIMATIONS
   ========================================================================== */

@keyframes pulse {F
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}


.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  list-style: none;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
}

.pagination a,
.pagination strong,
.pagination span {
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease; /* Transition douce sur tout */
  min-width: 36px;
  text-align: center;
}

/* Lien normal */
.pagination a {
  color: #555;
  border: 1px solid #ddd;
}

/* Hover : effet smooth */
.pagination a:hover {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

/* Page active (current) */
.pagination strong {
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Points de suspension */
.pagination span {
  color: #aaa;
  padding: 8px 0;
  min-width: auto;
}

/* Désactiver le hover sur les points */
.pagination span:hover {
  background: none;
  transform: none;
  box-shadow: none;
}


/* ==========================================================================
   # LANDING PAGE – Modern & Pro (compatible Dark/Light)
   ========================================================================== */

/* Hero Section */
.landing-modern .hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 100px 5%;
  gap: 40px;
  background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
  color: white;
  border-bottom: 1px solid var(--border-color);
}

.landing-modern .hero-content h1 {
  font-size: 3.2em;
  font-weight: 800;
  margin: 0 0 20px 0;
  line-height: 1.1;
}

.landing-modern .highlight {
  color: var(--warning-color);
}

.landing-modern .hero-content .lead {
  font-size: 1.3em;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 0 30px 0;
}

.landing-modern .cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.landing-modern .btn-lg {
  font-size: 1.1em;
  padding: 16px 32px;
}

.landing-modern .btn-xl {
  font-size: 1.3em;
  padding: 18px 40px;
}

.landing-modern .btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.landing-modern .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.landing-modern .score-badge {
  display: inline-block;
  width: 140px;
  height: 140px;
  background: white;
  color: var(--dark-color);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin: 0 auto 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.landing-modern .score-value {
  font-size: 2.5em;
}

.landing-modern .score-label {
  font-size: 0.9em;
  text-transform: uppercase;
}

.landing-modern .example-name {
  font-size: 1.1em;
  opacity: 0.9;
  margin: 0;
  font-style: italic;
}

/* Trust Section */
.landing-modern .trust {
  padding: 80px 5%;
  background: var(--bg-color);
  color: var(--text-color);
}

.landing-modern .container {
  max-width: 1200px;
  margin: 0 auto;
}

.landing-modern .section-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 16px;
  color: var(--dark-color);
}

[data-theme="dark"] .landing-modern .section-title,
[data-theme="dark"] .landing-modern .section-subtitle {
  color: var(--light-color);
}

.landing-modern .section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 1.1em;
  color: #666;
}

[data-theme="dark"] .landing-modern .section-subtitle {
  color: #aaa;
}

.landing-modern .cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.landing-modern .card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  transition: transform 0.3s ease;
}

.landing-modern .card:hover {
  transform: translateY(-5px);
}

.landing-modern .card .icon {
  font-size: 2.5em;
  margin-bottom: 16px;
}

.landing-modern .card h3 {
  font-size: 1.4em;
  margin: 0 0 12px 0;
  color: var(--primary-color);
}

/* How It Works */
.landing-modern .how-it-works {
  padding: 80px 5%;
  background: var(--card-bg);
  color: var(--text-color);
}

.landing-modern .steps {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
  justify-content: center;
}

.landing-modern .step {
  text-align: center;
  flex: 1;
  min-width: 250px;
  max-width: 320px;
  padding: 20px;
}

.landing-modern .step-number {
  display: block;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  line-height: 50px;
  font-weight: bold;
  margin: 0 auto 16px;
  font-size: 1.3em;
}

.landing-modern .step h3 {
  font-size: 1.3em;
  color: var(--dark-color);
  margin-bottom: 12px;
}

[data-theme="dark"] .landing-modern .step h3 {
  color: var(--light-color);
}

/* Final CTA */
.landing-modern .final-cta {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.landing-modern .final-cta h2 {
  font-size: 2.2em;
  margin-bottom: 16px;
}

.landing-modern .final-cta p {
  font-size: 1.2em;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 30px;
}


/* CSS */
.button-ld {
  padding: 0.6em 2em;
  border: none;
  outline: none;
  color: rgb(255, 255, 255);
  background: #111;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button-ld:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-button-85 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

@keyframes glowing-button-ld {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.button-ld:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #222;
  left: 0;
  top: 0;
  border-radius: 10px;
}



/* Footer */
.landing-modern .landing-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #888;
  border-top: 1px solid var(--border-color);
}

.landing-modern .landing-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.landing-modern .landing-footer a:hover {
  text-decoration: underline;
}



/* ==========================================================================
   # MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }

  .card {
    margin-bottom: 1.5rem;
  }
}

/* Responsive : réduit les paddings sur petits écrans */
@media (max-width: 480px) {
  .pagination {
    gap: 4px;
    font-size: 13px;
  }
  .pagination a,
  .pagination strong {
    padding: 6px 10px;
  }
}


@media (max-width: 900px) {
  .landing-modern .hero {
    flex-direction: column;
    text-align: center;
  }

  .landing-modern .hero-content .lead,
  .landing-modern .section-subtitle {
    max-width: 100%;
  }

  .landing-modern .cta-group {
    justify-content: center;
  }
}


@media (max-width: 991.98px) {
    body {
        padding-top: 90px;
    }
}

@media (max-width: 600px) {
  .landing-modern .hero-content h1 {
    font-size: 2.5em;
  }

  .landing-modern .section-title {
    font-size: 2em;
  }

  .landing-modern .final-cta h2 {
    font-size: 1.8em;
  }
}