/* =============================================
   La Table du Maréchal — Styles
   ============================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette issue du site original */
  --color-bg: #ffffff;
  --color-bg-cream: #f5f1eb;
  --color-bg-section: #faf8f5;
  --color-text: #3d2b1f;
  --color-text-muted: #7a6b5d;
  --color-olive: #555c2e;
  --color-olive-hover: #6b7339;
  --color-gold: #b8a44c;
  --color-gold-hover: #c9b55d;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-border: #d4cfc7;

  /* Polices */
  --font-heading: 'futura-pt', 'Futura', 'Century Gothic', sans-serif;
  --font-body: 'Poppins', 'Helvetica Neue', Arial, sans-serif;

  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-olive);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-olive-hover);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-olive);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 40px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid var(--color-olive);
  background: transparent;
  color: var(--color-olive);
}

.btn:hover {
  background-color: var(--color-olive);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-primary {
  border-color: var(--color-olive);
  color: var(--color-olive);
  background: transparent;
}

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

/* Boutons dans le hero (blanc) */
.hero .btn {
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero .btn:hover {
  background-color: var(--color-white);
  color: var(--color-text);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-text);
  transform: translateY(-2px);
}

/* =============================================
   Navigation
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .nav-logo {
  color: var(--color-text);
}

.navbar.scrolled .nav-link {
  color: var(--color-text-muted);
}

.navbar.scrolled .nav-link:hover {
  color: var(--color-text);
}

.navbar.scrolled .hamburger,
.navbar.scrolled .hamburger::before,
.navbar.scrolled .hamburger::after {
  background-color: var(--color-text);
}

.nav-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-white);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.nav-logo:hover {
  color: var(--color-gold);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-olive);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--color-white);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  position: relative;
  transition: all var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  left: 0;
  transition: all var(--transition);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-toggle.active .hamburger {
  background-color: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-image: url('../images/hero-bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.hero-badge {
  margin-bottom: 40px;
}

.hero-badge-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.hero-badge-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-white);
  font-weight: 300;
  line-height: 1.6;
}

.hero-title {
  color: var(--color-white);
  margin-bottom: 15px;
  font-weight: 400;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 35px;
}

.hero-info {
  position: absolute;
  bottom: 60px;
  right: 60px;
  z-index: 2;
  text-align: right;
}

.hero-info-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.hero-info-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-white);
  font-weight: 300;
  line-height: 1.6;
}

.hero-info-text a {
  color: var(--color-white);
}

.hero-info-text a:hover {
  color: var(--color-gold);
}

/* =============================================
   Sections
   ============================================= */
.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  color: var(--color-text);
  font-weight: 400;
}

.section-title--light {
  color: var(--color-white);
}

/* =============================================
   Notre Formule
   ============================================= */
.formule {
  background-color: var(--color-bg);
  text-align: center;
}

.formule-content {
  max-width: 700px;
  margin: 0 auto;
}

.formule-highlight {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.formule-menu {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-text);
  margin: 30px 0;
  line-height: 1.8;
}

.formule-price {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-olive);
  margin-left: 10px;
}

.formule-description {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 15px;
  line-height: 1.8;
}

.formule-description strong {
  color: var(--color-text);
}

/* =============================================
   Galerie
   ============================================= */
.galerie {
  padding: 40px 0;
  background-color: var(--color-bg);
}

.galerie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.galerie-item {
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.galerie-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.galerie-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* =============================================
   Nos Vins
   ============================================= */
.vins {
  background-color: var(--color-bg);
}

.vins-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.vins-text {
  text-align: left;
}

.vins-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-olive);
  margin-bottom: 25px;
  font-weight: 500;
}

.vins-description {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 35px;
  line-height: 1.9;
  font-weight: 300;
}

.vins-image {
  overflow: hidden;
  border-radius: 4px;
}

.vins-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
}

/* =============================================
   Playlist
   ============================================= */
.playlist {
  background-color: var(--color-bg-cream);
}

.playlist-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.playlist-text {
  text-align: left;
}

.playlist-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--color-olive);
  margin-bottom: 25px;
  font-weight: 400;
}

.playlist-description {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.playlist-embed {
  border-radius: 12px;
  overflow: hidden;
}

/* =============================================
   Hébergement
   ============================================= */
.hebergement {
  background-color: var(--color-bg);
  text-align: center;
}

.hebergement-intro {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--color-text);
  margin-bottom: 60px;
  font-weight: 400;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.card {
  background: var(--color-bg);
  border-radius: 6px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 6px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card-content {
  padding: 25px 10px;
  text-align: center;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 12px;
  font-weight: 500;
}

.card-text {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.hebergement-cta {
  margin-top: 20px;
}

/* =============================================
   Footer
   ============================================= */
.footer {
  background-color: var(--color-bg);
  padding: 80px 0 40px;
  border-top: 2px solid var(--color-olive);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col {
  text-align: center;
}

.footer-heading {
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-text);
}

.footer-col p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.footer-col a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--color-olive);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--color-border);
}

.footer-col p strong {
  color: var(--color-text);
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}

/* =============================================
   Animations - Scroll Reveal
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for gallery items */
.galerie-item {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.galerie-item.visible {
  opacity: 1;
  transform: scale(1);
}

/* Card stagger */
.card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow var(--transition);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Lightbox
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  cursor: pointer;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform var(--transition);
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 2px;
  background-color: var(--color-white);
  transition: background-color var(--transition);
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

.lightbox-close:hover::before,
.lightbox-close:hover::after {
  background-color: var(--color-gold);
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
  .galerie-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-info {
    right: 40px;
    bottom: 40px;
  }
}

@media (max-width: 768px) {

  /* Mobile Navigation */
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: right var(--transition);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu .nav-link {
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--color-text);
  }

  /* Hero — background-attachment: fixed non supporté sur iOS Safari */
  .hero {
    background-attachment: scroll;
  }

  .hero-info {
    position: relative;
    bottom: auto;
    right: auto;
    text-align: center;
    margin-top: 50px;
  }

  .hero-content {
    padding: 0 30px;
  }

  /* Gallery */
  .galerie-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Vins */
  .vins-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .vins-text {
    text-align: center;
  }

  /* Playlist */
  .playlist-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .playlist-text {
    text-align: center;
    order: -1;
  }

  /* Cards */
  .cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Sections */
  .section {
    padding: 70px 0;
  }

  /* Vins */
  .vins {
    min-height: 60vh;
    background-attachment: scroll;
  }
}

@supports (-webkit-touch-callout: none) {
  .hero {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  .galerie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }

  .hero-badge-text {
    font-size: 0.95rem;
  }

  .formule-menu {
    font-size: 1.1rem;
  }

  .btn {
    padding: 12px 30px;
    font-size: 0.75rem;
  }
}