:root {
  --color-bg: #FBFAF7;
  --color-cream: #F2EEE6;
  --color-text: #3A3630;
  --color-muted: #8A7F70;
  --color-accent: #7C6E8C;
  --color-accent-2: #C97C3D;
  --color-panel: #F2EEE6;
  --color-panel-dark: #E8E1D3;
  --color-dark: #29241F;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 12px 32px -12px rgba(41, 36, 31, 0.16);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; margin: 0 0 0.5em; letter-spacing: 0.01em; }

a { color: inherit; }

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

/* ---------- Section headings with flanking dividers ---------- */
.section-heading {
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  margin: 0 0 2.5rem;
  text-align: center;
}
.section-heading .line { flex: 0 0 48px; height: 1px; background: var(--color-accent-2); opacity: 0.6; }
.section-heading h2 {
  margin: 0; font-size: 1rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--color-text);
}
.eyebrow {
  display: block; text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.72rem; color: var(--color-accent-2); font-weight: 600; margin-bottom: 0.75rem;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 3rem;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(41, 36, 31, 0.08);
}

.site-nav__brand {
  font-family: var(--font-heading); font-size: 1.15rem; letter-spacing: 0.03em;
  color: var(--color-text); text-decoration: none;
}

.site-nav__links { list-style: none; display: flex; gap: 2.25rem; margin: 0; padding: 0; }
.site-nav__links a {
  color: var(--color-text); text-decoration: none;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  padding-bottom: 4px; border-bottom: 1px solid transparent;
}
.site-nav__links a:hover { border-bottom-color: var(--color-accent-2); }
.site-nav__links a.is-active { color: var(--color-accent-2); border-bottom-color: var(--color-accent-2); }

.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.site-nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.site-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav__overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(41, 36, 31, 0.45);
  z-index: 15;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.site-nav__overlay.is-open { display: block; opacity: 1; pointer-events: auto; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Footer (dark bookend) ---------- */
.site-footer {
  padding: 3.5rem 2rem 2.5rem;
  text-align: center;
  background: var(--color-dark);
  color: rgba(251, 250, 247, 0.82);
  margin-top: 2rem;
}
.site-footer p { margin: 0.35rem 0; font-size: 0.9rem; }
.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35); }
.site-footer a:hover { border-bottom-color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 92vh; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  text-align: center; color: #fff; padding-bottom: 4.5rem;
  background: linear-gradient(180deg, rgba(41,36,31,0.05) 0%, rgba(41,36,31,0.15) 55%, rgba(41,36,31,0.75) 100%);
}
.hero__overlay .eyebrow { color: #fff; opacity: 0.85; }
.hero__overlay h1 { font-size: 3.75rem; margin-bottom: 0.25em; text-shadow: 0 2px 20px rgba(0,0,0,0.25); }
.hero__overlay p { font-size: 1.15rem; opacity: 0.92; margin: 0; }

/* ---------- Info bar ---------- */
.info-bar {
  position: sticky; top: 66px; z-index: 9;
  display: flex; justify-content: center; align-items: center; gap: 2.5rem;
  padding: 0.85rem 1.5rem; background: rgba(251, 250, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(41, 36, 31, 0.08);
  font-size: 0.82rem; letter-spacing: 0.02em;
}
.info-bar a {
  color: #fff; background: var(--color-accent-2); text-decoration: none;
  font-weight: 600; padding: 0.4rem 1.1rem; border-radius: 999px; font-size: 0.78rem;
}

/* ---------- Buttons / CTA pills ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 0.75rem 1.75rem; border-radius: 999px; font-size: 0.85rem;
  letter-spacing: 0.02em; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn--primary { background: var(--color-accent-2); color: #fff; }
.btn--outline { background: transparent; color: var(--color-text); border: 1px solid rgba(41,36,31,0.25); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* ---------- Teasers ---------- */
.teaser { padding: 6rem 2rem; max-width: 640px; margin: 0 auto; text-align: center; }
.teaser p { color: var(--color-muted); margin-bottom: 1.75rem; }

.teaser-preview-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem;
  margin: 0 auto 2rem; max-width: 560px;
}
.teaser-preview-grid__item {
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card);
  background: var(--color-panel);
}
.teaser-preview-grid__item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.teaser-preview-grid__item span {
  display: block; font-size: 0.68rem; padding: 0.4rem 0.3rem; color: var(--color-text);
  font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.teaser-avatars { display: flex; justify-content: center; margin: 0 auto 2rem; }
.teaser-avatars img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--color-bg); box-shadow: var(--shadow-card);
  margin-left: -14px;
}
.teaser-avatars img:first-child { margin-left: 0; }

.teaser-event {
  display: flex; align-items: center; gap: 1.25rem; text-align: left;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
  overflow: hidden; margin: 0 auto 2rem; max-width: 480px;
}
.teaser-event img { width: 130px; height: 100px; object-fit: cover; flex-shrink: 0; }
.teaser-event__body { padding: 0.5rem 1.25rem 0.5rem 0; }
.teaser-event__date {
  display: block; color: var(--color-accent-2); font-weight: 700;
  text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; margin-bottom: 0.25rem;
}
.teaser-event h3 { margin: 0; font-size: 1.05rem; }

.map-section { padding: 5rem 2rem 6rem; text-align: center; }
.map-embed {
  max-width: 900px; margin: 0 auto 1.5rem; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 16 / 9;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Boutiques ---------- */
.boutiques-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem; padding: 1rem 3rem 5rem; max-width: 1200px; margin: 0 auto;
}
.boutique-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column;
}
.boutique-card:hover { transform: translateY(-4px); }
.boutique-card__cover { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-panel); }
.boutique-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.boutique-card__body { padding: 1.5rem; }
.boutique-card__categorie { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; color: var(--color-muted); margin-bottom: 0.4rem; }
.boutique-card h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.boutique-card p { color: var(--color-muted); font-size: 0.92rem; margin-bottom: 0.75rem; }
.boutique-card a { color: var(--color-accent-2); font-weight: 600; text-decoration: none; font-size: 0.85rem; }

/* ---------- Food Court ---------- */
.food-court-list { display: flex; flex-direction: column; gap: 1.25rem; max-width: 720px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.food-court-item {
  display: flex; gap: 1.25rem; align-items: center; background: #fff;
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-card);
}
.food-court-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.food-court-item h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.food-court-item p { color: var(--color-muted); margin: 0; font-size: 0.9rem; }

/* ---------- Agenda ---------- */
.agenda-list { display: flex; flex-direction: column; gap: 1.5rem; max-width: 720px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.agenda-item {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); display: flex; gap: 1.5rem; align-items: stretch;
}
.agenda-item__media { flex: 0 0 200px; }
.agenda-item__media img { width: 100%; height: 100%; object-fit: cover; min-height: 140px; }
.agenda-item__body { padding: 1.25rem 1.5rem 1.25rem 0; flex: 1; }
.agenda-item__date {
  display: inline-block; color: var(--color-accent-2); font-weight: 700;
  text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.06em; margin-bottom: 0.4rem;
}
.agenda-item p:last-child { color: var(--color-muted); margin: 0; font-size: 0.92rem; }

/* ---------- Actu ---------- */
.actu-list { display: flex; flex-direction: column; gap: 2.5rem; max-width: 680px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.actu-item {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card);
}
.actu-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: 0; }
.actu-item__body { padding: 1.5rem 1.75rem 1.75rem; }
.actu-item__date { color: var(--color-accent); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---------- Admin ---------- */
.admin-login, .admin-dashboard, .admin-crud { max-width: 680px; margin: 3rem auto; padding: 0 1.5rem; }
.admin-login form, .admin-crud form {
  display: flex; flex-direction: column; gap: 0.85rem; background: #fff;
  padding: 1.75rem; border-radius: var(--radius); margin-bottom: 2rem; box-shadow: var(--shadow-card);
}
.admin-login input, .admin-crud input, .admin-crud select, .admin-crud textarea {
  font-family: var(--font-body); padding: 0.6rem 0.75rem; border-radius: 8px;
  border: 1px solid rgba(41,36,31,0.18); font-size: 0.95rem;
}
.admin-login button, .admin-crud button {
  font-family: var(--font-body); cursor: pointer; border: none; border-radius: 999px;
  padding: 0.65rem 1.5rem; background: var(--color-accent-2); color: #fff; font-weight: 600;
}
.admin-crud table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.admin-crud td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--color-panel-dark); }
.error { color: #a33; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ==================== Responsive ==================== */

/* Tablet (<=900px) */
@media (max-width: 900px) {
  .site-nav { padding: 1rem 1.5rem; }
  .hero { height: 70vh; }
  .hero__overlay h1 { font-size: 2.5rem; }
  .boutiques-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 1rem 1.5rem 3rem; gap: 1.25rem; }
  .agenda-item__media { flex-basis: 150px; }
}

/* Mobile (<=768px) — off-canvas nav */
@media (max-width: 768px) {
  .site-nav { padding: 1rem 1.25rem; }
  .site-nav__toggle { display: flex; }

  .site-nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(280px, 80vw);
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 16;
    box-shadow: -4px 0 16px rgba(0,0,0,0.15);
  }
  .site-nav__links.is-open { transform: translateX(0); }
  .site-nav__links li { border-bottom: 1px solid var(--color-panel-dark); }
  .site-nav__links a { display: block; padding: 1rem 0; border-bottom: none; }

  .hero { height: 62vh; }
  .hero__overlay { padding-bottom: 2.5rem; }
  .hero__overlay h1 { font-size: 1.85rem; }
  .hero__overlay p { font-size: 0.95rem; }

  .info-bar { flex-wrap: wrap; gap: 0.6rem 1rem; font-size: 0.75rem; padding: 0.6rem 1rem; text-align: center; top: 0; position: static; }

  .teaser { padding: 3rem 1.25rem; }
  .map-section { padding: 3rem 1.25rem; }

  .teaser-preview-grid { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
  .teaser-avatars img { width: 52px; height: 52px; margin-left: -12px; }
  .teaser-event { flex-direction: column; max-width: 320px; }
  .teaser-event img { width: 100%; height: 140px; }
  .teaser-event__body { padding: 0.25rem 1.25rem 1.25rem; text-align: center; }

  .boutiques-grid { grid-template-columns: 1fr; padding: 0.5rem 1.25rem 3rem; }

  .food-court-list, .agenda-list, .actu-list { padding: 0.5rem 1.25rem 3rem; }
  .food-court-item { flex-direction: column; text-align: center; }
  .agenda-item { flex-direction: column; }
  .agenda-item__media { flex-basis: auto; height: 160px; }
  .agenda-item__body { padding: 1rem 1.25rem 1.25rem; }

  .admin-login, .admin-dashboard, .admin-crud { padding: 0 1rem; margin: 1.5rem auto; }
}

/* Small phones (<=480px) */
@media (max-width: 480px) {
  .hero__overlay h1 { font-size: 1.5rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .section-heading h2 { font-size: 0.85rem; }
  .info-bar span, .info-bar a { font-size: 0.72rem; }
}
