/* WKAD — Affiche plein panneau, lecture YouTube à la demande. v0.1.6
   L'affiche est locale. Le lecteur lui-même n'est jamais recadré. */
.wkad-home .wkad-video {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  min-width: 0;
  min-height: 29rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  overflow: hidden;
  background: #163844 url('../images/wkad-video-poster.jpg') center / cover no-repeat;
  color: #fff;
}
.wkad-home .wkad-video::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background: linear-gradient(180deg, rgba(10, 34, 43, .86), rgba(10, 34, 43, .18) 52%, rgba(10, 34, 43, .86));
}
.wkad-home .wkad-video-intro { padding: 0; }
.wkad-home .wkad-video[data-wkad-video-ready="1"] .wkad-video-intro {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.wkad-home .wkad-video-intro .wkad-home-eyebrow {
  margin-bottom: 1rem;
  font-size: .75rem;
}
.wkad-home .wkad-video-intro .wkad-home-hero-media-title {
  max-width: 25ch;
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.3;
}
.wkad-home .wkad-video-player {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
}
.wkad-home .wkad-video-load {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  min-height: 3rem;
  max-width: 100%;
  padding: 1rem;
  border: 2px solid transparent;
  border-radius: .75rem;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}
.wkad-home .wkad-video-load > span:last-child {
  padding: .35rem .75rem;
  border-radius: .35rem;
  background: #163844;
}
.wkad-home .wkad-video-load-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  padding: 0;
  border: 2px solid #ffe36a;
  border-radius: 50%;
  background: #ffe36a;
  color: #163844;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}
/* Le caractère décoratif du HTML reste présent mais sa taille est nulle :
   aucun glyphe emoji ne dépend de la police ou du système d'exploitation.
   Le triangle reprend currentColor, y compris en couleurs forcées.
   Son léger décalage horizontal assure un centrage optique dans le cercle. */
.wkad-home .wkad-video-load-icon::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: .75rem solid transparent;
  border-bottom: .75rem solid transparent;
  border-left: 1.25rem solid currentColor;
  content: '';
  pointer-events: none;
  transform: translate(-35%, -50%);
}
.wkad-home .wkad-video-load:hover .wkad-video-load-icon { background: #fff; border-color: #fff; }
.wkad-home .wkad-video-load:disabled { cursor: wait; opacity: .8; }
.wkad-home .wkad-video-stage {
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  background: #102c36;
}
.wkad-home .wkad-video-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  margin: 0;
  border: 0;
}
.wkad-home .wkad-video[data-wkad-video-state="active"] { padding: 0; gap: 0; background: #102c36; }
.wkad-home .wkad-video[data-wkad-video-state="active"]::before { display: none; }
.wkad-home .wkad-video[data-wkad-video-state="active"] .wkad-video-intro { display: none; }
.wkad-home .wkad-video-controls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border-top: 1px solid #47616a;
  background: #102c36;
}
.wkad-home .wkad-video-control {
  position: static;
  display: inline-flex;
  flex: 0 0 3rem;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: .65rem;
  border: 1px solid #9fb4bb;
  border-radius: 50%;
  background: #163844;
  color: #fff;
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}
.wkad-home .wkad-video-control > svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  pointer-events: none;
}
.wkad-home .wkad-video-control:is(:hover, :focus-visible) {
  border-color: #ffe36a;
  background: #ffe36a;
  color: #163844;
}
.wkad-home .wkad-video-control-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + .5rem);
  z-index: 3;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  padding: .5rem .75rem;
  border: 1px solid #9fb4bb;
  border-radius: .4rem;
  background: #fff;
  color: #163844;
  box-shadow: 0 .2rem .8rem rgb(0 0 0 / .15);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  transform: translateX(-50%);
  visibility: hidden;
}
/* Le pont transparent permet de passer du bouton à son infobulle. */
.wkad-home .wkad-video-control-label::after {
  position: absolute;
  inset: 100% 0 auto;
  height: .65rem;
  content: '';
}
/* Ancrage sur la barre entière : aucune infobulle ne dépasse au bord de l'écran.
   Une seule infobulle à la fois, même si un autre bouton conserve le focus. */
.wkad-home .wkad-video-controls:not([data-wkad-tooltip-pointer="1"]) .wkad-video-control:focus-visible:not([data-wkad-tooltip-dismissed="1"]) .wkad-video-control-label,
.wkad-home .wkad-video-control[data-wkad-tooltip-active="1"]:not([data-wkad-tooltip-dismissed="1"]) .wkad-video-control-label {
  visibility: visible;
}
.wkad-home .wkad-video-link { margin: 0; padding: 0; font-size: .85rem; }
.wkad-home .wkad-video-link a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.wkad-home .wkad-video-link a:hover { color: #ffe36a; }
.wkad-home .wkad-video[data-wkad-video-state="active"] .wkad-video-link { padding: .25rem 1.25rem 1rem; }
.wkad-home .wkad-video :is(button, a, iframe):focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #163844;
}
.wkad-home .wkad-video iframe:focus-visible { outline-offset: -4px; box-shadow: none; }
.wkad-home .wkad-video-info,
.wkad-home .wkad-video-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.wkad-home .wkad-video[data-wkad-video-state="error"] .wkad-video-status,
.wkad-home .wkad-video[data-wkad-video-notice] .wkad-video-status {
  position: static;
  width: calc(100% - 2rem);
  height: auto;
  margin: .75rem 1rem;
  padding: .75rem;
  border: 1px solid #fff;
  border-radius: .35rem;
  background: #163844;
  color: #fff;
  clip-path: none;
  white-space: normal;
}
.wkad-home .wkad-video [hidden] { display: none !important; }
.wkad-home .wkad-video-player:fullscreen {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: .35rem;
  min-height: 0;
  padding: .5rem;
  background: #000;
}
.wkad-home .wkad-video-player:fullscreen .wkad-video-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  aspect-ratio: auto;
}
.wkad-home .wkad-video-player:fullscreen iframe { min-height: 0; }
.wkad-home .wkad-video-player:fullscreen .wkad-video-controls {
  padding: .35rem;
  overflow: visible;
}
@media (max-width: 40rem) {
  .wkad-home .wkad-video { min-height: 26rem; }
  .wkad-home .wkad-video-controls { gap: .5rem; padding: .75rem; }
}
@media (forced-colors: active) {
  .wkad-home .wkad-video::before { background: Canvas; }
  .wkad-home .wkad-video-load-icon,
  .wkad-home .wkad-video-control { border-color: ButtonText; }
  .wkad-home .wkad-video-load-icon { color: ButtonText; }
  /* Garder les deux bordures transparentes : la couleur utile reste celle
     du système, ButtonText, héritée par currentColor. */
  .wkad-home .wkad-video-load-icon::before { forced-color-adjust: none; }
  .wkad-home .wkad-video-control-label { border-color: CanvasText; background: Canvas; color: CanvasText; }
  .wkad-home .wkad-video :is(button, a, iframe):focus-visible { outline-color: Highlight; box-shadow: none; }
}
@media print {
  .wkad-home .wkad-video { min-height: 0; background: #fff; color: #000; }
  .wkad-home .wkad-video::before,
  .wkad-home .wkad-video-player { display: none; }
  .wkad-home .wkad-video[data-wkad-video-ready="1"] .wkad-video-intro,
  .wkad-home .wkad-video-intro {
    display: block !important;
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  .wkad-home .wkad-video-intro .wkad-home-hero-media-title,
  .wkad-home .wkad-video-link a { color: #000; }
}
