/* a2i-videos.css — Page Vidéos (onglets Démos / Tutos) + page détail.
   Préfixe: a2i-videos-* / a2i-vdetail-* / a2i-chapitres-*.
   Charte a2common : violet corporate + vert corporate. Thème nuit.
   Réutilise .a2i-vitrine / .a2i-details existants. */

/* ═══ Onglets (deux vraies routes — liens, pas JS) ═══ */

.a2i-videos-onglets {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 2rem;
}

.a2i-videos-onglet {
  padding: 0.55em 1.4em;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #64748b;
  border: 1px solid var(--a2-corporate-border);
  border-radius: 999px;
  transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.a2i-videos-onglet:hover {
  color: var(--a2-corp-green-light);
  border-color: var(--a2-corp-green-border);
}

.a2i-videos-onglet--active {
  color: #e2e8f0;
  background: var(--a2-corporate-grad-soft);
  border-color: var(--a2-corporate-2);
  box-shadow: 0 0 14px var(--a2-corporate-glow);
}

/* ═══ Items des vidéos ═══ */

.a2i-videos-items {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

.a2i-videos-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--a2-corporate-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(14, 14, 22, 0.6);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.a2i-videos-card:hover {
  border-color: var(--a2-corporate-2);
  box-shadow: 0 0 24px var(--a2-corporate-glow);
  transform: translateY(-2px);
}

.a2i-videos-card__poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #050509;
}

.a2i-videos-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) brightness(0.85);
  transition: filter 0.4s, transform 0.5s;
  -webkit-user-drag: none;
  user-select: none;
}

.a2i-videos-card:hover .a2i-videos-card__poster img {
  filter: saturate(1) brightness(1);
  transform: scale(1.03);
}

.a2i-videos-card__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(7, 7, 11, 0.72);
  border: 1px solid var(--a2-corporate-2);
  color: var(--a2-corporate-3);
  font-size: 1.1rem; padding-left: 4px;
  box-shadow: 0 0 22px var(--a2-corporate-glow);
}

.a2i-videos-card__duree {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 2px 8px;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  background: rgba(7, 7, 11, 0.78);
  border: 1px solid var(--a2-corporate-border);
  border-radius: 6px;
}

.a2i-videos-card__corps {
  display: block;
  padding: 1rem 1.2rem 1.2rem;
}

.a2i-videos-card__titre {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.35rem;
}

.a2i-videos-card__desc {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

.a2i-videos-vide {
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  padding: 3rem 0;
}

/* ═══ Page détail ═══ */

.a2i-vdetail { max-width: 900px; margin: 0 auto; }

.a2i-vdetail__retour { margin: 0 0 1rem; }
.a2i-vdetail__retour a {
  color: #64748b;
  font-size: 0.78rem;
  text-decoration: none;
  letter-spacing: 0.06em;
}
.a2i-vdetail__retour a:hover { color: var(--a2-corp-green-light); }

.a2i-vdetail__desc {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  max-width: 620px;
  margin: 0.4rem auto 1.6rem;
}

/* Page détail : la card unique centrée */
.a2i-videos-items--seule {
  max-width: 780px;
}

.a2i-vdetail__bloc { margin-bottom: 1.8rem; }

.a2i-vdetail__sous-titre {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a2-corporate-2);
  margin: 0 0 0.9rem;
}

/* ═══ Chapitres ═══ */

.a2i-chapitres {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a2i-chapitres__btn {
  display: flex;
  align-items: baseline;
  gap: 0.9em;
  width: 100%;
  padding: 0.6em 1em;
  text-align: left;
  font-family: inherit;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(14, 14, 22, 0.5);
  border: 1px solid var(--a2-corporate-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.a2i-chapitres__btn:hover {
  border-color: var(--a2-corporate-2);
  background: var(--a2-corporate-grad-soft);
  color: #e2e8f0;
}

.a2i-chapitres__t {
  font-variant-numeric: tabular-nums;
  color: var(--a2-corp-green-light);
  font-size: 0.74rem;
  flex-shrink: 0;
}

.a2i-chapitres__label { flex: 1; }

/* ═══ Transcription ═══ */

.a2i-vdetail__transcription-texte {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.7;
  margin: 0;
}

/* ═══ Modale vidéo ═══ */

.a2i-vmodal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 3, 6, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.a2i-vmodal--ouvert { opacity: 1; pointer-events: auto; }

/* Mode théâtre : la modale occupe tout le viewport (in la page).
   On garde la barre de contrôle custom et la croix — pas le plein écran
   natif du navigateur qui masque nos contrôles. */
.a2i-vmodal--theatre { padding: 0; }
.a2i-vmodal--theatre .a2i-vmodal__boite {
  max-width: 100%;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
}
.a2i-vmodal--theatre .a2i-vmodal__lecteur video { object-fit: contain; }

.a2i-vmodal__boite {
  position: relative;
  width: 100%;
  max-width: 1160px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: rgba(14, 14, 22, 0.85);
  border: 1px solid var(--a2-corporate-border);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 60px var(--a2-corporate-glow);
  overflow: hidden;
}

.a2i-vmodal__close {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 30;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(7, 7, 11, 0.65);
  border: 1px solid var(--a2-corporate-border);
  color: #e2e8f0;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.a2i-vmodal__close:hover {
  border-color: var(--a2-corporate-3);
  color: #fff;
  box-shadow: 0 0 16px var(--a2-corporate-glow);
}

/* Corps : lecteur + panneaux côte à côte (desktop) */
.a2i-vmodal__corps {
  display: flex;
  gap: 0;
  min-height: 0;
  flex: 1;
}

.a2i-vmodal__lecteur {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #050509;
}

.a2i-vmodal__lecteur video {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  background: #050509;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* Barre de contrôle custom */
.a2i-vmodal__controles {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(7, 7, 11, 0.9);
  border-top: 1px solid var(--a2-corporate-border);
}

.a2i-vmodal__btn {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--a2-corporate-border);
  color: #e2e8f0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.a2i-vmodal__btn:hover {
  border-color: var(--a2-corporate-2);
  background: var(--a2-corporate-grad-soft);
}

.a2i-vmodal__temps {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.a2i-vmodal__timeline {
  flex: 1;
  height: 4px;
  accent-color: var(--a2-corporate-2);
  cursor: pointer;
}

/* Panneaux (dock) — colonne droite sur desktop */
.a2i-vmodal__panneaux {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--a2-corporate-border);
  background: rgba(10, 10, 16, 0.6);
  min-height: 0;
}

.a2i-vmodal__tabs {
  display: flex;
  border-bottom: 1px solid var(--a2-corporate-border);
}

.a2i-vmodal__tab {
  flex: 1;
  padding: 0.7em 0.5em;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.a2i-vmodal__tab:hover { color: var(--a2-corp-green-light); }

.a2i-vmodal__tab--active {
  color: #e2e8f0;
  border-bottom-color: var(--a2-corporate-2);
}

.a2i-vmodal__panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  min-height: 0;
}

.a2i-vmodal__panel--active { display: block; }

.a2i-vmodal__panel .a2i-vdetail__transcription-texte { font-size: 0.8rem; }

/* ═══ Responsive ═══ */

@media (min-width: 700px) {
  .a2i-videos-items { grid-template-columns: repeat(2, 1fr); }
  /* Une seule vidéo : pleine largeur centrée */
  .a2i-videos-items:has(> :only-child) { grid-template-columns: minmax(0, 560px); justify-content: center; }
}

@media (max-width: 760px) {
  .a2i-videos-onglet { padding: 0.5em 1.1em; font-size: 0.72rem; }
  .a2i-vdetail__desc { font-size: 0.8rem; }

  /* Modale : panneaux passent sous la vidéo, dock en bas */
  .a2i-vmodal { padding: 0; }
  .a2i-vmodal__boite {
    max-width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .a2i-vmodal__corps { flex-direction: column; }
  .a2i-vmodal__lecteur video { max-height: 44dvh; }
  .a2i-vmodal__panneaux {
    flex: 1;
    border-left: none;
    border-top: 1px solid var(--a2-corporate-border);
  }
}
