/* Display Lab, pages Meta et Motion. Charge après lab.css. */

/* ---------- galerie Meta : une rangée de formats de fil, une rangée de stories ---------- */
.rangs { display: flex; flex-direction: column; gap: 1.6rem; padding-top: 1.8rem; }
.rang {
  --n: 4;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.6rem;
  list-style: none;
}
.rang .card { flex: 0 0 calc((100% - (var(--n) - 1) * 1.6rem) / var(--n)); }
.rang .card img,
.film-card img { display: block; width: 100%; height: auto; }

/* ---------- modale Meta : la création dans un téléphone ---------- */
.player--meta, .player--film { width: fit-content; }
.player--meta .btn-close,
.player--film .btn-close { position: fixed; top: 20px; right: 20px; z-index: 3; }

.scene {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 28px 24px 24px;
  background: #EEF0F2;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.scene__legende {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.phone {
  flex: none;
  width: 392px;
  padding: 11px;
  border-radius: 46px;
  background: #11151C;
  box-shadow: 0 22px 50px rgba(16, 18, 16, 0.28);
}
.phone__ecran {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: #FFFFFF;
  font-family: system-ui, -apple-system, sans-serif;
  color: #050505;
  line-height: 1.4;
}

.statut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 6px;
  font-size: 12px;
  font-weight: 700;
}
.statut__icones { display: flex; align-items: flex-end; gap: 3px; }
.statut__icones i { width: 4px; background: #11151C; border-radius: 1px; }
.statut__icones i:nth-child(1) { height: 6px; }
.statut__icones i:nth-child(2) { height: 9px; }
.statut__icones i:nth-child(3) { height: 12px; }

.phone[data-vue="fil"] .story,
.phone[data-vue="story"] .fil,
.phone[data-vue="story"] .statut { display: none; }

/* placement fil */
.fil__app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid #E4E6EB;
}
.fil__nom { font-size: 19px; font-weight: 700; color: #0866FF; }
.fil__outils { display: flex; gap: 8px; }
.fil__outils i { width: 20px; height: 20px; border-radius: 50%; background: #E4E6EB; }

.post { padding: 12px 0 4px; }
.post__head { display: flex; align-items: center; gap: 10px; padding: 0 14px 10px; }
.post__menu { margin-left: auto; color: #65676B; letter-spacing: 1px; }

.feed-avatar {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
}
.feed-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; padding: 5px; display: block; }

.feed-ident { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.feed-ident b { font-size: 14px; }
.feed-ident i { font-style: normal; font-size: 12px; color: #65676B; }

.feed-primary { margin: 0 0 10px; padding: 0 14px; font-size: 14px; line-height: 19px; }

.feed-rail-wrap { position: relative; }
.feed-rail {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.feed-rail::-webkit-scrollbar { display: none; }

.feed-card { flex: none; width: 100%; scroll-snap-align: start; }
.feed-card img,
.feed-card video { display: block; width: 100%; height: auto; }
.feed-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #F7F8FA;
  border-top: 1px solid #E4E6EB;
}
.feed-card__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.feed-card__txt b { font-size: 13px; }
.feed-card__txt i { font-style: normal; font-size: 12px; color: #65676B; }
.feed-card__cta {
  flex: none;
  padding: 7px 12px;
  border-radius: 6px;
  background: #E4E6EB;
  font-size: 12px;
  font-weight: 700;
}

.feed-arrow,
.story__nav {
  position: absolute;
  z-index: 3;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  color: #11151C;
  cursor: pointer;
}
.feed-arrow { top: 40%; }
.feed-prev { left: 8px; }
.feed-next { right: 8px; }
.feed-arrow:disabled,
.story__nav:disabled { opacity: 0; pointer-events: none; }

.feed-dots { margin-top: 8px; display: flex; justify-content: center; gap: 5px; }
.feed-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 0, 0, 0.18); }
.feed-dots i.is-on { background: #0866FF; }

.post__actions {
  display: flex;
  justify-content: space-around;
  padding: 8px 6px 10px;
  border-top: 1px solid #E4E6EB;
  margin-top: 8px;
}
.act { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #65676B; }
.act svg { width: 17px; height: 17px; }

/* placement story : l'écran prend la proportion de la création, le chrome se pose dessus */
.story { position: relative; aspect-ratio: 9 / 16; background: #000; }
.story__media { position: absolute; inset: 0; }
.story__etape { position: absolute; inset: 0; opacity: 0; transition: opacity 220ms ease; }
.story__etape.is-on { opacity: 1; }
.story__media img,
.story__media video { width: 100%; height: 100%; object-fit: cover; display: block; }

.story__nav { top: 50%; margin-top: -16px; }
.story__nav--prev { left: 10px; }
.story__nav--next { right: 10px; }

.story__barres { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.story__barres i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.4); }
.story__barres i.is-on { background: #FFFFFF; }

.story__head {
  position: absolute;
  top: 24px; left: 10px; right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  color: #FFFFFF;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.story__head .feed-ident i { color: rgba(255, 255, 255, 0.85); }
.story__fermer { margin-left: auto; display: grid; place-items: center; }

.story__pied { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; display: grid; place-items: center; }
.story__cta {
  padding: 11px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #11151C;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Motion : vignette 9:16, aperçu au survol, film en modale ---------- */
.films {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  padding-top: 1.8rem;
}
.film-card {
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
}
.film-card .card-thumb { display: block; aspect-ratio: 9 / 16; overflow: hidden; }
.film-card video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.film-card.is-playing video { opacity: 1; }

.player--film video {
  display: block;
  width: min(calc(100vw - 40px), min(86vh, 900px) * 9 / 16);
  height: auto;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

@media (max-width: 920px) {
  .films { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 480px) {
  .player--meta { width: calc(100vw - 24px); }
  .phone { width: 100%; max-width: 360px; }
  .scene { padding: 20px 12px; }
}

/* ---------- Websites : visuels des réalisations, lien vers le site en ligne ---------- */
.sites {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  padding-top: 1.8rem;
}
.site-card { display: block; color: inherit; text-decoration: none; }
.site-card .card-thumb { aspect-ratio: 3 / 2; }
.site-card .card-meta { display: block; }
.site-go {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-weight: 700;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.site-card:hover .site-go { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 920px) {
  .sites { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
