/* ============================
   AVATAR PAGE — V2
============================ */

.avatar-page {
  background:
    radial-gradient(circle at 10% 5%, rgba(92,121,255,0.14), transparent 40%),
    radial-gradient(circle at 90% 15%, rgba(0,210,190,0.14), transparent 40%),
    linear-gradient(180deg, #eef4f2 0%, #edf4f3 42%, #e9f0f2 100%);
}

.avatar-page .tag {
  color: #2563eb;
}

.avatar-page .logo-dot {
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37,99,235,0.12);
}

.avatar-page .btn {
  background: #102033;
}

.avatar-page main {
  display: flex;
  flex-direction: column;
}

.avatar-hero {
  order: 1;
}

#formats-avatar {
  order: 2;
}

.avatar-examples-section {
  order: 3;
}

#cas-usage {
  order: 4;
}

#faq-avatar {
  order: 5;
}

.avatar-page .final {
  order: 6;
}

.avatar-formats-section {
  --avatar-portrait-card-width: clamp(142px, 13vw, 162px);
  --avatar-portrait-card-ratio: 1080 / 1350;
  --avatar-portrait-card-radius: 22px;
  --avatar-portrait-card-border: 4px solid rgba(255,255,255,0.96);
  --avatar-portrait-card-shadow: 0 28px 80px rgba(16,32,51,0.22);
}

/* ===========================
   Hero — Constellation
   =========================== */

.avatar-hero {
  padding: 110px 0 80px;
}

.avatar-hero-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.avatar-hero-copy {
  max-width: 560px;
}

.avatar-hero-video {
  width: min(100%, 760px);
  justify-self: end;
}

.avatar-examples-section {
  padding-top: 28px;
}

.avatar-examples-section .section-head {
  margin-bottom: 42px;
}

.avatar-examples-visual {
  min-height: 780px;
}

/* Bulles agrandies dans "Nos exemples" */
.avatar-examples-visual .avatar-char-core {
  width: clamp(250px, 21vw, 292px);
  height: clamp(250px, 21vw, 292px);
}

.avatar-examples-visual .avatar-char-2 .avatar-char-core {
  width: clamp(262px, 22vw, 304px);
  height: clamp(262px, 22vw, 304px);
}

.avatar-examples-visual .avatar-char-3 {
  display: none;
}

.avatar-example-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.avatar-example-label {
  margin: 0;
  color: #102033;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

/* Conteneur visuel principal */
.avatar-hero-visual {
  position: relative;
  min-height: 760px;
  width: 100%;
  isolation: isolate;
}

/* Stage glow — teintes bleues / teal du thème Avatar IA */
.avatar-hero-visual::before {
  content: "";
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse 68% 52% at 55% 48%, rgba(196, 224, 255, 0.42) 0%, transparent 65%),
    radial-gradient(ellipse 38% 34% at 18% 75%, rgba(196, 240, 232, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 34% 32% at 82% 22%, rgba(220, 215, 255, 0.24) 0%, transparent 52%);
  pointer-events: none;
  z-index: 0;
}

/* Grille de points — texture réseau IA */
.avatar-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(37, 99, 235, 0.14) 1.5px, transparent 0);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 72% at 55% 46%, black 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 72% at 55% 46%, black 10%, transparent 72%);
}

/* Orbites */
.avatar-hero-orbits {
  position: absolute;
  inset: 12% 10% 8%;
  pointer-events: none;
  z-index: 1;
}

.avatar-hero-orbits span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.avatar-hero-orbits span:nth-child(1) {
  transform: scale(0.52);
  border-color: rgba(37, 99, 235, 0.26);
}

.avatar-hero-orbits span:nth-child(2) {
  transform: scale(0.77);
  border-color: rgba(37, 99, 235, 0.14);
}

.avatar-hero-orbits span:nth-child(3) {
  transform: scale(1);
  border-color: rgba(37, 99, 235, 0.08);
}

/* Personnages — positionnement absolu */
.avatar-char {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 26px;
  z-index: 2;
}

.avatar-char-1 {
  top: 40px;
  left: 0;
  z-index: 3;
}

.avatar-char-2 {
  top: 24px;
  right: 6px;
  z-index: 3;
}

.avatar-char-3 {
  right: 12px;
  bottom: 92px;
  top: auto;
  left: auto;
  z-index: 3;
  /* Ancre centrale — pas de float */
}

.avatar-char-4 {
  left: 0;
  bottom: 88px;
  z-index: 3;
}

.avatar-char-5 {
  top: 208px;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-40%);
  z-index: 5;
}

/* Réutilisation des keyframes (aussi présents dans voice.css) */
/* Cercle de l'avatar */
.avatar-char-core {
  position: relative;
  width: clamp(198px, 16vw, 224px);
  height: clamp(198px, 16vw, 224px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow:
    0 22px 70px rgba(16, 32, 51, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  z-index: 1;
}

.avatar-char-2 .avatar-char-core,
.avatar-char-3 .avatar-char-core {
  width: clamp(206px, 17vw, 232px);
  height: clamp(206px, 17vw, 232px);
}

/* Halo coloré derrière chaque cercle */
.avatar-char-core::before {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: 999px;
  opacity: 0.26;
  filter: blur(36px);
  z-index: -1;
  transition: opacity 0.45s ease, inset 0.45s ease;
  pointer-events: none;
}

.avatar-core-blue::before   { background: radial-gradient(circle, rgba(37,  99, 235, 0.72), transparent 68%); }
.avatar-core-green::before  { background: radial-gradient(circle, rgba(22, 163, 100, 0.68), transparent 68%); }
.avatar-core-coral::before  { background: radial-gradient(circle, rgba(234,  88,  12, 0.62), transparent 68%); }
.avatar-core-teal::before   { background: radial-gradient(circle, rgba(6,  182, 212, 0.64), transparent 68%); }
.avatar-core-indigo::before { background: radial-gradient(circle, rgba(99, 102, 241, 0.64), transparent 68%); }

/* Hover : amplifier halo + légère élévation */
.avatar-char:hover .avatar-char-core {
  transform: scale(1.05);
  box-shadow:
    0 28px 85px rgba(16, 32, 51, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.96);
}

.avatar-char:hover .avatar-char-core::before {
  opacity: 0.50;
  inset: -42px;
}

/* Avatar central — dominance visuelle */
.avatar-char-5 .avatar-char-core {
  width: clamp(320px, 34vw, 392px);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 38px 110px rgba(16, 32, 51, 0.22),
    0 0 0 2px rgba(255, 255, 255, 0.98),
    0 0 0 7px rgba(99, 102, 241, 0.12);
}

.avatar-char-5 .avatar-char-core::before {
  inset: -38px;
  opacity: 0.38;
  border-radius: 42px;
}

.avatar-char-5:hover .avatar-char-core {
  box-shadow:
    0 44px 120px rgba(16, 32, 51, 0.26),
    0 0 0 2px rgba(255, 255, 255, 1),
    0 0 0 9px rgba(99, 102, 241, 0.16);
}

.avatar-char-ring {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(200, 220, 240, 0.65);
  pointer-events: none;
}

.avatar-char-5 .avatar-char-ring {
  border-radius: 40px;
}

/* Zone média : clip circulaire pour la vidéo */
.avatar-char-media {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 999px;
  overflow: hidden;
  background: #0f1f33;
}

.avatar-char-5 .avatar-char-media {
  border-radius: 28px;
}

.avatar-char-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.avatar-char-5 .avatar-char-media video {
  object-position: center 16%;
}

.avatar-examples-visual .avatar-char {
  align-items: flex-start;
}

.avatar-examples-visual .avatar-char-1 {
  top: 8px;
  left: 46px;
}

.avatar-examples-visual .avatar-char-2 {
  top: 8px;
  right: 46px;
}

.avatar-examples-visual .avatar-char-4 {
  left: 58px;
  bottom: 10px;
}

.avatar-examples-visual .avatar-char-5 {
  top: auto;
  left: auto;
  right: 58px;
  bottom: 10px;
  transform: none;
}

.avatar-examples-visual .avatar-char-5 .avatar-char-core {
  width: clamp(262px, 22vw, 304px);
  height: clamp(262px, 22vw, 304px);
  aspect-ratio: auto;
  border-radius: 999px;
  box-shadow:
    0 22px 70px rgba(16, 32, 51, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.88);
}

.avatar-examples-visual .avatar-char-5 .avatar-char-core::before,
.avatar-examples-visual .avatar-char-5 .avatar-char-ring,
.avatar-examples-visual .avatar-char-5 .avatar-char-media {
  border-radius: 999px;
}

.avatar-examples-visual .avatar-char-5 .avatar-char-media video {
  object-position: center 18%;
}

/* Couleurs de fond par personnage */
.avatar-core-blue   { background: rgba(219, 234, 254, 0.75); }
.avatar-core-green  { background: rgba(209, 250, 229, 0.72); }
.avatar-core-coral  { background: rgba(255, 237, 213, 0.76); }
.avatar-core-teal   { background: rgba(207, 250, 254, 0.72); }
.avatar-core-indigo { background: rgba(224, 231, 255, 0.75); }

/* ===========================
   Chips de langue
   =========================== */

.avchar-chips {
  position: relative;
  display: grid;
  gap: 18px;
  align-content: start;
}

.avchar-chips::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  width: 76px;
  border-top: 2px dashed rgba(37, 99, 235, 0.22);
  border-bottom: 2px dashed rgba(37, 99, 235, 0.22);
  opacity: 0.9;
}

.avchar-chips-left::before {
  right: -70px;
  border-left: 0;
  border-right: 0;
  border-radius: 0 999px 999px 0;
}

.avchar-chips-right::before {
  left: -70px;
  border-left: 0;
  border-right: 0;
  border-radius: 999px 0 0 999px;
}

.avchar-chip {
  position: relative;
  min-height: 42px;
  padding: 0 15px 0 17px;
  border: 1px solid rgba(200, 215, 245, 0.95);
  border-radius: 999px;
  background: rgba(246, 250, 255, 0.92);
  box-shadow:
    0 8px 22px rgba(16, 32, 51, 0.07),
    0 2px 6px rgba(16, 32, 51, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #102033;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease;
}

.avchar-chip::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  border-top: 2px dashed rgba(37, 99, 235, 0.32);
  transform: translateY(-50%);
}

.avchar-chips-left .avchar-chip::before {
  right: -23px;
}

.avchar-chips-right .avchar-chip::before {
  left: -23px;
}

.avchar-chip:hover,
.avchar-chip:focus-visible {
  transform: scale(1.05) translateY(-1px);
  box-shadow:
    0 14px 32px rgba(16, 32, 51, 0.12),
    0 4px 8px rgba(16, 32, 51, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(37, 99, 235, 0.28);
  outline: none;
}

.avchar-chip.is-active {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.40);
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.12),
    0 0 0 6px rgba(37, 99, 235, 0.05),
    0 12px 28px rgba(16, 32, 51, 0.08);
  transform: none;
}

.avchar-chip:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.avchar-chip svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: #2563eb;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.avchar-chip.is-active svg {
  transform: none;
}

/* ===========================
   Hero : chips de langue
   =========================== */

.hero-lang-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.hero-lang-chips .avchar-chip::before {
  display: none;
}

/* ===========================
   Responsive — Tablette
   =========================== */

@media (max-width: 1100px) {
  .avatar-hero-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .avatar-hero-copy {
    max-width: 100%;
  }

  .avatar-hero-video {
    justify-self: stretch;
    width: 100%;
  }

  .avatar-hero-visual {
    min-height: 920px;
    max-width: 740px;
    margin: 0 auto;
  }

  .avatar-examples-visual {
    min-height: 840px;
  }

  .avatar-char-1 { top: 28px; left: 8px; }
  .avatar-char-2 { top: 8px; right: 8px; }
  .avatar-char-3 { right: 8px; bottom: 126px; top: auto; left: auto; transform: none; }
  .avatar-char-4 { left: 8px; bottom: 132px; }
  .avatar-char-5 { top: 288px; left: 50%; right: auto; bottom: auto; transform: translateX(-44%); }

  .avatar-examples-visual .avatar-char-1 { top: 18px; left: 24px; }
  .avatar-examples-visual .avatar-char-2 { top: 18px; right: 24px; }
  .avatar-examples-visual .avatar-char-4 { left: 24px; bottom: 24px; }
  .avatar-examples-visual .avatar-char-5 { right: 24px; bottom: 24px; }
}

/* ===========================
   Responsive — Mobile
   =========================== */

@media (max-width: 760px) {
  .avatar-hero {
    padding: 72px 0 60px;
  }

  .avatar-examples-section {
    padding-top: 0;
  }

  /* Désactiver les floats sur mobile */
  .avatar-hero-visual {
    min-height: auto;
    display: grid;
    gap: 28px;
  }

  .avatar-hero-visual::after,
  .avatar-hero-orbits {
    display: none;
  }

  .avatar-char {
    position: relative;
    inset: auto;
    transform: none;
    flex-direction: column;
    gap: 16px;
  }

  .avatar-char-5 {
    order: 1;
  }

  .avatar-char-1 {
    order: 2;
  }

  .avatar-char-2 {
    order: 3;
  }

  .avatar-char-4 {
    order: 4;
  }

  .avatar-char-3 {
    order: 5;
  }

  .avatar-char-core {
    width: min(210px, 70vw);
    height: min(210px, 70vw);
  }

  .avatar-char-5 .avatar-char-core {
    width: min(92vw, 420px);
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
  }

  .avchar-chips {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .avchar-chips::before,
  .avchar-chip::before {
    display: none;
  }

  .avatar-example-spot {
    width: 100%;
  }

  .avatar-example-label {
    white-space: normal;
  }
}

/* ============================
   HERO (ancienne structure — conservée pour compatibilité)
============================ */

.avatar-demo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: rotate(-1deg) scale(1.03);
}

.avatar-video-box {
  background: #102033;
  border-radius: 30px;
  padding: 12px;
  width: 100%;
  transform: none;
}

.avatar-video-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.avatar-lang-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  z-index: 5;
}

.avatar-lang {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.avatar-lang.active {
  background: #102033;
  color: white;
}

/* SPLIT */

.avatar-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

.avatar-split.single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.avatar-split.single-panel .avatar-format-panel {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.avatar-format-panel {
  padding: 34px 32px 36px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 16% 10%, rgba(89, 106, 255, 0.08), transparent 24%),
    rgba(255,255,255,0.95);
  box-shadow: 0 30px 80px rgba(0,0,0,0.08);
  overflow: visible;
}

.dark-panel {
  background:
    radial-gradient(circle at 25% 20%, rgba(88, 91, 255, 0.22), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(0,210,190,0.12), transparent 34%),
    linear-gradient(180deg, rgba(16, 32, 51, 0.94), rgba(16, 32, 51, 0.9));
  color: white;
  overflow: hidden;
}

.dark-panel p {
  color: rgba(255,255,255,0.76);
}

.panel-label {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37,99,235,0.10);
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.dark-panel .panel-label {
  background: rgba(255,255,255,0.12);
  color: white;
}

/* AVATAR BIBLIOTHÈQUE */

.avatar-card-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  margin-top: 38px;
  padding-top: 8px;
  position: relative;
}

.avatar-card-group {
  position: relative;
  min-height: 392px;
  border: 1.5px dashed rgba(88, 91, 255, 0.38);
  border-radius: 22px;
  padding: 14px 16px 22px;
  background: rgba(255,255,255,0.52);
}

.avatar-card-group.triple {
  min-height: 392px;
}

.avatar-card-group.quad {
  min-height: 392px;
}

.avatar-card-group::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #6b61ff;
  transform: translateX(-50%);
}

.avatar-video-card {
  position: absolute;
  width: min(var(--avatar-portrait-card-width), calc(100% - 16px));
  aspect-ratio: var(--avatar-portrait-card-ratio);
  border-radius: var(--avatar-portrait-card-radius);
  overflow: hidden;
  background: #102033;
  border: var(--avatar-portrait-card-border);
  box-shadow: var(--avatar-portrait-card-shadow);
  cursor: pointer;
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    z-index 0.28s ease,
    filter 0.28s ease,
    opacity 0.28s ease;
}

.avatar-card-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  min-width: 44px;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #102033;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16,32,51,0.16);
}

.avatar-video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease;
}

/* groupe de 2 */

.avatar-card-group.pair .card-back {
  left: 12px;
  top: 16px;
  transform: rotate(-7deg);
  z-index: 1;
}

.avatar-card-group.pair .card-front {
  right: 12px;
  top: 90px;
  transform: rotate(7deg);
  z-index: 2;
}

/* groupe de 3 */

.avatar-card-group.triple .card-back {
  left: 10px;
  top: 14px;
  transform: rotate(-8deg);
  z-index: 1;
}

.avatar-card-group.triple .card-mid {
  left: 15%;
  top: 78px;
  transform: rotate(-1deg);
  z-index: 2;
}

.avatar-card-group.triple .card-front {
  right: 10px;
  top: 124px;
  transform: rotate(8deg);
  z-index: 3;
}

.avatar-card-group.quad .card-back {
  left: 8px;
  top: 12px;
  transform: rotate(-8deg);
  z-index: 1;
}

.avatar-card-group.quad .card-mid-left {
  left: 10%;
  top: 62px;
  transform: rotate(-2deg);
  z-index: 2;
}

.avatar-card-group.quad .card-mid-right {
  right: 10%;
  top: 104px;
  transform: rotate(3deg);
  z-index: 3;
}

.avatar-card-group.quad .card-front {
  right: 8px;
  top: 146px;
  transform: rotate(8deg);
  z-index: 4;
}

.avatar-card-group.pair .card-back:hover {
  transform: translateY(-14px) rotate(-7deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-card-group.triple .card-back:hover,
.avatar-card-group.quad .card-back:hover {
  transform: translateY(-14px) rotate(-8deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-card-group.pair .card-front:hover {
  transform: translateY(-14px) rotate(7deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-card-group.triple .card-front:hover,
.avatar-card-group.quad .card-front:hover {
  transform: translateY(-14px) rotate(8deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-card-group.triple .card-mid:hover {
  transform: translateY(-14px) rotate(-1deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-card-group.quad .card-mid-left:hover {
  transform: translateY(-14px) rotate(-2deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-card-group.quad .card-mid-right:hover {
  transform: translateY(-14px) rotate(3deg) scale(1.04);
  filter: saturate(1.05);
  opacity: 1;
}

.avatar-video-card:hover {
  z-index: 12;
  box-shadow: 0 34px 90px rgba(16,32,51,0.28);
}

.avatar-video-card:hover video {
  transform: scale(1.03);
}

/* carte active après clic */

.avatar-video-card.is-front {
  z-index: 10 !important;
  transform: translateY(-12px) rotate(0deg) scale(1.04);
  filter: none;
  opacity: 1;
}

.avatar-video-card.is-front:hover {
  transform: translateY(-26px) rotate(0deg) scale(1.08);
  box-shadow: 0 34px 90px rgba(16,32,51,0.28);
}


.avatar-card-group:has(.is-front) .avatar-video-card:not(.is-front) {
  opacity: 1;
  filter: none;
}

[data-media-focus] {
  cursor: pointer;
}

/* DOUBLE DIGITAL */

.digital-builder {
  width: 100%;
  margin: 26px auto 0;
}

.digital-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  position: relative;
  align-items: start;
  padding-bottom: 34px;
}

.digital-input {
  margin: 0;
  position: relative;
  width: min(100%, var(--avatar-portrait-card-width));
  aspect-ratio: var(--avatar-portrait-card-ratio);
  box-sizing: border-box;
  overflow: hidden;
  border-radius: var(--avatar-portrait-card-radius);
  background: rgba(255,255,255,0.12);
  border: var(--avatar-portrait-card-border);
  box-shadow: var(--avatar-portrait-card-shadow);
  justify-self: center;
}

.digital-input img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
}

.digital-input video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #05080c;
}

.audio-input {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04)),
    rgba(255,255,255,0.08);
}

.audio-trigger {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: 1;
  min-height: 0;
}

.audio-thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(37,99,235,0.5), rgba(16,185,129,0.35));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, background 0.22s ease;
}

.audio-icon {
  position: relative;
  width: 38px;
  height: 46px;
  border: 4px solid white;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border-bottom: none;
}

.audio-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 4px;
  height: 12px;
  background: white;
  transform: translateX(-50%);
  border-radius: 999px;
}

.audio-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 22px;
  height: 4px;
  background: white;
  transform: translateX(-50%);
  border-radius: 999px;
}

.audio-trigger:hover .audio-thumbnail,
.audio-trigger:focus-visible .audio-thumbnail,
.audio-trigger[aria-pressed="true"] .audio-thumbnail {
  transform: scale(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 16px 34px rgba(7, 20, 40, 0.24);
}

.audio-trigger[aria-pressed="true"] .audio-thumbnail {
  background: linear-gradient(135deg, rgba(52, 113, 255, 0.58), rgba(16, 185, 129, 0.48));
}

.audio-trigger:focus-visible {
  outline: 2px solid rgba(255,255,255,0.94);
  outline-offset: 6px;
  border-radius: 24px;
}

.audio-input audio {
  display: none;
}

.digital-input figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(16,32,51,0.78);
  color: white;
  font-size: 12px;
  font-weight: 850;
}

.photo-input {
  grid-column: auto;
  transform: none;
}

.voice-input {
  grid-column: auto;
  transform: none;
  margin-top: 0;
}

.movement-input {
  grid-column: auto;
  transform: none;
  margin-top: 0;
}

.movement-input video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
}

.digital-inputs::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 8px;
  height: 22px;
  border: 2px dashed rgba(110, 95, 255, 0.78);
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.builder-arrow {
  text-align: center;
  font-size: 48px;
  margin: 6px 0 10px;
  color: #7b6cff;
  opacity: 1;
}

.digital-result {
  width: min(100%, 360px);
  margin: 0 auto;
}

.digital-result video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 24px;
  display: block;
  background: #05080c;
  box-shadow: 0 30px 80px rgba(0,0,0,0.22);
}

.digital-result span {
  display: block;
  margin-top: 14px;
  font-weight: 850;
  color: white;
}

.digital-result span strong {
  color: #7b6cff;
}

/* CAS D’USAGE */

.avatar-usecases-section {
  overflow: hidden;
}

.usecase-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 42px;
}

.usecase-tab {
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(16,32,51,0.08);
  background: rgba(255,255,255,0.7);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(16,32,51,0.04);
}

.usecase-tab.active {
  background: #102033;
  color: white;
}

.usecase-carousel {
  position: relative;
  min-height: 560px;
}

.usecase-slide {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(880px, 82vw);
  opacity: 0;
  transform: translateX(-50%) scale(0.88);
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.usecase-slide.active {
  position: relative;
  left: auto;
  top: auto;
  opacity: 1;
  transform: none;
  margin: 0 auto;
  pointer-events: auto;
  z-index: 3;
}

.usecase-slide.prev {
  opacity: 0.24;
  transform: translateX(-92%) scale(0.82);
  z-index: 1;
}

.usecase-slide.next {
  opacity: 0.24;
  transform: translateX(-8%) scale(0.82);
  z-index: 1;
}

.usecase-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 28px;
  display: block;
  background: #111;
  box-shadow: 0 30px 90px rgba(16,32,51,0.14);
}


.usecase-slide-vertical .usecase-video {
  width: min(100%, 300px);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.usecase-slide-vertical .usecase-video video {
  width: auto;
  max-width: 100%;
  height: min(420px, 58vh);
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.usecase-slide-vertical .usecase-content {
  max-width: 300px;
  margin: 0 auto;
}

.usecase-slide-grid {
  width: min(1160px, 92vw);
}

.usecase-ugc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.usecase-ugc-grid .project-card {
  width: 100%;
  max-width: 340px;
  justify-self: center;
}

.usecase-ugc-grid .project-card video {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #111;
}

.usecase-slide-grid .usecase-content {
  max-width: 680px;
  margin: 26px auto 0;
  text-align: center;
}

.usecase-content {
  padding: 26px 20px 0;
}

.usecase-content span {
  color: #2563eb;
  font-weight: 950;
}

.usecase-content h3 {
  margin-top: 10px;
}

.usecase-content p {
  max-width: 680px;
}

/* FINAL */

.avatar-page .final {
  background:
    radial-gradient(circle at 12% 10%, rgba(88, 91, 255, 0.16), transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(0,210,190,0.12), transparent 30%),
    linear-gradient(180deg, rgba(16, 32, 51, 0.94), rgba(13, 24, 39, 0.98));
  color: white;
}

.avatar-page .final p {
  color: rgba(255,255,255,0.74);
}

.avatar-page .final .btn {
  background: white;
  color: #102033;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .avatar-split {
    grid-template-columns: 1fr;
  }

  .avatar-card-group,
  .avatar-card-group.triple {
    min-height: 430px;
  }

  .usecase-carousel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .avatar-formats-section {
    --avatar-portrait-card-width: min(72vw, 220px);
  }

  .avatar-hero {
    padding: 72px 0 90px;
  }

  .avatar-lang-tabs {
    margin-top: 14px;
    border-radius: 22px;
    flex-wrap: wrap;
  }

  .avatar-demo-card {
    transform: none;
  }

  .avatar-split {
    gap: 22px;
  }

  .avatar-format-panel {
    padding: 26px;
  }

  .avatar-card-groups {
    grid-template-columns: 1fr;
  }

  .avatar-card-group,
  .avatar-card-group.triple,
  .avatar-card-group.quad {
    min-height: 420px;
  }

  .digital-inputs {
    grid-template-columns: 1fr;
  }

  .photo-input,
  .voice-input,
  .movement-input {
    grid-column: 1 / -1;
    width: min(100%, var(--avatar-portrait-card-width));
    aspect-ratio: var(--avatar-portrait-card-ratio);
    margin: 0;
    transform: none;
  }

  .digital-input img {
    min-height: 170px;
  }

  .usecase-slide,
  .usecase-slide.prev,
  .usecase-slide.next,
  .usecase-slide.active {
    width: 100%;
  }

  .usecase-slide.active {
    position: relative;
  }

  .usecase-ugc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}
