/* ==========================================================================
   LES REFUGES DE QUENVEL — MORGAT / CROZON (logementcrozon.bzh)
   Design System, Animations & Performance Optimizations
   ========================================================================== */

:root {
  --color-ecru: #FAF8F5;
  --color-ecru-warm: #F3F0EA;
  --color-charcoal: #14171C;
  --color-charcoal-soft: #232830;
  --color-sage: #065F46;
  --color-sage-bg: #D1FAE5;
  --color-amber-bg: #FEF3C7;
  --color-amber-text: #92400E;
  --color-airbnb: #FF385C;
  --color-oak: #C88A58;
  --color-oak-light: #F8EFE7;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-ecru);
  color: var(--color-charcoal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.font-serif-title {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #F3F0EA;
}
::-webkit-scrollbar-thumb {
  background: #D3CDC4;
  border-radius: 9999px;
  border: 2px solid #F3F0EA;
}
::-webkit-scrollbar-thumb:hover {
  background: #A8A095;
}

/* Dropdown Hover Bridge to prevent premature closing when moving mouse onto menu */
.dropdown-bridge::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
}

/* Glassmorphism Classes */
.glass-nav {
  background: rgba(250, 248, 245, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 226, 219, 0.7);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(235, 232, 225, 0.85);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Subtle Shimmer on Buttons */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer 4s infinite ease-in-out;
}

/* Image Hover Zoom Container */
.bento-image-wrap {
  overflow: hidden;
  position: relative;
}

.bento-image-wrap img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease;
}

.bento-image-wrap:hover img {
  transform: scale(1.05);
}

/* Dynamic Text Fade Animation */
.dynamic-text-fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dynamic-text-fade-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Hatched Unavailable Calendar Cell (Style Hardynb) */
#calendar-container {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cal-cell-booked {
  background-color: #F3F4F6;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(209, 213, 219, 0.45) 4px,
    rgba(209, 213, 219, 0.45) 8px
  );
  color: #D1D5DB;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Leaflet Map Custom Styling */
.leaflet-popup-content-wrapper {
  background: #FFFFFF !important;
  border-radius: 1rem !important;
  box-shadow: 0 15px 35px -5px rgba(20, 23, 28, 0.15) !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  border: 1px solid #EBE8E1 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background: #FFFFFF !important;
}

.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.custom-map-pin:hover {
  transform: scale(1.15);
}

.custom-map-pin.pin-active {
  transform: scale(1.25) !important;
  box-shadow: 0 0 0 4px rgba(6, 95, 70, 0.35), 0 8px 18px rgba(0, 0, 0, 0.35) !important;
  z-index: 1000 !important;
}

.poi-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.poi-card-active {
  border-color: #059669 !important;
  background-color: #F0FDF4 !important;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.2), 0 8px 10px -6px rgba(5, 150, 105, 0.12) !important;
  transform: translateX(4px);
}

/* Reviews Carousel */
.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .carousel-slide {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 calc(33.333% - 16px);
  }
}

/* Lightbox Modal Animation */
.modal-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Form focus glow */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.15);
  border-color: var(--color-sage);
}

/* Selection highlight */
::selection {
  background: var(--color-sage-bg);
  color: var(--color-sage);
}
