/*
Theme Name: Epicea
Theme URI: https://www.epicea-arzier.ch
Author: L'Épicéa
Description: Thème WordPress pour l'Épicéa, épicerie participative d'Arzier-Le Muids.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: epicea
*/

@font-face {
  font-family: "Margon360";
  src: url("assets/fonts/Margon360W08-Bold.ttf") format("truetype");
  font-display: swap;
}

:root {
  --forest: #007012;
  --forest-deep: #007012;
  --forest-dark: #005d0f;
  --forest-rgb: 0, 112, 18;
  --sage: #d9ead0;
  --cream: #fcf6ea;
  --sand: #f1e6cf;
  --leaf: #78a95b;
  --tomato: #f35107;
  --carrot: #ff8e01;
  --gold: #fdb805;
  --ink: #213127;
  --muted: #5e6f63;
  --line: rgba(var(--forest-rgb), 0.14);
  --shadow: 0 22px 50px rgba(var(--forest-rgb), 0.12);
  --radius-lg: 12px;
  --radius-md: 8px;
  --content-width: 1180px;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
  --font-title: "Margon360", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Garamond, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(120, 169, 91, 0.16), transparent 34%),
    linear-gradient(200deg, rgba(253, 184, 5, 0.16), transparent 42%),
    linear-gradient(280deg, rgba(255, 142, 1, 0.1), transparent 32%),
    linear-gradient(320deg, rgba(243, 81, 7, 0.08), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fbf1df 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  overflow: hidden;
}

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(var(--forest-rgb), 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 92px;
  padding: 0.35rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex: 0 0 auto;
}

.brand__mark {
  width: 72px;
  filter: drop-shadow(0 8px 16px rgba(var(--forest-rgb), 0.12));
}

.brand__text {
  display: grid;
  gap: 0.22rem;
}

.brand__name {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 0.88;
  color: var(--forest-deep);
}

.brand__tagline {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.94rem;
  color: var(--forest-deep);
}

.menu a {
  padding: 0.72rem 0.85rem;
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.menu a:hover,
.menu a:focus-visible {
  background: rgba(120, 169, 91, 0.14);
}

.menu a.is-active,
.menu a[aria-current="page"] {
  background: linear-gradient(135deg, var(--forest), var(--forest-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(var(--forest-rgb), 0.18);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--forest), var(--forest-dark));
  color: #fff;
  box-shadow: 0 16px 30px rgba(var(--forest-rgb), 0.24);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--forest-deep);
  border: 1px solid var(--line);
}

.button--light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.button--inactive {
  cursor: default;
}

.button--inactive:hover,
.button--inactive:focus-visible {
  transform: none;
}

.hero {
  display: grid;
  min-height: calc(100svh - 93px);
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.8rem, 4vw, 3.5rem);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(252, 246, 234, 0.82)),
    radial-gradient(circle at 50% 46%, rgba(217, 234, 208, 0.7), transparent 48%),
    radial-gradient(circle at 78% 62%, rgba(253, 184, 5, 0.22), transparent 38%),
    radial-gradient(circle at 22% 72%, rgba(255, 142, 1, 0.14), transparent 32%);
}

.hero__inner {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  min-height: calc(100svh - 93px - clamp(3.8rem, 9vw, 7.5rem));
}

.hero__brand-logo {
  width: clamp(260px, 42vw, 560px);
  margin: 0 auto;
  filter: drop-shadow(0 20px 30px rgba(var(--forest-rgb), 0.1));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(120, 169, 91, 0.18);
  border: 1px solid rgba(var(--forest-rgb), 0.08);
  color: var(--forest-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.cta h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 0.95;
}

.hero h1 {
  justify-self: center;
  width: min(100%, 900px);
  font-size: clamp(2.8rem, 7.5vw, 6.6rem);
  color: var(--forest-deep);
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.hero__scroll {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 46px;
  height: 46px;
  margin-top: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(var(--forest-rgb), 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--forest-deep);
  box-shadow: 0 12px 24px rgba(var(--forest-rgb), 0.08);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.hero__scroll:hover,
.hero__scroll:focus-visible {
  transform: translateY(3px);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(var(--forest-rgb), 0.36);
}

.hero__scroll span {
  width: 12px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.hero__lede {
  max-width: 38rem;
  margin: 1.2rem 0 0;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  margin-bottom: 1.8rem;
}

.hero-card {
  position: relative;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(252, 246, 234, 0.82)),
    #fff;
  border: 1px solid rgba(var(--forest-rgb), 0.09);
  box-shadow: var(--shadow);
}

.hero-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.hero-card__panel {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(252, 246, 234, 0.95), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--line);
}

.hero-card__panel h3,
.content-card h3,
.hours-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--forest-deep);
}

.hero-card__list,
.hours-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-card__list li,
.hours-card li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(var(--forest-rgb), 0.08);
}

.hero-card__list li:last-child,
.hours-card li:last-child {
  border-bottom: 0;
}

.section {
  padding: 3rem 0;
}

.section--compact {
  padding-top: 0;
}

.section-heading {
  display: grid;
  gap: 0.85rem;
  max-width: 44rem;
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  color: var(--forest-deep);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.content-card {
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(252, 246, 234, 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.7;
}

.content-card h2 {
  margin: 0 0 0.55rem;
  color: var(--forest-deep);
  font-size: 1.18rem;
}

.content-card ul {
  margin: 1rem 0 0;
  padding-left: 1rem;
}

.editable-content {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.editable-content > *:first-child {
  margin-top: 0;
}

.editable-content > *:last-child {
  margin-bottom: 0;
}

.editable-content p,
.editable-content ul,
.editable-content ol {
  margin: 0 0 1rem;
}

.editable-content h2,
.editable-content h3,
.editable-content h4 {
  margin: 1.4rem 0 0.55rem;
  color: var(--forest-deep);
  line-height: 1.2;
}

.editable-content h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.editable-content h3 {
  font-size: 1.28rem;
}

.editable-content h4 {
  font-size: 1.08rem;
}

.editable-content ul,
.editable-content ol {
  padding-left: 1.25rem;
}

.editable-content li + li {
  margin-top: 0.35rem;
}

.editable-content a {
  color: var(--forest-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.editable-content--intro {
  max-width: 48rem;
  font-size: 1.04rem;
}

.editable-content--story {
  margin-top: 1.1rem;
  color: var(--ink);
}

.page-intro {
  max-width: 820px;
}

.text-link {
  display: inline-flex;
  margin-top: 0.7rem;
  color: var(--forest-deep);
  font-weight: 700;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.story-panel {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(253, 184, 5, 0.24), rgba(255, 142, 1, 0.1), rgba(255, 255, 255, 0.9)),
    var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.story-panel p {
  margin: 0 0 1rem;
  color: var(--ink);
  line-height: 1.8;
}

.hours-card {
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(var(--forest-rgb), 0.95), var(--forest-dark)),
    var(--forest);
  color: #fff;
  box-shadow: var(--shadow);
}

.hours-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.hours-card h3 {
  color: #fff;
}

.hours-card .button {
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.produce-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.produce-panel {
  min-height: 240px;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.produce-panel--green {
  background:
    linear-gradient(135deg, rgba(var(--forest-rgb), 0.96), rgba(0, 93, 15, 0.92)),
    var(--forest);
  color: #fff;
}

.produce-panel--light {
  background:
    linear-gradient(135deg, rgba(252, 246, 234, 0.96), rgba(217, 234, 208, 0.78));
  border: 1px solid var(--line);
}

.produce-panel h3 {
  margin-top: 0;
  font-size: 1.45rem;
}

.produce-panel p {
  line-height: 1.75;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.pill {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.produce-panel--light .pill {
  background: rgba(var(--forest-rgb), 0.08);
  border-color: rgba(var(--forest-rgb), 0.12);
}

.cta {
  padding: 2.4rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(253, 184, 5, 0.28), rgba(255, 142, 1, 0.14) 28%, rgba(243, 81, 7, 0.1) 48%, rgba(120, 169, 91, 0.2) 68%, rgba(255, 255, 255, 0.92) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cta h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  color: var(--forest-deep);
}

.cta p {
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.8;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.site-footer {
  padding: 2.4rem 0 3.2rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(var(--forest-rgb), 0.12);
}

.site-footer__links {
  display: flex;
  gap: 1rem;
}

.page-hero {
  padding: 4rem 0 2rem;
}

.page-hero__inner {
  max-width: 820px;
}

.page-hero h1 {
  margin: 1rem 0 0;
  color: var(--forest-deep);
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
}

.page-hero p {
  max-width: 48rem;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.event-list {
  display: grid;
  gap: 1rem;
}

.event-card {
  padding: 1.7rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--forest-rgb), 0.08);
  box-shadow: var(--shadow);
}

.event-card--featured {
  background:
    linear-gradient(135deg, rgba(var(--forest-rgb), 0.92), rgba(0, 93, 15, 0.9)),
    var(--forest);
  color: #fff;
}

.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.event-card__type,
.event-card__date {
  color: var(--tomato);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.event-card__date {
  color: var(--muted);
}

.event-card--featured .event-card__date,
.event-card--featured p {
  color: rgba(255, 255, 255, 0.82);
}

.event-card h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.event-card h2 a:hover,
.event-card h2 a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.event-card p {
  max-width: 54rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.event-card--empty p {
  margin: 0;
}

.post-content {
  max-width: 820px;
}

.contact-grid {
  display: grid;
  gap: 1.25rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  text-align: center;
}

.contact-row .button {
  justify-self: center;
}

.contact-row .hours-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(252, 246, 234, 0.72));
  border: 1px solid var(--line);
  color: inherit;
  box-shadow: var(--shadow);
}

.contact-row .hours-card h2 {
  color: var(--forest-deep);
}

.contact-row .hours-card p {
  color: var(--muted);
}

.simple-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.simple-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--forest-deep);
  font-weight: 700;
}

.simple-form input,
.simple-form textarea {
  width: 100%;
  border: 1px solid rgba(var(--forest-rgb), 0.18);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
}

.simple-form textarea {
  resize: vertical;
}

.signup-card {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.signup-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.qr-block {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 0.35rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(var(--forest-rgb), 0.06);
  border: 1px solid rgba(var(--forest-rgb), 0.1);
}

.qr-block img {
  width: 132px;
  border-radius: 6px;
  background: #fff;
}

.map-panel {
  padding: 1.7rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(241, 230, 207, 0.95), rgba(255, 255, 255, 0.88));
  box-shadow: var(--shadow);
}

.map-panel h2 {
  margin: 0;
  color: var(--forest-deep);
}

.map-panel p {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
}

.map-panel address {
  margin: 0.45rem 0 1rem;
  color: var(--forest-deep);
  font-style: normal;
  font-weight: 700;
  line-height: 1.55;
}

.google-map {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: var(--radius-md);
  background: rgba(252, 246, 234, 0.86);
}

.page-content h1 {
  margin-top: 0;
  color: var(--forest-deep);
}

.producer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.producer-card {
  display: grid;
  gap: 0.28rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--forest-rgb), 0.1);
}

.producer-card span {
  color: var(--muted);
  line-height: 1.45;
}

.producer-card strong {
  color: var(--forest-deep);
  font-size: 1.02rem;
}

.producer-card em {
  color: var(--tomato);
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 980px) {
  .intro-grid,
  .cards-3,
  .story-grid,
  .produce-band,
  .contact-grid,
  .contact-row {
    grid-template-columns: 1fr;
  }

  .producer-grid {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 0;
  }

  .brand {
    gap: 0.75rem;
  }

  .brand__mark {
    width: 64px;
  }

  .brand__name {
    font-size: 1.7rem;
  }

  .brand__tagline {
    font-size: 0.62rem;
  }

  .menu {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: calc(100svh - 192px);
    padding: 1.2rem 0 1.4rem;
  }

  .hero__inner {
    min-height: calc(100svh - 192px - 2.6rem);
  }

  .hero__brand-logo {
    width: clamp(170px, 54vw, 250px);
  }

  .hero h1 {
    font-size: clamp(2.05rem, 10vw, 3.35rem);
  }

  .site-header__inner {
    min-height: 72px;
  }

  .brand {
    gap: 0.65rem;
  }

  .brand__mark {
    width: 58px;
  }

  .brand__name {
    font-size: 1.45rem;
  }

  .brand__tagline {
    font-size: 0.58rem;
  }

  .hero-card,
  .story-panel,
  .hours-card,
  .produce-panel,
  .cta,
  .event-card,
  .map-panel {
    padding: 1.4rem;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__links {
    flex-wrap: wrap;
  }

  .qr-block {
    grid-template-columns: 1fr;
  }
}
