/* ============================================================
   Kombo Blog — main stylesheet
   v2.0.0 — built from Laurene's Figma (2026-06-05).
   Mobile-first, strict responsive, no horizontal scroll.
   ============================================================ */

/* === Tokens === */
:root {
  /* Brand */
  --c-primary: #208cfb;
  --c-primary-dark: #0167d0;
  --c-secondary: #ffd720;
  --c-secondary-dark: #f3cc16;
  --c-text: #132968;

  /* Surfaces */
  --c-bg: #f1f3f6;
  --c-white: #ffffff;
  --c-subtle: #ebf4fd;

  /* Greys */
  --c-grey-700: #515152;
  --c-grey-500: #6f6f6f;
  --c-grey-400: #acacaf;
  --c-grey-300: #d7d7d7;
  --c-grey-200: #dfe1e4;
  --c-grey-100: #f1f3f6;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px;

  /* Radius */
  --r-tag: 6px;
  --r-input: 8px;
  --r-btn: 10px;
  --r-card: 14px;
  --r-pill: 999px;

  /* Shadows */
  --sh-card:
    0 0 2px 0 rgba(40, 41, 61, 0.04),
    0 2px 4px 0 rgba(96, 97, 112, 0.10);
  --sh-card-hover: 0 0 10px 2px rgba(19, 41, 104, 0.20);
  --sh-btn: 0 2px 5px 0 rgba(0, 0, 0, 0.15);
  --sh-btn-focus: 0 4px 10px 0 rgba(0, 0, 0, 0.15);

  /* Typography */
  --font: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;

  /* Layout — gutter scales smoothly from 20px to 80px */
  --max-w: 1184px;
  --gutter: clamp(20px, 5vw, 80px);

  /* Motion */
  --t-fast: 150ms ease-out;
  --t-base: 200ms ease-out;
  --t-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset (strict, modern) === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* hard guard against accidental horizontal scroll */
}
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: var(--r-input); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* === Container ===
   max-width = inner 1184 + 2 × gutter, so the *content* width matches the
   Figma container (1184px on a 1440-viewport, with 128px gutters).
*/
.section__inner,
.cta-wrap__inner,
.site-footer__inner,
.featured-wrap,
.hero__inner,
.article-card,
.site-header__inner {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  width: 100%;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--c-primary);
  color: var(--c-white);
  position: relative;
  z-index: 10; /* always above pulled-up content (article overlap) so nav stays clickable */
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 100px;
  padding-top: var(--s-4);
  padding-bottom: var(--s-4);
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 130px;
  color: var(--c-white);
}
.site-header__logo svg { width: 100%; height: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-left: auto; /* push to the right (only 2 links: Blog + Faire une recherche) */
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav li { list-style: none; }
.site-nav a {
  color: var(--c-white);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  padding-bottom: 8px;
  transition: opacity var(--t-fast);
  white-space: nowrap;
}
.site-nav a:hover { opacity: 0.85; }
.site-nav .current-menu-item > a::after,
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  background: var(--c-secondary);
  border-radius: 50%;
}

/* ============================================================
   Hero (home + archive + 404)
   ============================================================ */
.hero {
  background: var(--c-primary);
  color: var(--c-white);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  /* 3.75vw → 54px pile sur 1440 viewport, clamped on small/large screens. */
  padding-top: clamp(32px, 3.75vw, 72px);
}
.hero__title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.21;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-5);
  max-width: 760px;
}
.hero__lead {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.92;
  max-width: 600px;
}

/* Wave divider — sits BETWEEN the blue hero and the next (light) section.
   Block-level element, full-width. Blue part at top continues the hero,
   transparent part at bottom shows the next section's background. */
.wave-divider {
  width: 100%;
  height: clamp(140px, 20vw, 260px);
  line-height: 0;
  margin-top: -1px;     /* anti-seam at top (against hero) */
  margin-bottom: -1px;  /* anti-seam at bottom (against next section) */
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.wave-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Archive hero is a bit shorter */
.hero--archive .hero__inner { padding-bottom: clamp(60px, 10vw, 100px); }

/* Single-post hero — empty blue zone behind the article card.
   Sized so the article-card head visibly overlaps the blue zone. */
.hero--single {
  background: var(--c-primary);
  min-height: clamp(160px, 20vw, 260px);
}

/* ============================================================
   Featured card (home — overlapping the hero/light boundary)
   ============================================================ */
.featured-wrap {
  /* -15vw → -216px pile sur 1440 viewport, capped on small/large screens. */
  margin-top: clamp(-216px, -15vw, -120px);
  position: relative;
  z-index: 2;
}
.featured-card {
  background: var(--c-white);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: box-shadow var(--t-base);
  text-decoration: none;
  color: inherit;
}
.featured-card:hover { box-shadow: var(--sh-card-hover); }
.featured-card__img {
  aspect-ratio: 592 / 285;
  background: var(--c-grey-300);
  overflow: hidden;
}
.featured-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-card__body {
  padding: var(--s-6) var(--s-5);
  display: flex;
  flex-direction: column;
}
.featured-card__title {
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 1.21;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: var(--s-5);
}
.featured-card__lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-grey-700);
  flex: 1;
  margin-bottom: var(--s-5);
}
.featured-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.read-link {
  color: var(--c-primary);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.read-link:hover { color: var(--c-primary-dark); }

@media (max-width: 700px) {
  .featured-card { grid-template-columns: 1fr; }
}

/* ============================================================
   Eyebrow (shared)
   ============================================================ */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--s-3);
  display: block;
}

/* ============================================================
   Section + cards grid (home, archive, 404, related)
   ============================================================ */
.section {
  padding: clamp(48px, 7vw, 72px) 0 0;
}
.section--related {
  padding-top: clamp(40px, 6vw, 64px);
}
/* Archive cards overlap the hero + wave, like the home featured card.
   -14.5vw → -210px pile sur 1440 viewport, capped on small/large screens. */
.section--archive {
  margin-top: clamp(-210px, -14.5vw, -120px);
  padding-top: 0;
  position: relative;
  z-index: 2;
}
/* When there is no .section__head wrapping the title (case of single related),
   the .section__title needs its own bottom margin to space the grid. */
.section--related > .section__inner > .section__title {
  margin-bottom: var(--s-6);
}
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-6);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.section__title {
  font-size: clamp(24px, 3.5vw, 32px);
  line-height: 1.19;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.section__all {
  color: var(--c-primary);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.section__all:hover { color: var(--c-primary-dark); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* ============================================================
   Post cards
   ============================================================ */
.post-card {
  background: var(--c-white);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-card);
}
.post-card:hover {
  box-shadow: var(--sh-card-hover);
  transform: translateY(-2px);
}
.post-card__img {
  aspect-ratio: 373 / 256;
  background: var(--c-grey-300);
  overflow: hidden;
}
.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow);
}
.post-card:hover .post-card__img img { transform: scale(1.03); }
.post-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--c-grey-300);
}
.post-card__body {
  padding: var(--s-6) var(--s-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card__body .eyebrow { margin-bottom: var(--s-2); }
.post-card__title {
  font-size: 18px;
  line-height: 1.28;
  font-weight: 700;
  color: var(--c-text);
  flex: 1;
  margin-bottom: var(--s-5);
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-grey-500);
  font-size: 14px;
  flex-wrap: wrap;
}
.dot-sep {
  width: 2px; height: 2px;
  background: var(--c-grey-400);
  border-radius: 50%;
  display: inline-block;
}
.meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--c-grey-500);
  flex-wrap: wrap;
}

/* ============================================================
   CTA banner ("Prêt à voyager ?" home / "Prêt à partir malin ?" article)
   ============================================================ */
.cta-wrap {
  padding: clamp(48px, 7vw, 72px) 0;
}
.cta-banner {
  background: var(--c-text);
  color: var(--c-white);
  border-radius: var(--r-card);
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.cta-banner__title {
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.21;
  font-weight: 800;
  margin-bottom: var(--s-4);
  letter-spacing: -0.01em;
}
.cta-banner__lead {
  font-size: 14px;
  opacity: 0.85;
}

/* Centered variant (article page) */
.cta-banner--centered {
  flex-direction: column;
  text-align: center;
  padding: clamp(48px, 8vw, 64px) clamp(24px, 5vw, 48px);
  gap: var(--s-5);
}
.cta-banner--centered .cta-banner__title {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.21;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0;
}
.cta-banner--centered .cta-banner__accent { color: var(--c-secondary); }

.btn-kombo {
  background: var(--c-secondary);
  color: var(--c-text);
  padding: 14px 24px;
  border-radius: var(--r-btn);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  box-shadow: var(--sh-btn);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.btn-kombo:hover { transform: translateY(-2px); box-shadow: var(--sh-btn-focus); }

/* ============================================================
   Single post (article) — WHITE CARD on light-grey page bg
   ============================================================ */
.article-page {
  padding: 0 var(--gutter) clamp(32px, 5vw, 64px);
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  /* Pull the article card up so it sits very close to the header.
     The article-page hero is empty (no title/description of its own),
     so we use a much more aggressive overlap than other pages.
     -34vw → -490px on a 1440 viewport, clamped at -500 / -200. */
  margin-top: clamp(-500px, -34vw, -200px);
  position: relative;
  z-index: 2;
}
/* Article card: no global padding so the hero image sits edge-to-edge.
   Sections inside get their own padding. */
.article-card {
  background: var(--c-white);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  overflow: hidden;
  padding: 0;
  margin: 0 auto;
}
.article-card__head {
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 64px) clamp(24px, 4vw, 40px);
}
.article-card__title {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.21;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--c-text);
  margin: var(--s-3) 0 var(--s-5);
}
.article-card__lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  max-width: 880px;
  margin-bottom: var(--s-5);
}
.article-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  color: var(--c-grey-500);
  font-size: 14px;
}

/* Hero image — full card width, edge-to-edge (no horizontal padding) */
.article-card__hero-img {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--c-grey-300);
  aspect-ratio: 1184 / 419;
}
.article-card__hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body (Gutenberg-rendered content) */
.article-card__body {
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 64px) clamp(32px, 5vw, 64px);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
}
.article-card__body > * + * { margin-top: var(--s-4); }
.article-card__body p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-text);
}
.article-card__body h2 {
  font-size: clamp(20px, 2.8vw, 24px);
  line-height: 1.21;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-top: var(--s-7);
  margin-bottom: var(--s-4);
}
.article-card__body h3 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--c-text);
  margin-top: var(--s-5);
  margin-bottom: var(--s-3);
}
.article-card__body strong { font-weight: 700; }
.article-card__body em { font-style: italic; color: var(--c-primary-dark); }
.article-card__body a {
  color: var(--c-primary);
  border-bottom: 1px solid currentColor;
  font-weight: 500;
}
.article-card__body a:hover { color: var(--c-primary-dark); }
.article-card__body ul, .article-card__body ol {
  margin: var(--s-3) 0 var(--s-5) var(--s-5);
  font-size: 14px;
  line-height: 1.7;
}
.article-card__body ul { list-style: disc; }
.article-card__body ol { list-style: decimal; }
.article-card__body li { margin-bottom: var(--s-2); }
.article-card__body blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-5) var(--s-6);
  border-left: 4px solid var(--c-secondary);
  background: var(--c-subtle);
  border-radius: 0 var(--r-input) var(--r-input) 0;
  font-size: 16px;
  font-style: italic;
}

/* Article inline images (Gutenberg image blocks + raw <img> + legacy
   wp-caption figures). Strategy:
   - Preserve the image's NATIVE aspect ratio (no forced panoramic crop).
   - Cap the WIDTH to the body container so images never overflow.
   - Cap the HEIGHT (max 540px) so very tall portrait images don't
     dominate the reading rhythm.
   - Center horizontally so smaller-than-container images look intentional.

   We also defeat the legacy WordPress `<figure class="wp-caption"
   style="width: 4032px">` pattern that forces an absurd inline width and
   pushes content off the right side of the card.
*/
.article-card__body figure,
.article-card__body .wp-caption,
.article-card__body .wp-block-image {
  max-width: 100% !important;
  width: auto !important;          /* override inline style="width: XXXpx" */
  height: auto;
  margin: var(--s-6) auto;
  text-align: center;
}
.article-card__body img,
.article-card__body figure img,
.article-card__body .wp-caption img,
.article-card__body .wp-block-image img {
  display: block;
  max-width: 100%;
  width: auto;                     /* keep natural width, don't force fill */
  height: auto;                    /* preserve native aspect ratio */
  max-height: 540px;               /* cap super-tall portrait images */
  margin: 0 auto;                  /* center inside the figure / paragraph */
  border-radius: var(--r-card);
  background: var(--c-grey-300);
  object-fit: contain;
}

/* Optional caption text under wp-caption / Gutenberg image blocks */
.article-card__body .wp-caption-text,
.article-card__body figure figcaption {
  font-size: 13px;
  color: var(--c-grey-500);
  text-align: center;
  margin-top: var(--s-2);
  font-style: italic;
}
.article-card__body figure.wp-block-image {
  margin: var(--s-6) 0;
}
.article-card__body figure.wp-block-image figcaption {
  font-size: 13px;
  color: var(--c-grey-500);
  text-align: center;
  margin-top: var(--s-2);
}

/* CTA wrap on article = no horizontal gutter (already inside .article-page) */
.cta-wrap--article {
  padding: clamp(48px, 6vw, 64px) 0 clamp(32px, 5vw, 48px);
}

/* Related section on the article page — keep aligned with the article card */
.article-page .section--related {
  padding: clamp(24px, 5vw, 48px) 0 0;
}
.article-page .section--related .section__inner {
  padding-left: 0;
  padding-right: 0;
  max-width: var(--max-w);
}

/* ============================================================
   Pagination + empty state
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-7);
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 14px;
  background: var(--c-white);
  color: var(--c-text);
  box-shadow: var(--sh-card);
}
.pagination .current { background: var(--c-primary); color: var(--c-white); }
.pagination a:hover { background: var(--c-subtle); }
.empty-state {
  padding: clamp(64px, 10vw, 96px) var(--gutter);
  text-align: center;
  color: var(--c-grey-700);
}
.empty-state h2 {
  font-size: 24px;
  margin-bottom: var(--s-4);
  color: var(--c-text);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--c-text);
  color: var(--c-white);
  padding: var(--s-8) 0 var(--s-6);
  margin-top: 0;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--s-6);
}
.site-footer__brand .site-footer__logo {
  display: inline-block;
  width: 180px;
  color: var(--c-white);
}
.site-footer__brand .site-footer__logo svg { width: 100%; height: auto; display: block; }
.site-footer__socials {
  display: flex;
  gap: var(--s-4);
  margin-top: var(--s-5);
  list-style: none;
  padding: 0;
}
.site-footer__socials a {
  color: var(--c-white);
  opacity: 0.85;
  transition: opacity var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.site-footer__socials a:hover { opacity: 1; }
.site-footer__socials svg {
  width: 20px;
  height: 20px;
  display: block;
}
.site-footer__heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--s-4);
  letter-spacing: 0.02em;
}
.site-footer .footer-list,
.site-footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.site-footer .footer-list a,
.site-footer__col a {
  color: var(--c-white);
  opacity: 0.75;
  font-size: 14px;
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.site-footer .footer-list a:hover,
.site-footer__col a:hover { opacity: 1; }

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-7) var(--s-6); }
}
@media (max-width: 600px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   WordPress core block styles (Gutenberg)
   ============================================================ */
.alignwide, .alignfull { /* keep full-bleed blocks within the article card */
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: var(--s-5); margin-bottom: var(--s-4); }
.alignright { float: right; margin-left: var(--s-5); margin-bottom: var(--s-4); }
