/* ==========================================================================
   Latresne 360 — main stylesheet
   Plain CSS, no preprocessor (Hugo standard build). Brand tokens: SPEC §6.
   ========================================================================== */

/* --- Self-hosted fonts (no CDN) -------------------------------------------- */
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/quicksand-v37-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/quicksand-v37-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/quicksand-v37-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/roboto-v51-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/roboto-v51-latin-700.woff2") format("woff2");
}

/* --- Design tokens --------------------------------------------------------- */
:root {
  --magenta: #B00858;
  --teal: #104848;
  --ink: #212121;
  --muted: #646464;
  --bg: #FFFFFF;

  /* Dark slate bar for header + footer (Wix color_37). */
  --bar-bg: #213D4B;
  --bar-fg: #FFFFFF;
  --bar-border: #909EA5;

  --font-heading: "Quicksand", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;

  --container: 1100px;
  --space: 1rem;
  --radius: 8px;
}

/* --- Reset / base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--magenta); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }

/* --- Typography ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--teal);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

/* --- Layout primitives ----------------------------------------------------- */
.container,
.site-header__inner,
.site-footer__inner,
main > .page,
main > .home {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space);
}

main { padding-block: 2.5rem; }

section { margin-block: 2.5rem; }

/* --- Buttons / CTAs -------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.7em 1.5em;
  border-radius: var(--radius);
  border: 2px solid var(--magenta);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--magenta); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #8e0646; border-color: #8e0646; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--magenta); }
.btn-secondary:hover, .btn-secondary:focus { background: var(--magenta); color: #fff; text-decoration: none; }

/* --- Header / nav ---------------------------------------------------------- */
.site-header {
  background: var(--bar-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}
.site-logo { display: inline-flex; align-items: center; }
.site-logo svg { height: 48px; width: auto; display: block; }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--bar-fg);
}
.site-nav a:hover, .site-nav a:focus { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--bar-bg);
  color: var(--bar-fg);
  margin-top: 3rem;
  padding-block: 1.5rem;
  font-size: 0.95rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer p { margin: 0; }

/* --- Home ------------------------------------------------------------------ */
.home .tagline { font-family: var(--font-heading); font-weight: 500; color: var(--teal); font-size: 1.25rem; }
.home .slogan { font-family: var(--font-heading); color: var(--magenta); }

/* --- Skip-friendly main target -------------------------------------------- */
#main { scroll-margin-top: 1rem; }

/* ==========================================================================
   M3 — page content
   ========================================================================== */

/* --- Home ------------------------------------------------------------------ */
.hero { text-align: center; padding-block: 1rem 2rem; }
.hero h1 { margin-bottom: 0.2em; }
.hero-tagline { font-family: var(--font-heading); font-weight: 500; color: var(--teal); font-size: 1.25rem; margin: 0; }
.hero-slogan { font-family: var(--font-heading); font-weight: 700; color: var(--magenta); font-size: 1.1rem; margin: 0.2em 0 1rem; }
.hero-intro { max-width: 46ch; margin-inline: auto; }

/* Full-bleed banner: video + photo span the whole viewport at the top. */
.hero-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: -2.5rem; /* cancel main's top padding */
}
.hero-banner > video,
.hero-banner > .hero-photo-wrap {
  width: 100%;
  height: min(85vh, 820px);
}
.hero-banner > video {
  object-fit: cover;
  display: block;
}
.hero-banner .hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Logo overlaid on the right photo (matches original). */
.hero-photo-wrap { position: relative; }
.hero-logo {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(70%, 420px);
  height: auto;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.social-links a {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}
.social-links svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}
.social-links a:hover svg,
.social-links a:focus svg { opacity: 0.7; }

/* --- Instagram feed (Behold, build-time render) --------------------------- */
.ig-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 0.5rem;
}
.ig-post { position: relative; }
.ig-post a { display: block; }
.ig-post img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.ig-post a:hover img,
.ig-post a:focus img { opacity: 0.9; }
.ig-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  color: #fff;
  font-size: 0.9rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.ig-date {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-heading);
}
.ig-follow { margin-top: 1rem; font-family: var(--font-heading); font-weight: 500; }

/* Captions stay in the DOM (SEO + lightbox source) but off-screen in the grid. */
.ig-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Lightbox (built by instagram.js) — Quicksand throughout, mimics the Behold widget */
.ig-lightbox[hidden] { display: none; }
.ig-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  font-family: var(--font-heading);
}
.ig-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}
.ig-lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  max-height: 90vh;
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 700px) {
  .ig-lightbox__dialog { flex-direction: row; }
}
.ig-lightbox__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
}

/* Post-to-post arrows, outside the dialog like the widget */
.ig-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  cursor: pointer;
}
.ig-lightbox__nav:hover { background: rgba(255, 255, 255, 0.3); }
.ig-lightbox__nav--prev { left: 0.5rem; }
.ig-lightbox__nav--next { right: 0.5rem; }

.ig-lightbox__media {
  position: relative;
  flex: 1 1 58%;
  background: #000;
  display: grid;
  place-items: center;
  min-height: 0;
}
.ig-lightbox__media img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* Slide arrows + dots inside a carousel post */
.ig-lightbox__slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
}
.ig-lightbox__slide[hidden] { display: none; }
.ig-lightbox__slide--prev { left: 0.5rem; }
.ig-lightbox__slide--next { right: 0.5rem; }
.ig-lightbox__dots {
  position: absolute;
  bottom: 0.6rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}
.ig-lightbox__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.ig-lightbox__dot.is-active { background: #fff; }

.ig-lightbox__body {
  flex: 1 1 42%;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ig-lightbox__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.75rem;
}
.ig-lightbox__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}
.ig-lightbox__date {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-heading);
  margin-top: -0.5rem;
}
.ig-lightbox__caption {
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.5;
}
.ig-lightbox__link { margin-top: auto; font-weight: 500; }

/* --- Newsletter ------------------------------------------------------------ */
.newsletter {
  text-align: center;
  background: #f6f7f8;
  border-radius: var(--radius);
  padding: 2rem 1rem;
}
.newsletter-form { max-width: 30rem; margin: 1.25rem auto 0; }
.newsletter-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.newsletter-form__input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.7em 1em;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--bar-border);
  border-radius: var(--radius);
}
.newsletter-form__input:focus {
  outline: none;
  border-color: var(--magenta);
}
.newsletter-form .btn { flex: 0 0 auto; }
.newsletter-form__consent {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Prose pages (legal, actualités) -------------------------------------- */
.page h2 { margin-top: 1.6em; }
.page { max-width: 70ch; }
.equipe, .contact { max-width: var(--container); }

.contact-photo { margin: 1.25rem 0 1.75rem; }
.contact-photo img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}
.contact-photo ~ p { text-align: center; }

/* --- Équipe carousel ------------------------------------------------------- */
.carousel { position: relative; margin-top: 1.5rem; }

.slide {
  border: 1px solid #e6e6e6;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  background: #fff;
}
.slide-intro {
  /* Match source .font_7: Quicksand bold 15px/1.4, slate color_15. */
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--bar-bg);
  max-width: 70ch;
  margin: 0 auto 1.75rem;
  text-align: center;
}

/* 3-column binôme: Q&A card | duo photo | Q&A card (matches source). */
.binome {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

.slide-duo { margin: 0; }
.slide-duo img {
  width: 100%;
  border-radius: var(--radius);
}

/* "3 questions à" card — original graphic. */
.qcard { margin: 0; }
.qcard img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Carousel controls (revealed by JS). */
.carousel-btn {
  font-size: 1.5rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--magenta);
  background: #fff;
  color: var(--magenta);
  cursor: pointer;
}
.carousel-btn:hover, .carousel-btn:focus { background: var(--magenta); color: #fff; }

/* Side arrows (top-left / top-right) — only when JS enhances the carousel. */
.carousel-top-arrows { display: none; }
.carousel.is-enhanced .carousel-top-arrows { display: block; }
.carousel-arrow {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
}
.carousel-arrow-left { left: 0.75rem; }
.carousel-arrow-right { right: 0.75rem; }

/* When JS is active, only the current slide shows (others use [hidden]). */
.carousel.is-enhanced .slide { margin-bottom: 0; }
[hidden] { display: none !important; }

/* Stack the 3-column binôme on narrow screens: duo photo first, then cards. */
@media (max-width: 820px) {
  .binome { grid-template-columns: 1fr; }
  .slide-duo { order: -1; max-width: 480px; margin-inline: auto; }
  .hero-banner { grid-template-columns: 1fr; }
  .hero-banner > video,
  .hero-banner > .hero-photo-wrap { height: min(60vh, 480px); }
}

/* Visually-hidden but available to screen readers. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

