/* À charger après la feuille du thème. Actif seulement sur le lien marqué --large. */
/* Le calque dépasse le menu, mais ne doit pas élargir la page du téléphone. */
body:has(.site-branding__video-link--large) {
  overflow-x: hidden;
}
@supports (overflow: clip) {
  body:has(.site-branding__video-link--large) {
    overflow-x: clip;
  }
}

.site-header:has(.site-branding__video-link--large),
.site-header .header-inner:has(.site-branding__video-link--large) {
  overflow: visible !important;
}

.site-header .site-branding:has(.site-branding__video-link--large) {
  position: relative !important;
  display: grid !important;
  place-items: center;
  height: 100% !important;
  min-width: 0;
  overflow: visible !important;
  z-index: 12 !important;
}

/* 1.7.4 ajoute un conteneur autour du lien et du bouton de lecture. */
html body .site-header .site-branding .site-branding__image-link.site-branding__video-wrap:has(> a.site-branding__video-link--large) {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  display: block !important;
  width: max-content !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  overflow: visible !important;
}

html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large {
  --tk-source-logo-width: 220px;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  display: block !important;
  width: var(--tk-source-logo-width) !important;
  height: 64px !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 auto !important;
  transform: none !important;
  overflow: visible !important;
  z-index: 13 !important;
}

/* Source 1536 × 1024 à (768,896), dans un canevas 3072 × 2048.
   Son centre (1536,1408) correspond à (50 %,68,75 %) du canevas. */
html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large > video.site-branding__image.site-branding__video,
html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large > img.site-branding__image.site-branding__animation {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  display: block;
  width: calc(var(--tk-source-logo-width) * 2) !important;
  height: auto !important;
  aspect-ratio: 3 / 2;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  transform: translate(-50%, -68.75%) !important;
  object-fit: contain !important;
  background: transparent !important;
  opacity: 1 !important;
  filter: none !important;
  clip-path: none !important;
  mask: none !important;
  pointer-events: none !important;
}

html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large > .site-branding__video-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--tk-source-logo-width);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large .site-branding__video-fallback > img.site-branding__image {
  position: static !important;
  display: block;
  width: var(--tk-source-logo-width) !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  object-fit: contain !important;
}

html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large > video[hidden],
html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large > img.site-branding__animation[hidden],
html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large > .site-branding__video-fallback[hidden] {
  display: none !important;
}

html body .site-header .site-branding .site-branding__video-wrap:has(> a.site-branding__video-link--large) > .site-branding__video-toggle {
  z-index: 14;
}

/* Respecte aussi le secours CSS de 1.7.4 avant le démarrage du JavaScript. */
@media (prefers-reduced-motion: reduce) {
  html body .site-header .site-branding .site-branding__video-wrap:not([data-logo-motion="play"]) > a.site-branding__video-link.site-branding__video-link--large > video.site-branding__video,
  html body .site-header .site-branding .site-branding__video-wrap:not([data-logo-motion="play"]) > a.site-branding__video-link.site-branding__video-link--large > img.site-branding__animation {
    display: none !important;
  }
  html body .site-header .site-branding .site-branding__video-wrap:not([data-logo-motion="play"]) > a.site-branding__video-link.site-branding__video-link--large > .site-branding__video-fallback[hidden] {
    display: block !important;
  }
}

@media (max-width: 820px) {
  html body .site-header .site-branding a.site-branding__video-link.site-branding__video-link--large {
    --tk-source-logo-width: 190px;
    height: 58px !important;
  }
}
