body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f2f2f2;
}

#wrapper {
  max-width: 1000px;
  margin: 20px auto;
  background-color: white;
  border: 2px solid #999;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #000;
}

#header h1 {
  margin: 0;
  font-size: 28px;
}

.rouge {
  color: red;
  font-weight: bold;
}

.bleu {
  color: #0077cc;
  font-weight: bold;
}

#logo {
  height: 60px;
}

#nav {
  display: flex;
  justify-content: space-around;
  padding: 15px;
  background-color: #eef;
  border-bottom: 2px solid #999;
}

#nav button {
  padding: 10px 15px;
  font-size: 1rem;
  background-color: #cbd5f0;
  border: 1px solid #444;
  border-radius: 10px;
  cursor: pointer;
}

#main-section {
  padding: 30px;
  text-align: center;
}

#main-section h2 {
  font-size: 26px;
  color: #204080;
}

#main-section p {
  font-size: 18px;
  margin: 15px auto;
  max-width: 800px;
}

.event {
  margin-top: 30px;
  background-color: #eef2fa;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.carousel-wrapper {
  margin-top: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
}

.carousel {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 auto;
  width: 200px;
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.carousel-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.carousel-item p {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

#footer {
  background-color: #f2f2f2;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  border-top: 1px solid #ccc;
}
/* === MODAL LOGIN === */
#loginModal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loginModal.active {
  display: flex;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0,0,0,0.2);
  animation: popup 0.4s ease-out;
  min-width: 300px;
}

@keyframes popup {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.login-box h2 {
  margin-bottom: 20px;
  color: #004080;
}

.login-box input {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.login-box button {
  background-color: #004080;
  color: white;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.login-box button:hover {
  background-color: #0066cc;
}

/* === SECTIONS DU DASHBOARD === */
.section {
  display: none;
  padding: 20px;
  animation: fadeIn 0.5s ease-in-out;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === BOUTONS DASHBOARD === */
.dashboard-btn {
  margin: 10px;
  padding: 10px 15px;
  background-color: #004080;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dashboard-btn:hover {
  background-color: #0066cc;
}

/* === BOUTON DÉCONNEXION === */
.logout-button {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 12px;
  background-color: #cc0000;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.logout-button:hover {
  background-color: #990000;
}

/* === TABLEAUX === */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #004080;
  color: white;
}

tr:hover {
  background-color: #f1f1f1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}

.carousel-wrapper {
  position: relative;
}
.cv-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e6ffed;
  color: #155724;
  padding: 20px;
  border: 2px solid #28a745;
  border-radius: 10px;
  z-index: 10000;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  max-width: 400px;
  animation: slideDown 0.4s ease-out;
}
.cv-popup.error {
  background-color: #ffe6e6;
  color: #721c24;
  border-color: #dc3545;
}
.cv-popup .close-btn {
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
}
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes fadeOutUp {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}

.cv-popup.fade-out {
  animation: fadeOutUp 0.5s ease-in-out forwards;
}
.cv-popup .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: #28a745;
  width: 100%;
  animation: shrink 5s linear forwards;
}

.cv-popup.error .progress-bar {
  background-color: #dc3545;
}

@keyframes shrink {
  from { width: 100%; }
  to { width: 0%; }
}




/* --- MODALS --- */
#signupModal, #loginModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#signupModal.active, #loginModal.active {
  display: flex;
}

.login-box {
  background: white;
  padding: 30px;
  border-radius: 10px;
  position: relative;
  width: 300px;
}

.close-btn {
  position: absolute;
  top: 10px;
  left: 15px;
  cursor: pointer;
  font-size: 20px;
}

/* --- GOOGLE MAP --- */
.map-container {
  margin-top: 40px;
  padding: 20px;
  background-color: #eef2ff;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

#map {
  width: 100%;
  height: 300px;
  border-radius: 10px;
  margin-top: 15px;
}

/* --- CARROUSEL BOUTONS --- */
.carousel-btn {
  background-color: #004080;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  margin: 10px;
}

.carousel-btn:hover {
  background-color: #0066cc;
}

/* --- LIEN BOUTON --- */
.link-button {
  background: none;
  border: none;
  color: #0077cc;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 10px;
}

.categorie {
  margin: 30px auto;
  background: #f9f9f9;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 20px;
  width: 80%;
}

.categorie h3 {
  color: #004080;
  margin-bottom: 10px;
}

.categorie ul {
  list-style-type: none;
  padding: 0;
}

.categorie li {
  margin: 8px 0;
}

.categorie a {
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}

.categorie a:hover {
  text-decoration: underline;
}

.btn-chat, .btn-voice {
  display: inline-block;
  margin: 5px 5px 0 0;
  padding: 10px 15px;
  font-size: 0.95rem;
  font-weight: bold;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn-chat {
  background-color: #00a8ff;
  color: white;
}
.btn-voice {
  background-color: #9b59b6;
  color: white;
}
.btn-chat:hover, .btn-voice:hover {
  opacity: 0.85;
}
#passwordRules li {
  transition: color 0.4s ease, transform 0.3s ease;
  list-style: none;
  margin: 4px 0;
}

#passwordRules li.valid {
  color: green;
  transform: translateX(5px);
}

#passwordRules li.invalid {
  color: red;
  transform: translateX(0);
}
@keyframes fadeInResult {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.result-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.06);
  margin: 20px 0;
  animation: fadeInResult 0.4s ease;
}
.result-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ccc;
}
.result-card h3 {
  margin: 0 0 5px;
}
.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.btn.green { background: #2ecc71; color: white; }
.btn.grey { background: #bdc3c7; color: black; }
.btn.link {
  background: none;
  color: #2980b9;
  text-decoration: underline;
  border: none;
}
@keyframes fadeInResult {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


td.occupied {
  background-color: #0077cc;
  color: white;
  font-weight: bold;
}

/* ===== STYLES GÉNÉRAUX ===== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  margin: 0;
  padding: 0;
}

#wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

#main-section {
  padding: 2rem;
  min-height: 70vh;
}

h2, h3, h4 {
  color: #2c3e50;
  margin-top: 0;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #3498db;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ===== BOUTONS ET INTERACTIONS ===== */
button {
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  border: none;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-success {
  background-color: #2ecc71;
  color: white;
}

.btn-success:hover {
  background-color: #27ae60;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

/* ===== PAGE "TOUT PARCOURIR" ===== */
.categorie {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.categorie:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.categorie h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #3498db;
  border-bottom: 1px solid #ecf0f1;
  padding-bottom: 0.5rem;
}

.categorie ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.categorie li {
  margin-bottom: 0.5rem;
}

.categorie li button {
  width: 100%;
  text-align: left;
  padding: 0.8rem;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #2c3e50;
}

.categorie li button:hover {
  background-color: #e8f4fc;
  border-color: #3498db;
}

/* ===== CARTES DE COACHS ===== */
.coachs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.coach-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.coach-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.coach-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.coach-info {
  padding: 1.2rem;
}

.coach-info h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.coach-info p {
  margin: 0.3rem 0;
  color: #7f8c8d;
}

.coach-email {
  font-size: 0.9rem;
  color: #3498db !important;
}

/* ===== CALENDRIER DES CRÉNEAUX ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

th, td {
  padding: 12px 15px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

th {
  background-color: #3498db;
  color: white;
  font-weight: 600;
}

td {
  transition: background-color 0.2s;
}

td[onclick]:hover {
  background-color: #e8f4fc !important;
}

/* ===== CARTES DE RÉSULTATS ===== */
.result-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.result-card img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e0e0e0;
}

/* ===== SECTION DES SALLES DE SPORT ===== */
.salle-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.salle-card img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin: 1rem 0;
}

/* ===== CARROUSEL ===== */
.carousel-wrapper {
  position: relative;
  margin: 2rem 0;
}

.carousel {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1rem;
  padding: 1rem 0;
  scrollbar-width: none; /* Pour Firefox */
}

.carousel::-webkit-scrollbar {
  display: none; /* Pour Chrome/Safari */
}

.carousel-item {
  flex: 0 0 auto;
  width: 220px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.carousel-item:hover {
  transform: translateY(-5px);
}

.carousel-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.carousel-item p {
  padding: 0.8rem;
  text-align: center;
  margin: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.8);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInResult {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .coachs-grid {
    grid-template-columns: 1fr;
  }
  
  .result-card {
    flex-direction: column;
    text-align: center;
  }
  
  #main-section {
    padding: 1rem;
  }
}

/* ===== STYLES POUR LA PAGE SALLES ===== */
.salle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-services {
  background-color: #3498db;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-services:hover {
  background-color: #2980b9;
}

.salle-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.salle-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid #eee;
}

.salle-description {
  font-style: italic;
  color: #555;
  margin: 1rem 0;
}

.services-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.service-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid #3498db;
}

.service-price {
  color: #27ae60;
  font-weight: bold;
  margin: 0.5rem 0;
}

.btn-service {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* ===== STYLES POUR LA PAGE SERVICES ===== */
.services-page {
  max-width: 1000px;
  margin: 0 auto;
}

.btn-back {
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  border: 1px solid #eee;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-color: #3498db;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-details {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: none;
}

.service-detail-content h3 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.service-detail-content ul, 
.service-detail-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.service-detail-content li {
  margin-bottom: 0.5rem;
}

.service-calendar {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.creneaux-dispo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.creneau {
  background: #f8f9fa;
  padding: 0.8rem;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid #e0e0e0;
}

.creneau:hover {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .creneaux-dispo {
    grid-template-columns: 1fr 1fr;
  }
}

/* STYLES POUR LA PAGE D'ACCUEIL */
.welcome-container {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.welcome-message {
  flex: 1;
}

.welcome-text {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.welcome-subtext {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

.feature p {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0;
}

.btn-primary {
  background: #3498db;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #2980b9;
}

.welcome-image {
  flex: 1;
}

.welcome-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 900px) {
  .welcome-container {
    flex-direction: column;
  }
  
  .welcome-features {
    grid-template-columns: 1fr;
  }
}