/* Shared base: header, navigation, footer, buttons, inner pages (formerly maquette.css + blocks.css). */

:where(.site-header) {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  align-items: center;
  gap: 28px;
  min-height: 84px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: none;
}

:where(.site-header.is-scrolled) {
  background: color-mix(in srgb, var(--wp--preset--color--navy) 96%, transparent);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

:where(.brand) {
  display: block;
}

:where(.brand img) {
  display: block;
  width: 188px;
}

:where(.main-nav) {
  display: flex;
}

:where(.main-nav a) {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.68);
}

:where(.site-header.is-scrolled .main-nav a) {
  color: #fff;
  text-shadow: none;
}

:where(:is(.eyebrow, .is-style-surtitre)) {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

:where(.contact-band p) {
  color: var(--muted);
  font-size: 1.08rem;
}

:where(.contact-band) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(42px, 6vw, 70px) clamp(20px, 6vw, 78px);
  background: var(--charcoal);
  color: #fff;
}

:where(.contact-band p) {
  color: rgba(255, 255, 255, 0.72);
}

/* As in the maquette: no space under the surtitre, 14px under the title. */
.contact-band :is(.eyebrow, .is-style-surtitre) {
  margin-bottom: 0;
}

.contact-band h2 {
  margin-bottom: 14px;
}

@media (max-width: 960px) {
  :where(.contact-band) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :where(.site-header) {
    min-height: 68px;
    padding-inline: 14px;
  }
  :where(.brand img) {
    width: 140px;
  }
  .header-action .wp-element-button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.header-action),
  :where(.primary-button),
  :where(.secondary-button),
  :where(.primary-button > span),
  :where(.secondary-button > span),
  :where(.header-action > span),
  :where(.footer-button > span),
  :where(.contact-path-action > span) {
    transition: none;
  }
}

:where(.site-footer) {
  background: var(--navy-deep);
  color: #fff;
}

:where(.footer-main) {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(210px, 0.9fr) minmax(260px, 1.1fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: start;
  padding: clamp(58px, 7vw, 94px) clamp(20px, 6vw, 78px);
}

:where(.footer-intro) {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  max-width: 330px;
}

:where(.footer-brand img) {
  display: block;
  width: min(230px, 100%);
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.24));
}

:where(.footer-contact),
:where(.footer-nav a) {
  color: rgba(255, 255, 255, 0.68);
}

:where(.footer-title) {
  margin: 0 0 22px;
  color: var(--accent-bright);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:where(.footer-nav a),
:where(.footer-contact a),
:where(.footer-bottom a) {
  transition: color 180ms ease;
}

:where(.footer-nav a:hover),
:where(.footer-contact a:hover),
:where(.footer-bottom a:hover) {
  color: #fff;
}

:where(.footer-contact) {
  display: grid;
  gap: 18px;
  font-style: normal;
  line-height: 1.65;
}

:where(.footer-project) {
  padding-left: clamp(28px, 3vw, 48px);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

:where(.footer-project h2) {
  max-width: 13ch;
  margin: 0 0 28px;
  color: #fff;
}

.footer-button .wp-element-button {
  min-height: 46px;
  justify-content: space-between;
  gap: 28px;
}

:where(.footer-bottom) {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 clamp(20px, 6vw, 78px);
  padding: 22px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.82rem;
}

@media (max-width: 1040px) {
  :where(.footer-main) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :where(.footer-project) {
    padding-top: 34px;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  :where(.footer-main) {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  :where(.footer-bottom) {
    flex-direction: column;
    gap: 10px;
  }
}

:root,
.editor-styles-wrapper {
  /* The maquette's two deep blues, used in its gradients and section backgrounds; brighter
     and bluer than navy / navy-deep, which they must not be replaced with. */
  --as-deep: #081a30;
  --as-night: #071426;
  --ink: var(--wp--preset--color--ink);
  --muted: var(--wp--preset--color--muted);
  --paper: var(--wp--preset--color--paper);
  --wash: var(--wp--preset--color--wash);
  --navy: var(--wp--preset--color--navy);
  --navy-deep: var(--wp--preset--color--navy-deep);
  --steel: var(--wp--preset--color--steel);
  --accent: var(--wp--preset--color--accent);
  --accent-bright: var(--wp--preset--color--accent-bright);
  --accent-dark: var(--wp--preset--color--accent-dark);
  --line: #d9dee2;
  --charcoal: #15191d;
}

:where(.site-header .brand img) {
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0,0,0,.45));
}

:where(.site-header .wp-block-navigation) {
  color: white;
  font-weight: 750;
  font-size: .94rem;
}

:where(.editor-styles-wrapper .site-header) {
  position: relative;
  background: var(--navy);
}

:where(body:not(.home) .site-header) {
  background: color-mix(in srgb, var(--wp--preset--color--navy) 96%, transparent);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

:where(body:not(.home) .wp-site-blocks > main) {
  padding-top: 120px;
}

:where(.admin-bar .site-header) {
  top: 32px;
}

/* Header as in the maquette (style.css .site-header, mobile.css): logo, menu and « Parler de
   votre projet » on one line; below 960px the menu and the button give way to « Menu + ». */

.site-header {
  grid-template-columns: auto minmax(0,1fr) auto;
  column-gap: 28px;
}

/* Pill buttons: WordPress makes the button wrapper a block, which left the text at the top
   of the pill; keep it centred. */

.site-header > .wp-block-site-logo,
.site-header > .as-button-row {
  position: relative;
  z-index: 1;
}

.site-header .wp-block-navigation.main-nav {
  min-width: 0;
  justify-content: center;
}

.site-header .main-nav .wp-block-navigation__container {
  justify-content: center;
  gap: clamp(16px,3vw,34px);
}

.site-header .main-nav .wp-block-navigation-item__content {
  white-space: nowrap;
}

/* Menu links: white, lifted and underlined by a gradient line on hover and on the current
   page (aria-current, set in functions.php). */

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  position: relative;
  padding: 8px 0;
  color: #fff;
  transition: color 180ms ease, transform 180ms ease;
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-bright), rgba(255,255,255,.72));
  content: "";
  transform: scaleX(0);
  transition: transform 220ms cubic-bezier(.2,.72,.22,1);
}

/* The line also runs under the Matériel arrow, part of the link in the maquette. */
.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .has-child > .wp-block-navigation-item__content::after {
  right: calc(-7px - .72rem);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:is(:hover,:focus-visible,[aria-current="page"]) {
  transform: translateY(-2px);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:is(:hover,:focus-visible,[aria-current="page"])::after {
  transform: scaleX(1);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:active {
  transform: translateY(0) scale(.96);
}

/* Matériel: arrow turned when open, then a square panel with a pink top line, separators and
   dots, sliding in under the item (maquette .nav-dropdown-menu). */

.site-header .main-nav .wp-block-navigation__submenu-icon {
  width: .72rem;
  height: .72rem;
  margin-left: 7px;
  color: #fff;
  transition: transform 180ms ease;
}

.site-header .main-nav .has-child > [aria-current="page"] ~ .wp-block-navigation__submenu-icon {
  transform: translateY(-2px);
}

.site-header .main-nav .has-child:is(:hover,:focus-within) > .wp-block-navigation__submenu-icon {
  transform: translateY(-2px) rotate(180deg);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .has-child:is(:hover,:focus-within) > .wp-block-navigation-item__content {
  transform: translateY(-2px);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .has-child:is(:hover,:focus-within) > .wp-block-navigation-item__content::after {
  transform: scaleX(1);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
  top: calc(100% + 14px);
  left: 50%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-top: 3px solid var(--accent-bright);
  border-radius: 0;
  background: rgba(11,25,41,.96);
  color: #fff;
  box-shadow: 0 22px 52px rgba(3,10,18,.4);
  backdrop-filter: blur(16px) saturate(135%);
  transform: translate(-50%,8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .has-child:is(:hover,:focus-within) > .wp-block-navigation__submenu-container,
.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .has-child > [aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
  width: max-content;
  min-width: 230px;
  transform: translate(-50%,0);
}

/* Keeps the panel open while the pointer crosses the gap under the item. */
.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 14px;
  content: "";
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item:last-child {
  border-bottom: 0;
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  position: relative;
  width: 100%;
  padding: 12px 16px 12px 20px;
  color: rgba(255,255,255,.78);
  font-size: .86rem;
  text-shadow: none;
  transition: background 180ms ease, color 180ms ease, padding 180ms ease;
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content::before {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-bright);
  content: "";
  opacity: .35;
  transform: translateY(-50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content:is(:hover,:focus-visible) {
  padding-left: 24px;
  background: rgba(255,77,129,.12);
  color: #fff;
}

.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content:is(:hover,:focus-visible)::before {
  opacity: 1;
  transform: translate(3px,-50%);
}

.site-header .wp-block-navigation a:focus-visible,
.site-header .wp-block-navigation button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}

/* « Menu + » (maquette mobile.css): the native menu opens as a panel under the button, the
   close button takes the place of « Menu + » as « Menu – ». */

.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close {
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 850;
  text-transform: uppercase;
}

.site-header :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) svg {
  display: none;
}

.site-header :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close)::before {
  content: "Menu";
}

.site-header :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close)::after {
  content: "+";
  font-size: 1.25rem;
  line-height: 0;
}

.site-header .wp-block-navigation__responsive-container-close::after {
  content: "–";
}

.site-header .main-nav .mobile-only {
  display: none;
}

/* Panel positions measured on the maquette: 75px from the top and 32px from the right edge
   at 800px, 67px and 14px on a phone; « Menu – » sits where « Menu + » was. */
@media (max-width: 960px) {
  .site-header {
    --as-menu-top: 75px;
    --as-menu-right: clamp(18px,4vw,56px);
    --as-header-height: 92px;
    grid-template-columns: minmax(0,1fr) auto;
  }
  .site-header .wp-block-navigation.main-nav {
    justify-content: flex-end;
    --navigation-layout-justification-setting: stretch;
  }
  .site-header > .as-button-row,
  .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none;
  }
  .site-header .wp-block-navigation__responsive-container-open {
    display: flex;
  }
  .site-header :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) {
    font-size: 1rem;
    line-height: 1.5;
  }

  .site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
    top: var(--as-menu-top);
    right: var(--as-menu-right);
    bottom: auto;
    left: auto;
    width: min(88vw,330px);
    padding: 12px 24px;
    overflow: visible;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 16px 34px rgba(0,0,0,.22);
    animation: none;
  }
  /* Positioned from the dialog, inside the panel's 12px / 24px padding. */
  .site-header .main-nav .is-menu-open .wp-block-navigation__responsive-container-close {
    top: calc(-1 * var(--as-menu-top) - 12px);
    right: -24px;
    display: flex;
    height: var(--as-header-height);
    padding: 0 24px;
    white-space: nowrap;
  }
  .site-header .main-nav:has(.is-menu-open) .wp-block-navigation__responsive-container-open {
    visibility: hidden;
  }
  .site-header .main-nav .is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content {
    max-height: calc(100vh - var(--as-menu-top) - 40px);
    padding-top: 0;
    overflow-y: auto;
  }
  .site-header .main-nav .is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content :is(.wp-block-navigation__container, .wp-block-navigation-item) {
    gap: 0;
  }
  .site-header .main-nav .is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,.16);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
  }
  .site-header .main-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:last-child > .wp-block-navigation-item__content {
    border-bottom: 0;
    color: var(--accent-bright);
  }
  .site-header .main-nav .is-menu-open .desktop-only {
    display: none;
  }
  .site-header .main-nav .is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
    min-width: 0;
    margin: 0 0 12px 2px;
    padding: 0 0 0 15px;
    border-left: 2px solid var(--accent);
  }
  .site-header .main-nav .is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding: 10px 0;
    border-bottom-color: rgba(255,255,255,.1);
    color: rgba(255,255,255,.72);
    font-size: .88rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    --as-menu-top: 67px;
    --as-menu-right: 14px;
    --as-header-height: 76px;
  }
}

@media(max-width:782px) {
  :where(.admin-bar .site-header) {
    top: 46px;
  }
}

:where(.site-header .brand a) {
  position: relative;
}

:where(.site-header .brand .brand-colour) {
  position: absolute;
  inset: 0;
  filter: none;
  width: 100%;
}

/* Colour shows only on the star and on the signature line; the rest of the logo stays white. */

:where(.site-header .brand .brand-colour-emblem) {
  clip-path: polygon(25% 0, 70% 0, 70% 42%, 25% 42%);
}

:where(.site-header .brand .brand-colour-signature) {
  clip-path: inset(80% 0 0 0);
}

:where(.footer-project) {
  --as-h2-size: clamp(1.65rem,2.4vw,2.65rem);
  --as-h2-line: 1.05;
  --as-h2-tracking: -.035em;
  --as-h2-margin: 28px;
}

:where(:is(.eyebrow, .is-style-surtitre)) {
  --as-p-margin: 12px;
}

:where(.footer-title) {
  --as-p-margin: 22px;
}

:where(.footer-contact p, .footer-bottom p) {
  --as-p-margin: 0;
}

.site-footer .footer-project h2 {
  margin-bottom: 28px;
}

.site-footer .footer-nav .wp-block-navigation__container {
  gap: 12px;
}

/* The navigation block forces color:inherit on its links: set the maquette's muted white on the menu itself. */

.site-footer .footer-nav {
  color: rgba(255,255,255,.68);
}

.site-footer .footer-nav .wp-block-navigation-item__content.wp-block-navigation-item__content:is(:hover,:focus-visible) {
  color: #fff;
}

/* Inner pages: shared base (formerly in interiors.css). */

.as-inner-page .page-hero {
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 190px clamp(20px, 12vw, 180px) clamp(64px, 10vw, 138px);
  background: #f1f3f4;
}

.as-inner-page .page-hero h1 {
  max-width: 1080px;
  margin: 0;
}

.as-inner-page .page-hero > p:last-child {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.08rem, 1.6vw, 1.38rem);
}

@media (max-width: 640px) {
  .as-inner-page .page-hero {
    padding-top: 152px;
  }
}

.as-inner-main {
  padding-top: 0!important;
}

.as-inner-page {
  --line: color-mix(in srgb, var(--wp--preset--color--glacier) 15%, transparent);
}

/* Buttons: colours, shape, padding and weight come from theme.json (Styles > Blocks >
   Button, variations « Secondaire » and « Clair »); only layout and motion live here. */

.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Same space as the one a flex box drops between the label and an arrow <span>. */
  column-gap: 0.21em;
  min-height: 44px;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.wp-element-button:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .wp-element-button {
    transition: none;
  }
  .wp-element-button:hover {
    transform: none;
  }
}
