.kwh {
  --kwh-bg: #070b1f;
  --kwh-gold: #c9a650;
  --kwh-text: #f2f4ff;
  --kwh-muted: #c8cde8;
  position: relative;
  overflow: hidden;
  color: var(--kwh-text);
  background:
    radial-gradient(60% 90% at 0% 40%, rgba(40, 60, 190, .45), transparent 70%),
    radial-gradient(50% 70% at 85% 80%, rgba(40, 60, 190, .25), transparent 70%),
    var(--kwh-bg);
  font-family: inherit;
}
.kwh *, .kwh *::before, .kwh *::after { box-sizing: border-box; }

.kwh .kwh__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1fr;
}

/* Les diapositives se superposent dans la même cellule de grille */
.kwh .kwh__slides { display: grid; }
.kwh .kwh__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility 0s linear .9s;
}
.kwh .kwh__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .9s ease, visibility 0s;
}
.kwh .kwh__slide .kwh__text { transform: translateY(12px); transition: transform .9s ease; }
.kwh .kwh__slide.is-active .kwh__text { transform: none; }
.kwh .kwh__slide .kwh__art img { transform: scale(.96); transition: transform 1.2s ease; }
.kwh .kwh__slide.is-active .kwh__art img { transform: none; }

.kwh .kwh__kicker {
  margin: 0 0 18px;
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--kwh-muted);
}
.kwh .kwh__title {
  margin: 0 0 28px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.2;
  font-weight: 600;
  color: var(--kwh-text);
}
.kwh .kwh__list { list-style: none; margin: 0; padding: 0; }
.kwh .kwh__list li {
  position: relative;
  padding-left: 28px;
  margin: 0 0 14px;
  font-size: clamp(16px, 1.5vw, 21px);
  color: var(--kwh-text);
}
.kwh .kwh__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 10px;
  height: 10px;
  background: var(--kwh-gold);
}
.kwh .kwh__art img { display: block; width: 100%; height: auto; max-width: 560px; margin-left: auto; }

/* Photo encadrée : cadre doré décalé + halo bleu, dans le ton du bandeau */
.kwh .kwh__art { display: flex; justify-content: flex-end; padding: 0 18px 18px 0; }
.kwh .kwh__frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 460px;
}
.kwh .kwh__frame::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--kwh-gold);
  border-radius: 18px;
  opacity: .8;
}
.kwh .kwh__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 11, 31, 0) 55%, rgba(7, 11, 31, .55) 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 140, 255, .25);
  pointer-events: none;
}
.kwh .kwh__crop {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(40, 60, 190, .45);
}
.kwh .kwh__art img.kwh__photo {
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
}
/* Zoom lent façon « Ken Burns » pendant que la diapositive est affichée */
.kwh .kwh__slide.is-active .kwh__art img.kwh__photo {
  animation: kwh-zoom var(--kwh-interval, 30000ms) ease-out forwards;
}
@keyframes kwh-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Cadre panoramique pour les images très larges (ex. carte RF de la diapositive R&D).
   Le léger agrandissement de départ masque la bande noire en haut de l'image. */
.kwh .kwh__frame--wide { max-width: 520px; }
.kwh .kwh__frame--wide .kwh__art img.kwh__photo,
.kwh .kwh__frame--wide img.kwh__photo { aspect-ratio: 2 / 1; transform: scale(1.06); }
.kwh .kwh__slide.is-active .kwh__frame--wide img.kwh__photo { animation-name: kwh-zoom-wide; }
@keyframes kwh-zoom-wide { from { transform: scale(1.06); } to { transform: scale(1.14); } }
.kwh .kwh__frame--wide .kwh__badge { left: 24px; bottom: -30px; }

/* Badge en verre dépoli qui chevauche la photo */
.kwh .kwh__badge {
  position: absolute;
  z-index: 2;
  left: -28px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border-radius: 14px;
  background: rgba(14, 20, 52, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 166, 80, .45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease .5s, transform .6s ease .5s;
}
.kwh .kwh__slide.is-active .kwh__badge.is-on { opacity: 1; transform: none; }
.kwh .kwh__badge--top { bottom: auto; top: 28px; }

/* Plusieurs photos dans une même diapositive : empilées, une seule visible (.is-on) */
.kwh .kwh__crop .kwh__photo + .kwh__photo { position: absolute; inset: 0; height: 100%; }
.kwh .kwh__art img.kwh__photo { opacity: 0; transition: opacity 1.1s ease; }
.kwh .kwh__art img.kwh__photo.is-on { opacity: 1; }
.kwh .kwh__badge strong { display: block; font-size: 15px; color: var(--kwh-text); font-weight: 700; }
.kwh .kwh__badge small { display: block; font-size: 12px; color: var(--kwh-muted); }
.kwh .kwh__pulse {
  position: relative;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--kwh-gold);
}
.kwh .kwh__pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--kwh-gold);
  animation: kwh-ping 2s ease-out infinite;
}
@keyframes kwh-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }

/* Ondes radio décoratives derrière la photo */
.kwh .kwh__waves {
  position: absolute;
  right: 18%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.kwh .kwh__waves span {
  position: absolute;
  left: -260px;
  top: -260px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(90, 110, 255, .35);
  animation: kwh-wave 9s linear infinite;
}
.kwh .kwh__waves span:nth-child(2) { animation-delay: -3s; }
.kwh .kwh__waves span:nth-child(3) { animation-delay: -6s; }
@keyframes kwh-wave { from { transform: scale(.4); opacity: 0; } 20% { opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.kwh .kwh__kicker::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--kwh-gold);
}

.kwh .kwh__nav { display: flex; align-items: center; gap: 18px; margin-top: 32px; }
.kwh .kwh__nav .kwh__dots { margin-top: 0; }
.kwh .kwh__count { font-size: 14px; letter-spacing: .08em; color: var(--kwh-muted); font-variant-numeric: tabular-nums; }
.kwh .kwh__count b { color: var(--kwh-gold); font-size: 18px; }

.kwh .kwh__actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.kwh .kwh__btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--kwh-gold);
  transition: background .2s, color .2s, border-color .2s;
}
.kwh .kwh__btn--gold { background: var(--kwh-gold); color: #0b1029; }
.kwh .kwh__btn--gold:hover, .kwh .kwh__btn--gold:focus { background: #dcbb66; border-color: #dcbb66; color: #0b1029; }
.kwh .kwh__btn--ghost { background: transparent; color: var(--kwh-text); border-color: var(--kwh-text); }
.kwh .kwh__btn--ghost:hover, .kwh .kwh__btn--ghost:focus { border-color: var(--kwh-gold); color: var(--kwh-gold); }

.kwh .kwh__dots { display: flex; gap: 10px; margin-top: 32px; }
.kwh .kwh__dots button {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.kwh .kwh__dots button.is-active { background: rgba(255, 255, 255, .35); }
.kwh .kwh__dots button.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--kwh-gold);
  transform-origin: left;
  animation: kwh-progress var(--kwh-interval, 30000ms) linear forwards;
}
.kwh.is-paused .kwh__dots button.is-active::after { animation-play-state: paused; }
@keyframes kwh-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Tablette : photo au-dessus du texte, en grand */
@media (max-width: 860px) {
  .kwh .kwh__inner { padding: 48px 32px 36px; }
  .kwh .kwh__slide { grid-template-columns: 1fr; gap: 28px; }
  .kwh .kwh__art { order: -1; justify-content: center; }
  .kwh .kwh__art img { max-width: 320px; margin: 0 auto; }
  .kwh .kwh__frame { max-width: 400px; }
  .kwh .kwh__frame--wide { max-width: 520px; }
  .kwh .kwh__badge { left: -16px; bottom: 22px; }
  .kwh .kwh__waves { right: 50%; top: 230px; }
}

/* Téléphone */
@media (max-width: 560px) {
  .kwh .kwh__inner { padding: 36px 16px 32px; }
  .kwh .kwh__slide { gap: 18px; }
  .kwh .kwh__frame { max-width: 290px; }
  .kwh .kwh__frame--wide { max-width: 100%; }
  .kwh .kwh__badge { left: -10px; bottom: 16px; padding: 10px 14px 10px 12px; }
  .kwh .kwh__badge strong { font-size: 14px; }
  .kwh .kwh__waves { top: 170px; }
  .kwh .kwh__actions { gap: 12px; }
  .kwh .kwh__btn { flex: 1 1 100%; text-align: center; padding: 15px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .kwh .kwh__slide, .kwh .kwh__slide .kwh__text, .kwh .kwh__slide .kwh__art img { transition: none; transform: none; }
  .kwh .kwh__dots button.is-active::after { animation: none; transform: none; }
  .kwh .kwh__slide.is-active .kwh__art img.kwh__photo,
  .kwh .kwh__pulse::after,
  .kwh .kwh__waves span { animation: none; }
  .kwh .kwh__badge { transition: none; }
}

/* Photo à montrer en entier, sans recadrage ni zoom (ex. carte électronique sur fond blanc) */
.kwh .kwh__frame--whole img.kwh__photo,
.kwh .kwh__frame--whole .kwh__art img.kwh__photo {
  aspect-ratio: 1024 / 572;
  object-fit: contain;
  background: #f6f8f6;   /* même blanc cassé que le fond de la photo */
  transform: none;
}
.kwh .kwh__slide.is-active .kwh__frame--whole img.kwh__photo { animation: none; }
