/* ==========================================================================
   LA P'TITE HALLE - FEUILLE DE STYLE PRINCIPALE
   Identité visuelle : Épicerie Fine & Produits Locaux du Bassin d'Arcachon
   ========================================================================== */

/* Police de titre personnalisée (remplace Yellowtail) */
@font-face {
  font-family: 'Thirsty Script';
  src: url('../fonts/ThirstyScriptExtraBoldDemo.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Police du bloc de marque "P'tite Halle" (reprend la typo du logo) */
@font-face {
  font-family: 'Moon Get';
  src: url('../fonts/moon_get-Heavy.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* À utiliser uniquement autour du texte "P'tite Halle" */
.font-moonget {
  font-family: 'Moon Get', sans-serif;
  text-transform: uppercase;
  font-size: 0.82em;
  letter-spacing: 0.04em;
  vertical-align: 0.15em;
}

/* Apostrophe renforcée (Moon Get n'a qu'une seule graisse) */
.font-moonget .apostrophe {
  font-weight: bolder;
  -webkit-text-stroke: 0.5px currentColor;
}

/* Variables de thème (Design Tokens) */
:root {
  --color-primary: #8f4b42;
  --color-primary-container: #c97e6c;
  --color-primary-fixed: #ffdad5;
  --color-primary-card: #c97e6c;
  --color-secondary: #5c614d;
  --color-secondary-container: #e0e5cc;
  --color-tertiary: #715a48;
  --color-tertiary-container: #af937f;
  --color-surface: #fbf9f8;
  --color-surface-bright: #ffffff;
  --color-surface-container: #efedec;
  --color-surface-container-low: #f5f3f2;
  --color-surface-container-high: #e9e8e7;
  --color-on-surface: #1b1c1b;
  --color-on-surface-variant: #534341;
  --color-outline: #867370;
  --color-outline-variant: #d8c1be;
  
  --font-headline: 'Thirsty Script', 'Yellowtail', cursive;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-label: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease-out;
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 30px -5px rgba(143, 75, 66, 0.08);
  --shadow-hover: 0 20px 40px -8px rgba(0, 0, 0, 0.12);
}

/* Thirsty Script n'a pas de glyphe apostrophe : on la remplace par celle de Newsreader italique */
.script-apostrophe {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 500;
}

/* Badge reCAPTCHA v3 : masqué globalement (flottant sur toutes les pages par
   défaut) puisque la mention légale requise par Google est affichée à la
   place, directement sous le bouton d'envoi du formulaire de contact. */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* Base HTML & Smooth Scroll */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--color-primary-container);
  color: #ffffff;
}

/* Material Symbols configuration */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Utilitaires Scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Typographies spéciales */
.font-headline {
  font-family: var(--font-headline);
}
.font-serif {
  font-family: var(--font-serif);
}
.font-body, .font-label {
  font-family: var(--font-body);
}

/* ==========================================================================
   NAVBAR & EFFET AU DÉFILEMENT (STICKY)
   ========================================================================== */
#main-nav {
  transition: background-color 0.4s ease, padding 0.3s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#main-nav.nav-scrolled {
  background-color: rgba(251, 249, 248, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Logo réduit au défilement sur mobile : évite qu'il déborde de la barre
   (fixe, hauteur réduite) et chevauche le contenu de la page en dessous. */
@media (max-width: 640px) {
  #main-nav img {
    transition: height 0.3s ease, margin-top 0.3s ease;
  }
  #main-nav.nav-scrolled img {
    height: 3.5rem !important;
    margin-top: 0 !important;
  }
  #main-nav > div {
    transition: background-color 0.3s ease;
  }
  #main-nav.nav-scrolled > div {
    background-color: transparent !important;
  }
}

/* Liens de navigation : pilules contour → remplies (fond identique au footer) */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  background-color: #c97e6c; /* même fond que le footer */
  color: #ffffff;
  border-color: #c97e6c;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(143, 75, 66, 0.45);
}

/* ==========================================================================
   BOUTON BURGER & TIROIR MOBILE (LUXURY DRAWER)
   ========================================================================== */
.burger-bar {
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s ease, background-color 0.3s ease;
}

#mobile-menu-btn.active .burger-top {
  transform: translateY(4px) rotate(45deg) !important;
  width: 22px !important;
}

#mobile-menu-btn.active .burger-bottom {
  transform: translateY(-4px) rotate(-45deg) !important;
  width: 22px !important;
  align-self: center !important;
}

/* Overlay & Panel States */
#mobile-menu-overlay {
  transition: opacity 0.4s ease, visibility 0.4s ease;
  visibility: hidden;
  opacity: 0;
  z-index: 998;
}

#mobile-menu-overlay.is-active {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#mobile-menu {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
  transform: translateX(100%);
  visibility: hidden;
  z-index: 999;
}

#mobile-menu.is-active {
  transform: translateX(0) !important;
  visibility: visible !important;
}

/* Staggered animation for links */
#mobile-menu.is-active .mobile-nav-link {
  animation: slideInLink 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInLink {
  from {
    opacity: 0;
    transform: translateX(25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Lock body scroll when drawer is open */
body.menu-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* ==========================================================================
   HERO SLIDER
   ========================================================================== */
.hero-slider-container {
  position: relative;
  height: 100vh;
  min-height: 600px;
  width: 100%;
  overflow: hidden;
  background-color: #1c1917;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  transition: opacity 1.2s ease-in-out, transform 8s ease-out;
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

/* Photos réduites sur mobile uniquement, sans réduire la hauteur du #hero */
@media (max-width: 640px) {
  .hero-slider-container {
    background-color: #fbf9f8;
  }
  .hero-slide {
    width: 100%;
    height: 73%;
    top: 5.5rem;
    left: 0;
    right: 0;
    bottom: auto;
    border-radius: 0;
  }
}

/* Bandeau Verre Dépoli (Frosted Glassmorphism), pleine largeur et légèrement incliné */
.hero-glass-card {
  background: rgba(153, 75, 54, 0.42);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transform: rotate(-2deg);
}

.slider-indicator {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.slider-indicator.active {
  width: 28px;
  background-color: #ffffff;
}

/* ==========================================================================
   CARTES PRODUITS & EFFETS AU SURVOL
   ========================================================================== */
.product-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.product-card:hover {
  transform: translateY(-8px);
}

.product-card-img-wrapper {
  overflow: hidden;
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 1rem;
  background-color: var(--color-surface-container-low);
  box-shadow: var(--shadow-subtle);
}

.product-card img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover img {
  transform: scale(1.08);
}

/* Badge de lieu */
.location-badge {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(251, 249, 248, 0.9);
}

/* Carte interactive Leaflet & Popups sur-mesure */
.leaflet-popup-content-wrapper {
  background: rgba(251, 249, 248, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(143, 75, 66, 0.15) !important;
  border-radius: 1rem !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
  padding: 6px !important;
}

.leaflet-popup-tip {
  background: rgba(251, 249, 248, 0.98) !important;
}

.custom-map-pin {
  /* Pas de transform ici — sinon Leaflet recalcule la hitbox → clignotement */
  pointer-events: auto;
}

/* Le scale est appliqué sur l'enfant direct pour ne pas déplacer la zone de détection */
.custom-map-pin > div {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
  will-change: transform;
}

.custom-map-pin:hover > div {
  transform: rotate(-45deg) scale(1.2) !important;
}

/* Masquer tout filigrane ou mention d'attribution sur la carte */
.leaflet-control-attribution {
  display: none !important;
  visibility: hidden !important;
}

.map-grayscale:hover {
  filter: grayscale(30%) contrast(100%) brightness(100%);
}

/* ==========================================================================
   SECTION CAVE SIGNATURE
   ========================================================================== */
.cave-image-wrapper {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
  transform: rotate(2deg);
}

.cave-image-wrapper:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cave-item-bullet {
  transition: width 0.3s ease, background-color 0.3s ease;
}

.cave-item:hover .cave-item-bullet {
  width: 3rem;
  background-color: var(--color-primary);
}

/* ==========================================================================
   FORMULAIRE DE CONTACT
   ========================================================================== */
.form-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid #d8c1be;
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-on-surface);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-bottom-color: var(--color-primary);
  box-shadow: 0 1px 0 0 var(--color-primary);
}

.form-input::placeholder {
  color: #a89f9e;
  font-weight: 300;
}

/* Honeypot field (hidden from real users) */
.honeypot-field {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Feedback message box */
.form-feedback {
  transition: all 0.4s ease;
  border-radius: 0.5rem;
  overflow: hidden;
}

.form-feedback.success {
  background-color: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
  padding: 1rem 1.25rem;
}

.form-feedback.error {
  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
  padding: 1rem 1.25rem;
}

/* Bouton avec indicateur de chargement */
.btn-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-primary-container);
  color: #ffffff;
  padding: 1rem 3rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 14px rgba(211, 131, 120, 0.35);
}

.btn-submit:hover:not(:disabled) {
  background-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(143, 75, 66, 0.4);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: none;
}

.btn-submit.loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   BOUTON RETOUR EN HAUT (BACK TO TOP)
   ========================================================================== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
  cursor: pointer;
  border: none;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: var(--color-primary-container);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(143, 75, 66, 0.35);
}

/* ==========================================================================
   ANIMATIONS D'APPARITION (FADE IN ON SCROLL)
   ========================================================================== */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   BANNIÈRE CMP TARTEAUCITRON (DESIGN DISCRET & HARMONIEUX)
   ========================================================================== */
#tarteaucitronAlertBig {
  background: rgba(251, 249, 248, 0.96) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(143, 75, 66, 0.18) !important;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.15) !important;
  color: var(--color-on-surface) !important;
  font-family: var(--font-body) !important;
  border-radius: 1rem !important;
  max-width: 820px !important;
  margin: 0 auto 1.5rem auto !important;
  left: 1.5rem !important;
  right: 1.5rem !important;
  width: calc(100% - 3rem) !important;
  padding: 1.25rem 1.75rem !important;
}

#tarteaucitronDisclaimerAlert {
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  color: var(--color-on-surface-variant) !important;
  margin-bottom: 0.75rem !important;
}

#tarteaucitronDisclaimerAlert b {
  color: var(--color-primary) !important;
  font-weight: 700 !important;
}

#tarteaucitronAlertBig #tarteaucitronCloseAlert,
#tarteaucitronAlertBig #tarteaucitronPersonalize2,
#tarteaucitronAlertBig #tarteaucitronAll {
  font-family: var(--font-label) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: 0.5rem !important;
  padding: 0.6rem 1.25rem !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
  margin: 0.25rem !important;
}

/* Bouton Tout Accepter */
#tarteaucitronAlertBig #tarteaucitronAll {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(143, 75, 66, 0.3) !important;
}
#tarteaucitronAlertBig #tarteaucitronAll:hover {
  background-color: var(--color-primary-container) !important;
  transform: translateY(-1px) !important;
}

/* Bouton Tout Refuser */
#tarteaucitronAlertBig #tarteaucitronCloseAlert {
  background-color: var(--color-surface-container) !important;
  color: var(--color-on-surface) !important;
  border: 1px solid var(--color-outline-variant) !important;
}
#tarteaucitronAlertBig #tarteaucitronCloseAlert:hover {
  background-color: var(--color-surface-container-high) !important;
}

/* Bouton Personnaliser */
#tarteaucitronAlertBig #tarteaucitronPersonalize2 {
  background-color: transparent !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-primary) !important;
}
#tarteaucitronAlertBig #tarteaucitronPersonalize2:hover {
  background-color: var(--color-primary-fixed) !important;
}

/* Panneau de gestion des cookies modal */
#tarteaucitronRoot #tarteaucitronMain {
  font-family: var(--font-body) !important;
  border-radius: 1rem !important;
  background-color: var(--color-surface) !important;
  border: 1px solid var(--color-outline-variant) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
}

