
/* Ajustement local du header espagnol : même structure desktop,
 * seulement des espacements légèrement resserrés pour les libellés plus longs. */
@media(min-width: 1241px) {
  html[lang="es"] .main-nav__list { gap: clamp(7px, .75vw, 12px); }
  html[lang="es"] .nav-link,
  html[lang="es"] .nav-disclosure { font-size: .82rem; }
  html[lang="es"] .site-header__actions { gap: 8px; }
  html[lang="es"] .language-selector__toggle { padding-inline: 10px; }
  html[lang="es"] .site-header__actions > .btn--primary {
    padding-inline: 15px;
    font-size: .82rem;
    white-space: nowrap;
  }
}

/* La navigation se simplifie avant de devenir comprimée. */
@media(max-width: 1240px) {
  :root { --header-height: 78px; }
  .header-brand__logo { height: 58px; max-width: 260px; }
  .site-header__inner { justify-content: space-between; }
  .site-header__nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; max-height: calc(100vh - var(--header-height)); overflow-y: auto; background: var(--color-paper); box-shadow: 0 20px 34px rgb(10 29 50 / 11%); border-bottom: 1px solid var(--color-line); }
  .site-header__nav.is-open { display: block; }
  .site-header__mobile.menu-toggle { display: inline-flex; }
  .nav-item--mobile-cta { display: block; margin-top: 15px; }
  .nav-item--mobile-cta .btn { width: 100%; }
  .main-nav__list { display: grid; gap: 0; width: min(var(--container-max), calc(100% - 44px)); margin: 0 auto; padding: 12px 0 24px; }
  .nav-link, .nav-disclosure { width: 100%; justify-content: space-between; padding: 13px 9px; font-size: .98rem; border-bottom: 1px solid var(--color-line); }
  .nav-link[aria-current="page"]::after { inset: auto auto 5px 9px; width: 36px; }
  .dropdown { position: static; transform: none; box-shadow: none; border: none; width: 100%; padding: 3px 2px 9px 15px; }
  body.mobile-nav-open { overflow: hidden; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; }
}
@media(max-width: 720px) {
  .container { width: calc(100% - 38px); }
  .header-brand__logo { height: 50px; max-width: 225px; }
  .footer-brand__logo { height: 72px; max-width: min(100%, 340px); }
  .site-header__inner { gap: 10px; }
  .site-header__actions { gap: 7px; }
  .site-header__actions .btn--primary { display: none; }
    .site-footer { padding-top: 55px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer h2 { margin: 5px 0 17px; }
  .site-footer__bottom { margin-top: 42px; align-items: flex-start; flex-direction: column; gap: 9px; }
  .floating-contact { top: auto; bottom: 18px; right: 13px; transform: none; gap: 9px; }
  .floating-contact__link { width: 47px; height: 47px; min-height: 0; padding: 0; border-radius: 50%; }
  .floating-contact__label { display: none; }
  .dev-preview { padding: 80px 0 100px; min-height: 460px; }
}
@media(max-width: 420px) {
  .header-brand__logo { height: 43px; max-width: 195px; }
  .footer-brand__logo { height: 64px; max-width: min(100%, 290px); }
  .language-selector__toggle { padding: 8px 9px; font-size: .8rem; }
  .site-header__actions { gap: 5px; }
    .site-header__inner { gap: 3px; }
}

/* Accueil */
@media(max-width: 1100px) {
  .home-hero__grid { grid-template-columns: 1fr; min-height: auto; }
  .home-hero__copy { max-width: 780px; }
  .home-hero__visual { min-height: 440px; }
  .home-about__grid { grid-template-columns: 1fr 1fr; gap: 55px; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-mosaic { grid-template-columns: repeat(2, 1fr); min-height: auto; }
  .sector-panel { min-height: 380px; }
  .sector-panel:last-child { grid-column: 1 / -1; min-height: 330px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map, .contact-map iframe { min-height: 430px; }
}
@media(max-width: 820px) {
  .section-space { padding: 72px 0; }
  .section-heading--split { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .section-heading__link { justify-self: start; }
  .home-about__grid { grid-template-columns: 1fr; }
  .home-about__media { min-height: 390px; }
  .why-grid { grid-template-columns: 1fr; gap: 1px; }
  .why-grid article { min-height: 0; }
  .why-grid span { margin-bottom: 20px; }
  .home-empty { flex-direction: column; align-items: flex-start; gap: 25px; }
  .references-pending { align-items: flex-start; flex-direction: column; }
  .projects-grid { grid-template-columns: 1fr; }
}
@media(max-width: 620px) {
  .home-hero__grid { padding-block: 65px 75px; gap: 45px; }
  .home-hero h1 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .home-hero__visual { min-height: 330px; border-radius: 20px; }
  .home-hero__visual-note { left: 16px; right: 16px; bottom: 16px; }
  .home-hero__actions { align-items: stretch; flex-direction: column; }
  .home-hero__actions .btn { width: 100%; }
  .home-about__media { min-height: 320px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-card__media { min-height: 210px; }
  .sector-mosaic { grid-template-columns: 1fr; }
  .sector-panel, .sector-panel:last-child { grid-column: auto; min-height: 310px; }
  .sector-panel__content > span:not(.sector-panel__arrow) { max-height: 100px; margin-top: 10px; opacity: 1; }
  .contact-card__actions { flex-direction: column; }
  .contact-card__actions .btn { width: 100%; }
  .contact-map, .contact-map iframe { min-height: 350px; }
}

/* Ajustements directionnels pour l’arabe. */
html[dir="rtl"] .language-selector__menu { right: auto; left: 0; }
html[dir="rtl"] .dropdown { left: auto; right: 0; }
html[dir="rtl"] .nav-link[aria-current="page"]::after { left: 0; right: 0; }
@media(max-width: 1240px) {
  html[dir="rtl"] .site-header__nav { left: auto; right: 0; }
  html[dir="rtl"] .nav-link[aria-current="page"]::after { left: auto; right: 9px; }
}
