/* Bouton de fermeture en haut à droite */
.close-overlay-btn-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #FE642E; /* Orange */
  cursor: pointer;
  z-index: 100;
}
.close-overlay-btn-top-right:hover {
  color: #ff5733; /* Teinte plus foncée d'orange au survol */
}

/* Texte des CGV */
.small-text {
  font-size: 0.6rem;
  color: #fff;
}

/* Animations slide */
.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.slide-in-right {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Avatars et vote-circle */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  border: 2px solid #FE642E;
}
.vote-circle {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.vote-like-highlight {
  background-color: rgba(0, 255, 0, 0.2) !important;
}
.vote-dislike-highlight {
  background-color: rgba(255, 0, 0, 0.2) !important;
}

/* Icône utilisateur et infos */
.user-icon {
  font-size: 40px;
  margin-right: 10px;
  color: #fff;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Menu principal */
.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FE642E;
  font-size: 20px;
  text-decoration: none;
  margin-right: 5px;
}
.menu-item i {
  font-size: 26px;
  margin-right: 8px;
}
.menu-item:hover {
  color: #ff5733;
  background-color: #0056b3;
  border-radius: 5px;
}

/* Propositions / Cartes */
.proposition,
.proposition-card,
.proposition.like,
.proposition.dislike {
  transition: transform 0.5s ease, opacity 0.5s ease;
  border-radius: 8px;
  border: 1px solid #344a5c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 10px;
  margin-bottom: 20px;
  position: relative;
}
.btn-vote-highlight {
  background-color: #ffc107 !important;
  transition: background-color 0.3s ease;
}
.photo-highlight {
  filter: brightness(1.2);
  transition: filter 0.3s ease;
}

/* Cartes candidats */
.card-candidat {
  border: 2px solid #FE642E;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  display: flex;
  flex-direction: column;
}
.card-candidat-header {
  text-align: center;
  padding: 10px;
  background-color: #344a5c;
}
.card-candidat-header .avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
}
.card-candidat-title {
  background-color: #344a5c;
  color: #FE642E;
  padding: 10px;
  text-align: center;
}
.card-candidat-footer {
  background-color: transparent;
  padding: 10px;
  text-align: center;
}
.card-candidat-footer a {
  margin: 0 5px;
  font-size: 1.5rem;
  color: inherit;
}
.card-candidat-footer a:hover {
  color: #FE642E;
}

/* Bio candidat */
.candidate-bio {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  color: #344a5c;
  font-size: 1rem;
}

/* Conteneurs et mise en page */
.content-container {
  margin-top: 10px;
}
main {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}
.main-page {
  margin: 0 auto;
  padding: 15px;
  margin-top: 0;
}

/* Header et navigation fixe */
.header-top-candidat-card {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  background-color: #fff;
  z-index: 1000;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.main-contenu {
  position: fixed;
  top: calc(80px + 150px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  background-color: #fff;
  z-index: 1000;
  padding: 15px;
}
.left-sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 250px;
  height: calc(100% - 60px);
  background-color: #f8f9fa;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}
.main-content {
  margin-left: 270px;
  padding: 20px;
}

/* Images arrondies */
.photo-rounded,
.theme-logo,
.proposition-icon {
  border-radius: 50%;
  object-fit: cover;
}
.theme-logo,
.proposition-icon {
  width: 40px;
  height: 40px;
}
.avatar,
.candidate-picture,
.photo-rounded {
  width: 40px;
  height: 40px;
}

/* Grilles et conteneurs */
.propositions-grid,
.container-flex,
.vote-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.container-flex {
  max-width: 1200px;
  margin: auto;
}
.left-column {
  flex: 0 0 300px;
}
.right-column {
  flex: 1;
}

/* Tableaux d'événements */
.table-event {
  margin-bottom: 40px;
}
.event-table-container {
  position: relative;
  margin-bottom: 40px;
  padding: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: rgba(255,255,255,0.95);
}
.event-table-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: -1;
}
.event-title {
  background-color: #333;
  color: orange;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
}
.candidate-name {
  font-weight: bold;
  color: #333;
}
.photo-col {
  width: 100px;
  text-align: center;
}

/* Animations diverses */
.vote-slideout {
  transform: translateX(150%);
  opacity: 0;
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-out {
  animation: fadeOut 0.5s ease-in-out;
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Boutons de vote et états */
.vote-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.bx-like.active,
.bx-dislike.active {
  color: #007bff;
  font-weight: bold;
}

/* Arrière-plan candidat et médailles */
.candidate-photo-container {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: -1;
}
.candidate-medal {
  font-size: 1.5rem;
  background: transparent;
  line-height: 1;
  position: absolute;
  top: -12px;
  left: 5px;
  font-weight: bold;
  border-radius: 50%;
  z-index: 10;
  text-align: center;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.candidate-picture {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}

/* Header responsive et menu burger */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  background-color: #344a5c;
  backdrop-filter: blur(6px);
  padding: 12px 0;
  border-bottom: 2px solid #FE642E;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.6);
}
#header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.logo-img {
  height: auto;
  max-height: 40px;
  width: auto;
  max-width: 80px;
}
#menuDropdown {
  background-color: #344a5c;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
#menuDropdown:hover {
  background-color: #FE642E;
  color: #fff;
}
.dropdown-menu {
  background-color: #344a5c;
  border: 1px solid #ffcc00;
  color: #fff;
}
.header .nav-link {
  color: #ffffff !important;
  font-weight: bold;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.header .nav-link:hover {
  background-color: #FE642E;
  transform: scale(1.05);
}

/* Contenu principal et footer */
.main {
  padding-top: 0;
  padding-bottom: 50px;
  max-width: 95%;
  margin: auto;
}
@media (max-width: 640px) {
  #header .container-fluid {
    flex-direction: column;
    align-items: center;
  }
  .logo-img {
    max-width: 100%;
    max-height: auto;
  }
  .main {
    padding-top: 100px;
  }
}
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #344a5c;
  color: white;
  text-align: center;
  padding: 8px 0;
  font-size: 0.9rem;
  box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

/* Sidebar navigation */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav .nav-item {
  padding: 5px 10px;
}
.sidebar-nav .nav-link {
  color: #344a5c;
  text-decoration: none;
  display: block;
  padding: 8px;
  border-radius: 5px;
}
.sidebar-nav .nav-link:hover {
  background: #f8f9fa;
}

/* Arrière-plan global */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #FEFEFE;
  z-index: -1;
}

/* Personnalisation des cartes */
.card-custom {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  margin-bottom: 20px;
}
.card-custom:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  z-index: 2;
}
.card-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f8f9fa;
}
.card-text {
  font-size: 1rem;
}
/* Titres */
.title h6 {
  color: black;
  font-weight: bold;
  margin-bottom: 5px;
}
.text-muted {
  color: #6c757d;
  font-size: 1rem;
}
/* Médailles */
.candidate-medal.gold { background-color: gold; color: black; }
.candidate-medal.silver { background-color: silver; color: black; }
.candidate-medal.bronze { background-color: #cd7f32; color: white; }
.candidate-medal.normal { background-color: gray; color: white; }

/* Propositions votées */
.proposition.voted {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
.proposition.voted::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid transparent;
  border-radius: 10px;
  pointer-events: none;
}
.proposition.voted.like::before {
  border-color: green;
}
.proposition.voted.dislike::before {
  border-color: red;
}
.proposition-column {
  padding: 10px;
}
.vote-avatar-container {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 3px solid transparent;
}
.proposition .w-100 {
  width: 100%;
}
.vote-highlight {
  border: 2px solid rgba(255, 255, 0, 0.7);
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.7);
  transition: border 0.5s ease, box-shadow 0.5s ease;
}
.vote-fadeout {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.vote-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  z-index: 10;
  animation: fadeIn 0.5s ease-in-out;
}
.vote-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}
.vote-name {
  color: white;
  font-size: 14px;
  font-weight: bold;
}
.candidate-highlight {
  background-color: rgba(255, 255, 0, 0.2);
  transition: background-color 0.5s ease-in-out;
}

/* Conteneur partis */
.container-partis {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Propositions avec overlay photo */
.proposition-container {
  position: relative;
  padding-top: 60px;
}
.proposition-container .photo-container {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.proposition-container .photo-container img.vote-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid white;
  background-color: #f8f9fa;
}
.proposition-container .photo-container .candidat-nom {
  font-size: 0.9rem;
  font-weight: bold;
  color: #333;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 5px;
  margin-top: 5px;
  display: none;
}
.proposition-card-header,
.proposition.like .proposition-card-header,
.proposition.dislike .proposition-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  background-color: #344a5c;
  color: #FE642E;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #FE642E;
  position: relative;
}
.proposition-card-header .vote-avatar,
.proposition.like .vote-avatar,
.proposition.dislike .vote-avatar {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.proposition-card-body h3,
.proposition-card-text h3 {
  font-size: 1.2em;
  color: #333;
  margin-bottom: 10px;
}
.proposition-card-text,
.proposition-text {
  color: #344a5c;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Alignement icônes thème et photo anonyme */
.theme-photo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.theme-photo-container .theme-logo {
  flex: 0;
}
.theme-photo-container .photo-anonymous {
  flex: 0;
  margin-left: auto;
}

/* Éléments circulaires */
.vote-circle,
.theme-logo,
.proposition-icon,
.photo-rounded,
.candidate-picture,
.category-icon {
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.theme-logo,
.proposition-icon,
.category-icon {
  width: 40px;
  height: 40px;
}
.photo-rounded,
.candidate-picture {
  width: 60px;
  height: 60px;
}

/* Boutons filtres */
.filter-btns {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 8px 15px;
  border-radius: 10px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 10px;
  margin-top: 5px;
}
.filter-button {
  padding: 5px 12px;
  font-size: 14px;
  transition: 0.2s ease-in-out;
}
.filter-button:hover {
  opacity: 0.8;
}
/* ✅ Header fixe */
header {
  height: 80px;
}

/* ✅ Bannière FIXE sous le header */
.banner-container {
  position: fixed;
  top: 50px;
  left: 0;
  width: 100%;
  height: 150px;
  background-image: url('<?= $backgroundImage ?>');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
  z-index: 999;
}

/* ✅ Main démarre SOUS la bannière */
main {
  margin-top: 80px;
  padding: 20px;
}

/* ✅ Colonne des événements */
.event-list {
  background: #f8f9fa;
  padding: 15px;
  border-right: 1px solid #ddd;
  height: 100vh;
  overflow-y: auto;
}
