/* One optical unit = height of the shared "Geiq" wordmark, not the PNG canvas.
   Measured official light assets: BTP 254/358, Multi 200/283, general 58/75.
   Existing dark crops: both 368/521. Keep their original aspect ratios/assets.
   Deliberately no header, menu, theme-color or animation changes. */

/* Three-way selector, shared by Home and the interior pages. */
html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] {
  container-type:inline-size;
  grid-template-columns:4.724409fr 5.172414fr 6fr;
}
html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] .geiq-switcher__btn {
  padding-inline:8px !important;
}
html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] .geiq-switcher__logo-img {
  --brand-unit:24px;
  --brand-unit:min(24px, calc((100cqi - 64px) / 16));
  height:calc(var(--brand-unit) * 1.293103) !important;
  width:auto !important;
  max-width:100%;
  max-height:none !important;
  object-fit:contain;
  flex-shrink:0;
}
html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] [data-val="btp"] .geiq-switcher__logo-img {
  height:calc(var(--brand-unit) * 1.409449) !important;
}
html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] [data-val="multi"] .geiq-switcher__logo-img {
  height:calc(var(--brand-unit) * 1.415) !important;
}
html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] [data-val="general"] .geiq-switcher__logo-img {
  translate:0 calc(var(--brand-unit) * -.165);
}

/* The same optical size for both two-way controls, with no interaction change. */
html:root body.geiq56-brand-scale-v10592 .site-main :is(.contact-switcher,.geiq-brand-switch) {
  container-type:inline-size;
}
html:root body.geiq56-brand-scale-v10592 .site-main :is(.contact-switcher,.geiq-brand-switch) button img {
  --brand-unit:29px;
  --brand-unit:min(29px, calc((50cqi - 40px) / 6));
  width:auto !important;
  height:calc(var(--brand-unit) * 1.415) !important;
  max-width:100% !important;
  max-height:none !important;
  object-fit:contain;
  flex-shrink:0;
}
html:root body.geiq56-brand-scale-v10592 .site-main :is(.contact-switcher,.geiq-brand-switch) button img[src$="/logo-geiq-btp-56.png"] {
  height:calc(var(--brand-unit) * 1.409449) !important;
}

/* Existing panel logos: same cap height, even when the column becomes narrow. */
html:root body.geiq56-brand-scale-v10592 .site-main :is(.panel-btp__kicker,.panel-multi__kicker) {
  container-type:inline-size;
  width:100% !important;
  max-width:100% !important;
}
html:root body.geiq56-brand-scale-v10592 .site-main .panel-kicker__logo {
  --brand-unit:32px;
  --brand-unit:min(32px, calc(100cqi / 6));
  height:calc(var(--brand-unit) * 1.415) !important;
  width:auto !important;
  max-width:100%;
  object-fit:contain;
}
html:root body.geiq56-brand-scale-v10592 .site-main .panel-kicker__logo[src$="/logo-geiq-btp-56.png"] {
  height:calc(var(--brand-unit) * 1.409449) !important;
}

/* Footer: match the Geiq lettering of the 104x26 general mark (20px ink height).
   Preserve natural proportions, complete entity names and the existing crops. */
html:root body.geiq56-brand-scale-v10592 .site-footer[data-geiq56-footer-layout="10590"] .footer__entities-column {
  container-type:inline-size;
}
html:root body.geiq56-brand-scale-v10592 .site-footer[data-geiq56-footer-layout="10590"] .footer-entity-logo {
  --brand-unit:20px;
  --brand-unit:min(20px, calc(100cqi / 6));
  width:100% !important;
  max-width:none !important;
}
html:root body.geiq56-brand-scale-v10592 .site-footer[data-geiq56-footer-layout="10590"] .footer-entity-logo__light {
  width:auto !important;
  height:calc(var(--brand-unit) * 1.415) !important;
  max-width:100%;
  object-fit:contain;
}
html:root body.geiq56-brand-scale-v10592 .site-footer[data-geiq56-footer-layout="10590"] .footer-entity-logo__light[src$="/logo-geiq-btp-56.png"] {
  height:calc(var(--brand-unit) * 1.409449) !important;
}
html:root body.geiq56-brand-scale-v10592 .site-footer[data-geiq56-footer-layout="10590"] .footer-entity-logo__dark {
  width:calc(var(--brand-unit) * 1.415761 * var(--logo-ratio));
  height:calc(var(--brand-unit) * 1.415761);
  max-width:100%;
}

/* Candidate cards: retain the two already-cropped dark variants, with the same
   optical scale as their light counterparts and a shared responsive limit. */
html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo {
  container-type:inline-size;
  width:100% !important;
  max-width:100% !important;
}
html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo > :is(.metiers-logo-light,.metiers-logo-dark) {
  --brand-unit:44px;
  --brand-unit:min(44px, calc(100cqi / 6));
}
html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo > .metiers-logo-light {
  height:calc(var(--brand-unit) * 1.415) !important;
  width:auto !important;
  max-width:100% !important;
  object-fit:contain;
}
html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo > .metiers-logo-light[src$="/logo-geiq-btp-56.png"] {
  height:calc(var(--brand-unit) * 1.409449) !important;
}
html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo > .metiers-logo-dark {
  height:calc(var(--brand-unit) * 1.415761);
  width:calc(var(--brand-unit) * 1.415761 * var(--logo-ratio));
  max-width:100%;
}

@media(max-width:700px) {
  html:root body.geiq56-brand-scale-v10592 .site-main :is(.contact-switcher,.geiq-brand-switch) button img {
    --brand-unit:23px;
    --brand-unit:min(23px, calc((50cqi - 28px) / 6));
  }
}
@media(max-width:640px) {
  html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] {
    width:min(520px, 100%);
  }
  html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] .geiq-switcher__btn {
    padding-inline:4px !important;
  }
  html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] .geiq-switcher__logo-img {
    --brand-unit:min(24px, calc((100cqi - 40px) / 16));
  }
  html:root body.geiq56-brand-scale-v10592 .site-main .panel-kicker__logo {
    --brand-unit:25px;
    --brand-unit:min(25px, calc(100cqi / 6));
  }
  html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo > :is(.metiers-logo-light,.metiers-logo-dark) {
    --brand-unit:38px;
    --brand-unit:min(38px, calc(100cqi / 6));
  }
}

/* Older engines without container units still get a conservative uniform size.
   Custom-property fallbacks alone cannot handle unsupported units at use time. */
@supports not (width:1cqi) {
  html:root body.geiq56-brand-scale-v10592 .site-main .geiq-switcher[data-active] .geiq-switcher__logo-img { --brand-unit:clamp(11px, 3vw, 24px); }
  html:root body.geiq56-brand-scale-v10592 .site-main :is(.contact-switcher,.geiq-brand-switch) button img { --brand-unit:clamp(14px, 3.6vw, 29px); }
  html:root body.geiq56-brand-scale-v10592 .site-main .panel-kicker__logo { --brand-unit:clamp(22px, 4vw, 32px); }
  html:root body.geiq56-brand-scale-v10592 .site-footer[data-geiq56-footer-layout="10590"] .footer-entity-logo { --brand-unit:20px; }
  html:root body.geiq56-brand-scale-v10592 #metiers .metiers-duo__logo > :is(.metiers-logo-light,.metiers-logo-dark) { --brand-unit:32px; }
}
