:root {
  --teal: #1A4A4C;
  --teal-dark: #0D242B;
  --tan: #B8997F;
  --brown: #977254;
  --muted: #A59F87;
  --bg: #ffffff;
  --border: #e5e1d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--teal-dark);
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--teal);
  line-height: 1.3;
}
a { color: var(--brown); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.site-logo img { height: 56px; display: block; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  color: var(--tan);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.site-nav li.active > a,
.site-nav a:hover { color: var(--teal); border-bottom-color: var(--teal); text-decoration: none; }
.site-nav .has-dropdown { position: relative; }
.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 0;
  min-width: 160px;
  box-shadow: 0 6px 18px rgba(13,36,43,0.08);
  z-index: 20;
}
.site-nav .has-dropdown:hover .dropdown,
.site-nav .has-dropdown:focus-within .dropdown { display: block; }
.site-nav .dropdown li { display: block; }
.site-nav .dropdown a { display: block; padding: 8px 18px; border-bottom: none; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--teal); margin: 5px 0; }

@media (max-width: 820px) {
  .site-nav { display: none; width: 100%; order: 3; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-nav .dropdown { position: static; display: block; border: none; box-shadow: none; padding-left: 12px; }
  .nav-burger { display: block; }
}

/* ---------- content / gutenberg-ish blocks ---------- */
.page-content { padding: 40px 24px 80px; }
.page-title {
  text-align: center;
  text-transform: uppercase;
  font-size: 2rem;
  margin-bottom: 40px;
}
.content p { margin: 0 0 1.2em; }
.content h1, .content h2, .content h3 { margin-top: 1.6em; margin-bottom: 0.6em; }
.content .has-text-align-center { text-align: center; }
.content .has-text-align-left { text-align: left; }
.content ul, .content ol { padding-left: 1.4em; }
.content figure { margin: 0 0 1.5em; }
.content img { max-width: 100%; height: auto; display: block; }
.content video { max-width: 100%; width: 100%; aspect-ratio: 16/9; display: block; margin: 0 auto 1.5em; border-radius: 2px; background: #000; }
.content audio { display: block; width: 100%; max-width: 480px; margin: 0 auto 1.5em; }

.wp-block-embed { margin: 1.5em 0; }
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper {
  position: relative;
  padding-top: 56.25%;
}
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.content figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 6px; font-style: italic; }
.content blockquote {
  border-left: 3px solid var(--tan);
  margin: 1.5em 0;
  padding: 0.4em 1.4em;
  font-style: italic;
  color: var(--teal);
}

.wp-block-columns { display: flex; gap: 32px; flex-wrap: nowrap; margin: 1.5em 0; align-items: center; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
/* Photo-beside-quote rows: WP's spacers and block margins inside a column push
   the portrait off the quote's vertical centre, so drop them and let each
   column centre its own content instead. */
.wp-block-column { display: flex; flex-direction: column; justify-content: center; }
.wp-block-column > .wp-block-spacer { display: none; }
.wp-block-column > .wp-block-image,
.wp-block-column > .wp-block-quote { margin-top: 0; margin-bottom: 0; }
@media (max-width: 700px) {
  .wp-block-columns { flex-wrap: wrap; }
}

.wp-block-media-text {
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 2.5em 0;
  flex-wrap: wrap;
}
/* Gutenberg already swaps the source order (content, then media) when the media
   sits on the right, so no flex-direction reversal is needed here — adding one
   would cancel that swap back out and put the image on the left again. */
.wp-block-media-text.has-media-on-the-right { flex-direction: row; }
/* .content figure carries a 1.5em bottom margin; inside a media-text block that
   margin shows up as a dead strip under the photo — beat its specificity here. */
.wp-block-media-text__media, .content .wp-block-media-text__media { flex: 1 1 320px; margin: 0; }
.wp-block-media-text__media img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 2px; }
.wp-block-media-text__content { flex: 1 1 320px; }
.wp-block-media-text__content { padding: 0 24px; }
/* "image fill" variant: the photo should stretch to match the height of the
   text column next to it, cropping to fit rather than leaving empty space. */
.wp-block-media-text.is-image-fill-element { align-items: stretch; }
.wp-block-media-text.is-image-fill-element .wp-block-media-text__media { min-height: 260px; }
.wp-block-media-text.is-image-fill-element .wp-block-media-text__media img {
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* "Découvrez l'article suivant" link cards: read as a clean, self-contained
   card rather than a plain background color with a tan hyperlink dropped on it. */
.wp-block-media-text.has-background {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(13, 36, 43, 0.08);
}
@media (max-width: 700px) {
  .wp-block-media-text.has-background { grid-template-columns: 1fr; }
  .wp-block-media-text.has-background .wp-block-media-text__media { min-height: 220px; }
}
.wp-block-media-text.has-background .wp-block-media-text__media {
  min-height: 260px;
  position: relative;
}
.wp-block-media-text.has-background .wp-block-media-text__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}
.wp-block-media-text.has-background .wp-block-media-text__content {
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: start;
}
.wp-block-media-text.has-background .wp-block-media-text__content h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--teal);
  margin-bottom: 12px;
}
.wp-block-media-text.has-background .wp-block-media-text__content h2 a {
  color: inherit;
  text-decoration: none;
}
.wp-block-media-text.has-background .wp-block-media-text__content h2 a:hover { text-decoration: underline; }
.wp-block-media-text.has-background .wp-block-media-text__content p { margin: 0; color: var(--teal-dark); opacity: 0.85; }
.wp-block-media-text h2 { margin-top: 0; }

.wp-block-buttons { list-style: none; padding: 0; margin: 1em 0; }
.wp-block-button__link, .wp-block-button a {
  display: inline-block;
  background: var(--tan);
  color: #fff !important;
  padding: 10px 26px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: background 0.2s;
}
.wp-block-button__link:hover { background: var(--brown); }

.wp-block-gallery.has-nested-images {
  column-count: 3;
  column-gap: 12px;
  margin: 1.5em 0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image {
  margin: 0 0 12px;
  break-inside: avoid;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  cursor: zoom-in;
}
@media (max-width: 700px) {
  .wp-block-gallery.has-nested-images { column-count: 2; }
}

/* ---------- lightbox ---------- */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(13, 36, 43, 0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay img {
  max-width: 100%; max-height: 100%;
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  color: #fff; font-size: 2rem; line-height: 1;
  background: none; border: none; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-weight: 300;
}

.wp-block-image.alignwide, .alignwide { max-width: 100%; }
.wp-block-image img { border-radius: 2px; }
.wp-block-image.is-resized img { width: auto; max-width: 100%; }
.wp-block-image { text-align: center; }
.wp-block-image img { margin-left: auto; margin-right: auto; }
.wp-block-image.is-style-rounded img { border-radius: 9999px; }
figcaption { text-align: center; }

.wp-block-social-links { list-style: none; display: flex; gap: 16px; padding: 0; margin: 1.5em 0; }
.wp-block-social-links a { color: var(--brown); font-family: 'Montserrat', sans-serif; font-size: 0.85rem; }

.wp-block-search input[type=search] { padding: 10px 14px; border: 1px solid var(--border); width: 100%; max-width: 420px; }
.wp-block-search__button, .wp-block-search button {
  background: var(--teal); color: #fff; border: none; padding: 10px 18px; margin-left: 8px; cursor: pointer;
}
.wp-block-group { margin: 1em 0; }
.wp-block-spacer { }

/* home hero heading */
.home h2:first-child, .home h1:first-child {
  text-align: center;
  text-transform: uppercase;
  font-size: 2.1rem;
  margin-top: 0.5em;
}

/* ---------- La foule: grid & filters ---------- */
#foule-search {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 24px 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}
.foule-controls { margin: 50px 0 20px; padding-top: 30px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.tags-heading { font-size: 1.1rem; margin: 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-extra.tag-extra { display: none; }
.tag-cloud.expanded .tag-extra.tag-extra { display: inline-block; }
.tag-filter.more { align-self: flex-start; background: none; border: none; color: var(--brown); text-decoration: underline; padding: 4px 0; }
.tag-filter.more:hover { background: none; color: var(--teal); }
.tag-filter {
  background: #f3f1ea;
  border: 1px solid var(--border);
  color: var(--teal-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
}
.tag-filter:hover { background: var(--tan); color: #fff; }
.tag-filter.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.tag-filter.reset { background: var(--brown); color: #fff; border-color: var(--brown); }

.recit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
  margin-top: 30px;
}
.recit-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--teal-dark);
}
.recit-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.4s ease;
}
.recit-card:hover .recit-card-bg { transform: scale(1.06); }
.recit-card-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.92) 100%);
}
.recit-card-overlay span {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.9), 0 0 24px rgba(0,0,0,0.7);
}
#no-results { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- éclairages: stacked list (mirrors the theme's blog-list template) ---------- */
.eclairages-list { margin-top: 40px; }
.eclairage-item {
  display: block;
  text-decoration: none;
  margin-bottom: 4px;
}
.eclairage-item:hover { text-decoration: none; }
.eclairage-image {
  height: 380px;
  background-size: cover;
  background-position: center;
}
.eclairage-panel { padding: 36px 40px; }
.eclairage-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.9rem;
  margin: 0 0 16px;
  line-height: 1.25;
}
.eclairage-excerpt {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 16px;
  max-width: 760px;
  opacity: 0.92;
}
.eclairage-date {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
}
@media (max-width: 700px) {
  .eclairage-image { height: 240px; }
  .eclairage-panel { padding: 24px; }
}

/* ---------- single recit ---------- */
.recit { padding: 40px 24px 80px; }
.recit-hero { text-align: center; margin: 0 auto 40px; max-width: 480px; }
.recit-hero img { max-width: 100%; width: auto; height: auto; max-height: 480px; border-radius: 2px; }
.recit-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 2.8rem;
  text-align: center;
  margin: 0 auto 32px;
  max-width: 800px;
}
.recit-meta {
  text-align: center;
  color: var(--muted);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 40px;
}
.recit-content { max-width: 720px; margin: 0 auto; }
.recit-tags { max-width: 720px; margin: 30px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  background: #f3f1ea; color: var(--teal-dark);
  font-family: 'Montserrat', sans-serif; font-size: 0.75rem;
  padding: 5px 12px; border-radius: 20px;
}
.tag-chip:hover { background: var(--tan); color: #fff; text-decoration: none; }
.back-link { max-width: 720px; margin: 40px auto 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--teal-dark); color: #cfd9d8; margin-top: 60px; padding: 40px 24px; text-align: center; }
.footer-tagline { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.3rem; color: var(--tan); margin: 0 0 12px; }
.social-links { list-style: none; display: flex; justify-content: center; gap: 20px; padding: 0; margin: 0 0 16px; }
.social-links a { color: #fff; font-family: 'Montserrat', sans-serif; font-size: 0.85rem; }
.footer-note { font-size: 0.8rem; color: #8fa3a2; margin: 0; }
