/* =========================
   UAS — Distortion + overlap
   ========================= */

#uas.sec--soft{
  position: relative;
  overflow: hidden;
}

/* fond soft */
#uas.sec--soft::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(900px 560px at 18% 40%, rgba(0,212,255,.10), transparent 60%),
    radial-gradient(820px 520px at 86% 24%, rgba(124,77,255,.10), transparent 60%);
  pointer-events:none;
  opacity:.9;
}

/* Split layering */
#uas .split{
  position: relative;
  align-items: center;
}

#uas .split__text{
  position: relative;
  z-index: 3; /* texte au-dessus */
}

/* Media : on autorise le chevauchement */
#uas .split__media{
  position: relative;
  z-index: 2;
  min-height: 420px;
}

/* Le visuel devient ABSOLU sur desktop pour passer "derrière" le texte */
.uas-visual{
  position: absolute;
  right: -56px;
  top: 50%;
  width: min(820px, 58vw);
  height: clamp(360px, 34vw, 560px);
  border-radius: 28px;
  overflow: hidden;

  /* base glass */
  background: rgba(255,255,255,.50);
  border: 1px solid rgba(20,30,50,.10);
  backdrop-filter: blur(10px);

  /* IMPORTANT: perspective + rotation */
  transform-origin: 25% 55%;
  transform:
    translateY(-50%)
    perspective(1200px)
    rotateX(16deg)
    rotateY(-22deg)
    rotateZ(2deg);

  /* ombre "posée" */
  box-shadow:
    0 40px 90px rgba(16, 24, 40, .22),
    0 14px 28px rgba(16, 24, 40, .12),
    inset 0 1px 0 rgba(255,255,255,.60);
}

/* Reflet léger (donne l'effet table / lumière) */
.uas-visual::after{
  content:"";
  position:absolute; inset:-20%;
  pointer-events:none;
  background:
    radial-gradient(600px 380px at 35% 20%, rgba(255,255,255,.35), rgba(255,255,255,0) 60%),
    linear-gradient(115deg, rgba(255,255,255,.18), rgba(255,255,255,0) 45%);
  mix-blend-mode: screen;
  opacity: .55;
  transform: rotate(-6deg);
}
/* Canvas + fallback */
.uas-canvas,
.uas-fallback{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.06);
}

.uas-fallback{
  opacity: 0;
  pointer-events: none;
}

/* Fondu : c’est lui qui donne le “subtil” */
.uas-fade{
  position:absolute;
  inset:-2px;
  pointer-events:none;

  /* gros point important : un fade qui “mange” vers la gauche
     pour que ça passe derrière le texte proprement */
  background:
    radial-gradient(950px 560px at 70% 40%, rgba(255,255,255,.00), rgba(245,249,255,.45) 70%, rgba(245,249,255,.80) 100%),
    linear-gradient(90deg, rgba(245,249,255,.92) 0%, rgba(245,249,255,.55) 18%, rgba(245,249,255,.18) 42%, rgba(245,249,255,.00) 70%);
  opacity: .95;
}

/* Grain ultra léger pour le premium */
.uas-grain{
  position:absolute; inset:0;
  pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: .18;
}

/* ---- Cards (Couverture / Mises à jour / Fiches zones) ---- */

#uas .cards3{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin-top: 18px;
}

#uas .cards3 .card{
  position: relative;
  padding: 14px 14px 14px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(20,30,50,.10);
  box-shadow:
    0 12px 30px rgba(16, 24, 40, .08),
    inset 0 1px 0 rgba(255,255,255,.75);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}

#uas .cards3 .card::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: 16px;
  background: radial-gradient(300px 180px at 20% 15%, rgba(0,212,255,.18), transparent 60%),
              radial-gradient(320px 200px at 90% 25%, rgba(124,77,255,.14), transparent 60%);
  opacity: .65;
  pointer-events:none;
}

#uas .cards3 .card b{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

#uas .cards3 .card b::before{
  content:"";
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(0,212,255,.85), rgba(124,77,255,.65));
  box-shadow: 0 8px 18px rgba(0,212,255,.18);
}

#uas .cards3 .card p{
  margin: 8px 0 0;
  position: relative;
  z-index: 1;
  opacity: .86;
}

@media (hover:hover){
  #uas .cards3 .card:hover{
    transform: translateY(-3px);
    box-shadow:
      0 18px 44px rgba(16, 24, 40, .12),
      inset 0 1px 0 rgba(255,255,255,.78);
  }
}

/* Mobile/tablette : on repasse le visuel en bloc sous le texte */
@media (max-width: 980px){
  .uas-visual{
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 360px;
    margin-top: 18px;
    border-radius: 22px;
  }

  #uas .split__media{
    min-height: 0;
    z-index: 1;
  }

  #uas .cards3{
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  .uas-canvas{ display:none; }
  .uas-visual{
    animation: uasTableFloat 6.5s ease-in-out infinite;
  }
  @keyframes uasTableFloat{
    0%,100%{
      transform:
        translateY(-50%)
        perspective(1200px)
        rotateX(16deg)
        rotateY(-22deg)
        rotateZ(2deg)
        translateZ(0);
    }
    50%{
      transform:
        translateY(calc(-50% - 6px))
        perspective(1200px)
        rotateX(15deg)
        rotateY(-20deg)
        rotateZ(1.5deg)
        translateZ(10px);
    }
  }
}
