/* CTX Prod — ajustements par-dessus la CSS officielle BITD (main.min.css)
   Site en thème jour uniquement : body.theme-light, pas de mode « nuit » BITD. */

#main-header .theme-selector {
  display: none !important;
}

#main-header .social svg * {
  stroke: #1d1d1b;
}

#main-header .social a.f {
  color: #1d1d1b;
}

#main-header .social a img {
  filter: none;
  opacity: 1;
}

/* Footer : anti-débordement (sizing des .bitd = CSS BITD d’origine) */
footer#main-footer,
footer#main-footer .container-fluid {
  max-width: 100%;
  overflow-x: clip;
}

footer#main-footer .inner {
  min-width: 0;
}

footer#main-footer .left.is-desktop,
footer#main-footer .center.is-desktop,
footer#main-footer .right.is-desktop {
  min-width: 0;
}

footer#main-footer .center.is-desktop {
  overflow: hidden;
}

footer#main-footer .bitd video {
  max-width: 100%;
}

footer#main-footer .right .address {
  max-width: 100%;
  overflow-wrap: anywhere;
}

footer#main-footer .right .address a {
  display: inline-block;
  max-width: 100%;
}

footer#main-footer a.ctx-footer-dl svg {
  flex-shrink: 0;
  height: clamp(22px, 5vw, 34px);
  width: auto;
  max-width: min(100%, 120px);
}

footer#main-footer .footer-mobile {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

footer#main-footer .footer-mobile .logos {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Layout pages intérieures : voir assets/css/ctx-inner-base.css (chargé après main.min). */

/* Empêcher la colonne « droite » (burger) de s’écraser à 0 en flex header */
@media all and (max-width: 992px) {
  body.ctx-inner header#main-header .inner .right {
    flex-shrink: 0;
    min-width: 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  html body.ctx-inner header#main-header .is-mobile {
    display: block !important;
  }

  html body.ctx-inner header#main-header .mobile-button {
    display: flex !important;
  }

  /* Traits du burger lisibles sur fond clair (certaines règles BITD jouent sur l’opacité) */
  body.ctx-inner .mobile-button .mobile-button-wrapper span:first-child,
  body.ctx-inner .mobile-button .mobile-button-wrapper span:last-child {
    opacity: 1 !important;
    background: #1d1d1b !important;
  }

  /* Bandeau footer mobile BITD : flex pour la rangée de logos */
  html body.ctx-inner footer#main-footer .footer-mobile.is-mobile {
    display: flex !important;
  }
}

/* Header / footer fixes : z-index explicites (au-dessus du main qui scroll) */
body.ctx-inner header#main-header {
  z-index: 100 !important;
}

body.ctx-inner #main-footer {
  z-index: 95 !important;
}

body.ctx-inner main[data-barba="wrapper"] {
  position: relative;
  z-index: 1;
}

/* Menu mobile au-dessus du contenu */
body.ctx-inner .header-mobile-menu {
  z-index: 100050 !important;
}

body.ctx-inner.menu-is-opened {
  overflow: hidden;
}

@font-face {
  font-family: BackInTheDayz;
  src: url("../bitd/fonts/BackInTheDayzRegular.woff2") format("woff2"),
    url("../bitd/fonts/BackInTheDayzRegular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Intro d’accueil : remplace la vidéo BITD par logo + titre CTX Prod (animation CSS) */
[data-introduction] .ctx-intro-splash {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: none;
  /* Fond opaque (même teinte que bg-second) — rien ne transparaît derrière */
  background-color: #eff0ed;
}

[data-introduction] .ctx-intro-logo {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: min(48vw, 200px) !important;
  max-width: 220px;
  height: auto !important;
  animation: ctx-intro-logo-in 4.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-introduction] .ctx-intro-title {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  margin: 0;
  font-family: BackInTheDayz, sans-serif;
  font-size: clamp(1.35rem, 4.5vw, 2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: ctx-intro-title-in 4.2s ease 0.45s both;
}

/* Animations sur ~5 s : entrée + maintien lisible jusqu’à fermeture JS */
@keyframes ctx-intro-logo-in {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  22% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ctx-intro-title-in {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  28% {
    opacity: 0;
    transform: translateY(18px);
  }
  52% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Intro plein écran : fond opaque explicite (évite tout rendu « transparent » selon la cascade BITD) */
[data-introduction] {
  cursor: default;
  background-color: #eff0ed !important;
  background-image: none !important;
}

/* Pendant l’intro (5 s) : pas de scroll sur le site derrière */
body.ctx-intro-active {
  overflow: hidden !important;
}

[data-introduction].is-done {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

[data-barba-loadingscreen].is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.35s ease;
}

/* Logo CTX : mêmes largeurs que #logo BITD (110px / 87px), hauteur auto = fidèle au SVG */
#logo.ctx-logo-wrap {
  display: flex;
  align-items: center;
  width: 110px;
  max-width: 110px;
}

@media all and (max-width: 1100px) {
  header#main-header .inner .left #logo.ctx-logo-wrap {
    width: 87px;
    max-width: 87px;
  }
}

.ctx-logo-header {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
}

/* LinkedIn header : aligné sur les pictos BITD */
.ctx-nav-ico {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

a.ctx-in {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mot central footer (remplace le SVG BITD) */
.ctx-footer-wordmark {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Menu mobile : pages statiques sans app.min.js — BITD laisse translate3d(100%) sur .header-mobile-menu ;
   il faut réinitialiser transform en plus du display (sinon le panneau reste hors écran). */
.header-mobile-menu.is-open {
  display: flex !important;
  transform: none !important;
}

