:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #76b947;
  --dark: #0f0f0f;
  --gray: #666;
  --light-gray: #f9f9f9;
  --text: #333;
  --bg-gradient: linear-gradient(to bottom right, #ffffff, #eef6ff);
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  overflow-x: hidden; /* Prevent horizontal scroll when sidebar is off-screen */
}

/* HEADER */
header {
  text-align: center;
}

header h1 {
  font-size: 3em;
  margin: 0;
  color: #2b2b2b;
}

header p {
  color: var(--gray);
  margin-top: 10px;
}

h1 {
  text-align: center;
  margin: 40px 0 30px;
  font-size: 2.5rem;
  color: #2c3e50;
  letter-spacing: -0.02em;
}

/* TOP BAR */
.top-bar {
  position: relative; /* Keep relative for potential future positioning */
  top: 0;
  background-color: #1d231f;
  color: white;
  display: flex;
  justify-content: space-between; /* This is key: distribute space evenly */
  height: 50px;
  font-size: 14px;
  align-items: center;
  width: 100%;
  left: 0;
  z-index: 10;
  padding: 0 50px;
  box-sizing: border-box; /* Crucial for padding not adding to width */
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 50px;
  /* We'll use auto margins to push it to the center effectively */
  margin-right: auto; /* Pushes content to the right */
  margin-left: auto; /* Pushes content to the left, effectively centering it */
  flex-shrink: 0; /* Prevents shrinking */
  width: fit-content; /* Ensure it only takes up necessary width */
}

.top-bar-left img {
  height: 18px;
}

.top-bar-left a {
  color: white;
  text-decoration: none;
  font-size: 16px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  height: 100%;
  width: fit-content;
  flex-shrink: 0; /* Prevent it from shrinking if space is tight */
}

.reservation-button {
  color: white;
  padding: 0 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  transition: background-color 0.3s ease;
  font-size: 20px;
}

.entete {
  font-size: 16px !important;
}

.reservation-button:hover {
  color: #327a15;
}

.top-bar-social-links {
  display: flex;
  align-items: center;
  height: 100%;
  background-color: #171c18;
  padding: 0 50px;
  gap: 10px;
}

.top-bar-social-links img {
  height: 20px;
  width: 20px;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  background-color: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  width: 100%;
  z-index: 10;
}

.logo img {
  height: 110px;
  margin-left: 50px;
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end;
  height: 100%;
  padding-right: 20px;
  position: relative; /* Assure que le pseudo-élément se positionne par rapport à cet élément */
  /* L'ancienne 'border-right' est maintenant remplacée par le pseudo-élément */
}

.nav-links-desktop::after {
  content: ""; /* Essentiel pour que le pseudo-élément soit visible */
  position: absolute;
  top: 50%; /* Centre la ligne verticalement */
  right: 0; /* Place la ligne sur le bord droit */
  transform: translateY(-50%); /* Ajuste le centrage pour une hauteur égale */
  width: 2px; /* Ceci est l'épaisseur de votre ligne */
  height: 1cm; /* C'est ici que vous définissez la LONGUEUR (hauteur) de votre ligne */
  background-color: gray; /* La couleur de votre ligne, correspondant à l'ancienne bordure */
}

.nav-links-desktop a {
  margin: 0 15px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links-desktop .active {
  color: #76b947;
}

.nav-links-desktop a:hover {
  color: #76b947;
}

.nav-icons-desktop {
  display: flex;
  align-items: center;
  margin-left: 30px;
  margin-right: 50px;
}

.nav-icons-desktop svg {
  color: white;
  font-size: 18px;
  margin-left: 20px;
  cursor: pointer;
}

.nav-icons-desktop .profile-icon {
  height: 30px;
  width: 30px;
  margin-left: 20px;
  cursor: pointer;
  padding: 10px; /* Padding to create a circular clickable area */
  /* Remove padding here if you don't want it to affect the size in the normal state */
  /* If you want the icon to always have padding, but NOT to change size on hover,
       you'd need to adjust height/width to account for padding.
       However, the request implies no size change at all, so removing padding makes sense. */

  /* Set transition duration to 0s for immediate change */
  transition: background-color 0s ease, border-radius 0s ease;
}

.nav-icons-desktop .profile-icon:hover,
.nav-icons-desktop .hamburger-active {
  background-color: #76b947;
  border-radius: 50%;
  /* Ensure no padding is added or removed here if you want no size change */
  /* The size (height/width) remains fixed at 24px because no new size is specified. */
}

/* Profile Dropdown (Desktop Only) */
.profile-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
  padding: 5px;
  margin-left: 15px;
}

.profile-dropdown .dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 120px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  right: 0;
  top: 100%;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

.profile-dropdown .dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
  white-space: nowrap;
}

.profile-dropdown .dropdown-content a:hover {
  background-color: #ddd;
  color: #63ab45;
}

.profile-dropdown.open .dropdown-content {
  display: block;
}

/* Arrow indicator for Profile Dropdown */
.profile-dropdown .arrow-indicator {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 15px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #f9f9f9;
  z-index: 2;
  transform: translateY(-100%) rotate(180deg);
  transform-origin: center;
}

.profile-dropdown.open .arrow-indicator {
  display: block;
}

/* Navbar Hamburger (Mobile only) */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 40px;
  height: 35px;
  margin-right: 20px;
  border-radius: 8px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.navbar-hamburger:hover span {
  background-color: #63ab45;
}

.navbar-hamburger span {
  display: block;
  height: 3px;
  width: 24px;
  background-color: white;
  border-radius: 4px;
  margin: 3px 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.navbar-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.navbar-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: -250px; /* Hidden off-screen to the left */
  width: 250px;
  height: 100%;
  background-color: white;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1); /* Shadow for left sidebar */
  transition: left 0.3s ease-in-out;
  z-index: 100; /* Above all other content */
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  left: 0; /* Slide in */
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.sidebar-logo {
  height: 40px;
  padding: 10px;
}

.close-sidebar {
  background-color: var(--accent); /* Green background */
  border: none; /* White border for contrast */
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.close-sidebar:hover {
  background-color: #63ab45; /* Darker green on hover */
}

.sidebar-nav-links {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.sidebar-nav-links a {
  padding: 15px 20px;
  text-decoration: none;
  text-align: left;
  color: var(--text);
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.sidebar-nav-links a:hover,
.sidebar-nav-links a.active {
  background-color: #f0f0f0;
  color: #63ab45;
}

.sidebar-social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  border-top: 1px solid #eee;
  margin-top: auto; /* Push social links to the bottom of the sidebar */
}

.sidebar-social-links img {
  height: 24px;
  width: 24px;
}

/* CARDS */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.modern-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  padding: 24px;
  max-width: 320px;
  font-family: "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 5px solid #76b947;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.card-description {
  font-size: 14px;
  color: #64748b;
  margin: 12px 0 0;
}

.card-body {
  margin-top: 20px;
}

.card-date-box,
.card-participants-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #334155;
}

.icon-box {
  font-size: 18px;
  background: #76b947;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 0.95em;
  background: #f2f2f2;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.meta-item {
  flex: 1;
  text-align: center;
}

.card-participants-box .icon-box {
  background: #76b947;
}

.progress-bar {
  position: relative;
  background: #e5e7eb;
  height: 6px;
  width: 100%;
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.progress {
  background: #76b947;
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s ease-in-out;
}

.card-footer {
  text-align: center;
  margin-top: 16px;
}

.btn-inscrire {
  background-color: #76b947;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-inscrire:hover {
  background-color: #63ab45;
}

.about-text {
  text-indent: 3rem;
}

.event-info {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  height: fit-content;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-content h2 {
  font-size: 1.4em;
  margin-bottom: 10px;
}

.card-content p {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 15px;
}

.price {
  font-size: 1.2em;
  color: #63ab45;
  font-weight: bold;
}

/* GENERAL BUTTON */
.btn {
  background-color: #63ab45;
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 10px;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-width: 200px;
  text-decoration: none;
}

.btn:hover {
  background-color: #327a15;
  transform: translateY(-2px);
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

.modal-content {
  background-color: #fff;
  border-radius: 20px;
  width: 90vw;
  max-width: 1200px;
  height: fit-content;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-event {
  background-color: #fff;
  border-radius: 20px;
  width: 90vw;
  max-width: 1200px;
  height: fit-content;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: scroll;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#modal-top {
  display: flex;
  flex: 4;
  gap: 2rem;
  box-sizing: border-box;
}

#modal-img {
  flex: 3.5;
}

#modal-img img {
  width: 100%;
  height: 100%;
  border-top-left-radius: 15px;
  object-fit: cover;
  max-height: 100%;
}

#modal-text {
  flex: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-left: 2rem;
  box-sizing: border-box;
}

body.no-scroll {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

.en-tete {
  border-bottom: 1px solid #eee;
}

.en-tete h2 {
  font-size: 2rem;
  color: var(--text);
}

.en-tete p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray);
}

.en-tete .price {
  font-weight: bold;
  font-size: 1.5rem;
  color: #2a7e2a;
}

.modal-body {
  flex-grow: 1;
}

.modal-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.modal-body ul {
  padding-left: 1.5rem;
  list-style: disc;
  color: #555;
}

.modal-body li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

#modal-bottom {
  flex: 3;
  background-color: var(--light-gray);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #ddd;
  box-sizing: border-box;
}

#modal-bottom h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text);
}

#modal-bottom p {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: #444;
  max-width: 80%;
}

#modal-bottom .btn {
  width: 100%;
  max-width: 300px;
  margin-bottom: 3rem;
}

/* CLOSE BUTTON */
.close-button {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #aaa;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1001;
  transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
  color: #333;
}

/* FOOTER */
.footer {
  position: relative;
  bottom: 0;
  background-color: #1d231f;
  color: #fff;
  height: 350px;
  padding: 40px 20px;
  font-family: sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
}

.footer-section {
  flex: 1 1 220px;
  min-width: 220px;
}

.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.logo-section img {
  width: fit-content;
}

.footer-section h2 {
  color: white;
  font-weight: bold;
  margin-bottom: 15px;
}

.footer-section p,
.footer-section li,
.footer-section li a,
.checkbox {
  color: #ccc;
  font-size: 16px;
  line-height: 1.6;
  text-decoration: none;
  list-style-type: none;
}

.footer-section a:hover {
  color: #6ee07f;
}

.logo-section .logo {
  width: 80px;
  margin-bottom: 10px;
}

.social-icons a {
  display: inline-block;
  margin-right: 10px;
  background-color: #1f2b23;
  padding: 10px;
  border-radius: 50%;
  color: white;
  font-size: 14px;
}

.newsletter-form {
  display: flex;
  margin: 15px 0;
  max-width: 280px;
}

.newsletter-form input {
  flex: 1;
  padding: 10px;
  border: none;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.newsletter-form button {
  background-color: #63ab45;
  border: none;
  padding: 0 15px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-top: 10px;
}

.icon-16 {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.arrow {
  color: #6ee07f;
  font-size: 14px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-item .icon {
  background-color: #1f2b23;
  color: #6ee07f;
  font-size: 20px;
  padding: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item .text .label {
  margin: 0;
  color: #ccc;
  font-size: 14px;
}

.contact-item .text .value {
  margin: 2px 0 0 0;
  color: white;
  font-weight: 600;
  font-size: 15px;
}

/* Media Queries */
@media (max-width: 768px) {
  /* Top Bar Mobile Adjustments */
  .top-bar-left,
  .top-bar-social-links {
    display: none; /* Hide email and social icons on mobile */
  }

  .top-bar {
    justify-content: flex-end; /* Push reservation button to the right */
    padding-right: 20px;
  }

  .reservation-button {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    font-size: 14px;
  }

  /* Navbar Mobile Adjustments */
  .nav-links-desktop {
    display: none; /* Hide desktop nav links */
  }

  .nav-icons-desktop {
    /* Keep profile icon visible on mobile but not in sidebar */
    display: flex;
    align-items: center;
    margin-left: auto; /* Push icons to the right */
    margin-right: 20px; /* Adjust spacing from hamburger */
  }

  .nav-icons-desktop svg {
    margin-left: 10px; /* Adjust spacing between icons */
    display: none; /* Hide icons on mobile */
  }

  .nav-icons-desktop .profile-icon {
    margin-left: 10px; /* Adjust spacing for profile icon */
  }

  .profile-dropdown {
    padding: 0; /* Remove padding if it affects layout */
  }

  .navbar-hamburger {
    display: flex; /* Show hamburger on mobile */
  }

  .navbar {
    justify-content: space-between; /* Space out logo, icons, and hamburger */
    height: 80px;
    padding: 0 10px;
  }

  .logo img {
    margin-left: 10px;
    height: 50px;
  }

  /* General Body Scroll Control */
  body.no-scroll {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px);
  }

  /* CARDS */
  .container {
    padding: 0 10px;
  }

  .card img {
    height: 200px;
  }

  .about-text {
    overflow-y: auto;
    padding: 0 20px;
  }

body.no-scroll {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px);
}

  /* Footer Mobile Adjustments */
  .footer {
    padding: 30px 15px;
    height: auto;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

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

  .newsletter-form {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
    border-radius: 8px;
  }

  .newsletter-form button {
    margin-top: 10px;
    border-radius: 8px;
  }

  .checkbox {
    justify-content: center;
    text-align: center;
  }

  .footer-contact {
    align-items: center;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-item .icon {
    padding: 10px;
  }

  .social-icons a {
    padding: 8px;
  }

  .icon-16 {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 25px 10px;
  }

  .footer-section h2 {
    font-size: 18px;
  }

  .footer-section p,
  .footer-section li,
  .checkbox {
    font-size: 14px;
  }

  .contact-item .text .value {
    font-size: 14px;
  }

  .logo-section .logo {
    width: 60px;
  }
}
