@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
  --primary: #4a90e2;
  --primary-dark: #357abd;
  --danger: #e53e3e;
  --bg: #f5f7fa;
  --text: #222;
  --card-bg: #fff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



.app-header {
  flex-shrink: 0; /* Empêche le header de rétrécir */
  padding-bottom: 4%;
}

.app-header h1 {
  flex: 1 1 100%;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  color: var(--primary);
}

.header-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex: 1 1 100%;
}

#topContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex: 1 1 100%;
}

.icon-btn {
  background: var(--card-bg);
  border: none;
  width: 60px;  /* ✅ Plus gros */
  height: 60px; /* ✅ Plus gros */
  border-radius: 50%;
  font-size: 1.8rem; /* ✅ Icônes plus grandes */
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #fff;
}

.logout-btn {
  background: var(--danger);
  border: none;
  color: white;
  font-weight: 600;
  font-size: 1.1rem; /* ✅ Texte plus gros */
  border-radius: 10px;
  padding: 0.8rem 1.5rem; /* ✅ Plus de padding */
  transition: background 0.2s ease;
  cursor: pointer;
}

.logout-btn:hover {
  background: #c53030;
}

/* Layout */
.main-grid {
  flex: 1; /* Prend tout l'espace disponible */
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 0 1rem 2rem;
  max-width: 1600px;
  margin: auto;
  width: 100%;
}

.game-card, .ranking-card {
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: transform 0.3s ease;
}

.game-card:hover, .ranking-card:hover {
  transform: translateY(-3px);
}


.welcome-message {
  margin-top: 0.5rem;
  font-size: 2rem;
  color: #333;
  text-align: center;
  /* padding-right: 1rem; */
  font-weight: 500;
  padding-top: 1%;
}



/* --- Sélection de questions du jour --- */
.question-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.question-selection h2 {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.question-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}

.question-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border-color: var(--primary);
}

.question-card.selected {
  background: #f0fff4; /* léger vert clair */
  border-color: #4caf50;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
  transform: scale(1.03);
}

.question-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.question-card p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #444;
  line-height: 1.4;
}

/* --- Bouton de choix --- */
.choose-btn {
  background: #4caf50;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.choose-btn:hover {
  background: #43a047;
  transform: scale(1.05);
}

/* --- Icônes d’étoiles --- */
.question-card h3 {
  color: #ffca28; /* jaune doré */
  letter-spacing: 2px;
}

/* Correction du curseur pour connexion */
#authBtn {
  cursor: pointer;
  display: flex;
  align-items: center; /* Centre verticalement */
  justify-content: center; /* Centre horizontalement (optionnel) */
  padding-top: 2%;
}




/* Game zone */
.event {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-weight: 600;
  margin-top: 7%;
}

.input-area {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

#inputYear {
  flex: 1;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  transition: 0.3s ease;
}

#inputYear:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(74,144,226,0.3);
  outline: none;
}

#submitBtn {
  background: var(--primary);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.1s;
}

#submitBtn:hover {
  background: var(--primary-dark);
  transform: scale(1.03);
}

/* Classement */
.ranking-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
}

#rankingList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#rankingList li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}


/* --- Classement du jour --- */
.ranking {
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.ranking:hover {
  transform: translateY(-3px);
}

.ranking h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary);
}

.ranking ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

.ranking li:last-child {
  border-bottom: none;
}

.ranking li:nth-child(1) {
  color: #FFD700; /* or */
  font-weight: 700;
}

.ranking li:nth-child(2) {
  color: #C0C0C0; /* argent */
  font-weight: 700;
}

.ranking li:nth-child(3) {
  color: #CD7F32; /* bronze */
  font-weight: 700;
}






.description {
  display: none;
  margin-top: 1.5rem;
  text-align: left;
}

.description-card {
  background: #f8fdf8;
  border-left: 5px solid #4caf50;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.5s ease forwards;
}

.description-card h4 {
  margin: 0 0 0.5rem;
  color: #4caf50;
  font-size: 1.1rem;
}

.description-card p {
  margin: 0;
  color: #333;
  line-height: 1.5;
  font-size: 0.95rem;
}

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
























/* Feedback & historique */
.feedback {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.history {
  margin-top: 1rem;
}

/* Footer */
.footer-banner {
  flex-shrink: 0; /* Empêche le footer de rétrécir */
  margin-top: 0; /* Retire le margin-top: auto si présent */
  text-align: center;
  padding: 1rem 0;
  background: var(--card-bg);
  border-top: 1px solid #e0e0e0;
  color: #555;
}

.footer-banner a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  margin: 0 0.5rem;
}

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

/* Consent banner */
.consent-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 25px;
  position: relative;
}

.consent-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  transition: color 0.2s;
}

.consent-close:hover {
  color: #000;
}



.consent-banner {
  position: fixed;
  bottom: 0; /* ✅ En bas de la page */
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  border-top: 3px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999; /* ✅ Au-dessus de tout */
  max-height: 85vh; /* ✅ Limite la hauteur */
  overflow-y: auto; /* ✅ Scroll si nécessaire */
  animation: slideUpFromBottom 0.4s ease;
}

@keyframes slideUpFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.consent-banner h3 {
  margin: 0 0 15px 0;
  font-size: 1.5rem;
  color: #333;
}

.consent-intro {
  font-size: 1rem;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.6;
}

.consent-details {
  margin: 20px 0;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

.consent-details details {
  margin: 10px 0;
  cursor: pointer;
}

.consent-details summary {
  padding: 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  user-select: none;
  transition: background 0.2s;
}

.consent-details summary:hover {
  background: #f0f0f0;
}

.consent-details ul {
  margin: 10px 0 10px 20px;
  line-height: 1.8;
}

.consent-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.consent-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Poppins', sans-serif;
}

.consent-btn-primary {
  background: #28a745;
  color: #fff;
}

.consent-btn-primary:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.consent-btn-secondary {
  background: #dc3545;
  color: #fff;
}

.consent-btn-secondary:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.consent-btn-tertiary {
  background: #6c757d;
  color: #fff;
}

.consent-btn-tertiary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.consent-footer {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-top: 15px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .consent-content {
    padding: 20px 15px;
  }

  .consent-banner h3 {
    font-size: 1.2rem;
    padding-right: 30px;
  }

  .consent-actions {
    flex-direction: column;
  }

  .consent-btn {
    width: 100%;
  }
}
#acceptAllConsent { background: #1a73e8; color: #fff; }
#acceptGoogleConsent { background: #4285f4; color: #fff; }
#acceptIpConsent { background: #34a853; color: #fff; }
#declineAnalyticsConsent { background: #e0e0e0; color: #333; }
#settingsConsent { background: #f9f9f9; color: #333; }
.consent-buttons button:hover { opacity: 0.9; }


@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

#acceptAllConsent {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
}

#acceptAllConsent:hover {
  background: var(--primary-dark);
}

#declineAnalyticsConsent {
  background: #e2e8f0;
  color: #333;
  padding: 0.6rem 1.2rem;
}

#declineAnalyticsConsent:hover {
  background: #cbd5e0;
}

#settingsConsent {
  background: transparent;
  color: var(--primary);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
    padding: 0;
    width: 100%;
    margin-top: 15%;
    padding-bottom: 5%; 
  }

  .ranking {
    width: 100%;
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
    width: 90%;
  }

  .game-card {
    padding-left: 5%;
    padding-right: 5%;
    width: 90%; /* Pour compenser le padding et éviter le débordement */
    margin: 0 auto; /* Centre la carte */
  }
  .app-header {
    padding: 1rem;
    margin-top: 5%;
  }
  .app-header h1 {
    font-size: 2rem;
  }

  .stats {
    margin-top: 21%; /* Ajuste cette valeur selon tes besoins */
  }

  .container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .input-area {
      flex-direction: column; /* Garde la direction en colonne si nécessaire */
      align-items: center; /* Centre horizontalement les éléments enfants */
      justify-content: center; /* Centre verticalement (si nécessaire) */
      gap: 0.5rem; /* Espacement entre les éléments */
      width: 100%; /* Prend toute la largeur disponible */
  }

  #submitBtn {
    margin-top: 6%;
    width: 80%;
    align-items: center;
  }

  #inputYear {
    width: 80%;
    align-items: center;
  }


  /* Header actions : affiche les éléments en colonne et centre #authBtn */
  .header-actions {
    display: flex;
    align-items: center; /* Centre horizontalement */
    gap: 0.5rem; /* Espacement entre les éléments */
    width: 100%; /* Prend toute la largeur */
  }

  /* Boutons d'icônes : affiche-les en ligne avec un espacement */
  .header-actions .icon-btn,
  .header-actions #logoutBtn {
    margin: 0.3rem;
  }

  /* #authBtn : place-le en dessous et centre-le */
  #authBtn {
    display: flex;
    justify-content: center; /* Centre le contenu horizontalement */
    width: 100%; /* Prend toute la largeur */
    margin-top: 0.5rem; /* Espace au-dessus */
    order: 1; /* Force #authBtn à être après les autres éléments */
  }

  /* Bouton de déconnexion : ajustements pour mobile */
  #logoutBtn {
    width: auto;
    margin: 0.3rem;
  }

  /* Conteneur des boutons d'icônes (optionnel) */
  #topContainer {
    display: flex;
    justify-content: center; /* Centre les boutons d'icônes */
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
  }


  .welcome-message {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
    text-align: center;
    /* padding-right: 1rem; */
    font-weight: 500;
    padding-top: 1%;
  }


  .footer-banner {
    font-size: 12px;
  }
}
