/* GCITT BENIN SA — breakpoints.
 *
 * Components are written mobile-safe in design-system.css (fluid type, fluid
 * gutters, minmax grids). This file holds only the places where the layout
 * itself changes: 1080px (the header collapses to a menu), 1024px (tablet)
 * and 640px (phone). Loaded last so its rules win.
 */

/* ── Header collapses into a drawer ───────────────────────────────────── */
@media (max-width: 1080px) {
  .gc-burger {
    display: inline-flex;
  }
  .gc-site-nav__menu {
    position: fixed;
    inset: var(--gc-chrome-h) 0 0 0;
    z-index: 79;
    display: flex;
    flex-direction: column;
    gap: var(--gc-sp-5);
    padding: var(--gc-sp-4) var(--gc-gutter) calc(var(--gc-sp-6) + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--gc-bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity var(--gc-base) var(--gc-ease),
      transform var(--gc-base) var(--gc-ease),
      visibility 0s linear var(--gc-base);
  }
  .gc-menu-open .gc-site-nav__menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .gc-menu-open body {
    overflow: hidden;
  }
  .gc-site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .gc-site-nav__link {
    display: flex;
    min-height: 56px;
    border-bottom: 1px solid var(--gc-border);
    font-family: var(--gc-font-serif);
    font-size: 1.375rem;
    font-weight: 600;
  }
  .gc-site-nav__link::after {
    content: none;
  }
  .gc-site-nav__link[aria-current] {
    color: var(--gc-red);
  }
  .gc-site-nav__drawer-extra {
    display: flex;
    flex-direction: column;
    gap: var(--gc-sp-3);
  }
  /* Without script the drawer cannot open: show the links as a scrolling row
     under the bar instead of hiding the navigation altogether. */
  html:not(.gc-js) .gc-site-nav__menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    padding: 0 var(--gc-gutter) 8px;
    overflow-x: auto;
    background: none;
  }
  html:not(.gc-js) .gc-site-nav__links {
    flex-direction: row;
    gap: 22px;
  }
  html:not(.gc-js) .gc-site-nav__link {
    border: 0;
    font-family: inherit;
    font-size: 0.9375rem;
    min-height: 44px;
  }
  html:not(.gc-js) .gc-site-nav__drawer-extra,
  html:not(.gc-js) .gc-burger {
    display: none;
  }
}

/* ── Tablet ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gc-grid--4,
  .gc-steps--cards,
  .gc-testi__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gc-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gc-steps--cards > li:not(:last-child)::after {
    content: none;
  }
  .gc-split,
  .gc-split--form {
    grid-template-columns: minmax(0, 1fr);
  }
  /* In a stacked split, the picture leads and the copy follows. */
  .gc-split > .gc-split__media {
    order: -1;
  }
  .gc-site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gc-trustbar__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gc-trustbar__item {
    padding: 18px 16px;
  }
  .gc-trustbar__item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .gc-trustbar__item:nth-child(n + 3) {
    border-top: 1px solid var(--gc-border);
  }
  .gc-video {
    grid-template-columns: minmax(0, 1fr);
  }
  .gc-video__frame {
    order: -1;
  }
  .gc-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(140px, 28vw, 240px);
  }
  .gc-fab--call {
    display: flex;
  }
}

/* ── Phone ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --gc-topbar-h: 0px;
    --gc-infobar-h: 58px;
    --gc-nav-h: 52px;
  }
  .gc-topbar {
    display: none;
  }
  .gc-infobar__phones {
    display: none;
  }
  .gc-infobar__logo img {
    height: 38px;
  }
  .gc-infobar__cert img {
    height: 36px;
  }
  /* Every hero eyebrow ("GCITT BENIN SA · Promotion immobilière", "Service ·
     Prestations extérieures", …) must stay on one line on every phone;
     shrink it instead of letting it wrap. */
  .gc-page-hero .gc-kicker {
    gap: 8px;
    max-width: 100%;
    letter-spacing: 0.03em;
    font-size: clamp(0.5625rem, 3vw, 0.8125rem);
    white-space: nowrap;
  }
  .gc-page-hero .gc-kicker::before {
    width: 16px;
  }
  /* The bar keeps language and menu. The call to action lives in the
     drawer and in every hero, where there is room for a full-width button. */
  .gc-site-nav__tools > .gc-btn {
    display: none;
  }
  .gc-grid--2,
  .gc-grid--3,
  .gc-grid--4,
  .gc-steps--cards,
  .gc-testi__grid,
  .gc-form__grid,
  .gc-site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gc-stats--boxed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gc-page-hero {
    min-height: 0;
  }
  .gc-page-hero--home {
    min-height: calc(100svh - var(--gc-chrome-h));
  }
  .gc-page-hero__inner {
    padding-block: 72px 36px;
  }
  /* Thumb-sized actions: full width, stacked. */
  .gc-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--gc-sp-3);
  }
  .gc-actions .gc-link {
    justify-content: center;
  }
  .gc-card--row {
    gap: var(--gc-sp-3);
  }
  .gc-mosaic,
  .gc-mosaic--duo {
    grid-auto-rows: 44vw;
  }
  .gc-mosaic > .gc-media:first-child {
    grid-row: span 1;
  }
  .gc-cite-head {
    align-items: flex-start;
  }
  .gc-site-footer__legal {
    flex-direction: column;
  }
  .gc-fab {
    width: 54px;
    height: 54px;
  }
  .gc-fab--call {
    width: 46px;
    height: 46px;
  }
  .gc-lightbox {
    padding: 14px 14px 18px;
  }
  .gc-lightbox__nav {
    display: none;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────────────
 * Everything animated on this site is decorative. Honour the preference in
 * full: no entrance, no hover travel, no smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .gc-js [data-reveal],
  .gc-js [data-reveal='stagger'] > *,
  [data-reveal-key] {
    opacity: 1 !important;
    transform: none !important;
  }
  .gc-btn:hover,
  .gc-villa:hover,
  a.gc-card:hover,
  .gc-post-card:hover,
  .gc-social:hover,
  .gc-fab:hover {
    transform: none !important;
  }
}
