/* Grain de Sel — guide indépendant des festivals (Occitanie)
   Design system per ТЗ "дизайн" */

:root {
  --sky-1: #A9C8EC;
  --sky-2: #5B8FD6;
  --sky-3: #2F64B5;
  --navy: #1E4FA0;
  --accent: #E8743B;
  --card-orange: #EFA048;
  --card-blue: #7FA6DE;
  --card-green: #8DC26F;
  --info-green: #43A047;
  --info-orange: #E07B39;
  --heading-green: #7CD67C;
  --page-bg: #FFFFFF;
  --page-heading: #2B5BA6;
  --page-text: #555555;
  --white: #FFFFFF;
  --font-head: "Roboto Condensed", "Roboto", Arial, sans-serif;
  --font-light: "Roboto", Arial, sans-serif;
  --container: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-light);
  font-size: 16px;
  line-height: 1.6;
  color: var(--page-text);
  background: var(--page-bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Independence notice */
.indep-note {
  font-size: 0.78rem;
  opacity: 0.9;
}
.indep-note a { color: var(--white); text-decoration: underline; }

/* ===== Header / hero (shared gradient top) ===== */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.4) 1.5px, transparent 1.6px),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  background-size: 28px 28px, 100% 100%;
  color: var(--white);
  padding-bottom: 56px;
}
.site-header { padding: 28px 0 10px; }
.site-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--white);
  text-decoration: none;
}
.hero .tagline { font-size: 0.9rem; margin: 2px 0 6px; opacity: 0.9; }

.nav-toggle {
  display: none;
  position: absolute;
  right: 10px;
  top: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 11px;
  width: 44px;
  height: 44px;
}
.main-nav { margin-top: 14px; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.main-nav a {
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.main-nav a:hover { text-decoration: underline; }

.breadcrumbs {
  font-size: 0.78rem;
  color: var(--white);
  opacity: 0.9;
  margin-top: 18px;
}
.breadcrumbs a { color: var(--white); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; }

/* ===== Hero inner (home only) ===== */
.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 28px;
  flex-wrap: wrap;
}
.hero-date {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: 64px;
  line-height: 1;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.hero-copy { flex: 1 1 320px; }
.hero-copy h1 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--white);
  font-size: 2.1rem;
  line-height: 1.25;
  margin: 0 0 14px;
}
.hero-copy ul { margin: 0; padding-left: 20px; }
.hero-copy li { margin-bottom: 4px; }

/* page hero (interior pages) */
.page-hero h1 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--white);
  font-size: 1.9rem;
  margin: 10px 0 0;
}

/* wave transition */
.wave { display: block; width: 100%; margin-top: -2px; }

/* ===== Decorative: bunting garland ===== */
.bunting { display: block; width: 100%; height: auto; margin-top: 6px; }

/* ===== Decorative: skyline silhouette at hero foot ===== */
.hero-skyline { display: block; width: 100%; margin-top: 18px; }

/* ===== Decorative: sun rays behind hero date ===== */
.hero-date-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.sun-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 230px;
  height: 230px;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0.55;
}
.hero-date { position: relative; z-index: 1; }

/* ===== Dark navy sections ===== */
.section-navy {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
}
.section-navy .eyebrow {
  font-family: var(--font-light);
  font-weight: 300;
  text-transform: uppercase;
  color: var(--heading-green);
  letter-spacing: 2px;
  font-size: 1.9rem;
  display: block;
  margin-bottom: 10px;
}
.section-flex {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.section-flex .col-intro { flex: 0 0 25%; min-width: 220px; }
.section-flex .col-cards { flex: 1 1 500px; display: flex; gap: 20px; flex-wrap: wrap; }
.section-navy > .container > .source-note { flex: 1 1 100%; display: block; margin-top: 28px; font-size: .8rem; color: #AEBBD6; }
.section-navy > .container > .source-note a { color: #FFFFFF; text-decoration: underline; }

.agenda-card {
  flex: 1 1 150px;
  border-radius: 14px;
  padding: 22px 18px;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.agenda-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.24); }
.agenda-card.c-orange { background: var(--card-orange); }
.agenda-card.c-blue { background: var(--card-blue); }
.agenda-card.c-green { background: var(--card-green); }
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.agenda-card .month {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.agenda-card ul { margin: 0 0 16px; padding-left: 18px; font-size: 0.92rem; }
.agenda-card li { margin-bottom: 4px; }
.pill-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 9px 20px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.pill-btn:hover { opacity: 0.9; transform: translateY(-2px); }

/* ===== Info blocks (centered) ===== */
.section-info {
  padding: 56px 0;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.info-block {
  max-width: 400px;
  flex: 1 1 320px;
  border-radius: 14px;
  padding: 30px 26px;
  color: var(--white);
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  transition: transform 0.15s ease;
}
.info-block:hover { transform: translateY(-4px); }
.info-block .card-icon { margin: 0 auto 14px; }
.info-block.c-green { background: var(--info-green); }
.info-block.c-orange { background: var(--info-orange); }
.info-block h2 {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.info-block p { margin: 0 0 18px; font-size: 0.95rem; }
.info-block .pill-btn { background: rgba(0,0,0,0.18); }

/* ===== Billetterie section (home) ===== */
.section-billetterie {
  background: var(--white);
  padding: 56px 0;
  text-align: center;
}
.section-billetterie .eyebrow {
  font-family: var(--font-light);
  font-weight: 300;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: 2px;
  font-size: 1.7rem;
  display: block;
  margin-bottom: 30px;
}
.tip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.tip-card {
  background: var(--info-green);
  color: var(--white);
  border-radius: 12px;
  padding: 20px 16px;
  font-size: 0.9rem;
  text-align: left;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  transition: transform 0.15s ease;
}
.tip-card:hover { transform: translateY(-3px); }
.tip-card .card-icon { width: 36px; height: 36px; margin-bottom: 10px; }
.tip-card strong { display: block; margin-bottom: 6px; font-family: var(--font-head); text-transform: uppercase; }

/* ===== Histoire teaser (home) ===== */
.section-histoire {
  background: #F2F6FC;
  padding: 50px 0;
  text-align: center;
}
.section-histoire h2 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--page-heading);
  font-size: 1.5rem;
}
.section-histoire p { max-width: 640px; margin: 0 auto 18px; }

/* ===== Interior page rows ===== */
.page-body { background: var(--white); padding: 50px 0; }
.intro-text { max-width: 760px; margin: 0 auto 40px; font-size: 1.02rem; }
.section-h2 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--page-heading);
  font-size: 1.3rem;
  text-align: center;
  margin: 0 0 30px;
}
.row-list { display: flex; flex-direction: column; gap: 36px; }
.item-row {
  display: flex;
  gap: 30px;
  align-items: center;
}
.item-row .img-box {
  flex: 0 0 45%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(43,91,166,0.18);
}
.item-row .img-box::before {
  content: "";
  display: block;
  padding-top: 82.5%; /* fallback 4:3.3 for Safari < 15 without aspect-ratio support */
}
.item-row .img-box svg {
  position: absolute;
  inset: 0;
}
@supports (aspect-ratio: 4 / 3.3) {
  .item-row .img-box::before { content: none; }
  .item-row .img-box { aspect-ratio: 4 / 3.3; }
  .item-row .img-box svg { position: static; }
}
.item-row .img-box img { width: 100%; height: 100%; object-fit: cover; }
.item-row .txt { flex: 1 1 auto; }
.item-row .kicker {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--page-heading);
  font-size: 0.78rem;
  letter-spacing: 1px;
  margin: 0 0 4px;
}
.item-row h3 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--page-heading);
  font-size: 1.25rem;
  margin: 0 0 10px;
}
.item-row:nth-child(even) { flex-direction: row-reverse; }
.item-row .source-note {
  font-size: 0.82rem;
  color: #888888;
  margin-top: 10px;
}
.item-row .source-note a { color: #888888; text-decoration: underline; }

/* FAQ */
.faq { max-width: 760px; margin: 50px auto 0; }
.faq dt {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--page-heading);
  margin-top: 18px;
}
.faq dd { margin: 6px 0 0; }

/* related links row */
.related-links {
  max-width: 760px;
  margin: 50px auto 0;
  padding-top: 24px;
  border-top: 1px solid #E5E5E5;
  text-align: center;
}
.related-links a {
  display: inline-block;
  margin: 0 10px;
  color: var(--page-heading);
  font-weight: 600;
  text-decoration: none;
}
.related-links a:hover { text-decoration: underline; }

/* ===== Plain prose block (home, bottom, before footer) ===== */
.section-more {
  background: var(--white);
  padding: 50px 0 56px;
}
.section-more .container { max-width: 760px; }
.section-more h2 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--page-heading);
  font-size: 1.3rem;
  margin: 0 0 18px;
}
.section-more h3 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--page-heading);
  font-size: 1.1rem;
  margin: 26px 0 10px;
}
.section-more h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--page-heading);
  font-size: 0.98rem;
  margin: 18px 0 6px;
}
.section-more p { margin: 0 0 16px; }
.section-more .source-note {
  font-size: 0.82rem;
  color: #888888;
  margin-top: 6px;
}
.section-more .source-note a { color: #888888; text-decoration: underline; }

/* ===== Footer ===== */
.site-footer {
  background: var(--white);
  padding: 20px 0 36px;
  text-align: center;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 14px;
}
.footer-links a {
  text-decoration: none;
  color: var(--page-heading);
  font-size: 0.88rem;
  font-weight: 600;
}
.footer-links a:hover { text-decoration: underline; }
.site-footer .indep-note { color: #777; }
.site-footer .indep-note a { color: var(--page-heading); }

/* ===== 404/410 ===== */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  color: var(--white);
  padding: 60px 20px;
}
.error-page h1 { font-family: var(--font-head); text-transform: uppercase; font-size: 2.2rem; }
.error-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ===== Mobile ===== */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { display: flex; align-items: center; min-height: 44px; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-date { font-size: 44px; }
  .section-flex, .item-row, .item-row:nth-child(even) { flex-direction: column; }
  .item-row .img-box { flex: 0 0 auto; width: 100%; }
  .tip-grid { grid-template-columns: 1fr; }
  .section-flex .col-cards { flex-direction: column; flex-wrap: nowrap; }
  .section-flex .col-cards .agenda-card { flex: 1 1 auto; width: 100%; }
  .sun-burst { width: 150px; height: 150px; }
  .hero-skyline { margin-top: 10px; }
}
