/* ============================================================
   Affichage dynamique : l'interface de gestion d'un client (gestion/gestion.js), montée dans Studio ET dans le HUB, et la page « Parc »
   de Studio (js/affdyn.js). Préfixes .adg-* et .adp-*. Autonome : ses couleurs sont déclarées ici (bleu de Prusse #222339 + menthe #3ce65f (charte.css), communs
   aux deux applications), rien n'est repris de la feuille de l'hôte, sauf la police. Pas de monospace, coins de 8 à 16 px.
   v1.167 : refonte (menus d'actions, vignettes, dialogues en sections, glisser-déposer, planning « en ce moment »).
   ============================================================ */
.adg, .adg-fond, .adg-toast, .adg-menu, .adp, .adp-client-zone {
  --adg-marine: var(--prusse); --adg-marine-2: var(--prusse-2); --adg-menthe: var(--menthe); --adg-menthe-f: #16a34a;
  --adg-ligne: rgba(var(--prusse-rgb),.10); --adg-ligne-2: rgba(var(--prusse-rgb),.18); --adg-doux: #f5f7fb; --adg-doux-2: #eef1f7;
  --adg-texte: var(--prusse); --adg-sourd: var(--ardoise-fonce); --adg-pale: var(--ardoise-claire);
  --adg-rouge: #dc2626; --adg-rouge-f: #fef2f2; --adg-orange: #b45309; --adg-orange-f: #fffbeb; --adg-bleu: #1d4ed8; --adg-bleu-f: #eff6ff; --adg-vert-f: #dcfce7;
  --adg-focus: 0 0 0 3px rgba(var(--menthe-rgb),.45);
  --adg-ombre: 0 1px 2px rgba(var(--prusse-rgb),.04), 0 1px 1px rgba(var(--prusse-rgb),.03);
  color: var(--adg-texte); font-size: 14px; line-height: 1.45;
}
.adg *, .adg-fond *, .adg-menu * { box-sizing: border-box; }
/* :where() : spécificité nulle, sinon « font: inherit » écrasait la taille des petits boutons (.adg-btn-s restait à 14 px avant la v1.167) */
:where(.adg, .adg-fond, .adg-menu, .adp) :where(button, select, input, textarea) { font: inherit; color: inherit; }
:where(.adg, .adg-fond) :where(select, input, textarea) { color: var(--adg-texte); }
.adg { padding: 4px 0 40px; }
.adg-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.adg-ic-grand { width: 30px; height: 30px; stroke-width: 1.6; color: var(--adg-pale); display: block; margin: 0 auto 10px; }
:where(.adg, .adg-fond, .adg-menu, .adp) [hidden] { display: none !important; }
.adg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.adg-sourd { color: var(--adg-sourd); font-weight: 400; }

/* ── Boutons ── */
.adg-btn { color: var(--adg-texte); display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--adg-ligne-2); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.adg-btn:hover:not(:disabled) { background: var(--adg-doux); border-color: rgba(var(--prusse-rgb),.28); }
.adg-btn:active:not(:disabled) { background: var(--adg-doux-2); }
.adg-btn:disabled { opacity: .45; cursor: not-allowed; }
.adg-btn-primaire { background: var(--adg-marine); border-color: var(--adg-marine); color: #fff; }
.adg-btn-primaire:hover:not(:disabled) { background: var(--adg-marine-2); border-color: var(--adg-marine-2); }
.adg-btn-primaire .adg-ic { color: var(--adg-menthe); }
.adg-btn-danger { background: var(--adg-rouge); border-color: var(--adg-rouge); color: #fff; }
.adg-btn-danger:hover:not(:disabled) { background: #b91c1c; border-color: #b91c1c; }
.adg-btn-s { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.adg-btn-s .adg-ic { width: 14px; height: 14px; }
.adg-btn-danger-s { color: var(--adg-rouge); }
.adg-btn-danger-s:hover:not(:disabled) { background: var(--adg-rouge-f); border-color: rgba(220, 38, 38, .35); }
.adg-btn-ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 1px solid transparent; background: transparent; border-radius: 8px; color: var(--adg-sourd); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.adg-btn-ic:hover:not(:disabled), .adg-btn-ic[aria-expanded="true"] { background: var(--adg-doux-2); color: var(--adg-texte); }
.adg-btn-ic:disabled { opacity: .3; cursor: not-allowed; }
.adg-btn-ic-danger:hover:not(:disabled) { background: var(--adg-rouge-f); color: var(--adg-rouge); }
.adg-bloc { width: 100%; margin-bottom: 10px; }
.adg-lien { border: 0; background: none; padding: 2px 0; color: var(--adg-bleu); font-weight: 600; font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(29, 78, 216, .35); }
.adg-lien:hover { text-decoration-color: currentColor; }
:where(.adg, .adg-fond, .adg-menu, .adp) :is(button, a, input, select, textarea, label[tabindex], [tabindex="0"]):focus-visible { outline: none; box-shadow: var(--adg-focus); }

/* ── Résumé, onglets ── */
.adg-alerte { display: flex; align-items: flex-start; gap: 9px; background: var(--adg-orange-f); border: 1px solid rgba(180, 83, 9, .25); color: var(--adg-orange); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 500; }
.adg-alerte .adg-ic { margin-top: 2px; }
.adg-resume { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--adg-ombre); }
.adg-badge-forfait { background: var(--adg-marine); color: var(--adg-menthe); font-weight: 700; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; border-radius: 8px; padding: 4px 10px; flex: none; }
.adg-quota { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; color: var(--adg-texte); font-size: 13px; font-weight: 600; }
.adg-quota > span { white-space: nowrap; }
.adg-quota i, .adg-envoi i { flex: 1; height: 8px; background: var(--adg-doux-2); border-radius: 6px; overflow: hidden; min-width: 60px; }
.adg-quota b, .adg-envoi b { display: block; height: 100%; background: var(--adg-menthe-f); border-radius: 6px; transition: width .3s; }
.adg-quota b.adg-haut { background: #d97706; }
.adg-quota b.adg-plein { background: var(--adg-rouge); }
.adg-etat-ecrans { display: flex; align-items: center; gap: 8px; color: var(--adg-sourd); font-size: 13px; }
.adg-pt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.adg-pt-vert { background: var(--adg-menthe-f); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.adg-pt-rouge { background: var(--adg-rouge); box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
.adg-pt-gris { background: var(--adg-pale); }
.adg-onglets { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 12px; padding: 4px; margin-bottom: 16px; max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: var(--adg-ombre); }
.adg-onglets::-webkit-scrollbar { display: none; }
.adg-onglets button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; border-radius: 9px; padding: 8px 14px; font-weight: 600; color: var(--adg-sourd); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.adg-onglets .adg-compte { font-size: 11px; font-weight: 700; background: var(--adg-doux-2); border-radius: 6px; padding: 1px 7px; min-width: 22px; text-align: center; }
.adg-onglets button:hover { background: var(--adg-doux); color: var(--adg-texte); }
.adg-onglets button.on { background: var(--adg-marine); color: #fff; }
.adg-onglets button.on .adg-ic { color: var(--adg-menthe); }
.adg-onglets button.on .adg-compte { background: rgba(255, 255, 255, .16); color: #fff; }

.adg-vide { text-align: center; color: var(--adg-sourd); background: #fff; border: 1px dashed var(--adg-ligne-2); border-radius: 14px; padding: 36px 20px; }
.adg-vide b { color: var(--adg-texte); display: block; }
.adg-vide p { margin: 6px auto 0; max-width: 520px; }
.adg-vide-grille { grid-column: 1 / -1; padding: 28px 20px; }
.adg-chargement { display: flex; align-items: center; justify-content: center; gap: 10px; border-style: solid; }
.adg-chargement .adg-tourne { border-color: var(--adg-doux-2); border-top-color: var(--adg-menthe-f); }
.adg-discret { color: var(--adg-sourd); font-size: 12.5px; margin: 0; }
.adg-aide { color: var(--adg-sourd); font-size: 12px; font-weight: 400; margin: 0; }
.adg-avert { display: flex; align-items: flex-start; gap: 7px; color: var(--adg-orange); background: var(--adg-orange-f); border-radius: 8px; padding: 6px 10px; margin: 6px 0 0; font-size: 12.5px; }
.adg-avert .adg-ic { width: 14px; height: 14px; margin-top: 1px; }
.adg-txt-avert { color: var(--adg-orange); }
.adg-txt-erreur { color: var(--adg-rouge); }
.adg-meta { color: var(--adg-sourd); font-size: 12.5px; margin: 2px 0; }
.adg-espace { flex: 1; }
.adg-pastille { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--adg-doux-2); color: var(--adg-sourd); white-space: nowrap; line-height: 1.5; }
.adg-pastille .adg-ic { width: 12px; height: 12px; stroke-width: 2.6; }
.adg-p-vert { background: var(--adg-vert-f); color: #15803d; }
.adg-p-bleu { background: var(--adg-bleu-f); color: var(--adg-bleu); }
.adg-p-orange { background: var(--adg-orange-f); color: var(--adg-orange); }
.adg-p-rouge { background: var(--adg-rouge-f); color: var(--adg-rouge); }
.adg-p-gris { background: var(--adg-doux-2); color: var(--adg-sourd); }

/* ── Écrans ── */
.adg-grille-ecrans { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.adg-ecran { background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--adg-ombre); min-width: 0; }
.adg-ecran.adg-hors { background: #fcfcfd; }
.adg-ecran header { display: flex; align-items: center; gap: 9px; margin: -2px -6px 0 0; }
.adg-ecran h4 { margin: 0; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adg-joue { display: flex; align-items: center; gap: 12px; background: var(--adg-doux); border-radius: 12px; padding: 8px; margin: 4px 0 2px; min-width: 0; }
.adg-joue-vign { position: relative; width: 84px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--adg-marine); flex: none; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .55); }
.adg-joue-vign img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adg-joue-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.adg-joue-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adg-joue-txt span { font-size: 12px; color: var(--adg-sourd); line-height: 1.35; }
.adg-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 2px; }
.adg-champs label, .adg-champ { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--adg-sourd); min-width: 0; }
.adg-champs select, .adg-champ input:not([type=range]):not([type=checkbox]), .adg-champ select, .adg-ligne select { border: 1px solid var(--adg-ligne-2); background: #fff; border-radius: 9px; padding: 8px 10px; font-weight: 500; font-size: 13.5px; color: var(--adg-texte); min-width: 0; width: 100%; transition: border-color .15s, box-shadow .15s; }
.adg-champs select:hover, .adg-champ input:hover, .adg-champ select:hover { border-color: rgba(var(--prusse-rgb),.3); }
.adg-champ input:disabled, .adg-champ select:disabled { background: var(--adg-doux); color: var(--adg-pale); }
.adg-ecran footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--adg-ligne); }

/* ── Menu « Plus d'actions » (posé sur la page) ── */
.adg-menu { position: fixed; z-index: 100002; min-width: 220px; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 12px; padding: 6px; box-shadow: 0 18px 50px -12px rgba(var(--prusse-rgb),.35), 0 2px 6px rgba(var(--prusse-rgb),.08); animation: adg-menu .12s ease-out; }
@keyframes adg-menu { from { opacity: 0; transform: translateY(-4px); } }
.adg-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; color: var(--adg-texte); }
.adg-menu button .adg-ic { color: var(--adg-sourd); }
.adg-menu button:hover, .adg-menu button:focus-visible { background: var(--adg-doux); outline: none; box-shadow: none; }
.adg-menu .adg-menu-danger, .adg-menu .adg-menu-danger .adg-ic { color: var(--adg-rouge); }
.adg-menu .adg-menu-danger:hover, .adg-menu .adg-menu-danger:focus-visible { background: var(--adg-rouge-f); }
.adg-menu-sep { height: 1px; background: var(--adg-ligne); margin: 5px 4px; }

/* ── Médias ── */
.adg-depot { display: flex; align-items: center; gap: 14px 16px; flex-wrap: wrap; border: 2px dashed var(--adg-ligne-2); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fff; transition: background .15s, border-color .15s; }
.adg-depot.on { background: var(--adg-vert-f); border-color: var(--adg-menthe-f); }
.adg-depot-ic { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--adg-doux-2); color: var(--adg-marine); flex: none; }
.adg-depot-ic .adg-ic { width: 20px; height: 20px; }
.adg-depot.on .adg-depot-ic { background: #fff; color: var(--adg-menthe-f); }
.adg-depot-txt { flex: 1 1 300px; min-width: 0; }
.adg-depot p { margin: 2px 0 0; color: var(--adg-sourd); font-size: 12.5px; }
.adg-depot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adg-barre-medias { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 4px 0 12px; }
.adg-dossiers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.adg-dos { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--adg-ligne-2); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--adg-texte); transition: background .15s, border-color .15s; }
.adg-dos:hover { background: var(--adg-doux); }
.adg-dos .adg-ic { width: 14px; height: 14px; color: var(--adg-sourd); }
.adg-dos small { color: var(--adg-sourd); font-size: 11.5px; font-weight: 600; }
.adg-dos.on { background: var(--adg-marine); border-color: var(--adg-marine); color: #fff; }
.adg-dos.on .adg-ic, .adg-dos.on small { color: rgba(255, 255, 255, .75); }
.adg-dos-nouveau { border-style: dashed; color: var(--adg-sourd); }
.adg-recherche { position: relative; display: flex; align-items: center; flex: 0 1 260px; min-width: 180px; }
.adg-recherche .adg-ic { position: absolute; left: 10px; color: var(--adg-pale); pointer-events: none; }
.adg-recherche input { width: 100%; border: 1px solid var(--adg-ligne-2); border-radius: 10px; padding: 8px 10px 8px 34px; background: #fff; font-size: 13.5px; }
.adg-recherche-large { flex: 1 1 auto; max-width: none; }
.adg-dos-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px 8px 12px; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 12px; font-size: 13px; color: var(--adg-sourd); }
.adg-dos-actions > span { margin-right: auto; }
.adg-grille-medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.adg-media { background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; box-shadow: var(--adg-ombre); min-width: 0; transition: box-shadow .15s, border-color .15s; }
.adg-media:hover { border-color: var(--adg-ligne-2); box-shadow: 0 8px 22px -14px rgba(var(--prusse-rgb),.35); }
.adg-media-refuse { border-color: rgba(220, 38, 38, .25); }
.adg-media-corps { padding: 8px 4px 2px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.adg-media-titre { display: flex; align-items: center; gap: 4px; margin-right: -4px; }
.adg-media h5 { margin: 0; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adg-media .adg-btn-ic { width: 28px; height: 28px; }
.adg-media .adg-meta { display: flex; align-items: center; gap: 5px; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.adg-media .adg-meta .adg-ic { width: 13px; height: 13px; }
.adg-libre { color: var(--adg-pale) !important; }
.adg-media .adg-btn-primaire { margin-top: 8px; white-space: normal; }
.adg-vignette { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; background: var(--adg-marine); border: 0; border-radius: 9px; overflow: hidden; color: rgba(255, 255, 255, .6); padding: 0; }
.adg-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.adg-vign-ic { display: flex; align-items: center; justify-content: center; }
.adg-vign-ic .adg-ic { width: 26px; height: 26px; stroke-width: 1.6; }
.adg-mini .adg-vign-ic .adg-ic, .adg-joue-vign .adg-vign-ic .adg-ic { width: 18px; height: 18px; }
.adg-cliquable { cursor: pointer; }
.adg-cliquable:hover img { transform: scale(1.04); }
.adg-voir { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(var(--prusse-rgb),.35); color: #fff; opacity: 0; transition: opacity .15s; }
.adg-voir .adg-ic { width: 26px; height: 26px; }
.adg-cliquable:hover .adg-voir, .adg-cliquable:focus-visible .adg-voir { opacity: 1; }
.adg-duree { position: absolute; right: 6px; bottom: 6px; background: rgba(var(--prusse-rgb),.78); color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 6px; z-index: 1; }
.adg-etat-vign { position: absolute; left: 6px; top: 6px; z-index: 1; }
.adg-tourne { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--adg-menthe); animation: adg-tour .9s linear infinite; flex: none; }
.adg-tourne-s { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; }
.adg-btn-primaire .adg-tourne-s { border-color: rgba(255, 255, 255, .3); border-top-color: var(--adg-menthe); }
@keyframes adg-tour { to { transform: rotate(360deg); } }
.adg-attente { margin: 6px 0 0; font-size: 12px; }

/* ── Modules sur mesure (agence) ── */
.adg-modules { margin: 0 0 18px; padding: 14px 16px 16px; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; box-shadow: var(--adg-ombre); }
.adg-modules-tete { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; margin-bottom: 4px; }
.adg-mod-titre { margin: 0 0 2px; font-size: 15px; }
.adg-mod-fam { margin: 10px 0 0; border: 1px solid var(--adg-ligne); border-radius: 12px; background: #fff; }
.adg-mod-fam-bouton { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: none; border: 0; border-radius: 12px; cursor: pointer; text-align: left; color: inherit; }
.adg-mod-fam-bouton:hover { background: var(--adg-doux); }
.adg-mod-fam-titre { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--adg-sourd); font-weight: 700; }
.adg-mod-fam-bouton small { margin-left: auto; color: var(--adg-sourd); font-size: 12px; }
.adg-mod-fam-bouton i { width: 8px; height: 8px; border-right: 2px solid var(--adg-sourd); border-bottom: 2px solid var(--adg-sourd); transform: rotate(-45deg); transition: transform .2s; flex: none; }
.adg-mod-fam.ouvert .adg-mod-fam-bouton i { transform: rotate(45deg); }
.adg-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 0 14px 14px; }
.adg-mod { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.adg-mod:hover { box-shadow: 0 10px 28px -12px rgba(var(--prusse-rgb),.25); }
.adg-mod-on { border-color: rgba(22, 163, 74, .55); box-shadow: 0 0 0 1px rgba(22, 163, 74, .25); }
.adg-mod-visuel { position: relative; width: 100%; padding-top: 56.25%; background: var(--adg-marine); overflow: hidden; }
.adg-mod-visuel iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; background: var(--adg-marine); }
.adg-mod-tag { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(var(--prusse-rgb),.72); color: #fff; font-size: 11px; font-weight: 600; }
.adg-mod-corps { padding: 12px 14px 4px; flex: 1; }
.adg-mod-corps h5 { margin: 0 0 3px; font-size: 14.5px; }
.adg-mod-corps p { margin: 0; color: var(--adg-sourd); font-size: 13px; }
.adg-mod footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 14px 14px; }
.adg-inter { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; font-size: 13px; margin-right: auto; }
.adg-inter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adg-inter i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--ardoise-ligne-2); transition: background .2s; flex: none; }
.adg-inter i:after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.adg-inter input:checked + i { background: var(--adg-menthe-f); }
.adg-inter input:checked + i:after { transform: translateX(16px); }
.adg-inter input:focus-visible + i { box-shadow: var(--adg-focus); }
.adg-inter input:disabled + i { opacity: .5; }
.adg-inter-s { font-size: 12.5px; font-weight: 500; color: var(--adg-sourd); margin-right: 0; min-width: 92px; }
.adg-inter-s i { width: 32px; height: 18px; }
.adg-inter-s i:after { width: 12px; height: 12px; }
.adg-inter-s input:checked + i:after { transform: translateX(14px); }

/* ── File d'envoi : numéro, pourcentage, vitesse, temps restant, annulation ── */
.adg-file { background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; box-shadow: var(--adg-ombre); }
.adg-file-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.adg-envoi { display: flex; align-items: center; gap: 12px; background: var(--adg-doux); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; }
.adg-envoi:last-child { margin-bottom: 0; }
.adg-envoi-rang { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--adg-marine); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.adg-envoi-rang .adg-ic { width: 14px; height: 14px; }
.adg-envoi-attente .adg-envoi-rang { background: var(--adg-pale); }
.adg-envoi-fini .adg-envoi-rang { background: var(--adg-menthe-f); }
.adg-envoi-erreur { border-color: rgba(220, 38, 38, .3); background: var(--adg-rouge-f); }
.adg-envoi-erreur .adg-envoi-rang { background: var(--adg-rouge); }
.adg-envoi-corps { flex: 1; min-width: 0; }
.adg-envoi-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.adg-envoi-nom { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.adg-envoi-barre { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.adg-envoi-barre i { flex: 1; height: 8px; background: #fff; border-radius: 6px; overflow: hidden; min-width: 60px; border: 1px solid var(--adg-ligne); }
.adg-reception .adg-envoi-barre i { background: var(--adg-doux-2); border: 0; }
.adg-envoi-barre b { display: block; height: 100%; background: var(--adg-menthe-f); border-radius: 6px; transition: width .3s; }
.adg-envoi-barre strong { flex: none; width: 44px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.adg-envoi-global i { height: 10px; }
.adg-envoi-etat { margin-top: 4px; font-size: 12.5px; color: var(--adg-sourd); }
.adg-envoi-actions { flex: none; display: flex; gap: 6px; }
.adg-indet b { width: 40% !important; animation: adg-glisse 1.4s ease-in-out infinite; }
@keyframes adg-glisse { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.adg-reception { margin: 2px 0 2px; }
.adg-reception .adg-envoi-barre { margin-top: 0; }
.adg-recep-resume { display: flex; flex-wrap: wrap; gap: 6px; }
.adg-recep-resume:empty { display: none; }

/* ── Boucles ── */
.adg-boucles { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.adg-boucles aside { background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 12px; box-shadow: var(--adg-ombre); position: sticky; top: 0; }
.adg-boucle-ligne { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 9px 11px; cursor: pointer; color: inherit; }
.adg-boucle-ligne b { font-size: 13.5px; }
.adg-boucle-ligne > span { font-size: 12px; color: var(--adg-sourd); }
.adg-boucle-ligne:hover { background: var(--adg-doux); }
.adg-boucle-ligne.on { background: var(--adg-marine); color: #fff; }
.adg-boucle-ligne.on > span { color: rgba(255, 255, 255, .7); }
.adg-boucle-neuve { cursor: default; margin-bottom: 2px; }
.adg-joue-sur { color: #15803d; font-weight: 600; }
.adg-boucle-ligne.on .adg-joue-sur { color: var(--adg-menthe); }
.adg-point-modif { color: #f59e0b; font-weight: 900; }
.adg-editeur { background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 16px; box-shadow: var(--adg-ombre); }
.adg-editeur-tete { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.adg-champ-nom { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--adg-sourd); }
.adg-champ-nom input { border: 1px solid var(--adg-ligne-2); border-radius: 10px; padding: 9px 12px; font-size: 16px; font-weight: 700; color: var(--adg-texte); }
.adg-editeur-infos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 22px; }
.adg-total { color: var(--adg-sourd); font-size: 13px; }
.adg-elements { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.adg-el { position: relative; display: grid; grid-template-columns: 18px 20px 78px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; background: var(--adg-doux); border: 1px solid transparent; border-radius: 12px; padding: 7px 8px 7px 6px; transition: background .15s, border-color .15s, opacity .15s; }
.adg-el:hover { border-color: var(--adg-ligne); }
.adg-poignee { color: var(--adg-pale); cursor: grab; display: flex; justify-content: center; }
.adg-el:hover .adg-poignee { color: var(--adg-sourd); }
.adg-el-num { font-size: 12px; font-weight: 700; color: var(--adg-sourd); text-align: center; font-variant-numeric: tabular-nums; }
.adg-glisse { opacity: .4; }
.adg-cible-dessus { box-shadow: 0 -3px 0 0 var(--adg-menthe-f); }
.adg-cible-dessous { box-shadow: 0 3px 0 0 var(--adg-menthe-f); }
.adg-elements li.adg-vide-li { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--adg-sourd); padding: 26px; background: var(--adg-doux); border-radius: 12px; border: 1px dashed var(--adg-ligne-2); }
.adg-mini { width: 78px; aspect-ratio: 16 / 9; background: var(--adg-marine); border-radius: 7px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .6); }
.adg-mini img { width: 100%; height: 100%; object-fit: cover; }
.adg-li-texte { display: flex; flex-direction: column; min-width: 0; }
.adg-li-texte b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.adg-li-texte span { color: var(--adg-sourd); font-size: 12px; }
.adg-duree-image { font-size: 12.5px; color: var(--adg-sourd); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.adg-duree-image input { width: 62px; border: 1px solid var(--adg-ligne-2); border-radius: 8px; padding: 5px 7px; background: #fff; }
.adg-li-actions { display: flex; gap: 2px; }
.adg-editeur-pied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--adg-ligne); }
.adg-usages { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }
.adg-usages .adg-ic { margin-top: 1px; }

/* ── Planning ── */
.adg-planning { display: flex; flex-direction: column; gap: 16px; }
.adg-bloc-carte { background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 16px; box-shadow: var(--adg-ombre); }
.adg-bloc-carte > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.adg-bloc-carte > header .adg-discret { max-width: 760px; margin-top: 3px; }
.adg-bloc-carte h4 { margin: 0; font-size: 15px; }
.adg-ligne, .adg-regle { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--adg-ligne); }
.adg-ligne label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--adg-sourd); font-weight: 600; }
.adg-ligne select { width: auto; }
.adg-cible { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--adg-ligne); }
.adg-cible > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adg-cible h5 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; min-width: 0; flex-wrap: wrap; }
.adg-cible h5 .adg-ic { color: var(--adg-sourd); }
.adg-maintenant { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0 6px; font-size: 13px; }
.adg-sinon { margin: 6px 0 0; font-size: 12.5px; color: var(--adg-sourd); }
.adg-regle { font-size: 13px; background: var(--adg-doux); border: 1px solid transparent; border-radius: 10px; padding: 8px 8px 8px 12px; margin-top: 6px; }
.adg-regle-active { border-color: rgba(22, 163, 74, .3); background: #f3fbf5; }
.adg-regle-txt { display: flex; flex-direction: column; min-width: 0; }
.adg-regle-txt span { color: var(--adg-sourd); font-size: 12.5px; }

/* ── Dialogues, notifications ── */
.adg-fond { position: fixed; inset: 0; background: rgba(var(--prusse-rgb),.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100000; animation: adg-fond .15s; }
@keyframes adg-fond { from { opacity: 0; } }
.adg-dialogue { background: #fff; border-radius: 16px; padding: 18px 22px 20px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 70px rgba(var(--prusse-rgb),.35); animation: adg-dlg .18s ease-out; }
@keyframes adg-dlg { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.adg-dialogue.adg-large { max-width: 760px; }
.adg-dialogue-tete { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 0 -8px 14px 0; }
.adg-dialogue h3 { margin: 0; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.adg-dialogue-corps { display: flex; flex-direction: column; gap: 14px; }
.adg-dialogue-corps > p { margin: 0; }
.adg-dialogue-erreur { display: block; margin: 14px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--adg-rouge-f); color: var(--adg-rouge); font-size: 13px; font-weight: 500; }
.adg-dialogue-erreur[hidden] { display: none; }
.adg-boutons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.adg-dialogue-corps .adg-boutons { margin-top: 4px; }
.adg-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adg-section { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--adg-ligne); }
.adg-section:first-child { padding-top: 0; border-top: 0; }
.adg-section h4 { margin: 0; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--adg-sourd); }
.adg-curseur input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 8px 0 4px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--adg-menthe-f) var(--pc, 50%), var(--adg-doux-2) var(--pc, 50%)); }
.adg-curseur input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--adg-menthe-f); box-shadow: 0 1px 4px rgba(var(--prusse-rgb),.25); }
.adg-curseur input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--adg-menthe-f); box-shadow: 0 1px 4px rgba(var(--prusse-rgb),.25); }
.adg-curseur input[type=range]:disabled { cursor: not-allowed; filter: grayscale(1); }
.adg-curseur-tete { display: flex; justify-content: space-between; align-items: baseline; }
.adg-curseur output { font-size: 13px; font-weight: 700; color: var(--adg-texte); font-variant-numeric: tabular-nums; }
.adg-radio { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: opacity .15s; }
.adg-radio:disabled, .adg-horaires:disabled { opacity: .45; }
.adg-case { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.adg-case input { width: 16px; height: 16px; accent-color: var(--adg-marine); margin: 0; }
.adg-choix-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adg-radio-carte { position: relative; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--adg-ligne-2); border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.adg-radio-carte input { margin: 3px 0 0; accent-color: var(--adg-marine); }
.adg-radio-carte span { display: flex; flex-direction: column; }
.adg-radio-carte small { color: var(--adg-sourd); font-size: 12px; }
.adg-radio-carte:has(input:checked) { border-color: var(--adg-marine); background: var(--adg-doux); box-shadow: inset 0 0 0 1px var(--adg-marine); }
.adg-horaires { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adg-jour { display: grid; grid-template-columns: 96px auto 1fr; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--adg-ligne); }
.adg-jour-nom { font-weight: 600; font-size: 13.5px; }
.adg-plage { display: flex; align-items: center; gap: 8px; color: var(--adg-sourd); font-size: 13px; }
.adg-plage input { border: 1px solid var(--adg-ligne-2); border-radius: 8px; padding: 6px 8px; background: #fff; }
.adg-jour-off .adg-plage { opacity: .35; }
.adg-copier-lundi { align-self: flex-start; margin-top: 8px; }
.adg-jours { border: 1px solid var(--adg-ligne); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.adg-jours legend { font-size: 12px; font-weight: 600; color: var(--adg-sourd); padding: 0 6px; }
.adg-jours-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.adg-puce { position: relative; cursor: pointer; }
.adg-puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adg-puce span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 7px 10px; border: 1px solid var(--adg-ligne-2); border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--adg-sourd); background: #fff; transition: background .15s, color .15s, border-color .15s; }
.adg-puce input:checked + span { background: var(--adg-marine); border-color: var(--adg-marine); color: #fff; }
.adg-puce input:focus-visible + span { box-shadow: var(--adg-focus); }
.adg-jours-raccourcis { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.adg-heures[hidden] { display: none; }
.adg-phrase { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--adg-doux); font-size: 13px; color: var(--adg-texte); }
.adg-lecteur { width: 100%; max-height: 62vh; background: #000; border-radius: 10px; display: block; object-fit: contain; }
.adg-grille-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 52vh; overflow: auto; padding: 3px; }
.adg-choix { position: relative; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; cursor: pointer; min-width: 0; }
.adg-choix[hidden] { display: none; }
.adg-choix input { position: absolute; top: 8px; left: 8px; z-index: 2; width: 18px; height: 18px; accent-color: var(--adg-menthe-f); }
.adg-choix-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adg-choix input:checked ~ .adg-vignette { box-shadow: 0 0 0 3px var(--adg-menthe-f); }
.adg-choix input:focus-visible ~ .adg-vignette { box-shadow: var(--adg-focus); }
.adg-ordre { position: absolute; top: 6px; right: 6px; z-index: 2; min-width: 22px; height: 22px; border-radius: 11px; background: var(--adg-menthe-f); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.adg-ordre:empty { display: none; }
.adg-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.adg-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--adg-sourd); padding: 4px 8px; }
.adg-table td { padding: 6px 8px; border-top: 1px solid var(--adg-ligne); vertical-align: top; }
.adg-table td:first-child { white-space: nowrap; color: var(--adg-sourd); font-variant-numeric: tabular-nums; }
.adg-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--adg-marine); color: #fff; border-radius: 12px; padding: 11px 18px; font-weight: 600; z-index: 100001; opacity: 0; transition: opacity .25s, transform .25s; max-width: 90vw; box-shadow: 0 12px 34px rgba(var(--prusse-rgb),.3); }
.adg-toast.on { opacity: 1; transform: translate(-50%, 0); }
.adg-toast-erreur { background: var(--adg-rouge); }

/* ── Aperçu d'un module : les deux formats d'écran, à la même hauteur ── */
.adg-apercu-module { display: flex; align-items: flex-start; gap: 16px; }
.adg-apercu-module figure { margin: 0; flex: 0 0 calc(76% - 8px); }
.adg-apercu-module figure.adg-portrait { flex: 0 0 calc(24% - 8px); }
.adg-apercu-module iframe { display: block; width: 100%; border: 0; border-radius: 10px; background: var(--adg-marine); pointer-events: none; }
.adg-apercu-module figcaption { font-size: 12px; color: var(--adg-sourd); margin-top: 6px; }

@media (max-width: 820px) {
  .adg-boucles { grid-template-columns: 1fr; }
  .adg-boucles aside { position: static; }
  .adg-el { grid-template-columns: 18px 60px minmax(0, 1fr) auto; }
  .adg-el .adg-el-num { display: none; }
  .adg-el .adg-mini { width: 60px; }
  .adg-el .adg-duree-image { grid-column: 3; }
  .adg-el .adg-li-actions { grid-column: 4; grid-row: 1 / span 2; flex-direction: column; }
  .adg-champs, .adg-2col, .adg-choix-mode { grid-template-columns: 1fr; }
  .adg-jour { grid-template-columns: 1fr auto; }
  .adg-jour .adg-plage { grid-column: 1 / -1; }
  .adg-grille-ecrans { grid-template-columns: 1fr; }
  .adg-grille-medias { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .adg-bloc-carte > header { flex-direction: column; }
  .adg-recherche { flex: 1 1 100%; }
  .adg-apercu-module { flex-direction: column; }
  .adg-apercu-module figure, .adg-apercu-module figure.adg-portrait { flex: none; width: 100%; }
  .adg-apercu-module figure.adg-portrait { width: 50%; }
}
@media (prefers-reduced-motion: reduce) { .adg-tourne, .adg-fond, .adg-dialogue, .adg-menu, .adg-indet b { animation: none; } .adg-toast, .adg-vignette img { transition: none; } }

/* ── Page « Parc » de Studio (js/affdyn.js) ── */
.adp { display: flex; flex-direction: column; gap: 18px; }
.adp-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.adp-chiffre { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 12px 16px; text-align: left; color: inherit; box-shadow: var(--adg-ombre); }
button.adp-chiffre { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.adp-chiffre:hover { border-color: var(--adg-ligne-2); box-shadow: 0 8px 22px -14px rgba(var(--prusse-rgb),.35); }
.adp-chiffre b { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.adp-chiffre span { color: var(--adg-sourd); font-size: 12.5px; }
.adp-ok b { color: var(--adg-menthe-f); }
.adp-ko b { color: var(--adg-rouge); }
.adp-att b { color: var(--adg-orange); }
.adp-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.adp-titre { margin: 0; font-size: 15px; }
.adp-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.adp-client { display: flex; flex-direction: column; gap: 9px; text-align: left; background: #fff; border: 1px solid var(--adg-ligne); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; color: inherit; box-shadow: var(--adg-ombre); }
.adp-client:hover { border-color: var(--adg-ligne-2); transform: translateY(-1px); box-shadow: 0 12px 28px -16px rgba(var(--prusse-rgb),.35); }
.adp-client header { display: flex; align-items: center; gap: 10px; }
.adp-client header b { flex: 1; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adp-client p { margin: 0; color: var(--adg-sourd); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.adp-client footer { display: flex; gap: 6px; flex-wrap: wrap; }
.adp-client .adg-quota { font-weight: 500; color: var(--adg-sourd); font-size: 12.5px; flex: none; }
.adp-initiales { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.adp-surveiller { padding: 6px 16px 8px; }
.adp-surveiller > header { margin-bottom: 0; }
.adp-surveiller .adg-ligne { gap: 8px 12px; }
.adp-surveiller .adg-ligne b { font-size: 13.5px; }
@media (max-width: 820px) { #affdyn-contenu { padding: 10px 12px 40px !important; } .adp-chiffres { grid-template-columns: repeat(2, 1fr); } }
