/* admin.tdlm.tv : styles propres à l'administration ; la base (couleurs, barre latérale, listes,
   interrupteurs, modales) vient de /static/css/app.css, partagé avec Tournages et Édition. */

/* Logo d'Administration : même famille (carré arrondi, dégradé, signe blanc), en graphite. */
.logo-mark.ad-mark { background: linear-gradient(135deg, #8e8e93, #3a3a3c); }
.ad-me { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ad-intro { margin: -8px 0 16px; }
.ad-search { margin-bottom: 12px; }
.ad-h2 { margin: 18px 0 8px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.ad-wrap { white-space: normal; }

/* Produits : une carte par produit, avec son logo. */
.ad-products { display: grid; gap: 10px; margin: 6px 0 16px; text-align: left; }
.ad-products.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ad-product { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); color: var(--text); }
.ad-product:hover { text-decoration: none; background: var(--bg-sunken); }
.ad-product .label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-product-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px; color: #fff; }
.ad-product-ico.tournages { background: linear-gradient(135deg, var(--accent), #5e5ce6); }
.ad-product-ico.edition { background: linear-gradient(135deg, #ff9f0a, #ff375f); }
.ad-product-ico.sm { width: 22px; height: 22px; border-radius: 6px; margin-right: 8px; vertical-align: -5px; }
.ad-later { margin-top: 8px; }

/* Comptes : accès de chacun à chaque produit. */
.ad-access { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.ad-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: var(--bg-sunken); color: var(--text-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-chip.tournages .ico { color: var(--accent); }
.ad-chip.edition .ico { color: #ff6b35; }
.ad-account h3 { display: flex; align-items: center; margin: 18px 0 8px; font-size: 14px; }
.ad-account h3:first-child { margin-top: 0; }
.ad-addproj { margin: 8px 0 4px; }
.ad-addproj .select { flex: 1 1 160px; width: auto; min-width: 0; max-width: 100%; }
.ad-projs { margin: 6px 0; }
.ad-shows { display: grid; gap: 6px; }
.ad-show-row { display: flex; align-items: center; gap: 10px; }
.ad-show-row .label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-show-row .select { width: auto; flex: 0 1 220px; min-width: 0; }
.ad-role { display: flex; align-items: center; gap: 6px; flex: none; }
.ad-air { display: flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.ad-air input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (hover: none), (pointer: coarse) { .ad-air { min-height: 44px; } }
.ad-role .select { width: auto; }
.ad-show-sel { width: auto; }

/* Rôles et droits : interrupteurs en colonnes, par groupe. */
.ad-rights { display: grid; gap: 2px; padding: 2px 16px 10px; }
.ad-rights.flat { padding: 0; }
.ad-rgroup { display: grid; gap: 2px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 4px; }
.ad-rgroup-name { grid-column: 1 / -1; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.ad-rrow { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-layout { margin: 4px 0; }
.ad-layout .select { width: auto; }
/* Ordre des rôles : chevrons verticaux. */
.ad-up .ico, .ad-down .ico { transform: rotate(90deg); }

@media (max-width: 640px) {
  .ad-chip { white-space: normal; }
  .ad-show-row { flex-wrap: wrap; }
  .ad-show-row .select { flex: 1 1 100%; }
  .group-row:has(.ad-role) { flex-wrap: wrap; }
  .group-row > .ad-role { flex: 1 1 100%; }
  .group-row > .ad-role .select { flex: 1; }
}
