@layer components {
  /* Cadre à ratio fixe : le SVG donne la proportion, le contenu remplit et se recadre. */
  .frame { display: grid; position: relative; overflow: hidden; background: var(--paper-sunken); }
  .frame > * { grid-area: 1 / 1; }
  .frame > :not(.frame__fill) { position: relative; } /* au-dessus de l’image */
  .frame__spacer { width: 100%; height: auto; }
  /* Hors du flux : une image à un autre ratio ne doit pas déformer le cadre. */
  .frame__fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .frame__empty { display: grid; place-items: center; color: var(--ink-faint); font-size: var(--text-sm); }
  .frame__glyph { place-self: start end; margin: 0.6rem; color: #FFF; filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.5)); }
  .frame__play { place-self: center; color: #FFF; filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.5)); }
  .frame__counter { place-self: start end; margin: 0.6rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: rgb(0 0 0 / 0.6); color: #FFF; font-size: 0.75rem; }
  .frame__more { display: grid; place-items: center; background: rgb(0 0 0 / 0.45); color: #FFF; font-size: var(--text-lg); }


  /* Instagram : couleurs du réseau, cantonnées à la preview */
  .ig-post { background: var(--ig-bg); color: var(--ig-ink); font-size: 0.8125rem; line-height: 1.35; border: 1px solid var(--ig-line); border-radius: var(--radius-lg); overflow: hidden; }
  .ig-post__header { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; }
  .ig-post__more { margin-inline-start: auto; }
  .ig-post__actions { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.75rem 0.2rem; position: relative; }
  .ig-post__save { margin-inline-start: auto; }
  .ig-post__dots { position: absolute; left: 50%; translate: -50%; display: flex; gap: 4px; }
  .ig-post__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ig-line); }
  .ig-post__dots span.is-active { background: var(--ig-blue); }
  .ig-post__caption { padding: 0.2rem 0.75rem 0.75rem; white-space: pre-line; }
  .ig-muted { color: var(--ig-muted); }
  .ig-post--story { position: relative; }
  .ig-post--story .ig-post__header { position: absolute; z-index: 1; color: #FFF; }

  /* LinkedIn */
  .li-post { background: var(--li-bg); color: var(--li-ink); font-size: 0.8125rem; line-height: 1.4; border: 1px solid var(--li-line); border-radius: var(--radius-lg); overflow: hidden; }
  .li-post__header { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.75rem 0.75rem 0.5rem; }
  .li-post__author { display: grid; line-height: 1.3; }
  .li-post__author span { color: var(--li-muted); font-size: 0.75rem; }
  .li-post__time { gap: 0.2rem; }
  .li-post__more { margin-inline-start: auto; color: var(--li-muted); }
  .li-post__text { padding: 0 0.75rem 0.6rem; }
  .li-muted { color: var(--li-muted); }
  .li-post__media { display: grid; gap: 2px; }
  .li-post__media--2 { grid-template-columns: 1fr 1fr; }
  .li-post__media--3 { grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; }
  .li-post__media--3 > :first-child { grid-row: span 2; }
  .li-post__actions { display: flex; justify-content: space-around; padding: 0.4rem 0.25rem 0.5rem; border-top: 1px solid var(--li-line); margin-top: 0.25rem; color: var(--li-muted); }
  .li-post__actions span { display: grid; justify-items: center; gap: 2px; font-size: 0.6875rem; font-weight: 600; }
}
