@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
  --primary-pink: #e91e63;
  --primary-pink-dark: #c2185b;
  --accent-red: #d32f2f;
  --accent-green: #388e3c;
  --accent-blue: #1976d2;
  --accent-orange: #f57c00;
  
  --bg-gradient: linear-gradient(135deg, #fdfbf7 0%, #f4efe6 100%);
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(233, 30, 99, 0.12);
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  
  --text-main: #2c3e50;
  --text-muted: #607d8b;
  --text-light: #78909c;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(233, 30, 99, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --font-main: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-hand: 'Caveat', cursive;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-gradient: linear-gradient(135deg, #18191c 0%, #0d0e10 100%);
  --card-bg: rgba(30, 32, 38, 0.9);
  --card-border: rgba(233, 30, 99, 0.25);
  --sidebar-bg: rgba(24, 26, 32, 0.9);
  --text-main: #f0f2f5;
  --text-muted: #b0bec5;
  --text-light: #90a4ae;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header Banner */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid rgba(233, 30, 99, 0.15);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="dark"] .site-header {
  background: rgba(20, 21, 26, 0.95);
  border-bottom-color: rgba(233, 30, 99, 0.3);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-pink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--text-main);
}

.poem-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.original-header-banner {
  max-height: 190px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 4px 12px rgba(233, 30, 99, 0.15));
  transition: transform 0.3s ease;
}

.original-header-banner:hover {
  transform: scale(1.03);
}

[data-theme="dark"] .original-header-banner {
  background: #1e2026; /* Change ici la couleur de fond (ex: un fond sombre assorti à tes cartes) */
  padding: 6px;
  border-radius: 12px;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

.theme-toggle-btn {
  background: rgba(233, 30, 99, 0.08);
  border: 1px solid var(--card-border);
  color: var(--primary-pink);
  padding: 0.6rem 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle-btn:hover {
  background: var(--primary-pink);
  color: white;
  transform: translateY(-2px);
}

/* Layout App Structure */
.app-layout {
  max-width: 1350px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 2rem;
  align-items: start;
}

.app-layout.public-layout {
  grid-template-columns: 275px 1fr;
  gap: 1.75rem;
}

.left-sidebar-public {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.9em; /* 10% plus petit */
}

.left-sidebar-public .form-input {
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
}

.left-sidebar-public .btn-primary {
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem;
}

/* Sidebar Component */
.sidebar {
  background: var(--sidebar-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.widget-card {
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  padding-bottom: 1.25rem;
}

[data-theme="dark"] .widget-card {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.widget-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.widget-header {
  background: linear-gradient(135deg, #7cb342 0%, #43a047 100%);
  color: white;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 10px rgba(67, 160, 71, 0.25);
  margin-bottom: 1rem;
}

.widget-header.identification {
  background: linear-gradient(135deg, #8e24aa 0%, #e91e63 100%);
  box-shadow: 0 4px 10px rgba(233, 30, 99, 0.25);
}

.widget-header.nav-header {
  background: linear-gradient(135deg, #0288d1 0%, #0097a7 100%);
  box-shadow: 0 4px 10px rgba(2, 136, 209, 0.25);
}

/* Menu Items List */
.nav-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.3;
}

.nav-item-btn:hover {
  background: rgba(233, 30, 99, 0.08);
  color: var(--primary-pink);
  transform: translateX(4px);
}

.nav-item-btn.active {
  background: var(--primary-pink);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.menu-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-weight: 700;
  margin: 1.2rem 0 0.5rem 0.5rem;
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--primary-pink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-title small {
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Login Form Components */
.login-box {
  max-width: 450px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
}

[data-theme="dark"] .form-input {
  background: rgba(40, 42, 50, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(233, 30, 99, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.45);
}

.btn-secondary {
  background: rgba(233, 30, 99, 0.1);
  color: var(--primary-pink);
  border: 1px solid rgba(233, 30, 99, 0.2);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: var(--primary-pink);
  color: white;
}

.credentials-hint {
  background: rgba(255, 193, 7, 0.15);
  border-left: 4px solid #ffb300;
  padding: 0.9rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  margin-top: 1.5rem;
  color: var(--text-main);
}

/* Countdown Module */
.timer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.timer-box {
  background: rgba(233, 30, 99, 0.05);
  border: 1px solid rgba(233, 30, 99, 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem 0.5rem;
  text-align: center;
}

.timer-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-pink);
  font-family: var(--font-serif);
}

.timer-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Welcome Announcement Card */
.event-hero {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.05) 0%, rgba(255, 235, 238, 0.5) 100%);
  border-left: 5px solid var(--primary-pink);
}

[data-theme="dark"] .event-hero {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(40, 30, 35, 0.5) 100%);
}

.event-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.info-badge {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .info-badge {
  background: rgba(40, 42, 50, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

.info-icon {
  font-size: 1.8rem;
  color: var(--primary-pink);
  flex-shrink: 0;
}

/* Interactive Map Container */
.map-frame-container {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

/* Photo Gallery Grid & Lightbox */
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-card:hover img {
  transform: scale(1.06);
}

.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  color: white;
}

.photo-card:hover .photo-card-overlay {
  opacity: 1;
}

.photo-title {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  object-fit: contain;
}

.lightbox-caption {
  color: white;
  margin-top: 1rem;
  font-size: 1.1rem;
  text-align: center;
  font-family: var(--font-serif);
}

.lightbox-close-btn,
.lightbox-prev-btn,
.lightbox-next-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close-btn:hover,
.lightbox-prev-btn:hover,
.lightbox-next-btn:hover {
  background: var(--primary-pink);
}

.lightbox-close-btn { top: -60px; right: 0; }
.lightbox-prev-btn { left: -70px; top: 50%; transform: translateY(-50%); }
.lightbox-next-btn { right: -70px; top: 50%; transform: translateY(-50%); }

/* Responsive adjustments */
@media (max-width: 992px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .poem-text {
    font-size: 1.25rem;
  }
  .brand-title {
    font-size: 1.8rem;
  }
  .lightbox-prev-btn { left: 10px; }
  .lightbox-next-btn { right: 10px; }
}

@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .poem-container {
    flex-direction: column;
    text-align: center;
  }
  .timer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
