/* ============================================
   INDEX PAGE - TRATTORIA ITALIENNE (MOBILE COMPACT)
   - Desktop : rendu premium
   - Mobile : compact (2 colonnes, textes plus petits, + dense)
   - Mobile : badges HERO cachés
   - Mobile : Specialités 2/ligne
   - Mobile : Valeurs 2/ligne
   - Mobile : Masonry 2 colonnes
   - Mobile : Timeline carrousel (CSS track + dots)
   ============================================ */

/* =========================
   HERO
   ========================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--brun-pain);

  /* FIX placement navbar */
  margin-top: 0;
  padding-top: var(--nav-height);

  /* iOS safe */
  min-height: calc(100svh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));

  display: flex;
  align-items: center;
}

.hero-image-side {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 238, 226, 0.88), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(196, 66, 58, 0.42), transparent 60%),
    linear-gradient(to bottom, rgba(26, 15, 10, 0.78), rgba(26, 15, 10, 0.93));
}

.hero-inner {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  padding: clamp(2.4rem, 4.5vw, 4rem) 1.25rem;

  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.15fr);
  gap: clamp(1.6rem, 3.5vw, 3rem);
  align-items: center;

  min-width: 0;
}

.hero-content-side {
  color: #fff;
  text-align: left;
  max-width: 620px;
  min-width: 0;
}

.hero-ornament {
  font-size: 0.85rem;
  color: var(--rouge-tomate);
  text-transform: uppercase;
  letter-spacing: 0.30em;
  font-weight: 900;
  margin-bottom: 0.65rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: rgba(245, 238, 226, 0.95);
  opacity: 0.95;
  margin: 0 0 0.9rem 0;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  font-weight: 900;
  line-height: 1.02;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-title span {
  display: block;
  font-size: 0.46em;
  font-style: italic;
  color: var(--beige-clair);
  margin-top: 0.65rem;
  text-transform: none;
  letter-spacing: 0.18em;
  font-weight: 500;
}

.hero-divider {
  width: 78px;
  height: 2px;
  background: var(--rouge-tomate);
  margin: 1.1rem 0 1.4rem;
}

.hero-description {
  font-size: 1rem;
  color: rgba(245, 238, 226, 0.95);
  line-height: 1.75;
  margin: 0 0 1.6rem 0;
  max-width: 560px;
}

/* Badges (supprimés sur mobile via media query) */
.hero-badges {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.hero-badge-icon { font-size: 1.85rem; margin-bottom: 0.25rem; }
.hero-badge-text {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  min-width: 180px;
}

/* Carte horaires */
.hero-side-card {
  background: rgba(245, 238, 226, 0.96);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.05rem 1.8rem;
  color: var(--brun-pain);

  max-width: 380px;
  justify-self: end;

  position: relative;
  overflow: hidden;
}

.hero-side-card::before {
  content: "Buon appetito";
  position: absolute;
  right: -40px;
  top: -10px;
  font-family: var(--serif);
  font-size: 1.05rem;
  transform: rotate(18deg);
  color: rgba(196, 66, 58, 0.15);
}

.hero-side-title {
  font-family: var(--serif);
  font-size: 1.32rem;
  margin: 0 0 0.8rem 0;
}

.hero-side-sub {
  font-size: 0.9rem;
  color: var(--brun-light);
  margin: 0 0 1.15rem 0;
}

.hero-side-list {
  margin: 0 0 1.15rem;
  padding: 0;
}

.hero-side-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  padding: 0.42rem 0;
  border-bottom: 1px dashed rgba(91, 59, 45, 0.25);
}

.hero-side-list li:last-child { border-bottom: none; }

.hero-side-label { font-weight: 800; }
.hero-side-value { font-style: italic; white-space: nowrap; }

.hero-side-contact {
  font-size: 0.9rem;
  margin: 0 0 0.95rem 0;
}
.hero-side-contact strong { color: var(--rouge-tomate); }

.hero-side-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hero-side-actions .btn { width: 100%; }


/* =========================
   SECTION HEADER
   ========================= */
   .section-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
}

.gallery-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
}

/* spacing entre galerie et CTA réservation */
.galerie-masonry {
  padding-bottom: calc(var(--spacing-xl) + 2rem);
}
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--spacing-lg);
  padding: 0 1rem;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--rouge-tomate);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.85rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  margin: 0 0 0.9rem 0;
}

.section-intro {
  font-size: 1rem;
  color: var(--brun-light);
  line-height: 1.7;
  margin: 0;
}


/* =========================
   SPECIALITES (mosaïque)
   ========================= */
.specialites-section {
  padding: var(--spacing-xl) 0;
  background: #fff;
}

.specialites-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  margin-top: var(--spacing-lg);
}

.specialite-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.specialite-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* layout desktop mosaïque */
.specialite-card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.specialite-card:nth-child(2) { grid-column: span 5; }
.specialite-card:nth-child(3) { grid-column: span 5; }
.specialite-card:nth-child(4),
.specialite-card:nth-child(5),
.specialite-card:nth-child(6) { grid-column: span 4; }

.specialite-image {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.specialite-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(91, 59, 45, 0.97) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.6rem;
  color: #fff;
}

.specialite-category {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--beige-clair);
  margin-bottom: 0.35rem;
}

.specialite-name {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 0.45rem 0;
}

.specialite-description {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  max-width: 460px;
}


/* =========================
   TIMELINE
   ========================= */
.timeline-section {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--beige-clair) 0%, var(--beige-fonce) 100%);
  position: relative;
  overflow: hidden;
}

.timeline-section::before {
  content: '🍝';
  position: absolute;
  font-size: 15rem;
  opacity: 0.03;
  top: 50%;
  right: -5rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.timeline-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--rouge-tomate) 0%, var(--vert-sauge) 50%, var(--rouge-tomate) 100%);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 3.2rem;
  position: relative;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-content {
  flex: 1;
  padding: 1.8rem;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 45%;
}

.timeline-item:nth-child(odd) .timeline-content { margin-right: auto; text-align: right; }
.timeline-item:nth-child(even) .timeline-content { margin-left: auto; text-align: left; }

.timeline-year {
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 900;
  color: var(--rouge-tomate);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 0.75rem 0;
}

.timeline-text {
  font-size: 0.98rem;
  color: var(--brun-light);
  line-height: 1.75;
  margin: 0;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--rouge-tomate) 0%, var(--vert-sauge) 100%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 0 0 8px var(--beige-clair), var(--shadow-md);
  z-index: 2;
}

/* Mobile carousel helpers (utilisés par index.js) */
.storia-track { display: flex; }
.storia-dots { display: flex; justify-content: center; gap: 0.45rem; padding-top: 1rem; }
.storia-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(91,59,45,0.25);
  background: rgba(91,59,45,0.12);
  padding: 0;
}
.storia-dot.active {
  background: var(--rouge-tomate);
  border-color: var(--rouge-tomate);
  transform: scale(1.15);
}


/* =========================
   VALEURS
   ========================= */
.valeurs-section {
  padding: var(--spacing-xl) 0;
  background: #fff;
}

.valeurs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.valeur-item {
  text-align: center;
  padding: 1.6rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 238, 226, 0.85) 0%, #fff 100%);
  box-shadow: var(--shadow-sm);
}

.valeur-icon-wrapper {
  width: 116px;
  height: 116px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vert-sauge-light) 0%, var(--vert-sauge) 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  position: relative;
}

.valeur-icon-wrapper::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px dashed #fff;
  border-radius: 50%;
  opacity: 0.5;
}

.valeur-icon { font-size: 2.4rem; }
.valeur-title { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 0.5rem 0; }
.valeur-text { font-size: 0.95rem; color: var(--brun-light); line-height: 1.65; margin: 0; }


/* =========================
   MASONRY
   ========================= */
.galerie-masonry {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--beige-clair) 0%, var(--beige-fonce) 100%);
}

.masonry-grid {
  column-count: 3;
  column-gap: 1.25rem;
  margin-top: var(--spacing-lg);
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.masonry-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }

.masonry-item img { width: 100%; display: block; }

.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(107, 139, 101, 0.9) 0%, rgba(196, 66, 58, 0.9) 100%);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-label { font-family: var(--serif); font-size: 1.6rem; font-weight: 800; color: #fff; }


/* =========================
   CTA
   ========================= */
.cta-final {
  padding: calc(var(--spacing-xl) * 0.9) 0;
  background: var(--beige-clair);
}

.cta-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.cta-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 0.6rem 0;
  text-align: center;
}

.cta-text {
  text-align: center;
  color: var(--brun-light);
  margin: 0 0 1.6rem 0;
  line-height: 1.7;
}

.cta-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  padding: 1.2rem;
  background: rgba(245, 238, 226, 0.75);
  border-radius: var(--radius-md);
}

.cta-info-item { text-align: center; padding: 0.4rem; }
.cta-info-icon { font-size: 1.45rem; margin-bottom: 0.25rem; }
.cta-info-label { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--vert-sauge); }
.cta-info-value { font-weight: 800; margin-top: 0.25rem; }

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-buttons .btn { min-width: 190px; }


/* =====================================================
   RESPONSIVE (MOBILE COMPACT)
   ===================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 4.25rem;
    padding-bottom: 2.75rem;
    gap: 2rem;
  }
  .hero-side-card { justify-self: stretch; max-width: none; }

  .specialites-grid { grid-template-columns: repeat(6, 1fr); }
  .specialite-card:nth-child(1) { grid-column: span 6; grid-row: span 1; }
  .specialite-card:nth-child(2),
  .specialite-card:nth-child(3) { grid-column: span 3; }
  .specialite-card:nth-child(4),
  .specialite-card:nth-child(5),
  .specialite-card:nth-child(6) { grid-column: span 2; }

  .masonry-grid { column-count: 2; }
}

/* Mobile */
@media (max-width: 768px) {
  /* HERO compact */
  .hero-inner { padding: 4.4rem 1rem 2.4rem; }
  .hero-ornament { font-size: 0.72rem; margin-bottom: 0.5rem; }
  .hero-subtitle { font-size: 0.82rem; margin-bottom: 0.6rem; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 3rem); margin-bottom: 0.7rem; }
  .hero-title span { font-size: 0.50em; margin-top: 0.5rem; }
  .hero-divider { width: 56px; margin: 0.9rem 0 1.1rem; }
  .hero-description { font-size: 0.92rem; margin-bottom: 1.1rem; line-height: 1.7; }

  /* ✅ supprime les 3 badges sur mobile */
  .hero-badges { display: none; }

  /* boutons plus petits, sur la même largeur */
  .hero-buttons { flex-direction: column; gap: 0.55rem; }
  .hero-buttons .btn { width: 100%; min-width: 0; padding: 0.72rem 1.1rem; font-size: 0.82rem; letter-spacing: 0.12em; }

  /* side card compact */
  .hero-side-card { padding: 1.35rem 1.15rem; }
  .hero-side-sub { font-size: 0.85rem; margin-bottom: 0.9rem; }
  .hero-side-list li { font-size: 0.85rem; }
  .hero-side-actions .btn { padding: 0.72rem 1.1rem; font-size: 0.82rem; }

  /* SECTION TITLES plus petits */
  .section-label { font-size: 0.72rem; margin-bottom: 0.6rem; }
  .section-title { font-size: clamp(1.45rem, 6.2vw, 2.05rem); margin-bottom: 0.6rem; }
  .section-intro { font-size: 0.92rem; }

  /* ✅ Les saveurs : 2 par ligne sur mobile */
  .specialites-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .specialite-card:nth-child(n) { grid-column: auto; grid-row: auto; }
  .specialite-image { min-height: 160px; }
  .specialite-overlay { padding: 0.9rem; }
  .specialite-category { font-size: 0.65rem; margin-bottom: 0.25rem; }
  .specialite-name { font-size: 1rem; margin-bottom: 0.25rem; }
  .specialite-description { display: none; } /* compact : pas de pavé texte sur mobile */

  /* ✅ La nostra storia : carrousel (JS) -> on enlève la ligne centrale et les marqueurs */
  .timeline-wrapper::before { display: none; }
  .timeline-item { margin-bottom: 0; }
  .timeline-marker { display: none; }
  .timeline-content {
    max-width: 100%;
    text-align: left !important;
    padding: 1.2rem;
    border-radius: var(--radius-md);
  }
  .timeline-year { font-size: 1.6rem; }
  .timeline-title { font-size: 1.05rem; margin-bottom: 0.5rem; }
  .timeline-text { font-size: 0.9rem; line-height: 1.65; }

  /* ✅ I nostri valori : 2 par ligne */
  .valeurs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .valeur-item { padding: 1rem; }
  .valeur-icon-wrapper { width: 78px; height: 78px; margin-bottom: 0.7rem; }
  .valeur-icon { font-size: 1.7rem; }
  .valeur-title { font-size: 1rem; }
  .valeur-text { font-size: 0.85rem; }

  /* ✅ Petite galerie masonry : 2 colonnes */
  .masonry-grid { column-count: 2; column-gap: 0.85rem; }
  .masonry-item { margin-bottom: 0.85rem; }
  .masonry-label { font-size: 1.15rem; }

  /* CTA compact */
  .cta-content { padding: 1.35rem 1rem; }
  .cta-info-grid { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons .btn { width: 100%; min-width: 0; padding: 0.72rem 1.1rem; font-size: 0.82rem; }
}

/* Très petit mobile */
@media (max-width: 420px) {
  /* Specialités : encore plus compact */
  .specialite-image { min-height: 140px; }
  .specialite-name { font-size: 0.95rem; }

  /* Valeurs : reste 2/ligne mais plus petit */
  .valeur-icon-wrapper { width: 70px; height: 70px; }
  .valeur-text { font-size: 0.82rem; }

  /* Masonry : toujours 2 colonnes */
  .masonry-grid { column-gap: 0.75rem; }
}
