/* ========================================================================
   BPM 226 — Correctif des contrôles de publication
   Empêche les libellés Photo / Vidéo / Musique de se briser verticalement
   et adapte la disposition à la largeur réelle du bloc de publication.
   ======================================================================== */

body.page-index.bpm-ui-polish-v216 .bpm185-composer {
  container-type: inline-size;
}

body.page-index.bpm-ui-polish-v216 .bpm185-composer-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, max-content)) minmax(170px, 1fr);
  align-items: center;
  gap: 8px;
}

body.page-index.bpm-ui-polish-v216 .bpm185-media-btn {
  min-width: 92px;
  width: auto;
  justify-content: center;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.page-index.bpm-ui-polish-v216 .bpm185-media-btn i {
  flex: 0 0 auto;
}

body.page-index.bpm-ui-polish-v216 .bpm185-media-btn span {
  display: inline-block;
  min-width: max-content;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.page-index.bpm-ui-polish-v216 .bpm185-title-input {
  grid-column: 4;
  grid-row: 1;
  min-width: 0;
  width: 100%;
}

body.page-index.bpm-ui-polish-v216 .bpm185-vis {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
}

body.page-index.bpm-ui-polish-v216 .bpm185-rights-confirm {
  grid-column: 2 / span 2;
  grid-row: 2;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.page-index.bpm-ui-polish-v216 .bpm185-publish {
  grid-column: 4;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* Le fil central est souvent plus étroit que la fenêtre entière :
   on adapte donc le composant à sa propre largeur, pas au viewport. */
@container (max-width: 660px) {
  body.page-index.bpm-ui-polish-v216 .bpm185-composer-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-media-btn {
    min-width: 0;
    width: 100%;
    padding-inline: 8px;
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-title-input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-vis {
    grid-column: 1;
    grid-row: 3;
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-rights-confirm {
    grid-column: 2 / -1;
    grid-row: 3;
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-publish {
    grid-column: 1 / -1;
    grid-row: 4;
    min-height: 44px;
  }
}

@container (max-width: 390px) {
  body.page-index.bpm-ui-polish-v216 .bpm185-composer-actions {
    gap: 6px;
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-media-btn {
    gap: 5px;
    padding-inline: 5px;
    font-size: 10px;
  }

  body.page-index.bpm-ui-polish-v216 .bpm185-media-btn i {
    font-size: 15px;
  }
}
