/* CC du Val de l'Aisne — period-inspired civic portal
   Palette: terracotta / sage / honey on cream
   Typography: Lora (serif headings) + Source Sans 3 (body)
*/

:root {
  --cream:        #e8ede1;
  --cream-soft:   #f2f4ea;
  --cream-warm:   #dfe6d4;
  --paper:        #f9f8f0;
  --ink:          #1e261f;
  --ink-muted:    #54604f;
  --ink-soft:     #7c8876;
  --rule:         #cbd4c0;
  --rule-soft:    #e0e6d6;
  --terracotta:   #1e3d2c;
  --terracotta-d: #142a1f;
  --terracotta-l: #2f5a42;
  --sage:         #2b8e52;
  --sage-d:       #1c7040;
  --honey:        #b98f3c;
  --honey-d:      #8a6720;
  --bg-tile:      #e6ecdb;
  --shadow-soft:  0 1px 0 rgba(20, 42, 31, 0.08);
  --shadow-card:  0 1px 2px rgba(20, 42, 31, 0.06), 0 0 0 1px var(--rule-soft);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: "Lora", "Times New Roman", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: 2.25rem; line-height: 1.15; }
h2 { font-size: 1.5rem; line-height: 1.25; }
h3 { font-size: 1.15rem; line-height: 1.3; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-d); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }

/* ───── Layout ───── */
.site {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  box-shadow: 0 0 0 1px var(--rule-soft);
}

/* Utility bar — language + search */
.utility {
  background: var(--terracotta-d);
  color: var(--cream-soft);
  font-size: 0.82rem;
  padding: 0.4rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.utility a { color: var(--cream-soft); }
.utility a:hover { color: var(--cream); }
.utility .lang {
  display: flex; gap: 0.6rem; align-items: center;
}
.utility .lang span { opacity: 0.5; }
.utility .lang a.active { color: var(--honey); font-weight: 600; }
.utility .util-meta { display: flex; gap: 1.2rem; align-items: center; opacity: 0.9; }

/* Header — crest + wordmark */
.masthead {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.6rem 1.4rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--paper), var(--cream-soft));
}
.crest {
  width: 88px; height: 88px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
}
.crest img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wordmark .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}
.wordmark h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--terracotta-d);
  font-weight: 600;
}
.wordmark .tagline {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 0.15rem;
}
.masthead-meta {
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.45;
}
.masthead-meta .dept { color: var(--sage-d); font-weight: 600; }

/* Primary nav */
.mainnav {
  background: var(--terracotta);
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--terracotta-d);
  border-bottom: 1px solid var(--terracotta-d);
}
.mainnav a {
  color: var(--cream-soft);
  padding: 0.75rem 1.1rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border-right: 1px solid rgba(255,255,255,0.12);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.12s;
}
.mainnav a:hover { background: var(--terracotta-d); text-decoration: none; color: var(--cream); }
.mainnav a.current {
  background: var(--cream);
  color: var(--terracotta-d);
  font-weight: 600;
}
.mainnav a .nav-icon {
  width: 14px; height: 14px; opacity: 0.7;
}

/* Body grid */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.6rem;
  padding: 1.6rem 1.4rem 2.4rem;
}
.layout.wide { grid-template-columns: 1fr; }
.layout.three { grid-template-columns: 220px 1fr 240px; }

/* Side nav */
.sidenav { font-size: 0.92rem; }
.sidenav .panel + .panel { margin-top: 1.2rem; }
.panel {
  background: var(--cream-soft);
  border: 1px solid var(--rule-soft);
}
.panel-head {
  background: var(--sage);
  color: var(--cream-soft);
  padding: 0.45rem 0.8rem;
  font-family: "Lora", Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.panel-head.honey { background: var(--honey-d); }
.panel-head.terra { background: var(--terracotta); }
.panel-body { padding: 0.7rem 0.8rem; }
.panel-list { list-style: none; padding: 0; margin: 0; }
.panel-list li { border-bottom: 1px dotted var(--rule); }
.panel-list li:last-child { border-bottom: 0; }
.panel-list a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--ink);
  font-size: 0.9rem;
}
.panel-list a:hover { background: var(--cream-warm); text-decoration: none; }
.panel-list a.current { color: var(--terracotta); font-weight: 600; }

/* Breadcrumbs */
.crumbs {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--terracotta); }
.crumbs .sep { margin: 0 0.4rem; opacity: 0.5; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
  align-items: stretch;
}
.hero-image {
  background: var(--cream-warm);
  border: 1px solid var(--rule);
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.hero-copy {
  background: var(--cream-soft);
  border: 1px solid var(--rule-soft);
  padding: 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-d);
  margin-bottom: 0.5rem;
}
.hero-copy h2 {
  font-size: 1.85rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.hero-copy p { color: var(--ink-muted); margin-bottom: 1rem; }

/* Image placeholder slots */
.slot {
  background-color: var(--cream-warm);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 12px,
    rgba(30, 61, 44, 0.06) 12px 13px
  );
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.72rem;
  color: var(--ink-muted);
  padding: 1rem;
  position: relative;
}
.slot::before {
  content: "📷";
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  opacity: 0.5;
  filter: grayscale(1);
}
.slot .slot-label {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.slot .slot-id {
  font-size: 0.65rem;
  opacity: 0.65;
  letter-spacing: 0.05em;
}

/* Section heading */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--terracotta);
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--terracotta-d);
}
.section-head .more {
  font-size: 0.82rem;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.12s;
}
.card:hover {
  box-shadow: 0 2px 8px rgba(74, 53, 30, 0.12);
  transform: translateY(-1px);
}
.card .slot { border: 0; border-bottom: 1px solid var(--rule-soft); aspect-ratio: 16 / 10; }
.card .card-body { padding: 0.85rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--terracotta); text-decoration: none; }
.card .meta {
  font-size: 0.78rem;
  color: var(--sage-d);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.card .excerpt {
  font-size: 0.88rem;
  color: var(--ink-muted);
  flex: 1;
  margin: 0 0 0.75rem;
}
.card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
  border-top: 1px dotted var(--rule);
  padding-top: 0.5rem;
}
.card .tag {
  display: inline-block;
  background: var(--cream-warm);
  color: var(--terracotta-d);
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
  border: 1px solid var(--rule);
  letter-spacing: 0.04em;
}

/* News list */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px dotted var(--rule);
}
.news-list li:last-child { border-bottom: 0; }
.news-list .date {
  font-family: "Lora", Georgia, serif;
  color: var(--terracotta);
  font-size: 0.85rem;
  line-height: 1.2;
}
.news-list .date .day { display: block; font-size: 1.6rem; font-weight: 600; color: var(--terracotta-d); }
.news-list .date .month { display: block; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; }
.news-list h3 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.news-list h3 a { color: var(--ink); }
.news-list h3 a:hover { color: var(--terracotta); }
.news-list .excerpt { font-size: 0.88rem; color: var(--ink-muted); margin: 0; }

/* Detail page */
.detail-hero {
  position: relative;
  margin-bottom: 1.4rem;
}
.detail-hero .slot { aspect-ratio: 21 / 9; min-height: 280px; }
.detail-head {
  padding: 1rem 0 1.2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.4rem;
}
.detail-head .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-d);
  margin-bottom: 0.4rem;
}
.detail-head h1 { font-size: 2.2rem; margin-bottom: 0.4rem; color: var(--terracotta-d); }
.detail-head .lede { font-size: 1.1rem; color: var(--ink-muted); margin: 0; max-width: 60ch; }

.detail-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
}
.detail-body .prose { font-size: 1rem; }
.detail-body .prose p { margin-bottom: 1em; }
.detail-body .prose h2 {
  font-size: 1.3rem;
  margin: 1.6em 0 0.5em;
  color: var(--terracotta-d);
}
.detail-body .prose h3 { font-size: 1.05rem; margin: 1.3em 0 0.3em; }
.detail-body .prose blockquote {
  border-left: 3px solid var(--honey);
  padding: 0.4rem 0 0.4rem 1.1rem;
  margin: 1.2rem 0;
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  color: var(--ink-muted);
}

/* Info table (used for hotel/restaurant cards, contact details) */
.infobox {
  background: var(--cream-soft);
  border: 1px solid var(--rule-soft);
  padding: 1rem;
  font-size: 0.9rem;
}
.infobox h3 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-d);
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.infobox dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 0.9rem; }
.infobox dt { color: var(--ink-muted); font-size: 0.82rem; }
.infobox dd { margin: 0; color: var(--ink); }
.infobox .infobox-cta { margin-top: 0.9rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--terracotta);
  color: var(--cream-soft);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--terracotta-d);
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--terracotta-d); color: var(--cream); text-decoration: none; }
.btn.btn-ghost {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--rule);
}
.btn.btn-ghost:hover { background: var(--cream-warm); color: var(--terracotta-d); }
.btn.btn-sage { background: var(--sage); border-color: var(--sage-d); }
.btn.btn-sage:hover { background: var(--sage-d); }

/* Stars (ratings) */
.stars { color: var(--honey-d); letter-spacing: 0.1em; font-size: 0.9rem; }

/* Filters bar */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--cream-soft);
  border: 1px solid var(--rule-soft);
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
}
.filterbar .filterbar-label { color: var(--ink-muted); margin-right: 0.4rem; }
.chip {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
}
.chip:hover { background: var(--cream-warm); text-decoration: none; }
.chip.active { background: var(--sage); color: var(--cream-soft); border-color: var(--sage-d); }

/* List rows (hotels/restaurants list) */
.row-list { display: flex; flex-direction: column; gap: 1rem; }
.row {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 1.2rem;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  box-shadow: var(--shadow-soft);
  padding: 0;
}
.row .slot { border: 0; border-right: 1px solid var(--rule-soft); min-height: 160px; }
.row .row-body { padding: 1rem 0 1rem 0.2rem; display: flex; flex-direction: column; }
.row .row-body h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.row .row-body h3 a { color: var(--ink); }
.row .row-body h3 a:hover { color: var(--terracotta); }
.row .row-meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.row .row-meta .sep::before { content: "·"; margin: 0 0.4rem; opacity: 0.5; }
.row .row-excerpt { font-size: 0.92rem; color: var(--ink); flex: 1; margin: 0; }
.row .row-side {
  padding: 1rem 1rem 1rem 0;
  border-left: 1px dotted var(--rule);
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.row .row-side .price {
  font-family: "Lora", Georgia, serif;
  font-size: 1.4rem;
  color: var(--terracotta-d);
}
.row .row-side .price .unit { font-size: 0.78rem; color: var(--ink-muted); font-family: inherit; }

/* Footer */
.footer {
  background: var(--terracotta-d);
  color: var(--cream-warm);
  padding: 1.6rem 1.4rem;
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1.6rem;
}
.footer h4 {
  font-family: "Lora", Georgia, serif;
  font-size: 0.95rem;
  color: var(--honey);
  margin: 0 0 0.6rem;
  letter-spacing: 0.02em;
}
.footer a { color: var(--cream-warm); display: block; padding: 0.15rem 0; }
.footer a:hover { color: var(--cream); }
.footer .footer-meta {
  color: var(--cream-warm);
  opacity: 0.7;
  font-size: 0.78rem;
  line-height: 1.5;
}
.footer-bottom {
  background: #0e1d14;
  color: var(--cream-warm);
  font-size: 0.78rem;
  padding: 0.7rem 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  opacity: 0.85;
}
.footer-bottom a { color: var(--cream-warm); }

/* Mini-map placeholder */
.mini-map {
  aspect-ratio: 4 / 3;
  background: var(--cream-warm);
  background-image:
    radial-gradient(ellipse at 30% 40%, var(--sage) 0%, transparent 22%),
    radial-gradient(ellipse at 60% 70%, var(--honey-d) 0%, transparent 18%),
    repeating-linear-gradient(90deg, transparent 0 32px, rgba(30,61,44,0.05) 32px 33px),
    repeating-linear-gradient(0deg, transparent 0 32px, rgba(30,61,44,0.05) 32px 33px);
  background-blend-mode: multiply, multiply, normal, normal;
  border: 1px solid var(--rule);
  position: relative;
}
.mini-map::after {
  content: "Carte interactive — placeholder";
  position: absolute;
  bottom: 8px; left: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  background: var(--paper);
  padding: 0.2rem 0.5rem;
  color: var(--ink-muted);
}

/* Quick facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--cream-soft);
  border: 1px solid var(--rule-soft);
  margin-bottom: 1.4rem;
}
.facts .fact {
  padding: 0.9rem 1rem;
  border-right: 1px solid var(--rule-soft);
  text-align: center;
}
.facts .fact:last-child { border-right: 0; }
.facts .fact .num {
  font-family: "Lora", Georgia, serif;
  font-size: 1.8rem;
  color: var(--terracotta-d);
  display: block;
  line-height: 1.1;
}
.facts .fact .lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

/* Page header strip (catalog top) */
.page-header {
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 1.4rem 1.2rem;
}
.page-header .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-d);
  margin-bottom: 0.3rem;
}
.page-header h1 { font-size: 2.1rem; color: var(--terracotta-d); margin-bottom: 0.3rem; }
.page-header .lede { font-size: 1.05rem; color: var(--ink-muted); max-width: 60ch; margin: 0; }

/* Responsive trim */

/* Intermediate breakpoint — drop the right rail of three-column layouts first
   so the page stays usable on tablet-landscape widths (~900–1100px). */
@media (max-width: 1100px) {
  .layout.three { grid-template-columns: 220px 1fr; }
  .layout.three > aside.sidenav:last-of-type { display: none; }
}

/* Drop to single column once the left rail no longer fits comfortably. */
@media (max-width: 880px) {
  .layout, .layout.three { grid-template-columns: 1fr; }
  .layout.three > aside.sidenav:last-of-type { display: block; }
  .hero { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .row .slot { border-right: 0; border-bottom: 1px solid var(--rule-soft); aspect-ratio: 16 / 9; }
  .row .row-side { border-left: 0; border-top: 1px dotted var(--rule); padding: 1rem; }
  .footer { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .masthead { grid-template-columns: 64px 1fr; }
  .masthead-meta { display: none; }
  .crest { width: 64px; height: 64px; }
}
