/* ============================================
   MEMORIAEVENTIA - CUSTOM STYLES
   ============================================ */

/* Variables de couleurs - Palette MemoriaEventia */
:root {
  /* Vert culturel - couleur principale */
  --color-primary: #0F5E59;
  --color-primary-hover: #2E8A84;
  --color-primary-dark: #0A3F3B;
  
  /* Or élégant - accents */
  --color-accent: #C49A52;
  --color-accent-hover: #B38842;
  --color-accent-light: #E1C48A;
  
  /* Fond et textes */
  --color-background: #F5F1E8;
  --color-text: #000000;
  --color-text-muted: #000000;
}

/* Styles généraux */
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background-color: var(--color-background);
  color: var(--color-text);
  min-height: 100vh;
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 600;
}

/* Typographie - Titres avec Cinzel (alternative à Trajan Pro) */
h1, h2, h3, h4, h5, h6,
.page-title,
.footer-title,
.modal-title,
.form-section-title,
.eventCard .card-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Tailles de texte réduites pour meilleure lisibilité */
.eventCard .card-text,
.eventCard small,
.footer-text,
.footer-links,
.footer-contact,
.nav-link,
.badge,
.form-text,
.text-muted,
small,
.small {
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-links a,
.footer-contact li {
  font-size: 1rem;
  font-weight: 600;
}

.btn {
  font-size: 1.05rem;
  font-weight: 600;
}

.form-label {
  font-size: 1.1rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Assurer que tous les textes sont en gras */
p, span, a, td, th, li, label, input, textarea, select, .card-text {
  font-weight: 600;
}

/* Surcharges Bootstrap */
.btn-primary {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-hover) !important;
  border-color: var(--color-primary-hover) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.text-accent {
  color: var(--color-accent) !important;
}

.bg-primary {
  background-color: var(--color-primary) !important;
}

/* Header */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header {
  background-color: white;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header .container {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.header-logo {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.header-logo-img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

.header-logo:hover {
  opacity: 0.8;
}

.nav-link {
  color: var(--color-primary);
  font-size: 1.2rem;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link.active {
  color: var(--color-accent);
  font-weight: 500;
}

/* Header buttons - adaptés au fond blanc */
.header .btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: transparent;
}

.header .btn-outline-primary:hover {
  color: white;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.header .btn-outline-secondary {
  color: var(--color-text-muted);
  border-color: #dee2e6;
  background-color: transparent;
}

.header .btn-outline-secondary:hover {
  color: var(--color-text);
  background-color: var(--color-background);
  border-color: #dee2e6;
}

.header .btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
  background-color: transparent;
}

.header .btn-outline-danger:hover {
  color: white;
  background-color: #dc3545;
  border-color: #dc3545;
}

.header .btn-primary {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: white !important;
  font-weight: 600;
}

.header .btn-primary:hover {
  background-color: var(--color-primary-hover) !important;
  border-color: var(--color-primary-hover) !important;
}

/* Event Cards */
.eventCard {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.eventCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.eventCard img {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.eventCard:hover img {
  transform: scale(1.05);
}

.eventCard .badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: var(--color-primary);
  font-size: 1rem;
}

/* Bouton Favoris */
.btn-favorite {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #6c757d;
}

.btn-favorite:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-favorite i {
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.btn-favorite.active {
  color: #dc3545;
  background: rgba(255, 255, 255, 1);
}

.btn-favorite.active i {
  font-weight: 700;
}

.btn-favorite.active i.bi-heart::before {
  content: "\f415"; /* bi-heart-fill */
}

.eventCard .card-title {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.125rem;
}

.eventCard .icon-accent {
  color: var(--color-accent);
}

/* Augmentation de la taille des informations de localisation/date/heure */
.eventCard .eventCard-location,
.eventCard .eventCard-date,
.eventCard .eventCard-time,
.eventCard .small,
.eventCard small {
  font-size: 1.2rem !important;
}

/* Textes des cards en noir pour meilleure lisibilité (sauf titres) */
.eventCard .card-body,
.eventCard .card-text,
.eventCard p,
.eventCard small,
.eventCard span:not(.badge),
.card-body,
.card-text,
.card p,
.card small,
.card span:not(.badge) {
  color: #000000 !important;
}

/* Textes en noir sur fonds blancs/beige (sauf titres) */
.form-section p,
.form-section span,
.form-section label:not(.form-section-title),
.eventDetail-info-box p,
.eventDetail-info-box span,
.eventDetail-reservation p,
.eventDetail-reservation span,
.filterContainer p,
.filterContainer span,
.profile-section p,
.profile-section span,
.profile-card p:not(.page-title),
.profile-card span {
  color: #000000 !important;
}

/* Filters */
.filterContainer {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filterContainer input,
.filterContainer select,
.filterContainer .form-control,
.filterContainer .form-select {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000000 !important;
}

.filterContainer input::placeholder {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000000 !important;
}

/* Modal / Dialog */
.modal-dialog {
  max-width: 600px;
}

.modal-dialog-large {
  max-width: 900px;
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  background-color: white;
}

.modal-title {
  color: var(--color-primary);
  font-weight: 600;
}

/* Event Detail */
.eventDetail {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Pour iOS : créer un nouveau contexte de scroll */
  will-change: scroll-position;
}

/* Sur mobile : modal pleine hauteur avec scroll */
@media (max-width: 767px) {
  .eventDetail {
    padding: 0;
    align-items: flex-start;
    padding-bottom: 2rem;
  }
  
  .eventDetail-content {
    margin: 0 !important;
    border-radius: 0 !important;
    min-height: auto !important;
    max-height: none;
  }
  
  /* Ajouter du padding en bas du dernier élément pour éviter que le contenu soit coupé */
  .eventDetail-content .p-4,
  .eventDetail-content .p-md-5 {
    padding-bottom: 3rem !important;
  }
}

/* Sur desktop : modal centré avec marges */
@media (min-width: 768px) {
  .eventDetail {
    align-items: center;
    padding: 1rem;
  }
}

.eventDetail-content {
  background-color: white;
  border-radius: 0.5rem;
  max-width: 650px;
  width: 100%;
  margin: 2rem auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.eventDetail-image {
  height: 216px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .eventDetail-image {
    height: 288px;
  }
}

.eventDetail-info-box {
  background-color: var(--color-background);
  border-radius: 0.375rem;
  padding: 0.54rem;
}

.eventDetail-info-box .small,
.eventDetail-info-box .fw-medium,
.eventDetail-info-box div {
  font-size: 1.2rem !important;
}

.eventDetail-info-box .small,
.eventDetail-info-box .text-muted {
  color: #000000 !important;
}

.eventDetail-reservation {
  background-color: var(--color-background);
  border-radius: 0.5rem;
  padding: 1.08rem;
}

.eventDetail-reservation .fs-5,
.eventDetail-reservation .fw-medium,
.eventDetail-reservation span {
  font-size: 1.2rem !important;
}

.eventDetail-reservation .fs-4,
.eventDetail-info-box .fs-4 {
  font-size: 1.2rem !important;
}

/* Quantité en grand pour meilleure visibilité */
#quantity {
  font-size: 2rem !important;
}

/* Description de l'événement en noir */
#detailDescription {
  color: #000000 !important;
}

/* Réduction du padding du conteneur principal */
.eventDetail-content > div:not(.position-relative) {
  padding: 0.9rem !important;
}

@media (min-width: 768px) {
  .eventDetail-content > div:not(.position-relative) {
    padding: 1.44rem !important;
  }
}

/* Réduction proportionnelle des tailles de texte et espacements */
.eventDetail-content h2 {
  font-size: 1.44rem !important;
}

.eventDetail-content h3 {
  font-size: 0.9rem !important;
}

.eventDetail-content .fs-2 {
  font-size: 1.44rem !important;
}

.eventDetail-content .fs-3 {
  font-size: 1.08rem !important;
}

.eventDetail-content .fs-4 {
  font-size: 1.2rem !important;
}

.eventDetail-content .fs-5 {
  font-size: 1.2rem !important;
}

.eventDetail-content .fs-6 {
  font-size: 0.72rem !important;
}

.eventDetail-content .btn {
  padding: 0.36rem 0.72rem;
}

.eventDetail-content .btn-primary.w-100 {
  padding: 0.54rem 0.9rem !important;
}

.eventDetail-content .mb-3 {
  margin-bottom: 0.54rem !important;
}

.eventDetail-content .mb-4 {
  margin-bottom: 0.72rem !important;
}

.eventDetail-content .pt-4 {
  padding-top: 0.72rem !important;
}

.eventDetail-content .badge {
  font-size: 0.72rem !important;
  padding: 0.36rem 0.72rem !important;
}

.eventDetail-content .m-3 {
  margin: 0.54rem !important;
}

.eventDetail-content .gap-3 {
  gap: 0.54rem !important;
}

/* Forms */
.form-section {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-section-title {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 0.2rem rgba(201, 169, 97, 0.25);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
}

.toast {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Page titles */
.page-title {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 768px;
  margin: 0 auto;
}

/* Profile page */
.profile-card {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-section {
  background-color: var(--color-background);
  border-radius: 0.375rem;
  padding: 1rem;
}

/* Profile Header */
.profile-header {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Cartes de statistiques */
.profile-stat-card {
  background: linear-gradient(135deg, white 0%, var(--color-background) 100%);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  height: 100%;
}

/* Stat card comme bouton */
.stat-card-btn {
  cursor: pointer;
  text-align: left;
}

.stat-card-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Bordures colorées selon la section active */
.stat-card-btn[data-section="events"].active {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(15, 94, 89, 0.2);
}

.stat-card-btn[data-section="reservations"].active {
  border-color: #198754;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
}

.stat-card-btn[data-section="favorites"].active {
  border-color: #ffc107;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

/* Lien de changement de mot de passe */
.profile-header a[data-bs-target="#changePasswordModal"] {
  transition: all 0.3s ease;
}

.profile-header a[data-bs-target="#changePasswordModal"]:hover {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
  transform: scale(1.02);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: 'Cinzel', serif;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Cartes de section */
.profile-section-card {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.section-header {
  border-bottom: 2px solid var(--color-background);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.section-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  font-family: 'Cinzel', serif;
}

.section-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

/* État vide dans les sections */
.empty-state-small {
  text-align: center;
  padding: 2rem 1rem;
}

.empty-state-small i {
  display: block;
  margin: 0 auto;
}

.empty-state-small p {
  font-size: 1rem;
  margin: 0.5rem 0;
}

/* Responsive pour la page profile */
@media (max-width: 768px) {
  .profile-header {
    padding: 1.5rem;
  }

  .profile-header .d-flex {
    flex-direction: column !important;
    text-align: center;
  }

  .profile-header .btn {
    width: 100%;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .profile-section-card {
    min-height: 250px;
  }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-title {
  color: var(--color-accent);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.footer-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social-link:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li {
  display: flex;
  align-items: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
  padding-left: 0.5rem;
}

.footer-links i {
  font-size: 0.75rem;
  color: var(--color-accent);
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
}

.footer-contact i {
  color: var(--color-accent);
  font-size: 1.125rem;
  margin-top: 0.125rem;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: var(--color-accent);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 2rem 0 1.5rem;
}

.footer-bottom {
  padding-top: 1rem;
}

.footer-copyright {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-copyright p {
  margin: 0.5rem 0;
}

.footer-copyright strong {
  color: var(--color-accent);
  font-weight: 600;
}

.footer-credits {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem;
    margin-top: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-section {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-contact li {
    justify-content: center;
  }
}

/* Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cursor-pointer {
  cursor: pointer;
}

.transition-all {
  transition: all 0.2s ease-in-out;
}

/* ============================================
   SPA TRANSITIONS
   ============================================ */

/* Transitions pour le conteneur principal d'application */
#app {
  transition: opacity 0.3s ease-in-out;
  min-height: 50vh;
}

/* État de chargement lors de la navigation */
#app.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Animation d'entrée des vues */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#app > * {
  animation: fadeIn 0.3s ease-in-out;
}

/* Smooth scrolling pour la navigation */
html {
  scroll-behavior: smooth;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Loading spinner */
.spinner-border-accent {
  color: var(--color-accent);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .eventCard img {
    height: 180px;
  }
}

/* ============================================
   VALIDATION DES FORMULAIRES
   ============================================ */

/* Messages d'erreur de validation */
.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 0.95rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Champ invalide */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
  background-image: none !important;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Champ valide */
.form-control.is-valid,
.form-select.is-valid {
  border-color: #198754 !important;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
  background-image: none !important;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: #198754 !important;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

/* Bouton désactivé */
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Animation des messages d'erreur */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.invalid-feedback {
  animation: slideDown 0.2s ease-in-out;
}

/* ============================================
   HOVER CARDS (Favoris dans Profile)
   ============================================ */

/* Wrapper pour les cartes de favoris */
.favorite-card-wrapper {
  min-width: 450px;
  max-width: 50%;
  flex: 1 1 450px;
}

/* Cartes cliquables avec effet hover */
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive pour favoris */
@media (max-width: 576px) {
  .favorite-card-wrapper {
    min-width: 100%;
    max-width: 100%;
  }
}

/* ============================================
   CALENDRIER
   ============================================ */

/* Navigation du calendrier */
.calendar-navigation {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calendar-navigation h2 {
  font-family: 'Cinzel', serif;
  color: var(--color-primary);
  font-size: 1.75rem;
}

/* Container du calendrier */
.calendar-container {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* En-têtes des jours */
.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.calendar-day-name {
  text-align: center;
  font-weight: 700;
  color: var(--color-primary);
  padding: 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Corps du calendrier */
.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

/* Jour du calendrier */
.calendar-day {
  min-height: 120px;
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.5rem;
  background: white;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.calendar-day.empty {
  background: #f8f9fa;
  border-color: transparent;
}

.calendar-day.today {
  border-color: var(--color-accent);
  background: #fff8e1;
  box-shadow: 0 0 0 2px var(--color-accent) inset;
}

.calendar-day.has-events {
  background: linear-gradient(135deg, rgba(15, 94, 89, 0.05) 0%, rgba(15, 94, 89, 0.1) 100%);
  border-color: var(--color-primary);
}

.calendar-day.has-events:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 94, 89, 0.3);
  border-color: var(--color-primary-hover);
}

.calendar-day.has-events:hover .day-events {
  opacity: 0.95;
}

/* Numéro du jour */
.day-number {
  font-weight: 700;
  color: var(--color-text);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-family: 'Cinzel', serif;
}

.calendar-day.today .day-number {
  color: var(--color-accent);
  font-size: 1.3rem;
}

/* Container des événements dans un jour */
.day-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
  max-height: 80px;
}

/* Badge d'événement */
.event-badge {
  background: var(--color-primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
  pointer-events: none;
}

/* Indicateur "plus d'événements" */
.event-more-indicator {
  background: var(--color-accent);
  color: #5a4214;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.event-more-indicator i {
  font-size: 0.85rem;
}

/* Modal événements du jour */
.modal-event-card {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  background: white;
}

.modal-event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
}

.modal-event-card:last-child {
  margin-bottom: 0;
}

.modal-event-title {
  color: var(--color-primary);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.modal-event-location {
  color: var(--color-text);
  font-size: 0.9rem;
}

.modal-event-location i {
  color: var(--color-accent);
}

.modal-event-description {
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Légende du calendrier */
.legend-box {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive pour le calendrier */
@media (max-width: 992px) {
  .calendar-day {
    min-height: 100px;
  }
  
  .day-events {
    max-height: 60px;
  }
  
  .event-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .calendar-day-name {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
}

@media (max-width: 768px) {
  .calendar-day {
    min-height: 80px;
  }
  
  .day-number {
    font-size: 0.9rem;
  }
  
  .event-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }
  
  .calendar-day-name {
    font-size: 0.75rem;
    padding: 0.4rem 0.2rem;
  }
  
  .day-events {
    max-height: 50px;
  }
  
  .calendar-navigation h2 {
    font-size: 1.3rem;
  }
  
  .calendar-navigation .btn {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
  }
}

@media (max-width: 576px) {
  .calendar-container {
    padding: 0.75rem;
  }
  
  .calendar-body,
  .calendar-header {
    gap: 0.25rem;
  }
  
  .calendar-day {
    min-height: 60px;
    padding: 0.25rem;
  }
  
  .day-number {
    font-size: 0.8rem;
  }
  
  .event-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.25rem;
  }
  
  .day-events {
    max-height: 35px;
    gap: 0.15rem;
  }
  
  .calendar-day-name {
    font-size: 0.65rem;
    padding: 0.3rem 0.1rem;
  }
}

/* ============================================
   CARTE INTERACTIVE (MAP VIEW)
   ============================================ */

/* Carte Leaflet */
#map {
  width: 100%;
  z-index: 1;
}

/* Marqueur utilisateur */
.user-marker {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

/* Popups Leaflet personnalisées */
.leaflet-popup-content-wrapper {
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
}

/* Cartes d'événements dans la liste */
.event-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.event-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.event-card.border-primary {
  animation: highlight 0.5s ease-in-out;
}

@keyframes highlight {
  0%, 100% {
    background-color: white;
  }
  50% {
    background-color: rgba(15, 94, 89, 0.05);
  }
}

/* Boutons de la carte */
.event-card .btn {
  transition: all 0.2s ease;
}

.event-card .btn:hover {
  transform: scale(1.05);
}

/* Contrôles de la carte */
.form-range::-webkit-slider-thumb {
  background-color: var(--color-primary);
  cursor: pointer;
}

.form-range::-webkit-slider-thumb:hover {
  background-color: var(--color-primary-hover);
}

.form-range::-moz-range-thumb {
  background-color: var(--color-primary);
  cursor: pointer;
}

.form-range::-moz-range-thumb:hover {
  background-color: var(--color-primary-hover);
}

/* Panneau latéral scrollable */
.col-lg-4.border-end {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) #f1f1f1;
}

.col-lg-4.border-end::-webkit-scrollbar {
  width: 8px;
}

.col-lg-4.border-end::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.col-lg-4.border-end::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

.col-lg-4.border-end::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}

/* Responsive pour la carte */
@media (max-width: 991px) {
  .col-lg-4.border-end {
    height: auto !important;
    max-height: 400px;
  }
  
  #map {
    height: 500px !important;
  }
}

@media (max-width: 576px) {
  .col-lg-4.border-end {
    max-height: 300px;
  }
  
  #map {
    height: 400px !important;
  }
  
  .event-card {
    margin-bottom: 0.75rem !important;
  }
}

/* ============================================
   NAVIGATION MOBILE (Bottom Navigation)
   ============================================ */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1040;
  display: none;
  padding: 0.5rem 0;
}

@media (max-width: 767px) {
  .mobile-nav {
    display: flex !important;
    justify-content: space-around;
  }
  
  /* Cacher le bouton profile du header sur mobile car il est dans la nav mobile */
  #btnProfile {
    display: none !important;
  }
  
  /* Ajouter du padding en bas du body pour compenser la hauteur de la nav mobile */
  body {
    padding-bottom: 70px;
    overflow-x: hidden;
  }
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6c757d;
  padding: 0.5rem;
  transition: all 0.2s;
  font-size: 0.75rem;
}

.mobile-nav-item i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--color-primary);
  background-color: var(--color-background);
}

.mobile-nav-item span {
  font-weight: 600;
}
