/* Custom site styles - Coastal Theme ✨ */

/* Color Palette - Cozy Littoral/Coastal Theme */
:root {
  --coastal-blue: #4A90A4;
  --soft-sand: #F4E4C1;
  --warm-white: #FFF9F0;
  --sea-foam: #8CBCB9;
  --deep-ocean: #2C5F7C;
  --sunset-coral: #E8A598;
  --light-gray: #F5F5F5;
  --navbar-logo-spacing: 80px;
  
  /* Light mode specific */
  --bg-color: #FFF9F0;
  --text-color: #333;
  --card-bg: white;
  --section-border: #eee;
}

/* Dark Mode - Seaside Night Theme */
body.dark-mode {
  --bg-color: #0F1419;
  --text-color: #E8E6E3;
  --card-bg: #1A2332;
  --section-border: #2A3F5F;
  --coastal-blue: #5BA3BA;
  --soft-sand: #D4C4A8;
  --warm-white: #1A2332;
  --sea-foam: #6B9B98;
  --deep-ocean: #4A7A9C;
  --sunset-coral: #D19587;
  --light-gray: #2A3F5F;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header styling with coastal colors */
.site-header {
  background: linear-gradient(135deg, var(--coastal-blue) 0%, var(--sea-foam) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
}

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

/* Navigation lists */
.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
  align-items: center;
}

.nav-left {
  flex: 1;
  justify-content: flex-end;
}

.nav-right {
  flex: 1;
  justify-content: flex-start;
}

/* Logo in the center */
.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Navigation links */
.nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  display: block;
}

.nav-list a:hover {
  color: var(--soft-sand);
  transform: translateY(-2px);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 2px;
  background-color: white;
  position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 2px;
  background-color: white;
  position: relative;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 6px;
}

/* Mobile responsive design */
@media (max-width: 991px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
  }
  
  .nav-list.active {
    display: flex;
  }
  
  .nav-left,
  .nav-right {
    justify-content: center;
  }
  
  .logo-link {
    order: -1;
    margin: 0 auto;
  }
  
  .nav-list a {
    text-align: center;
    width: 100%;
  }
}

/* Banner with better proportions */
.banner {
  position: relative;
  width: 100%;
  height: 35vh;
  min-height: 200px;
  max-height: 400px;
  background: url("public/img/projet_pornichet_2027.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.2);
}

/* Overlay for readability */
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44, 95, 124, 0.4) 0%, rgba(74, 144, 164, 0.3) 100%);
}

/* Banner text styling */
.banner h1 {
  position: relative;
  font-size: 2.5rem;
  font-weight: bold;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner p {
  position: relative;
  font-size: 1.2rem;
  z-index: 1;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Section styling */
section {
  padding: 40px 0;
  border-bottom: 1px solid var(--section-border);
}

section h2 {
  margin-bottom: 20px;
  font-size: 2rem;
  font-weight: 600;
  color: var(--deep-ocean);
}

section p, section li {
  color: var(--text-color);
  line-height: 1.6;
}

/* Card styling with coastal theme */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body.dark-mode .card {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(74, 144, 164, 0.2);
}

.card-title {
  color: var(--deep-ocean);
  font-weight: 600;
}

/* Image styling */
.img-fluid.rounded.shadow {
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

.custom-video {
  width: 100%;
  max-width: 500px;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Footer with coastal colors */
footer {
  background: linear-gradient(135deg, var(--deep-ocean) 0%, var(--coastal-blue) 100%);
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
  font-size: 0.95rem;
  color: white;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

footer p {
  margin-bottom: 5px;
}

footer .small {
  font-size: 0.8rem;
  opacity: 0.9;
}

footer a {
  color: var(--soft-sand);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Container improvements */
.container {
  max-width: 1200px;
}

/* Button styling */
.btn-primary {
  background-color: var(--coastal-blue);
  border-color: var(--coastal-blue);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--deep-ocean);
  border-color: var(--deep-ocean);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}

/* Weather bar styling */
.weather-bar {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
}

.weather-bar.weather-loaded {
  opacity: 1;
}

.weather-bar:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.weather-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.weather-link:hover {
  color: white;
  opacity: 0.95;
}

.weather-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.weather-temp {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.weather-location {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Weather page specific styles */
.weather-card-large {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 2rem;
}

/* Weather dashboard cards - compact and modern */
.weather-dashboard-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  height: 100%;
  min-height: 200px;
}

/* Square weather card for today's weather */
.weather-square-card {
  aspect-ratio: 1 / 1;
  min-height: auto;
}

body.dark-mode .weather-dashboard-card {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.weather-icon-dashboard {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.advice-icon {
  font-size: 4rem;
}

/* Horizontal forecast card */
.weather-forecast-horizontal {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow-x: auto;
}

body.dark-mode .weather-forecast-horizontal {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.forecast-day-item {
  flex: 1;
  min-width: 100px;
  padding: 0.75rem;
  border-right: 1px solid var(--section-border);
}

.forecast-day-item:last-child {
  border-right: none;
}

.forecast-icon-small {
  font-size: 2rem;
}

.forecast-precip-text {
  font-size: 0.75rem;
  min-height: 1rem;
}

/* Compact tide link card */
.tide-link-card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background: var(--card-bg);
}

body.dark-mode .tide-link-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tide-link-card .card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.weather-icon-large {
  font-size: 6rem;
  margin-bottom: 1rem;
}

.forecast-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.forecast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(74, 144, 164, 0.2);
}

.forecast-icon {
  font-size: 3rem;
  margin: 1rem 0;
}

.temp-max {
  font-weight: 600;
  color: var(--deep-ocean);
}

.temp-min {
  color: #888;
}

/* Dark mode: Improve text contrast for Bootstrap classes */
body.dark-mode .text-muted {
  color: #bdc3c7 !important;
}

body.dark-mode .text-secondary {
  color: #cbd0d5 !important;
}

body.dark-mode .temp-min {
  color: #b0b8c0;
}

body.dark-mode .small {
  color: var(--text-color);
}

/* Tide cards styling */
.tide-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, rgba(74, 144, 164, 0.05) 0%, rgba(140, 188, 185, 0.05) 100%);
}

.tide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(74, 144, 164, 0.2);
}

.sea-emoji {
  font-size: 3rem;
  display: inline-block;
}

/* Mobile weather adjustments */
@media (max-width: 991.98px) {
  .weather-bar {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

/* Secret Door Easter Egg */
.secret-door {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.10;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  user-select: none;
}

.secret-door:hover {
  opacity: 0.8;
  transform: scale(1.2) rotate(5deg);
}

/* Emergency Numbers Card - Clear but subtle */
.emergency-card {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.emergency-item {
  text-align: center;
  padding: 0.5rem;
}

.emergency-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.emergency-item strong {
  display: block;
  color: var(--deep-ocean);
  margin-bottom: 0.25rem;
}

.emergency-item p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
}

/* Dark mode toggle button - Fixed at bottom left */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dark-mode-toggle {
  background: rgba(74, 144, 164, 0.3);
  backdrop-filter: blur(10px);
}

body.dark-mode .dark-mode-toggle:hover {
  background: rgba(74, 144, 164, 0.5);
}

/* Dark mode accordion styling */
body.dark-mode .accordion-item {
  background-color: var(--card-bg);
  border-color: var(--section-border);
}

body.dark-mode .accordion-button {
  background-color: var(--card-bg);
  color: var(--text-color);
}

body.dark-mode .accordion-button:not(.collapsed) {
  background-color: var(--deep-ocean);
  color: white;
}

body.dark-mode .accordion-body {
  background-color: var(--card-bg);
  color: var(--text-color);
}

/* Dark mode banner overlay */
body.dark-mode .banner::before {
  background: linear-gradient(135deg, rgba(15, 20, 25, 0.6) 0%, rgba(26, 35, 50, 0.5) 100%);
}

/* Dark mode emergency card */
body.dark-mode .emergency-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, #1F2D3D 100%);
}

/* Activities map styling */
#map {
  height: 600px;
  width: 100%;
}
