:root {
  --ground: #F3F1EC;
  --ink: #2A2A2C;
  --muted: #5C5A55;
  --accent: #8E2A1E;
  --accent-hover: #6B1F16;
  --nav: #303033;
  --card: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: var(--ink);
  background: var(--ground);
}

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

h1, h2, h3, .carte-valeur, .nav-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* Navigation */
.nav {
  background: var(--nav);
  color: var(--ground);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-brand { color: inherit; text-decoration: none; font-size: 20px; }
.nav-brand:hover { color: inherit; }
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
}
.nav-links a { color: inherit; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

/* Téléphone : barre compacte, liens sur une seule ligne (défilement latéral si besoin) */
@media (max-width: 640px) {
  .nav { padding: 10px 16px; gap: 6px; }
  .nav-brand { font-size: 18px; }
  .nav-links {
    flex-wrap: nowrap;
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; display: inline-block; padding: 4px 0; }
}

/* En-tête photo */
.hero { position: relative; height: 300px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  color: #FFFFFF;
}
.hero-kicker { margin: 0 0 8px; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(34px, 7vw, 56px); line-height: 1.1; }

/* Page d'accueil */
.home {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.fournee { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.label { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.fournee h2 { margin: 0; font-size: clamp(30px, 5.5vw, 42px); line-height: 1.15; }
.fournee-date { font-size: 20px; }

.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.carte {
  background: var(--card);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.carte-libelle { font-size: 18px; color: var(--muted); }
.carte-valeur { font-size: clamp(24px, 3vw, 28px); line-height: 1.25; }
.carte-valeur.rouge { color: var(--accent); }

.commande { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.bouton {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  padding: 14px 40px;
  border-radius: 8px;
  min-height: 44px;
}
.bouton:hover { background: var(--accent-hover); color: #FFFFFF; }
.commande-autre { font-size: 15px; color: var(--muted); }
.commande-autre a { color: inherit; white-space: nowrap; }

.texte { width: 100%; max-width: 680px; margin: 0 auto; font-size: 17px; line-height: 1.7; }
.texte p { margin: 0 0 12px; }
.texte p:last-child { margin-bottom: 0; }

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.photos img { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; display: block; }

/* Pages intérieures */
.page { max-width: 820px; margin: 0 auto; padding: 48px 24px 64px; }
.page h1 { margin: 0 0 24px; font-size: clamp(32px, 5vw, 42px); }

.footer { text-align: center; padding: 24px; font-size: 14px; color: var(--muted); }

@media (max-width: 480px) {
  .home { padding-top: 40px; gap: 32px; }
  .carte { padding: 24px 20px; }
}

/* Bannière des pages intérieures */
.hero-page { height: 220px; }
.hero-page h1 { font-size: clamp(34px, 6vw, 48px); }

/* Texte des pages (Histoire) */
.page { font-size: 17px; line-height: 1.7; }
.page h2 { font-size: clamp(26px, 4vw, 32px); margin: 48px 0 12px; line-height: 1.2; }
.page h3 { font-size: 22px; margin: 32px 0 8px; }
.page blockquote { margin: 16px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.page figure { margin: 0 0 32px; }
.page figure img { width: auto; max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 0 auto; }
.page figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; text-align: center; }
.page li { margin-bottom: 6px; }

/* Galerie */
.page .galerie {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 640px) { .page .galerie { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 960px) { .page .galerie { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.galerie a { display: block; }
.galerie img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 8px; display: block; }
.page:has(.galerie) { max-width: 1040px; }

/* Visionneuse plein écran */
.visionneuse {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgba(20, 18, 16, 0.95);
}
.visionneuse::backdrop { background: rgba(20, 18, 16, 0.95); }
.visionneuse figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 24px; }
.visionneuse img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 4px; }
.visionneuse figcaption { color: #F3F1EC; font-size: 15px; margin-top: 12px; text-align: center; }
.visionneuse button {
  position: absolute; background: none; border: 0; color: #FFFFFF;
  font-size: 32px; line-height: 1; width: 48px; height: 48px; cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.visionneuse .fermer { top: 8px; right: 8px; }
.visionneuse .prec { left: 4px; top: 50%; transform: translateY(-50%); }
.visionneuse .suiv { right: 4px; top: 50%; transform: translateY(-50%); }

/* Contact */
.carte-texte { font-size: 20px; line-height: 1.5; }
.page .cartes a { font-weight: 600; }
