/* ==========================================================================
   TABLE OF CONTENTS
   1. Design tokens
   2. Base & global layout
   3. Site header
   4. Side rail (desktop ≥1280px)
   5. Navigation overlay (drawer)
   6. Site footer
   7. Shared sections: hero
   8. Pages: Accueil · À propos · Vision · Mandats · Médias
   9. Block editor canvas

   Breakpoints: 600 / 768 / 1024 / 1280 (side rail appears).
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  --header-height: var(--wp--preset--spacing--90, 8rem);
  --side-rail-width: var(--wp--preset--spacing--60, 5rem);
  --content-max-width: var(--wp--style--global--wide-size, 87.5rem);
  /* Inline padding of the header and footer bars below 1280px */
  --bar-gutter: var(--wp--preset--spacing--20);

  /* Light header & rail (default) */
  --nav-border-color: var(--wp--preset--color--secondary);
  --nav-btn-color: var(--wp--preset--color--secondary);
  --nav-social-color: var(--wp--preset--color--secondary);
  --nav-logo: url('../images/logo.svg');
  --nav-burger: url('../images/burger-dark.svg');
}

/* Dark header & rail (e.g. Vision) */
body.has-dark-header {
  --nav-border-color: var(--wp--preset--color--primary);
  --nav-btn-color: #ffffff;
  --nav-social-color: var(--wp--preset--color--primary);
  --nav-logo: url('../images/logo-dark.svg');
  --nav-burger: url('../images/burger.svg');
}

@media screen and (max-width: 600px) {
  :root {
    --bar-gutter: var(--wp--preset--spacing--10);
  }
}

/* Drawer open: header and rail lines disappear */
html.has-modal-open body {
  --nav-border-color: transparent;
}


/* ==========================================================================
   2. BASE & GLOBAL LAYOUT
   ========================================================================== */
html {
  scrollbar-gutter: stable;
}

/* Preserve the scrollbar gutter while WordPress locks page scrolling on the body */
html.has-modal-open {
  overflow-y: scroll;
}

html,
body {
  overflow-x: hidden;
  min-height: 100vh;
}

.wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.wp-block-group {
  width: 100%;
  flex: 1 0 auto;
}

body.has-dark-header.has-dark-footer main.wp-block-group {
  background-color: var(--wp--preset--color--secondary, #0f2346);
}

main.wp-block-group .alignwide {
  max-width: min(var(--content-max-width, 87.5rem), 100%);
}

/* Root (gutter) padding: narrow on tablet & mobile */
@media screen and (max-width: 1279.98px) {
  body {
    --wp--style--root--padding-left: var(--wp--preset--spacing--20);
    --wp--style--root--padding-right: var(--wp--preset--spacing--20);
  }

  /* Remove double padding on .alignwide */
  main.wp-block-group .alignwide,
  .entry-content .alignwide {
    padding-inline: 0;
  }

  /* Prevent inner groups within global padding from compounding padding */
  .has-global-padding>.alignwide.has-global-padding,
  .has-global-padding>.wp-block-group.has-global-padding:not(.alignfull) {
    padding-inline: 0;
  }
}

/* Root padding on desktop: content sits between the left gutter and the side rail,
   while full-width backgrounds still run underneath it */
@media screen and (min-width: 1280px) {
  body {
    --wp--style--root--padding-right: calc(var(--side-rail-width) + var(--wp--preset--spacing--50));
  }
}

/* Display-size serif paragraphs (hero sentences, quotes) use a tight 1.2 leading */
p.has-xx-large-font-size,
p.has-xxx-large-font-size {
  line-height: 1.2;
}

/* Buttons */
.wp-block-button {
  display: inline-flex;
}

.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

/* Site logo (header & footer): the uploaded image is hidden and replaced by an SVG background.
   Width and aspect ratio come from theme.json (core/site-logo). */
.site-header .wp-block-site-logo,
footer.site-footer .wp-block-site-logo {
  display: inline-flex;
}

.site-header .wp-block-site-logo .custom-logo-link,
footer.site-footer .wp-block-site-logo .custom-logo-link {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 191 / 59;
  background-image: var(--logo-image);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  transition: background-image 0.3s ease;
}

.site-header .wp-block-site-logo .custom-logo,
footer.site-footer .wp-block-site-logo .custom-logo {
  opacity: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 191 / 59;
  display: block;
}


/* ==========================================================================
   3. SITE HEADER
   ========================================================================== */
header.site-header {
  --logo-image: var(--nav-logo);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

body.admin-bar header.site-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

header.site-header .site-header-wrapper {
  width: 100%;
  max-width: 100%;
  padding-inline: 0;
  margin: 0;
}

/* Header inner row aligned with content grid */
header.site-header .site-header-inner {
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid var(--nav-border-color);
  transition: border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* Vertical centering for logo and actions */
header.site-header .site-header-logo,
header.site-header .site-header-actions {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin: 0;
}

/* Header action button */
header.site-header .wp-block-button__link:not(:hover) {
  color: var(--nav-btn-color);
  border-color: var(--nav-btn-color);
}

/* Drawer open: lift the header above the overlay (its bottom line is cleared in section 1) */
html.has-modal-open header.site-header {
  z-index: 100000;
  pointer-events: auto;
}

/* Burger button (32×26 SVG replaces the core icon) */
.wp-block-navigation__responsive-container-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 26px;
  padding: 0;
  border: none;
  background-color: transparent;
  background-image: var(--nav-burger);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wp-block-navigation__responsive-container-open:hover {
  opacity: 0.75;
}

.wp-block-navigation__responsive-container-open svg {
  display: none;
}

@media screen and (max-width: 1279.98px) {
  /* Full-height bar */
  header.site-header .site-header-inner {
    height: var(--header-height);
    padding-inline: var(--bar-gutter);
    gap: 16px;
  }

  header.site-header nav.nav-mobile-only {
    display: flex;
    align-items: center;
    margin: 0;
  }
}

@media screen and (min-width: 1280px) {
  header.site-header .site-header-wrapper {
    padding-left: var(--wp--style--root--padding-left);
    padding-right: var(--wp--style--root--padding-right);
  }

  /* Inner row aligned with the content grid */
  header.site-header .site-header-inner {
    max-width: min(var(--content-max-width, 87.5rem), 100%);
    margin-inline: auto;
    padding-block: min(var(--wp--preset--spacing--30), 1.625rem);
  }

  /* The side rail holds the burger on desktop */
  header.site-header nav.nav-mobile-only {
    display: none;
  }
}

/* Hide the header action button on tablet & mobile */
@media screen and (max-width: 1024px) {
  header.site-header .wp-block-buttons {
    display: none;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar header.site-header {
    top: var(--wp-admin--admin-bar--height, 46px);
  }
}


/* ==========================================================================
   4. SIDE RAIL (DESKTOP ≥1280px)
   ========================================================================== */
.site-side-rail {
  display: none;
}

@media screen and (min-width: 1280px) {
  .site-side-rail {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--side-rail-width);
    height: 100vh;
    border-left: 1px solid var(--nav-border-color);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.3s ease;
  }

  body.admin-bar .site-side-rail {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
  }

  .site-side-rail > .nav-desktop-rail {
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
  }

  /* Rail social links */
  .site-side-rail .side-rail-socials,
  .site-side-rail .side-rail-socials .wp-block-social-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
  }

  .site-side-rail .side-rail-socials .wp-block-social-links {
    padding-top: var(--wp--preset--spacing--30, 2rem);
    gap: var(--wp--preset--spacing--30, 2rem);
    pointer-events: auto;
    /* Icons carry an inline color:currentColor, so the color is set on the list */
    color: var(--nav-social-color);
  }

  .site-side-rail .side-rail-socials .wp-social-link {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.3s ease;
    width: 32px;
    height: 32px;
  }

  .site-side-rail .side-rail-socials .wp-social-link a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    color: inherit;
  }

  .site-side-rail .side-rail-socials .wp-social-link svg {
    fill: currentColor;
    width: 32px;
    height: 32px;
  }

  .site-side-rail .side-rail-socials .wp-social-link:hover {
    opacity: 0.7;
    transform: scale(1.08);
  }

  /* Drawer open: lift the rail above the overlay, clear its border and hide its socials */
  html.has-modal-open .site-side-rail {
    z-index: 100000;
    pointer-events: auto;
  }

  html.has-modal-open .site-side-rail .side-rail-socials {
    display: none;
  }
}


/* ==========================================================================
   5. NAVIGATION OVERLAY (DRAWER)
   WordPress handles modal sizing, scrolling and focus; the theme sets its look.
   Mobile & tablet: full-screen panel. Desktop (≥1025px): 440px side panel over a blurred backdrop.
   ========================================================================== */
.wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open {
  background-color: var(--wp--preset--color--secondary, #0f2346);
}

@media screen and (min-width: 1025px) {
  .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open {
    background-color: rgba(12, 25, 46, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open .wp-block-navigation__responsive-close {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open .wp-block-navigation__responsive-dialog {
    width: 440px;
    max-width: 100%;
    height: 100%;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--wp--preset--color--secondary, #0f2346);
    box-sizing: border-box;
  }
}

/* Overlay root container */
.gougeonep-custom-overlay {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Close button ("X") bar */
.gougeonep-custom-overlay__close {
  position: relative;
  width: 100%;
  height: var(--header-height, 128px);
  min-height: var(--header-height, 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--wp--preset--color--primary, #ce5f3a);
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #ffffff;
  box-sizing: border-box;
}

.gougeonep-custom-overlay__close svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 0.5px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gougeonep-custom-overlay__close:hover svg {
  opacity: 0.75;
  transform: rotate(90deg);
}

/* Menu links */
.gougeonep-custom-overlay__nav .wp-block-navigation__container {
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.gougeonep-custom-overlay__nav .wp-block-navigation-item {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}

.gougeonep-custom-overlay__nav .wp-block-navigation-item.wp-block-navigation-link {
  border-bottom: 1px solid var(--wp--preset--color--primary, #ce5f3a);
}

.gougeonep-custom-overlay__nav .wp-block-navigation-item .wp-block-navigation-item__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.5rem 1rem;
  font-family: var(--wp--preset--font-family--libre-caslon-text, "Libre Caslon Text", serif);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 400;
  line-height: 1.3;
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  transition: color 0.25s ease, opacity 0.25s ease;
  box-sizing: border-box;
}

.gougeonep-custom-overlay__nav .wp-block-navigation-item:hover .wp-block-navigation-item__content,
.gougeonep-custom-overlay__nav .wp-block-navigation-item .wp-block-navigation-item__content:focus-visible {
  color: var(--wp--preset--color--primary, #ce5f3a);
  opacity: 0.9;
  outline: none;
}

/* Social links */
.gougeonep-custom-overlay .menu-overlay-socials,
.gougeonep-custom-overlay .wp-block-social-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  width: 100%;
}

.gougeonep-custom-overlay .wp-block-social-links {
  margin-top: clamp(1.5rem, 3.5vh, 2.75rem);
  margin-bottom: 2.5rem;
  gap: 20px;
  color: #ffffff;
}

.gougeonep-custom-overlay .wp-block-social-links .wp-social-link {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.3s ease;
  width: 32px;
  height: 32px;
}

.gougeonep-custom-overlay .wp-block-social-links .wp-social-link a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  color: inherit;
}

.gougeonep-custom-overlay .wp-block-social-links .wp-social-link svg {
  width: 32px;
  height: 32px;
}

.gougeonep-custom-overlay .wp-block-social-links .wp-social-link:hover {
  opacity: 0.7;
  transform: scale(1.08);
}


/* ==========================================================================
   6. SITE FOOTER
   Variants (page meta → body class, or template-part style) only swap tokens.
   ========================================================================== */
footer.site-footer {
  --footer-border: var(--wp--preset--color--secondary);
  --footer-text-color: var(--wp--preset--color--secondary);
  --footer-heading-color: var(--wp--preset--color--primary);
  --logo-image: url('../images/logo.svg');
  width: 100%;
  font-size: var(--wp--preset--font-size--small);
  background-color: var(--wp--preset--color--base, #fef8ec);
  box-sizing: border-box;
}

/* Light blue (e.g. À propos) */
body.has-light-blue-footer,
body.has-light-blue-footer footer.site-footer,
footer.site-footer.is-style-light-blue {
  background-color: var(--wp--preset--color--contrast, #e8eff7);
}

/* Dark blue (e.g. Vision) */
body.has-dark-footer footer.site-footer,
footer.site-footer.is-style-dark {
  --footer-border: var(--wp--preset--color--primary);
  --footer-text-color: #ffffff;
  --footer-heading-color: var(--wp--preset--color--primary);
  --logo-image: url('../images/logo-dark.svg');
  background-color: var(--wp--preset--color--secondary, #0f2346);
}

/* Terracotta (e.g. Accueil) */
body.has-terracotta-footer footer.site-footer,
footer.site-footer.is-style-terracotta {
  --footer-border: var(--wp--preset--color--secondary);
  --footer-text-color: #ffffff;
  --footer-heading-color: var(--wp--preset--color--secondary);
  --logo-image: url('../images/logo-terracotta.svg');
  background-color: var(--wp--preset--color--primary, #ce5f3a);
}
/* Short pages: fill the stretched main area so no beige band shows above the footer */
body.has-terracotta-footer main.wp-block-group {
  background-color: var(--wp--preset--color--primary, #ce5f3a);
}

footer.site-footer .site-footer-wrapper {
  width: 100%;
  max-width: 100%;
  padding-inline: 0;
  margin: 0;
}

/* Inner footer row aligned with content grid */
footer.site-footer .site-footer-inner {
  width: 100%;
  border-top: 1px solid var(--footer-border);
  padding-top: var(--wp--preset--spacing--50, 3rem);
  padding-bottom: var(--wp--preset--spacing--70, 5rem);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--wp--preset--spacing--40);
  transition: border-color 0.3s ease;
}

footer.site-footer .footer-links-contact {
  display: flex;
  align-items: flex-start;
  gap: clamp(2.5rem, 6vw, 7rem);
}

footer.site-footer .footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

footer.site-footer .footer-column p {
  margin: 0;
  line-height: 1.4;
  color: var(--footer-text-color);
}

footer.site-footer .footer-column a {
  color: var(--footer-text-color);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.3s ease;
}

footer.site-footer .footer-column a:hover {
  opacity: 0.7;
}

footer.site-footer .footer-column .footer-heading {
  font-weight: 600;
  color: var(--footer-heading-color);
  transition: color 0.3s ease;
}

/* Footer navigation menu */
footer.site-footer .footer-menu .wp-block-navigation__container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

footer.site-footer .footer-menu .wp-block-navigation-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

footer.site-footer .footer-menu .wp-block-navigation-item__content {
  padding: 0;
  margin: 0;
  line-height: 1.4;
  color: var(--footer-text-color);
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s ease, color 0.3s ease;
}

footer.site-footer .footer-menu .wp-block-navigation-item__content:hover {
  opacity: 0.7;
}

/* The footer has its own Contact column: hide the menu's contact item */
footer.site-footer .footer-menu .hide-in-footer,
footer.site-footer .footer-menu li:has(a[href^="mailto"]),
footer.site-footer .footer-menu li:has(a[href="#contact"]) {
  display: none;
}

@media screen and (max-width: 1279.98px) {
  footer.site-footer .site-footer-inner {
    padding-inline: var(--bar-gutter);
  }
}

@media screen and (min-width: 1280px) {
  footer.site-footer .site-footer-wrapper {
    padding-left: var(--wp--style--root--padding-left);
    padding-right: var(--wp--style--root--padding-right);
  }

  /* Inner row aligned with the content grid */
  footer.site-footer .site-footer-inner {
    max-width: min(var(--content-max-width, 87.5rem), 100%);
    margin-inline: auto;
    padding-inline: 0;
  }
}

@media screen and (max-width: 768px) {
  footer.site-footer .site-footer-inner {
    flex-direction: column;
  }

  footer.site-footer .footer-links-contact {
    width: 100%;
    justify-content: space-between;
    gap: 2rem;
  }
}

@media screen and (max-width: 600px) {
  footer.site-footer .footer-links-contact {
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
  }
}


/* ==========================================================================
   7. SHARED SECTIONS: HERO
   The header clearance spacer (::before) comes from the "Hero" group style (styles/group-hero.json).
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* !important: overrides the padding saved inline on the hero's inner group */
  .is-style-hero > .wp-block-group {
    padding-bottom: var(--wp--preset--spacing--70) !important;
  }
}


/* ==========================================================================
   8.1 ACCUEIL
   ========================================================================== */
@media screen and (min-width: 769px) {
  .home .is-style-hero {
    min-height: calc(var(--header-height) + 400px);
    box-sizing: border-box;
  }
}

/* Rotating hero phrase (assets/js/hero-phrases.js); the source list is only visible in the editor */
.hero-phrases {
  display: none;
}

.hero-rotating-text {
  transition: opacity 350ms ease-in-out;
}

.hero-rotating-text.is-transitioning {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotating-text {
    transition: none;
  }
}

/* Services section */
#services p:not(.services--cta) {
  margin-top: .5lh;
  max-width: 750px;
}

.services--title,
.services--list,
.services--list-item {
  padding-top: var(--wp--preset--spacing--30, 2rem);
}

.services--wrapper {
  padding-bottom: var(--wp--preset--spacing--30, 2rem);
}

@media screen and (min-width: 1280px) {
  .services--title,
  .services--list,
  .services--list-item {
    padding-top: 0;
  }

  .services--wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--40, 2.5rem);
    padding-bottom: 0;
  }

  .services--title {
    padding-top: var(--wp--preset--spacing--20, 1.25rem);
  }

  .services--top {
    border-bottom: 1px solid var(--wp--preset--color--secondary, #0f2346);
  }

  .services--top,
  .services--list-item {
    padding: var(--wp--preset--spacing--30, 2rem);
  }

  .services--list {
    border-left: 1px solid var(--wp--preset--color--secondary, #0f2346);
  }

  .services--list-item:not(:first-child) {
    border-left: 1px solid var(--wp--preset--color--secondary, #0f2346);
  }

  .services--bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: var(--wp--preset--spacing--40);
  }
}


/* ==========================================================================
   8.2 À PROPOS — no page-specific rules (light-blue footer variant in section 6)
   ========================================================================== */


/* ==========================================================================
   8.3 VISION — bars graphic
   ========================================================================== */
.vision-bars {
  max-width: 300px;
  margin: 0;
}

.vision-bars img {
  width: 100%;
  height: auto;
}

/* Columns stack below 782px: shrink the graphic and center it above the text */
@media screen and (max-width: 781px) {
  .vision-bars {
    width: 45%;
    margin-inline: auto;
  }
}


/* ==========================================================================
   8.4 MANDATS — featured projects grid
   Up to three cards side by side; stacked when the section is ≤1024px wide.
   ========================================================================== */
.mandats-featured-section {
  container: mandats-featured / inline-size;
}

.mandats-featured-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.mandats-featured-grid > .mandats-feature-card {
    padding-block-start: var(--wp--preset--spacing--40, 3rem);
    padding-block-end: var(--wp--preset--spacing--80);
  }

.mandats-feature-media {
  background-position: center;
  background-size: cover;
  min-height: 8rem;
}

.mandats-feature-card .mandats-feature-link {
  width: 36px;
  height: 36px;
  margin: 0;
  flex-shrink: 0;
}

.mandats-feature-link a {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mandats-feature-link a:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

/* !important: the image block saves an inline 36×36 size in the page content */
.mandats-feature-link img {
  width: 17px !important;
  height: 17px !important;
  object-fit: contain !important;
}

/* Stacked */
@container mandats-featured (width <= 1024px) {
  .mandats-featured-grid > .mandats-feature-card:not(:first-child) {
    border-top: 1px solid var(--wp--preset--color--secondary, #0f2346);
  }

  .mandats-feature-media {
    height: 240px;
  }
}

/* Side by side: 2 columns, or 3 when there are three cards */
@container mandats-featured (width > 1024px) {
  .mandats-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mandats-featured-grid:has(> .mandats-feature-card:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mandats-featured-grid > .mandats-feature-card {
    padding: var(--wp--preset--spacing--40, 3rem);
  }

  .mandats-featured-grid > .mandats-feature-card:not(:first-child) {
    border-left: 1px solid var(--wp--preset--color--secondary, #0f2346);
  }

  .mandats-featured-grid > .mandats-feature-card:first-child {
    padding-left: 0;
  }

  .mandats-featured-grid > .mandats-feature-card:last-child {
    padding-right: 0;
  }
}


/* ==========================================================================
   8.5 MÉDIAS — category sections and query loops
   ========================================================================== */
.media-section {
  border-top: 1px solid var(--wp--preset--color--secondary, #0f2346);
  padding-top: var(--wp--preset--spacing--50, 2.5rem);
  padding-bottom: var(--wp--preset--spacing--70, 4rem);
}

.media-section--subcategory {
  padding: var(--wp--preset--spacing--30, 1.5rem) 0;
}

@media screen and (min-width: 1280px) {
  .media-section {
    display: flex;
    padding: 0;
  }

  .media-section--content {
    border-left: 1px solid var(--wp--preset--color--secondary, #0f2346);
  }

  .media-section--category {
    flex: 1 0 17%;
    padding-top: var(--wp--preset--spacing--20, 1.25rem);
  }

  .media-section--subcategory {
    padding: var(--wp--preset--spacing--30, 1.5rem);
  }
}

/* Query loop grid: 3 columns → 2 (≤1024px) → 1 (≤600px) */
.media-section .wp-block-post-template {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

@media screen and (max-width: 1024px) {
  .media-section .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 600px) {
  .media-section .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

/* "Dans les couloirs" highlights a single item across two columns */
.query--couloirs li {
  grid-column: 1 / span 2;
}

/* Media card */
.media-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-card .wp-block-post-featured-image {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: var(--wp--preset--aspect-ratio--325-224, 325 / 224);
}

.media-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: var(--wp--preset--aspect-ratio--325-224, 325 / 224);
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.media-card:hover .wp-block-post-featured-image img {
  transform: scale(1.02);
}

/* Round white badge with the terracotta link icon, top right */
.media-card .wp-block-post-featured-image::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #ffffff;
  background-image: url('../images/lien.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.2s ease;
}

.media-card:hover .wp-block-post-featured-image::after {
  transform: scale(1.08);
}

.media-card .wp-block-post-title {
  margin-top: 12px;
  margin-bottom: 0;
  font-family: var(--wp--preset--font-family--lexend, sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--wp--preset--color--secondary, #0f2346);
}

.media-card .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}

.media-card .wp-block-post-title a:hover {
  color: var(--wp--preset--color--primary, #ce5f3a);
}


/* ==========================================================================
   9. BLOCK EDITOR CANVAS
   ========================================================================== */
/* No header clearance spacer in the editor */
.editor-styles-wrapper .is-style-hero::before {
  display: none;
}

/* Keep the burger visible in the editor at every canvas width */
.editor-styles-wrapper nav.nav-mobile-only {
  display: flex !important;
}

.editor-styles-wrapper .wp-block-button .wp-block-button__link {
  white-space: nowrap !important;
}

.editor-styles-wrapper .components-button.wp-block-navigation__responsive-container-open {
  height: 26px;
  min-height: 26px;
}

.editor-styles-wrapper .hero-phrases {
  display: block;
}
