/* ============================================================
   ID Demos — Styles dédiés (Video + Live demo portals)
   Réutilise les bases de idakto-presentation.css (.ip-*)
   Préfixes ajoutés : .idd-*
   Source Figma : 791:1588 (Video) / 791:1655 (Live)
   ============================================================ */

/* ─── Titre principal des deux slides ────────────────────── */
/* Figma: left=149 dans glass + 69 = 218 ; top=212 dans glass + 75 = 287 ; width=582 */
.idd-title {
  position: absolute;
  left: 218px;
  top: 287px;
  width: 582px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 63px;
  line-height: 82px;
  color: var(--ip-text);
  margin: 0;
}

/* ─── Conteneur des 5 cartes ─────────────────────────────── */
/* Figma Video: container left=511 dans glass + 69 = 580 ; top=140 dans glass + 75 = 215 ; w=1128 ; h=745 */
.idd-cards {
  position: absolute;
  left: 580px;
  top: 215px;
  width: 1128px;
  height: 745px;
}

/* ─── Carte (commune Video + Live) ───────────────────────── */
/* Carte 354×354 avec image bg + barre 92px en bas */
.idd-card {
  position: absolute;
  width: 354px;
  height: 354px;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f3f2;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.idd-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
.idd-card:active {
  transform: scale(0.99);
}

.idd-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Voile sombre sur l'image — uniquement sur les cartes VIDEO (cf Figma rgba(0,0,0,0.2))
   Les cartes LIVE doivent rester nettes, sans overlay */
.idd-cards--video .idd-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 1;
}

/* ─── Bouton play (uniquement Video) ─────────────────────── */
/* Position Figma : left=50%, top=103 (en haut de la zone image visible) */
.idd-play-btn {
  position: absolute;
  left: 50%;
  top: 103px;
  transform: translateX(-50%);
  width: 107px;
  height: 107px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: block;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
/* Triangle play — pseudo-element */
.idd-play-btn::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-left: 30px solid #00057b;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
}

/* ─── Barre de bas de carte (titre + flèche) ─────────────── */
.idd-card-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  background: rgba(25, 25, 25, 0.53);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  z-index: 3;
}
.idd-card-bar > span:first-child {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 30px;
  color: #fff;
  white-space: nowrap;
}
.idd-arrow-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idd-arrow-icon svg {
  width: 100%;
  height: 100%;
}

/* ─── Positions des cartes — VIDEO DEMOS ─────────────────── */
/* Container 1128×745 ; cartes 354×354 ; gap 33px ; row 2 à top=391 */
/* Row 1 : 2 cartes (right side only, leaving left for the title) */
.idd-cards--video .idd-card--banking { left: 384px; top: 0; }
.idd-cards--video .idd-card--health  { left: 774px; top: 0; }
/* Row 2 : 3 cartes (full width) */
.idd-cards--video .idd-card--egov    { left: 0;     top: 391px; }
.idd-cards--video .idd-card--evisa   { left: 387px; top: 391px; }
.idd-cards--video .idd-card--bankid  { left: 774px; top: 391px; }

/* ─── Positions des cartes — LIVE DEMOS ──────────────────── */
/* Figma : Row 1 cartes à left=920/1310 dans glass + top=129 dans glass
   Container at slide x=580, slide y=215 (same), so:
   - Banking: glass left=920 → container x=920-(580-69)=409; glass top=129 → container y=129-(215-75)=-11
     (presque même row 1) */
/* Row 1 : positions ajustées pour matcher Figma (y légèrement différente : 129+75=204 vs 215) */
.idd-cards--live .idd-card--banking { left: 409px; top: -11px; }
.idd-cards--live .idd-card--health  { left: 799px; top: -11px; }
/* Row 2 : flex row at glass left=536, top=520 → container coords (25, 380) ; cartes à 0/387/774 */
.idd-cards--live .idd-card--egov    { left: 25px;  top: 380px; }
.idd-cards--live .idd-card--evisa   { left: 412px; top: 380px; }
.idd-cards--live .idd-card--kiosk   { left: 799px; top: 380px; }

/* ─── Modal Vidéo ─────────────────────────────────────────── */
.idd-video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.idd-video-modal[hidden] {
  display: none;
}
.idd-video-modal video {
  max-width: 90%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  background: #000;
}
.idd-modal-close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, transform 0.15s;
  z-index: 1001;
}
.idd-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.idd-modal-close:active {
  transform: scale(0.95);
}
.idd-modal-close svg {
  width: 28px;
  height: 28px;
}

/* ─── Burger button — fait office de retour vers index ───── */
.ip-app.is-iddemos .ip-burger-btn { cursor: pointer; }

/* ─── Modale iframe (Live demos) ──────────────────────────── */
.idd-link-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.idd-link-modal[hidden] {
  display: none;
}

/* Cadre intérieur — taille ajustée 1500×1000 dans un slide 1920×1080
   (un peu moins large et un peu plus haut que le glass panel)
   en suivant le même scaling que le stage : min(vw/1920, vh/1080) */
.idd-link-modal-frame {
  /* width = 1500 * stage_scale = min(1500*vw/1920, 1500*vh/1080) */
  width: min(78.13vw, 138.89vh);
  /* height = 1000 * stage_scale = min(1000*vw/1920, 1000*vh/1080) */
  height: min(52.08vw, 92.59vh);
  background: #0c0837;
  border-radius: 14px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(120, 140, 230, 0.25);
}

/* Header de la modale (nav + titre + URL + close) */
.idd-link-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(12, 8, 55, 0.85);
  border-bottom: 1px solid rgba(120, 140, 230, 0.18);
  flex-shrink: 0;
}

/* Boutons Back / Forward / Home */
.idd-link-modal-nav {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}
.idd-link-modal-nav:hover {
  background: rgba(255, 255, 255, 0.14);
}
.idd-link-modal-nav:active {
  transform: scale(0.92);
}
.idd-link-modal-nav svg {
  width: 18px;
  height: 18px;
}
.idd-link-modal-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  user-select: none;
}
.idd-lock-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
}
#idd-link-modal-url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idd-link-modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.idd-link-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
}
.idd-link-modal-close:active {
  transform: scale(0.95);
}
.idd-link-modal-close svg {
  width: 22px;
  height: 22px;
}

/* Iframe (zone web encapsulée) */
.idd-link-modal-frame iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
  display: block;
}
