/* ==========================================================================
   Bar des Amis — Canari, Haute-Corse — V2 "Terre cuite corse"
   Design system inspiré de la discipline du Vieux Mas :
   crème + encre + un accent fort, typo ample, sections aérées.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500&family=Work+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #f7f1e3;        /* fond principal */
  --cream-2: #faf5ea;      /* fond alterné clair */
  --sand: #efe3ca;         /* sable — fonds alternés (utilisé à ~40 %) */
  --ink: #221e18;          /* encre — texte, header/footer sombres */
  --ink-soft: #5c5548;     /* texte secondaire */
  --line: rgba(34, 30, 24, 0.12);  /* bordures fines */
  --accent: #c1440e;       /* terre cuite corse — CTA, liens actifs */
  --accent-dark: #9a3407;  /* hover accent */
  --deep: #12336f;         /* bleu profond — bas de hero, touches rares */

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-soft: 0 18px 44px rgba(34, 30, 24, 0.12);
  --shadow-card: 0 6px 20px rgba(34, 30, 24, 0.08);
  --radius: 2px;
  --container: 1180px;
  --header-h: 84px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 900; letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

p.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 58ch;
}

.section { padding: 128px 0; }
.section--dark {
  background: var(--ink);
  color: var(--cream);
}
.section--dark h2, .section--dark h3 { color: var(--cream); }
.section--dark p { color: rgba(247, 241, 227, 0.82); }
.section--dark .eyebrow { color: #e88a5e; }
.section--dark .eyebrow::before { background: #e88a5e; }
.section--stone {
  background: rgba(239, 227, 202, 0.4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Buttons — blocs à coins carrés façon Vieux Mas ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.btn-dark {
  background: var(--ink);
  color: var(--cream);
}
.btn-dark:hover { background: #3a332a; }
.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline-dark:hover { background: var(--ink); color: var(--cream); }
.btn-block { width: 100%; }

/* ---------- Header — hauteur constante, transparent puis crème ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  height: 56px;
  width: auto;
  filter: invert(1);
  transition: filter 0.4s ease;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.15;
  color: #fff;
}
.brand-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  font-size: 0.875rem;
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: #fff; }

.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-social { display: flex; gap: 8px; }
.nav-social a {
  width: 34px; height: 34px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.nav-social a:hover { color: #fff; }
.nav-social svg { width: 16px; height: 16px; fill: currentColor; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* État scrollé : seules les couleurs changent, jamais les dimensions */
.site-header.is-scrolled {
  background: var(--cream);
  border-bottom-color: var(--line);
}
.site-header.is-scrolled .brand-logo { filter: none; }
.site-header.is-scrolled .brand-text { color: var(--ink); }
.site-header.is-scrolled .brand-text span { color: var(--ink-soft); }
.site-header.is-scrolled .nav-links a { color: var(--ink-soft); }
.site-header.is-scrolled .nav-links a:hover,
.site-header.is-scrolled .nav-links a[aria-current="page"] { color: var(--accent); }
.site-header.is-scrolled .nav-social a { color: var(--ink-soft); }
.site-header.is-scrolled .nav-social a:hover { color: var(--accent); }
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Overlay façon Vieux Mas : image claire au centre, texte lisible en bas */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(18, 51, 111, 0.45) 0%, rgba(18, 51, 111, 0) 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.7) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
  padding-top: calc(var(--header-h) + 24px);
  width: 100%;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero p.lead, .page-hero p.lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  font-weight: 300;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.page-hero {
  position: relative;
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.page-hero .hero-content { padding-bottom: 56px; }
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.2rem); }

/* ---------- Statut ouvert / fermé — discret, point coloré ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fff;
  background: rgba(34, 30, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.status-pill .ico { width: 15px; height: 15px; }
.status-pill--open .ico { color: #8fe3b0; }
.status-pill--closed .ico { color: #ffb18a; }

/* ---------- Teasers / cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.teaser-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.teaser-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.teaser-card:hover img { transform: scale(1.05); }
.teaser-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.8) 100%);
}
.teaser-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 28px;
  color: #fff;
}
.teaser-content .tag {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}
.teaser-content h3 { color: #fff; margin: 8px 0 8px; }
.teaser-content p { margin: 0 0 14px; font-size: 0.92rem; font-weight: 300; color: rgba(255, 255, 255, 0.85); }
.teaser-link {
  font-weight: 500;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feature-card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
}
.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
}

/* ---------- Content block (image pleine largeur + texte en dessous) ---------- */
.content-block { margin-bottom: 112px; }
.content-block:last-child { margin-bottom: 0; }
.content-block-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 44px;
  height: 56vh;
  min-height: 320px;
  max-height: 600px;
}
.content-block-media img { width: 100%; height: 100%; object-fit: cover; }
/* Image portrait : affichée à son format naturel, jamais recadrée */
.content-block-media.is-portrait {
  height: auto;
  max-height: none;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.content-block-media.is-portrait img {
  width: auto;
  height: auto;
  max-height: 620px;
  max-width: 100%;
  object-fit: contain;
}
/* Variante côte à côte : image portrait à gauche, texte à droite */
.content-block--side {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
}
.content-block--side .content-block-media {
  height: auto;
  max-height: none;
  margin-bottom: 0;
}
.content-block--side .content-block-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.content-block--side .content-block-body { max-width: none; }
.content-block-body { max-width: 640px; }
.content-block-body.align-right { margin-left: auto; }
.content-block.reverse .content-block-body { margin-left: auto; }

.stat-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  padding: 20px 28px;
  text-align: center;
  font-family: var(--font-display);
}
.stat-badge strong { display: block; font-size: 1.15rem; line-height: 1.2; white-space: nowrap; }
.stat-badge span { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; font-family: var(--font-body); }

/* ---------- Grille de cartes (menu = photos uniquement) ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
}
.menu-grid-card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.menu-grid-card img {
  width: 100%;
  height: auto;
  display: block;
}
.menu-grid-card h3 {
  margin: 16px 0 2px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1/1;
}
.gallery-item:nth-child(5n+1) { grid-row: span 2; aspect-ratio: 1/2.05; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 17, 13, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 84vh;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  transition: background 0.2s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.12); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Activities ---------- */
.chip-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.chip .ico { color: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
}
.contact-card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
}
.contact-item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.contact-item:last-child { border-bottom: none; }
.contact-item .icon {
  width: 44px; height: 44px;
  font-size: 1.25rem;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-item h4 { margin: 0 0 4px; font-size: 1rem; }
.contact-item p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }
.contact-item a:hover { color: var(--accent); }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 100%;
  min-height: 420px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(247, 241, 227, 0.8);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(247, 241, 227, 0.12);
}
.footer-brand .brand-text { color: var(--cream); }
.footer-brand .brand-text span { color: rgba(247, 241, 227, 0.6); }
.footer-brand p { color: rgba(247, 241, 227, 0.6); font-size: 0.9rem; font-weight: 300; margin-top: 16px; max-width: 34ch; }
.footer-col h4 {
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 10px; font-size: 0.92rem; font-weight: 300; }
.footer-col a { color: rgba(247, 241, 227, 0.75); }
.footer-col a:hover { color: #e88a5e; }
.footer-social { display: flex; gap: 12px; margin-top: 8px; }
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(247, 241, 227, 0.25);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-social a:hover { border-color: #e88a5e; color: #e88a5e; }
.footer-bottom {
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(247, 241, 227, 0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.icon-inline { display: inline-flex; align-items: center; }

/* ---------- Icon system (SVG) ---------- */
.ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-fill { fill: currentColor; stroke: none; }
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.arrow-link .ico { width: 0.85em; height: 0.85em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-social { display: none; }
  .nav-toggle { display: flex; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-block-media { height: 42vh; min-height: 260px; }
  .content-block { margin-bottom: 72px; }
  .content-block--side { grid-template-columns: 1fr; gap: 36px; }
  .content-block--side .content-block-media { height: auto; min-height: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .section { padding: 96px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand-logo { height: 46px; }
  .brand-text { display: none; }
  .page-hero { min-height: 56svh; }
  .hero-actions .btn { flex: 1; }
  .menu-grid { grid-template-columns: 1fr; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
}

/* Mobile nav panel */
.nav-links.is-open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--cream);
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 24px 28px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.nav-links.is-open a { color: var(--ink); }
.nav-links.is-open a[aria-current="page"] { color: var(--accent); }
