/* ============================================================
   Paris-Turf skin — pont charte ↔ Web Awesome / Tailwind / Alpine.
   Re-skin du studio Ads marketing, limité à ce package (aucune
   modification du thème partagé /shared/theme.css). Dark-only.

   Consomme les tokens --pt-* de ./vendor/paristurf.css et les
   applique à la stack existante (composants wa-*, utilitaires
   Tailwind, structure index.html). colorway.css gère la couleur
   de marque (rampe brand = rouge PTF) ; ce fichier gère la
   structure : fond sobre, typo, rayons nets, surfaces, rail, logo.
   ============================================================ */

/* ---------- 1. Polices Web Awesome → charte ---------- */
:root {
  --wa-font-family-body: var(--pt-font-ui);
  --wa-font-family-heading: var(--pt-font-display);
  --wa-font-family-code: var(--pt-font-mono);

  /* Rayons nets, éditoriaux. On couvre les deux conventions de nom
     (Web Awesome v3 « s/m/l » + héritage Shoelace « small/medium/large »). */
  --wa-border-radius-s: var(--pt-r-sm);
  --wa-border-radius-m: var(--pt-r-md);
  --wa-border-radius-l: var(--pt-r-lg);
  --wa-border-radius-xl: 10px;
  --wa-border-radius-pill: var(--pt-r-pill);
  --wa-border-radius-small: var(--pt-r-sm);
  --wa-border-radius-medium: var(--pt-r-md);
  --wa-border-radius-large: var(--pt-r-lg);

  /* Hauteur unique des contrôles (boutons + champs de saisie) — au pixel près. */
  --pt-control-h: 34px;
}

/* ---------- 2. Fond éditorial sobre ---------- */
/* Neutralise l'« aurora » du thème partagé : fond uni #121417 (--pt-bg) dans
   les pages. On écrase le shorthand `background` (pas seulement background-color)
   pour réinitialiser background-image — sinon les gradients radiaux de l'aurora
   survivent par-dessus la couleur. Le menu garde son --pt-surface (opaque). */
body {
  background: var(--pt-bg);
  font-family: var(--pt-font-ui);
  color: var(--pt-ink);
}

/* ---------- 3. Typographie ---------- */
/* Titres de section : Oswald, capitales, lettrage serré (charte display). */
.pt-display {
  font-family: var(--pt-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pt-ink);
}

/* Chiffres tabulaires (cotes, dates, ratios, CTA) → JetBrains Mono.
   Spécificité `body .font-mono` (0,1,1) pour passer devant l'utilitaire
   Tailwind .font-mono (0,1,0) injecté en runtime par le CDN, sans !important. */
body .font-mono {
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- 4. Rail latéral ---------- */
aside {
  background: var(--pt-surface);
  border-right: 1px solid var(--pt-line);
  /* Padding du rail centralisé ici (et non plus en style inline) pour pouvoir
   * le réduire au repli — cf. handoff RAIL_OPEN/RAIL_SHUT. overflow:hidden
   * clippe tout débordement horizontal dans le rail étroit (idem prototype). */
  padding: 18px 14px;
  overflow: hidden;
}

/* En-tête du rail (logo + bouton repli) : la flèche est poussée à droite. */
.pt-rail-toggle {
  margin-left: auto;
}

/* ---- Rail replié (64px — piloté par html.sidebar-collapsed) ----
 * Padding latéral réduit (cf. handoff RAIL_SHUT : 18px 10px). */
html.sidebar-collapsed aside {
  padding: 18px 10px;
}
/* En-tête empilé : logo PT au-dessus, flèche en dessous, centrés — la flèche
 * reste entièrement visible au lieu de déborder du rail (logo PT + bouton ne
 * tiennent pas côte à côte dans 64px). */
html.sidebar-collapsed .pt-rail-head {
  flex-direction: column;
  gap: 8px;
}
html.sidebar-collapsed .pt-rail-toggle {
  margin-left: 0;
}

/* Logo Paris-Turf dans le rail. */
.pt-brand {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}
.pt-brand .pt-logo__wm {
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--pt-ink);
}
.pt-brand .pt-logo__wm .b {
  color: var(--pt-rouge);
}
.pt-brand__sub {
  font-family: var(--pt-font-cond);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--pt-ink-3);
  padding-left: 1px;
}
/* Filet « ligne d'arrivée » rouge, révélé au chargement, sous le logo. */
.pt-brand::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -5px;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--pt-rouge);
  transform-origin: left;
  animation: pt-brand-sweep 0.7s cubic-bezier(0.4, 0, 0.1, 1) both;
}
@keyframes pt-brand-sweep {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pt-brand::after {
    animation: none;
  }
}

/* ---------- 5. Surfaces Web Awesome ---------- */
/* Cartes : surface + filet froids, coins nets (charte pt-card). */
wa-card::part(base) {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-lg);
  box-shadow: var(--pt-shadow-sm);
}
wa-card::part(header) {
  border-bottom: 1px solid var(--pt-line);
  font-family: var(--pt-font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* Carte galerie : survol = filet plus marqué + légère élévation. */
wa-card[class*="cursor-pointer"]::part(base) {
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;
}
wa-card[class*="cursor-pointer"]:hover::part(base) {
  border-color: var(--pt-line-strong);
  box-shadow: var(--pt-shadow-md);
  transform: translateY(-2px);
}

/* Modale : surface + coins nets. */
wa-dialog::part(panel) {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-lg);
}
wa-dialog::part(header) {
  font-family: var(--pt-font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ---------- 6. Boutons ---------- */
/* Boutons compactés globalement (hauteur + police) — surcharge de la famille
   .pt-btn du design system vendored. vendor/paristurf.css reste intact ; ce
   skin est chargé après → gagne à spécificité égale. Demande explicite : densité
   accrue sur toute l'app (dérogation assumée au gel hi-fi du handoff sur les
   écrans Ads/journaux/bibliothèque ; l'Autopromo, lui, n'est pas figé). */
.pt-btn {
  /* Hauteur unifiée avec les champs de saisie (au pixel près) — cf. § Contrôles. */
  height: var(--pt-control-h);
  padding: 0 13px;
  font-size: 12px;
}
.pt-btn--sm {
  /* Variante « petite » explicite (toolbars denses, journaux / éditeur) :
     garde une hauteur réduite, ne suit pas --pt-control-h. */
  height: auto;
  padding: 6px 11px;
  font-size: 11px;
}
.pt-btn--lg {
  height: var(--pt-control-h);
  padding: 0 18px;
  font-size: 13px;
}

/* Boutons Web Awesome alignés sur la même densité. Dans WA 3.x, la hauteur de
   ::part(base) est em-based (--wa-form-control-height) : réduire font-size réduit
   donc AUSSI la hauteur, proportionnellement (padding-block / min-height seraient
   sans effet sur cette hauteur fixe). On conserve l'échelle small < medium. */
wa-button::part(base) {
  font-size: 12px;
}
wa-button[size="small"]::part(base) {
  font-size: 11px;
}

/* Bouton de marque : rouge plein, micro-lift au survol (cf. thème partagé,
   désormais teinté rouge via --admin-accent). On force juste le poids/tracking. */
wa-button[variant="brand"]::part(base) {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- 7. Accent de page ---------- */
/* Filet rouge sous l'en-tête de page principale (touche éditoriale). */
main h1.pt-display {
  position: relative;
}

/* ============================================================
   8. STUDIO CRÉA — composants bespoke (Ads : galerie + éditeur)
   Portés du handoff de design (Studio Créa.dc.html). Tout en
   tokens --pt-* du design system. Une seule couleur en dur,
   sanctionnée par le design : le dégradé de vignette placeholder
   (#243038 / #14181c) — il sera remplacé par les vrais rendus.
   ============================================================ */

/* ---- Coquille : main = en-tête fixe + corps défilant ---- */
.pt-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* Pages historiques (autopromo) écrites pour l'ancien <main> paddé/défilant :
   wrapper de défilement autonome maintenant que <main> ne scrolle plus. */
.pt-legacy {
  height: 100%;
  overflow: auto;
  padding: 24px 30px 60px;
}
.pt-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 30px 18px;
  border-bottom: 1px solid var(--pt-line);
  flex: none;
}
.pt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-bottom: 1px solid var(--pt-line);
  flex: none;
  flex-wrap: wrap;
}
.pt-body {
  flex: 1;
  overflow: auto;
  padding: 26px 30px 60px;
}
.pt-eyebrow {
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
}

/* ---- Rail : item de navigation (actif = barre rouge encastrée) ---- */
.pt-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--pt-r-md);
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1;
  background: transparent;
  color: var(--pt-ink-3);
  transition:
    background 0.14s,
    color 0.14s;
}
.pt-nav:hover {
  background: var(--pt-surface-2);
  color: var(--pt-ink-2);
}
.pt-nav--active {
  background: var(--pt-surface-2);
  color: var(--pt-ink);
  box-shadow: inset 3px 0 0 var(--pt-red);
}
.pt-nav__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
}
/* Le theme.css partagé masque tout <span> enfant direct d'un bouton de nav
 * (pour cacher les libellés au repli) ; or ici l'icône vit dans
 * <span class="pt-nav__ico">. On la réaffiche pour garder « icônes seules ». */
html.sidebar-collapsed aside .pt-nav__ico {
  display: grid;
}
.pt-nav--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pt-nav--disabled:hover {
  background: transparent;
  color: var(--pt-ink-3);
}
.pt-nav__soon {
  margin-left: auto;
  font-family: var(--pt-font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--pt-ink-4);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  padding: 1px 4px;
}

/* ---- Rail : séparation des groupes (Studios / Paramétrage / Admin IA) ----
 * Rail déplié : un libellé de section (eyebrow) ouvre le groupe.
 * Rail replié : le libellé est masqué et cède la place à un filet fin, pour
 * que les grappes d'icônes restent visuellement séparées. */
.pt-nav-label {
  margin: 16px 0 5px;
  padding: 0 12px;
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
.pt-nav-rule {
  height: 1px;
  margin: 13px 2px;
  background: var(--pt-line);
}

/* ---- En-tête de groupe repliable du rail (proto-unifie : « Marketing » /
 * « Hérité »). Cliquable, caret qui pivote à l'ouverture. ---- */
.pt-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 10px 12px 6px;
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
.pt-nav-group:hover {
  color: var(--pt-ink-3);
}
.pt-nav-group__caret {
  font-size: 11px;
  flex-shrink: 0;
  transition: transform 0.14s;
}
.pt-nav-group__caret.is-open {
  transform: rotate(90deg);
}

/* ---- Pastilles de statut — grammaire unifiée (même partout) ---- */
.pt-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pt-font-ui);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: var(--pt-r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.pt-status--brouillon {
  background: transparent;
  border-color: var(--pt-line-strong);
  color: var(--pt-ink-3);
}
.pt-status--valide {
  background: var(--pt-green-bg);
  color: var(--pt-green-ink);
}
.pt-status--attente {
  background: var(--pt-surface-3);
  color: var(--pt-ink-4);
}
.pt-status--encours {
  background: var(--pt-blue-bg);
  color: var(--pt-blue);
}
.pt-status--ok {
  background: var(--pt-green-bg);
  color: var(--pt-green-ink);
}
.pt-status--erreur {
  background: var(--pt-red-bg);
  color: var(--pt-red-ink);
}
.pt-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pt-pulse 1.2s ease-in-out infinite;
}

/* ---- Bascule segmentée (Galerie / Kanban) ---- */
.pt-seg {
  display: inline-flex;
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  overflow: hidden;
}
.pt-seg__btn {
  padding: 7px 15px;
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--pt-ink-3);
  transition:
    background 0.14s,
    color 0.14s;
}
.pt-seg__btn:hover {
  color: var(--pt-ink-2);
}
.pt-seg__btn[aria-pressed="true"] {
  background: var(--pt-surface-3);
  color: var(--pt-ink);
}

/* ---- Bouton icône (« I » info, roue dentée) ---- */
.pt-iconbtn {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  color: var(--pt-ink-3);
  cursor: pointer;
  transition:
    border-color 0.14s,
    color 0.14s;
}
.pt-iconbtn:hover {
  border-color: var(--pt-blue);
  color: var(--pt-blue);
}
.pt-iconbtn--i {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 16px;
}
.pt-iconbtn--sm {
  width: 28px;
  height: 28px;
  border-color: var(--pt-line);
  border-radius: var(--pt-r-sm);
}

/* ---- Bouton « générer » scindé (mode-agnostic : IT câblé / IA déféré) ---- */
.pt-split {
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--pt-r-md);
  overflow: hidden;
  box-shadow: var(--pt-shadow-sm);
}
.pt-split > .pt-btn {
  border-radius: 0;
  box-shadow: none;
}
.pt-split__more {
  background: var(--pt-red);
  color: #fff;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.25);
  padding: 0 11px;
  cursor: pointer;
  font-size: 12px;
}
.pt-split__more:hover {
  background: var(--pt-red-ink);
}
.pt-split__more[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
}
/* Popover des modes de génération */
.pt-modes {
  position: absolute;
  z-index: 40;
  right: 0;
  margin-top: 6px;
  min-width: 220px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  box-shadow: var(--pt-shadow-lg);
  overflow: hidden;
}
.pt-modes__item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pt-line);
  cursor: pointer;
  color: var(--pt-ink-2);
  font-family: var(--pt-font-ui);
  font-size: 12.5px;
}
.pt-modes__item:last-child {
  border-bottom: 0;
}
.pt-modes__item:hover:not([disabled]) {
  background: var(--pt-surface-2);
  color: var(--pt-ink);
}
.pt-modes__item[disabled] {
  cursor: not-allowed;
  color: var(--pt-ink-4);
}
.pt-modes__tag {
  margin-left: auto;
  font-family: var(--pt-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: var(--pt-r-xs);
}

/* Lien-action rouge discret (« + Ajouter ») */
.pt-link-red {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--pt-red);
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 12px;
}
.pt-link-red:hover {
  color: var(--pt-red-ink);
}

/* ---- Panneau (carte à en-tête, colonne gauche éditeur) ---- */
.pt-panel {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
}
.pt-panel__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-panel__title {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--pt-ink);
}
.pt-panel__body {
  padding: 13px 14px;
}

/* ---- Galerie : carte projet ---- */
.pt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 20px;
}
.pt-proj {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.14s,
    transform 0.14s,
    box-shadow 0.14s;
}
.pt-proj:hover {
  border-color: var(--pt-line-strong);
  box-shadow: var(--pt-shadow-md);
  transform: translateY(-2px);
}
.pt-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  border-bottom: 1px solid var(--pt-line);
  overflow: hidden;
  background: radial-gradient(120% 90% at 70% 12%, #243038 0%, #14181c 62%);
  background-size: cover;
  background-position: center;
}
.pt-thumb__logo {
  position: absolute;
  top: 9px;
  left: 10px;
  font-family: var(--pt-font-brand);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
/* La lettre rouge « TURF » est colorée inline dans le markup (var(--pt-red))
   pour éviter un sélecteur descendant `.b` en conflit de spécificité. */
.pt-thumb__dup {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(12, 15, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--pt-r-sm);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}
.pt-thumb__dup:hover {
  background: rgba(12, 15, 18, 0.85);
  color: #fff;
}
.pt-thumb__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 18, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
/* ---- Vignette vidéo (galerie Studio Vidéo) : ▶ central + durée mono ---- */
.pt-vthumb__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.14s;
}
.pt-proj:hover .pt-vthumb__play {
  opacity: 0.55;
}
.pt-vthumb__dur {
  position: absolute;
  right: 7px;
  bottom: 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--pt-r-xs);
  padding: 2px 6px;
}
.pt-proj__body {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pt-ratios {
  display: flex;
  gap: 5px;
  align-items: center;
}
.pt-ratio-chip {
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  color: var(--pt-ink-4);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  padding: 2px 5px;
}
.pt-proj__title {
  font-family: var(--pt-font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--pt-ink);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  word-break: break-word;
}
.pt-proj__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---- Kanban (par statut) ---- */
.pt-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
  min-width: 940px;
}
.pt-kcol {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.pt-kcol__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-kcol__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pt-kcol__title {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pt-ink);
}
.pt-kcol__count {
  margin-left: auto;
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-kcol__body {
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pt-kcol__empty {
  color: var(--pt-ink-4);
  font-size: 11.5px;
  text-align: center;
  padding: 12px 0;
}
.pt-kcard {
  display: flex;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  background: var(--pt-surface-2);
  cursor: pointer;
  align-items: center;
}
.pt-kcard:hover {
  border-color: var(--pt-line-strong);
}
/* Carte en cours de glisse (opacité) + colonne survolée par un drop valide. */
.pt-kcard--dragging {
  opacity: 0.4;
}
.pt-kcol--dragover {
  border-color: var(--pt-red);
  background: var(--pt-surface-2);
}
.pt-kcard__thumb {
  flex: none;
  width: 38px;
  height: 48px;
  border-radius: var(--pt-r-xs);
  border: 1px solid var(--pt-line);
  background: radial-gradient(120% 90% at 70% 12%, #243038 0%, #14181c 62%);
  background-size: cover;
  background-position: center;
}
.pt-kcard__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  /* Réserve la place de la poignée (coin haut-droit) pour ne pas la chevaucher. */
  padding-right: 18px;
}
.pt-kcard__title {
  font-family: var(--pt-font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--pt-ink);
  text-transform: uppercase;
  line-height: 1.05;
  word-break: break-word;
}

/* ---- Autopromo : sélecteur de journaux (chips multi-sélection) ---- */
.pt-journal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--pt-r-sm);
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  color: var(--pt-ink-2);
  font-size: 12px;
  cursor: pointer;
  transition:
    border-color 0.14s,
    color 0.14s,
    background 0.14s;
}
.pt-journal-chip:hover {
  border-color: var(--pt-line-strong);
  color: var(--pt-ink);
}
.pt-journal-chip[aria-pressed="true"] {
  border-color: var(--pt-red);
  color: var(--pt-ink);
  background: var(--pt-red-bg);
}

/* ---- Éditeur : déclinaisons ---- */
.pt-decls {
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pt-decl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  border-radius: var(--pt-r-sm);
  cursor: pointer;
  border: 1px solid var(--pt-line);
  background: transparent;
  text-align: left;
  width: 100%;
}
.pt-decl:hover {
  border-color: var(--pt-line-strong);
}
.pt-decl--active {
  border-color: var(--pt-line-strong);
  background: var(--pt-surface-2);
  box-shadow: inset 3px 0 0 var(--pt-red);
}
.pt-decl__top {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pt-decl__n {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  color: var(--pt-ink-4);
}
.pt-decl__accroche {
  font-family: var(--pt-font-display);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--pt-ink);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.pt-decl__meta {
  font-size: 11.5px;
  color: var(--pt-ink-3);
}
.pt-decl__meta .cta {
  color: var(--pt-ink-4);
}

/* Zones (chips de la déclinaison sélectionnée) */
.pt-zones {
  border-top: 1px solid var(--pt-line);
  padding: 12px 14px;
}
.pt-zones__label {
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
  margin-bottom: 9px;
}
.pt-zones__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pt-zone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  padding: 4px 7px;
  font-size: 11px;
  color: var(--pt-ink-2);
  background: var(--pt-surface-2);
}
.pt-zone__k {
  font-size: 9.5px;
  color: var(--pt-ink-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pt-zone--empty {
  opacity: 0.5;
}

/* ---- Éditeur : plan de travail (3 stations × 2 tirages) ---- */
.pt-worktop {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pt-worktop__sub {
  font-size: 12px;
  color: var(--pt-ink-4);
}
.pt-autoref {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--pt-ink-4);
}
.pt-autoref__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pt-blue);
  animation: pt-pulse 1.2s ease-in-out infinite;
}
.pt-stations {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.pt-station {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  padding: 14px;
}
.pt-station__head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 12px;
}
.pt-station__ratio {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--pt-ink);
}
.pt-station__dims {
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-station__proofs {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pt-slot {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pt-proof {
  position: relative;
  height: 176px;
  border-radius: var(--pt-r-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--pt-line);
  background: radial-gradient(120% 90% at 70% 12%, #243038 0%, #14181c 62%);
  background-size: cover;
  background-position: center;
}
.pt-proof:hover {
  border-color: var(--pt-line-strong);
}
.pt-proof--r916 {
  aspect-ratio: 1080 / 1920;
}
.pt-proof--r11 {
  aspect-ratio: 1 / 1;
}
.pt-proof--r45 {
  aspect-ratio: 1080 / 1360;
}
.pt-proof--empty {
  background: var(--pt-surface-2);
  cursor: default;
}
.pt-proof__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--pt-line-strong);
  border-radius: var(--pt-r-sm);
  color: var(--pt-ink-4);
  font-size: 10.5px;
}
.pt-proof__logo {
  position: absolute;
  top: 7px;
  left: 8px;
  font-family: var(--pt-font-brand);
  font-weight: 700;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
/* « TURF » coloré inline dans le markup — cf. .pt-thumb__logo. */
.pt-proof__cap {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pt-proof__accroche {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.05;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.pt-proof__dur {
  position: absolute;
  top: 6px;
  right: 7px;
  font-family: var(--pt-font-mono);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: var(--pt-r-xs);
}
.pt-proof__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.pt-proof__play span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  display: grid;
  place-items: center;
}
.pt-proof__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 18, 0.58);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pt-proof__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pt-slot__legend {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pt-slot__media {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  color: var(--pt-ink-3);
}

/* ---- Barre de progression INDÉTERMINÉE (overlay rendu en cours) ----
   Le back n'expose pas de % de progression (Rendu.statut ∈ en_attente/en_cours/
   ok/erreur) : on montre une barre indéterminée honnête, jamais un faux %. */
.pt-prog {
  position: relative;
  width: 62%;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  overflow: hidden;
}
.pt-prog__bar {
  position: absolute;
  top: 0;
  left: -40%;
  height: 100%;
  width: 40%;
  background: var(--pt-blue);
  border-radius: 2px;
  animation: pt-indeterminate 1.1s ease-in-out infinite;
}
@keyframes pt-indeterminate {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pt-prog__bar {
    animation: none;
    left: 0;
    width: 100%;
    opacity: 0.5;
  }
}
.pt-prog__label {
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-blue);
  font-weight: 600;
}

/* ---- Input fichier au design system (remplace les classes file: Tailwind) ---- */
.pt-file {
  font-size: 13px;
  color: var(--pt-ink-2);
}
.pt-file::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--pt-r-sm);
  background: var(--pt-surface-3);
  color: var(--pt-ink-2);
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.pt-file::file-selector-button:hover {
  background: var(--pt-line-strong);
  color: var(--pt-ink);
}

/* ---- Modales bespoke (info, nouveau projet, slot) sur wa-dialog ---- */
.pt-modal-eyebrow {
  font-size: 12px;
  color: var(--pt-ink-3);
}
.pt-pick {
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  background: var(--pt-surface-2);
  text-align: left;
  width: 100%;
  transition: border-color 0.14s;
}
.pt-pick:hover,
.pt-pick--active {
  border-color: var(--pt-red);
}
.pt-pick__title {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--pt-ink);
}
.pt-pick__desc {
  font-size: 12px;
  color: var(--pt-ink-3);
  line-height: 1.4;
}
.pt-field-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
  font-weight: 700;
}
.pt-info-col__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}
.pt-info-col__title {
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pt-info-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}
.pt-info-list li {
  display: flex;
  gap: 8px;
}

/* ---- Marques (identités visuelles) ---- */
.pt-marques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
/* Logo gallery: drag-drop a journal's several logos/images; first = principal.
   Side-by-side fixed 56×56 square frames; the image is contained inside,
   keeping its aspect ratio (centered, letterboxed) → never distorted. */
.pt-marque__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px dashed var(--pt-line);
  border-radius: var(--pt-r-sm);
  background: var(--pt-surface-2);
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}
.pt-marque__logos.is-drop {
  border-color: var(--pt-red);
  background: var(--pt-surface-3);
}
.pt-marque__logo {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  background: var(--pt-surface);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.pt-marque__logo.is-primary {
  border-color: var(--pt-ink-3);
  box-shadow: inset 0 0 0 1px var(--pt-ink-3);
}
/* Fixed 56×56 frame; the image fills it but `object-fit: contain` keeps the
   logo's aspect ratio (scaled to fit, centered, letterboxed) → no distortion. */
.pt-marque__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pt-marque__logo-actions {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.pt-marque__logo:hover .pt-marque__logo-actions {
  opacity: 1;
}
.pt-logo-act {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  color: var(--pt-ink-2);
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-xs);
}
.pt-logo-act:hover {
  color: var(--pt-ink);
  border-color: var(--pt-ink-3);
}
.pt-logo-act--danger:hover {
  color: var(--pt-red-ink);
  border-color: var(--pt-red);
}
.pt-marque__drop {
  height: 56px;
  width: auto;
  min-width: 96px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  text-align: center;
  font-size: 9.5px;
  color: var(--pt-ink-4);
  border: 1px dashed var(--pt-line-strong);
  border-radius: var(--pt-r-xs);
  background: var(--pt-surface);
}
.pt-marque__drop:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-ink-3);
}
.pt-marque__drop wa-icon {
  font-size: 14px;
}
.pt-marque__drop--empty {
  min-width: 160px;
}
.pt-code-badge {
  font-family: var(--pt-font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--pt-ink-2);
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  padding: 2px 6px;
}
/* Condensed colour zone: chips in a 2-up auto-fit grid (was 6 stacked rows). */
.pt-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px 10px;
}
.pt-color-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  cursor: text;
}
.pt-color-chip__field {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.pt-color-chip__role {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pt-ink-4);
}
.pt-color-chip input {
  height: 26px;
  padding: 2px 6px;
  font-size: 11px;
}
.pt-swatch {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: var(--pt-r-xs);
  border: 1px solid var(--pt-line-strong);
}

/* ---- Bibliothèque d'assets ---- */
.pt-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.pt-asset {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
}
.pt-asset__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--pt-surface-2);
  border-bottom: 1px solid var(--pt-line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pt-asset__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pt-asset__ext {
  font-family: var(--pt-font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--pt-ink-4);
  text-transform: uppercase;
}
.pt-asset__body {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-asset__nom {
  font-size: 12px;
  color: var(--pt-ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--pt-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--pt-ink-3);
  background: var(--pt-surface-3);
  border-radius: var(--pt-r-xs);
  padding: 2px 5px;
}
.pt-uploader {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  margin-bottom: 18px;
}
.pt-uploader__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ============================================================
   Bibliothèque — DAM par facettes (arbre / grille / inspecteur)
   Dark-only, coins nets, tokens --pt-* uniquement. Rouge réservé
   action / sélection (jamais décoratif). Chiffres en mono.
   ============================================================ */

/* --- Recherche du header --- */
.pt-lib-search {
  position: relative;
  display: flex;
  align-items: center;
}
.pt-lib-search wa-icon {
  position: absolute;
  left: 9px;
  font-size: 13px;
  color: var(--pt-ink-4);
  pointer-events: none;
}
.pt-lib-search__input {
  width: 240px;
  padding-left: 28px;
}

/* --- Grille 3 colonnes : arbre fixe · grille flex · inspecteur fixe --- */
.pt-lib {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
}
.pt-lib--inspecting {
  grid-template-columns: 240px minmax(0, 1fr) 320px;
}

/* --- Colonne 1 : arbre de facettes --- */
.pt-lib-tree {
  border-right: 1px solid var(--pt-line);
  padding: 16px 14px 30px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-lib-tree__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.pt-lib-clear {
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-red);
  background: transparent;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
}
.pt-lib-clear:hover {
  color: var(--pt-red-ink);
}

.pt-lib-group {
  display: flex;
  flex-direction: column;
}
.pt-lib-group__head {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 7px 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--pt-ink-2);
  text-align: left;
}
.pt-lib-group__caret {
  flex: none;
  font-size: 11px;
  color: var(--pt-ink-4);
  transition: transform 0.14s;
}
.pt-lib-group__caret.is-open {
  transform: rotate(90deg);
}
.pt-lib-group__title {
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-ink-2);
}
.pt-lib-group__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-lib-group__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 6px;
}

.pt-lib-node {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px 6px 18px;
  background: transparent;
  border: 0;
  border-radius: var(--pt-r-sm);
  cursor: pointer;
  color: var(--pt-ink-3);
  text-align: left;
  transition:
    background 0.12s,
    color 0.12s,
    box-shadow 0.12s;
}
.pt-lib-node:hover {
  background: var(--pt-surface-2);
  color: var(--pt-ink-2);
}
.pt-lib-node.is-active {
  background: var(--pt-surface-2);
  color: var(--pt-ink);
  box-shadow: inset 3px 0 0 var(--pt-red);
}
.pt-lib-node.is-drop-target {
  background: var(--pt-red-bg);
  box-shadow: inset 0 0 0 1px var(--pt-red);
}
.pt-lib-node__label {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-lib-node__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-lib-node__empty {
  padding: 5px 8px 5px 18px;
  font-size: 12px;
  color: var(--pt-ink-4);
  font-style: italic;
}

/* --- Colonne 2 : grille (barre de lot ancrée + zone défilante + dropzone) --- */
.pt-lib-grid-col {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pt-lib-grid-scroll {
  flex: 1;
  overflow: auto;
  padding: 18px 24px 60px;
}

.pt-lib-bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 10px 24px;
  border-bottom: 1px solid var(--pt-line);
  background: var(--pt-surface);
}
.pt-lib-bulkbar__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-ink);
}
.pt-lib-bulkbar__count .pt-num {
  color: var(--pt-red);
}
.pt-lib-bulkbar__sep {
  width: 1px;
  align-self: stretch;
  background: var(--pt-line);
}
.pt-lib-bulkbar__del {
  background: var(--pt-red);
  color: #fff;
  border: 1px solid var(--pt-red);
}
.pt-lib-bulkbar__del:hover {
  background: var(--pt-red-ink);
  border-color: var(--pt-red-ink);
}
/* .pt-btn--ghost : deja defini dans vendor/paristurf.css (l.149) - ne pas redefinir. */

/* Overlay import (drag externe Windows) */
.pt-lib-dropzone {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--pt-bg) 78%, transparent);
  backdrop-filter: blur(1px);
  pointer-events: none;
}
.pt-lib-dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 44px;
  border: 2px dashed var(--pt-red);
  border-radius: var(--pt-r-md);
  background: var(--pt-surface);
  color: var(--pt-ink-2);
}
.pt-lib-dropzone__inner wa-icon {
  color: var(--pt-red);
}
.pt-lib-dropzone__title {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pt-ink);
}
.pt-lib-dropzone__sub {
  font-size: 12px;
  color: var(--pt-ink-4);
}

/* --- Vignette : sélection + coche + badge type --- */
.pt-asset {
  position: relative;
  cursor: pointer;
  transition:
    box-shadow 0.12s,
    border-color 0.12s;
}
.pt-asset:hover {
  border-color: var(--pt-line-strong);
}
.pt-asset--sel {
  border-color: var(--pt-red);
  box-shadow: 0 0 0 1px var(--pt-red);
}
.pt-asset__check {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: var(--pt-r-xs);
  background: var(--pt-red);
  color: #fff;
  font-size: 11px;
}
.pt-tag--type {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Colonne 3 : inspecteur --- */
.pt-lib-inspector {
  border-left: 1px solid var(--pt-line);
  overflow: auto;
  background: var(--pt-surface);
}
.pt-lib-inspector__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 40px;
}
.pt-lib-inspector__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pt-lib-inspector__preview {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
}
.pt-lib-inspector__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pt-lib-inspector__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Chips de tags éditables */
.pt-lib-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 6px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
}
.pt-lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-ink-2);
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  padding: 2px 4px 2px 7px;
}
.pt-lib-chip__x {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  font-size: 10px;
  color: var(--pt-ink-4);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.pt-lib-chip__x:hover {
  color: var(--pt-red);
}
.pt-lib-chip-input {
  flex: 1;
  min-width: 70px;
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-ink);
  background: transparent;
  border: 0;
  outline: none;
  padding: 2px 4px;
}
.pt-lib-chip-input::placeholder {
  color: var(--pt-ink-4);
}

/* Métadonnées (lecture seule, mono) */
.pt-lib-inspector__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--pt-line);
}
.pt-lib-meta-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pt-lib-meta-row__k {
  flex: none;
  width: 58px;
  font-family: var(--pt-font-cond);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
.pt-lib-meta-row__v {
  font-size: 11px;
  color: var(--pt-ink-3);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-lib-meta-row__v--break {
  white-space: normal;
  word-break: break-all;
}

.pt-lib-inspector__del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 6px;
  background: transparent;
  color: var(--pt-red);
  border: 1px solid var(--pt-red);
}
.pt-lib-inspector__del:hover {
  background: var(--pt-red);
  color: #fff;
}

/* ---------- Calendrier Autopromo (dashboard) ---------- */
/* Porté fidèlement du handoff (design_handoff_studio_crea/Studio Créa.dc.html) :
   grille des temps forts. Navigation par mois seulement ; l'année n'aligne que
   les jours de la semaine (les campagnes sont récurrentes). */
/* Rangée calendrier + historique. Le display:flex est porté par une CLASSE (pas
   en inline) : x-show vide le style.display inline en ré-affichant l'élément, ce
   qui ferait retomber le conteneur en block et empilerait les panneaux. */
.pt-cal-row {
  display: flex;
  gap: 18px;
  align-items: stretch; /* l'historique s'étire à la hauteur du calendrier */
  flex: none; /* dans la page flex-colonne : ne pas comprimer le calendrier */
}
.pt-cal-panel {
  flex: 1 1 0; /* 50/50 avec l'historique */
  min-width: 0;
  max-width: 100%;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
}
.pt-cal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-cal-title {
  flex: 1;
  text-align: center;
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--pt-ink);
}
.pt-cal-navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--pt-r-sm);
  border: 1px solid var(--pt-line);
  background: transparent;
  color: var(--pt-ink-3);
  cursor: pointer;
  transition:
    color 0.12s,
    border-color 0.12s;
}
/* Sauts de campagne (« / ») : mêmes flèches que les mois mais surface pleine +
   gras pour les distinguer du pas mensuel (‹ / ›). */
.pt-cal-navbtn--camp {
  background: var(--pt-surface-2);
  color: var(--pt-ink-2);
  font-weight: 700;
}
.pt-cal-navbtn:hover {
  color: var(--pt-ink);
  border-color: var(--pt-line-strong);
}
.pt-cal-body {
  padding: 14px;
}
.pt-cal-head,
.pt-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.pt-cal-head {
  margin-bottom: 6px;
  font-family: var(--pt-font-mono);
  font-size: 10px;
  color: var(--pt-ink-4);
  text-align: center;
}
.pt-cal-day {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 6px;
  border-radius: var(--pt-r-xs);
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.pt-cal-day:hover {
  border-color: var(--pt-line-strong);
}
.pt-cal-num {
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1;
  color: var(--pt-ink-3);
}
.pt-cal-evt {
  font-size: 9.5px;
  line-height: 1.12;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: var(--pt-r-xs);
  word-break: break-word;
  background: var(--pt-teal-bg);
  color: var(--pt-teal);
}
.pt-cal-evt-more {
  font-family: var(--pt-font-mono);
  font-size: 9px;
  color: var(--pt-ink-4);
  padding: 0 4px;
}
.pt-cal-day--blank {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.pt-cal-day--selected {
  border-color: var(--pt-red);
  background: var(--pt-red-bg);
}
.pt-cal-day--selected .pt-cal-num {
  color: var(--pt-red-ink);
  font-weight: 700;
}
.pt-cal-day--selected .pt-cal-evt {
  background: var(--pt-red);
  color: #fff;
}

/* ---------- Historique Autopromo (strip d'éditions, porté du handoff) ---------- */
.pt-hist-panel {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  overflow: hidden;
}
.pt-hist-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-hist-title {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--pt-ink);
}
.pt-hist-count {
  margin-left: auto;
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-hist-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px;
}
/* Conteneur « jour sélectionné » : remplit le body pour permettre le centrage
   vertical de l'état vide ; le contenu réel (strip + actions) reste en haut. */
.pt-hist-when-day {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* État vide centré (vertical + horizontal), libellé éditorial MAJ. */
.pt-hist-vide {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--pt-font-display);
  font-weight: 400;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pt-ink-3);
}
.pt-hist-empty {
  text-align: center;
  color: var(--pt-ink-4);
  font-size: 12px;
  padding: 28px 0;
}
.pt-hist-muted {
  font-size: 11.5px;
  color: var(--pt-ink-4);
}
.pt-hist-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pt-hist-card {
  flex: none;
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
}
.pt-hist-thumb {
  position: relative;
  width: 100%;
  /* Aperçu agrandi en hauteur (2/3 ≈ 140×210) — laisse respirer les formats
     portrait (1080×1920) sans déformer (cf. object-fit: contain). */
  aspect-ratio: 2 / 3;
  border-radius: var(--pt-r-xs);
  border: 1px solid var(--pt-line);
  background: radial-gradient(120% 90% at 70% 12%, #243038 0%, #14181c 62%);
  overflow: hidden;
}
.pt-hist-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  /* contain = on garde le format de l'image, sans la déformer ni la recadrer
     (le dégradé fait le letterbox autour). */
  object-fit: contain;
}
/* Édition sélectionnée : liseré rouge (placé après .pt-hist-thumb pour garder
   l'ordre de spécificité croissant — règle Biome noDescendingSpecificity). */
.pt-hist-card--selected .pt-hist-thumb {
  border-color: var(--pt-red);
  box-shadow: 0 0 0 1px var(--pt-red);
}
.pt-hist-thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-ink-4);
}
.pt-hist-n {
  position: absolute;
  top: 4px;
  left: 4px;
  font-family: var(--pt-font-mono);
  font-size: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 0 4px;
  border-radius: 2px;
}
.pt-hist-year {
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-ink);
}
.pt-hist-fmt {
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--pt-ink-4);
}
/* Barre d'actions du bas : « Dupliquer » (édition sélectionnée) + « Archiver ». */
.pt-hist-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
/* Action « Dupliquer » (rouge = action) : grisée tant qu'aucune édition de
   l'historique n'est sélectionnée. */
.pt-hist-dupliquer {
  font-family: var(--pt-font-ui);
  font-size: 12px;
  color: var(--pt-red-ink);
  background: var(--pt-red-bg);
  border: 1px solid var(--pt-red);
  border-radius: var(--pt-r-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.pt-hist-dupliquer:hover {
  background: var(--pt-red);
  color: #fff;
}
.pt-hist-dupliquer:disabled {
  color: var(--pt-ink-4);
  background: transparent;
  border-color: var(--pt-line);
  cursor: not-allowed;
  opacity: 0.55;
}
.pt-hist-dupliquer:disabled:hover {
  background: transparent;
  color: var(--pt-ink-4);
}
.pt-hist-archive {
  width: auto;
  padding: 6px 12px;
  font-family: var(--pt-font-ui);
  font-size: 12px;
  color: var(--pt-ink-3);
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  cursor: pointer;
  transition:
    color 0.12s,
    border-color 0.12s;
}
.pt-hist-archive:hover {
  border-color: var(--pt-line-strong);
  color: var(--pt-ink);
}
.pt-hist-archive:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.pt-hist-archive:disabled:hover {
  border-color: var(--pt-line);
  color: var(--pt-ink-3);
}

/* ---------- Puces de bascule entre campagnes (inline dans l'en-tête) ---------- */
.pt-campchips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
/* Texte au format du titre « Historique » (Oswald 14px MAJ) — pas un encadré.
   Cliquabilité signalée par un soulignement pointillé (plein + clair au survol). */
.pt-campchip {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--pt-ink-3);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--pt-line-strong);
  text-underline-offset: 3px;
  transition:
    color 0.12s,
    text-decoration-color 0.12s;
}
/* Campagne en cours d'affichage : pleine clarté, soulignement plein (sans rouge). */
.pt-campchip--on {
  color: var(--pt-ink);
  text-decoration-style: solid;
  text-decoration-color: var(--pt-ink);
}
.pt-campchip:hover {
  color: var(--pt-ink);
  text-decoration-style: solid;
  text-decoration-color: var(--pt-ink);
}

/* ---------- Recherche campagnes (champ + croix + petite modale) ---------- */
/* Anti-flash avant init Alpine : plus spécifique que .pt-search-pop (display:flex)
   pour masquer sans !important. */
.pt-search-pop[x-cloak] {
  display: none;
}
.pt-search-clear {
  border: none;
  background: transparent;
  color: var(--pt-ink-4);
  font-size: 13px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: var(--pt-r-xs);
}
.pt-search-clear:hover {
  color: var(--pt-red);
}
/* La petite modale de résultats, ancrée sous le champ (.pt-search est relatif). */
.pt-search-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  box-shadow: var(--pt-shadow-md);
  overflow: hidden;
}
.pt-search-pop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  font-size: 11px;
  color: var(--pt-ink-3);
  border-bottom: 1px solid var(--pt-line);
}
.pt-search-pop__hint {
  font-size: 10px;
  color: var(--pt-ink-4);
}
.pt-search-pop__body {
  overflow-y: auto;
}
.pt-search-table {
  width: 100%;
  border-collapse: collapse;
}
.pt-search-table tr {
  cursor: pointer;
  border-bottom: 1px solid var(--pt-line);
}
.pt-search-table tr:last-child {
  border-bottom: none;
}
.pt-search-table tr:hover {
  background: var(--pt-surface-2);
}
.pt-search-table__nom {
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--pt-ink);
}
.pt-search-table__date {
  padding: 7px 10px;
  text-align: right;
  font-size: 11px;
  color: var(--pt-ink-4);
  white-space: nowrap;
}
.pt-search-pop__empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--pt-ink-4);
}

/* ---------- Kanban Autopromo (barre + toggle archives + pastille) ---------- */
/* ---- Layout pleine hauteur : pas d'ascenseur de fenêtre, scroll par colonne ---- */
/* La page autopromo-kanban devient une colonne flex figée : en-tête + calendrier
   fixes, section kanban qui prend le reste, et CHAQUE colonne scrolle dedans. */
.pt-legacy.pt-kanban-page {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 24px;
}
.pt-kan-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pt-kan-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(
    0,
    1fr
  ); /* la rangée remplit la hauteur → colonnes scrollables */
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.pt-kan-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 9px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-lg);
  overflow: hidden;
  transition:
    border-color 0.12s,
    background 0.12s;
}
.pt-kan-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Rappel « éventail » des rendus générés sur la carte kanban (cartes en
   portrait qui se chevauchent + s'inclinent, déployées au survol). */
.pt-eventail {
  display: flex;
  align-items: flex-end;
  height: 60px;
  margin-top: 9px;
  padding-left: 18px;
}
.pt-eventail__card {
  position: relative;
  flex: none;
  width: 32px;
  height: 56px;
  margin-left: -16px;
  border: 1px solid var(--pt-line-strong);
  background: var(--pt-surface-3);
  overflow: hidden;
  transform-origin: bottom center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.18s ease,
    margin-left 0.18s ease;
}
.pt-eventail__card:first-child {
  margin-left: 0;
}
.pt-eventail__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pt-eventail__more {
  align-self: center;
  margin-left: 8px;
  font-size: 10px;
  color: var(--pt-ink-3);
}
/* Survol de la carte : on resserre moins → l'éventail se déploie. */
.pt-kan-card:hover .pt-eventail__card {
  margin-left: -6px;
}
.pt-kan-card:hover .pt-eventail__card:first-child {
  margin-left: 0;
}
/* Drag & drop des cartes kanban : carte saisie estompée, colonne cible mise
 * en évidence (filet rouge = zone de dépôt active). */
.pt-kan-card--dragging {
  opacity: 0.4;
}
/* Carte cliquable (ouvre le projet) ; le drag ne part QUE de la poignée. */
.pt-kan-card {
  cursor: pointer;
}
/* Poignée de drag : coin haut-droit, seul point de saisie. */
.pt-kan-grip {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pt-ink-4);
  cursor: grab;
  font-size: 13px;
  line-height: 1;
}
.pt-kan-grip:hover {
  color: var(--pt-ink-2);
}
.pt-kan-grip:active {
  cursor: grabbing;
}
.pt-kan-col--dragover {
  border-color: var(--pt-red);
  background: var(--pt-surface-2);
}

/* ---- Picker « inspiration depuis un projet / archive » (modale) ---- */
.pt-insp-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px;
}
.pt-insp-picker-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  background: var(--pt-surface-3);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.12s,
    transform 0.12s;
}
.pt-insp-picker-cell:hover {
  border-color: var(--pt-line-strong);
  transform: translateY(-1px);
}
.pt-insp-picker-cell.is-on {
  border-color: var(--pt-blue);
  box-shadow: inset 0 0 0 1px var(--pt-blue);
}
.pt-insp-picker-cell img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}
.pt-insp-picker-cell__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 9 / 16;
  color: var(--pt-ink-3);
  font-size: 22px;
}
.pt-insp-picker-cell__cap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  text-align: left;
}
.pt-insp-picker-cell__lab {
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-insp-picker-cell__sub {
  font-size: 10.5px;
  color: var(--pt-ink-4);
}
.pt-insp-picker-cell__check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-radius: 50%;
  background: var(--pt-blue);
  color: #fff;
}
.pt-insp-picker-cell__kind {
  position: absolute;
  top: 5px;
  left: 5px;
  font-family: var(--pt-font-cond);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: var(--pt-r-sm);
  background: rgba(0, 0, 0, 0.55);
  color: var(--pt-ink-2);
}
.pt-kan-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pt-kan-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--pt-r-pill);
  flex: none;
}
.pt-kan-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  background: transparent;
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  cursor: pointer;
  color: var(--pt-ink-2);
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 12.5px;
}
.pt-kan-switch {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  border-radius: var(--pt-r-pill);
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line-strong);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.pt-kan-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pt-ink-3);
  transition:
    transform 0.15s,
    background 0.15s;
}
.pt-kan-toggle--on .pt-kan-switch {
  background: var(--pt-red-bg);
  border-color: var(--pt-red);
}
.pt-kan-toggle--on .pt-kan-knob {
  transform: translateX(14px);
  background: var(--pt-red);
}

/* ---------- En-tête Studio (page Autopromo) ---------- */
/* Dans .pt-legacy (qui fournit déjà le padding horizontal) : pas de padding
   latéral ici, filet bas aligné sur le contenu en dessous. */
.pt-studio-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--pt-line);
  flex: none; /* en-tête fixe dans la page flex-colonne */
}
.pt-studio-tag {
  font-family: var(--pt-font-cond);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}

/* ---------- Studio Autopromo « L'Atelier » : 2 colonnes pleine hauteur ----------
   Refonte handoff (design_handoff_studio_crea/Atelier - Studio Autopromo.html).
   Pilotage (46 %, accordéons Inspiration/Banque + chat compact + consignes
   dominantes + génération collée en bas) | Sortie (cadres comparables, un par
   journal). Tokens --pt-* uniquement (déjà fournis par vendor/paristurf.css),
   coins nets, dark-only. Classes préfixées .pt-atl- : le mockup emploie des noms
   génériques (.grid / .panel / .cols) qui entreraient en collision avec Tailwind.
   Valeurs portées du mockup au pixel près. */
.pt-legacy.pt-autopromo-studio {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  /* Coquille pleine hauteur edge-to-edge (mockup .screen) : on annule les
     gouttières de .pt-legacy (padding: 24px 30px 60px), réservées aux pages en
     grille de cartes (kanban), pas à cet atelier 2 colonnes. */
  padding: 0;
}

/* En-tête d'écran */
.pt-atl-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-atl-head__back {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-3);
  background: transparent;
  cursor: pointer;
}
.pt-atl-head__back:hover {
  color: var(--pt-ink);
  border-color: var(--pt-line-strong);
}
.pt-atl-head__titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pt-atl-head h1 {
  margin: 0;
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--pt-ink);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-atl-head__sub {
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-ink-4);
}

/* 2 colonnes */
.pt-atl {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* ===== Pilotage (gauche) ===== */
.pt-atl__pilotage {
  flex: none;
  width: 52%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--pt-line-strong);
  min-height: 0;
}
.pt-atl__pilo {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* Barres accordéon (Inspiration / Banque de texte) — repliées par défaut */
.pt-atl-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.pt-atl-bar:hover {
  border-color: var(--pt-line-strong);
}
.pt-atl-bar__t {
  font-size: 11px;
  font-weight: 600;
  color: var(--pt-ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pt-atl-bar__meta {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  color: var(--pt-ink-4);
}
/* Libellé explicatif inline (Inspiration) : prend la place restante, peut passer
   à la ligne, le chevron reste à droite. */
.pt-atl-bar__note {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  line-height: 1.25;
  color: var(--pt-ink-4);
  text-align: left;
}
.pt-atl-bar__chev {
  margin-left: auto;
  color: var(--pt-ink-4);
  transition: transform 0.16s;
}
.pt-atl-bar[aria-expanded="true"] .pt-atl-bar__chev {
  transform: rotate(180deg);
}
/* Tiroir déroulé : prolonge sa barre (bord haut supprimé) */
.pt-atl-acc {
  border: 1px solid var(--pt-line);
  border-top: 0;
  background: var(--pt-surface);
  padding: 12px;
}
/* Visualisation de l'historique : hauteur plafonnée, scroll interne */
.pt-atl-insp-scroll {
  /* Filmstrip horizontal : les groupes d'années défilent côte à côte. */
  max-height: 200px;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Zone Inspiration : moodboard curable (drag-drop PNG + ajouts depuis
   l'Historique). Panneau visible en permanence en haut du pilotage ; grille
   calquée sur .pt-atl-bimg. Tokens --pt-* uniquement, dark-only. */
/* Wrapper transparent : sert uniquement de dropzone. Le cadre vient désormais
   de .pt-atl-bar + .pt-atl-acc (comme « Insérer »), plus de double encadrement. */
.pt-atl-insp {
  border-radius: var(--pt-r-sm);
}
.pt-atl-insp--drop {
  outline: 1px dashed var(--pt-blue);
  outline-offset: 2px;
}
.pt-atl-insp__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.pt-atl-insp__t {
  font-size: 11px;
  font-weight: 600;
  color: var(--pt-ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pt-atl-insp__meta {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  color: var(--pt-ink-4);
}
.pt-atl-insp__note {
  margin-left: auto;
  font-size: 10px;
  line-height: 1.25;
  color: var(--pt-ink-4);
  text-align: right;
}
.pt-atl-insp__empty {
  font-size: 11px;
  line-height: 1.35;
  color: var(--pt-ink-4);
  padding: 2px 0 10px;
}
.pt-atl-insp__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pt-atl-insp__cell {
  position: relative;
  height: 72px;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  overflow: hidden;
}
.pt-atl-insp__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pt-atl-insp__icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--pt-ink-3);
}
.pt-atl-insp__tag {
  position: absolute;
  bottom: 2px;
  left: 2px;
  padding: 0 4px;
  font-family: var(--pt-font-mono);
  font-size: 9px;
  line-height: 14px;
  color: var(--pt-ink-2);
  background: rgba(0, 0, 0, 0.55);
}
.pt-atl-insp__x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--pt-ink-2);
  font-size: 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}
.pt-atl-insp__cell:hover .pt-atl-insp__x {
  opacity: 1;
}
.pt-atl-insp__x:hover {
  background: var(--pt-red);
  color: #fff;
}
.pt-atl-insp__add {
  display: grid;
  place-items: center;
  height: 72px;
  background: var(--pt-surface-3);
  border: 1px dashed var(--pt-line-strong);
  color: var(--pt-ink-4);
  cursor: pointer;
}
.pt-atl-insp__add:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-ink-3);
}

/* Panneaux (chat compact, consignes) */
.pt-atl-panel {
  border: 1px solid var(--pt-line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pt-atl-panel__h {
  flex: none;
  padding: 9px 12px;
  border-bottom: 1px solid var(--pt-line);
  background: var(
    --pt-surface-2
  ); /* même fond que .pt-atl-bar (Inspiration/Insérer) */
  display: flex;
  align-items: center;
}
.pt-atl-panel__t {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pt-ink-2);
}
.pt-atl-panel__x {
  font-size: 10px;
  color: var(--pt-ink-4);
}
.pt-atl-panel__i {
  margin-left: auto;
  color: var(--pt-ink-4);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
}
.pt-atl-panel__i:hover {
  color: var(--pt-ink-2);
}

/* Chat copilote — panneau de travail (assistant), hauteur confortable */
.pt-atl-panel--chat {
  /* S'étend jusqu'en bas du pilotage (les consignes sont passées à droite). */
  flex: 1;
  min-height: 230px;
}
.pt-atl-chat__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pt-atl-chat__empty {
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-atl-chat__msg {
  max-width: 88%;
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
  border: 1px solid var(--pt-line);
}
/* Bulle Markdown rendu (réponse copilote) : le HTML porte déjà les sauts de
   ligne (<p>/<br>/<ul>) → on annule pre-wrap, et on compacte titres/listes. */
.pt-atl-chat__md {
  white-space: normal;
}
.pt-atl-chat__md > :first-child {
  margin-top: 0;
}
.pt-atl-chat__md > :last-child {
  margin-bottom: 0;
}
.pt-atl-chat__md p {
  margin: 0 0 7px;
}
.pt-atl-chat__md h1,
.pt-atl-chat__md h2,
.pt-atl-chat__md h3,
.pt-atl-chat__md h4 {
  font-family: var(--pt-font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pt-ink);
  margin: 10px 0 5px;
  line-height: 1.15;
}
.pt-atl-chat__md h1 {
  font-size: 14px;
}
.pt-atl-chat__md h2 {
  font-size: 13px;
}
.pt-atl-chat__md h3,
.pt-atl-chat__md h4 {
  font-size: 12px;
}
.pt-atl-chat__md ul {
  margin: 4px 0 7px;
  padding-left: 18px;
}
.pt-atl-chat__md li {
  margin: 2px 0;
}
.pt-atl-chat__md strong {
  font-weight: 700;
  color: var(--pt-ink);
}
.pt-atl-chat__md code {
  font-family: var(--pt-font-mono);
  font-size: 11px;
  background: var(--pt-surface-3);
  padding: 1px 4px;
  border-radius: var(--pt-r-xs);
}
/* Vert (pas rouge) : le rouge est réservé action/erreur — une bulle user rouge
   se lisait comme une erreur (retour QA 2026-07-06). */
.pt-atl-chat__msg--user {
  align-self: flex-end;
  background: var(--pt-green-bg);
  color: var(--pt-ink);
  border-color: var(--pt-green-ink);
}
.pt-atl-chat__msg--ai {
  align-self: flex-start;
  background: var(--pt-surface-2);
  color: var(--pt-ink-2);
}
.pt-atl-chat__msg--err {
  align-self: flex-start;
  background: var(--pt-surface-3);
  color: var(--pt-red-ink);
}
.pt-atl-chat__thumbs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.pt-atl-chat__thumbs img {
  height: 40px;
  border: 1px solid var(--pt-line);
}
.pt-atl-chat__foot {
  flex: none;
  border-top: 1px solid var(--pt-line);
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-atl-chat__attach {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pt-atl-chat__attach-img {
  position: relative;
}
.pt-atl-chat__attach-img img {
  height: 38px;
  border: 1px solid var(--pt-line-strong);
}
.pt-atl-chat__attach-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pt-red);
  color: #fff;
  border: 0;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.pt-atl-chat__doc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  font-size: 10px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-2);
}
.pt-atl-chat__doc button {
  background: transparent;
  border: 0;
  color: var(--pt-ink-4);
  cursor: pointer;
}
/* Badge d'état de lecture d'une pièce jointe (lu / lu tronqué / non lu) */
.pt-atl-chat__doc-state {
  font-family: var(--pt-font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 4px;
}
/* Bouton supprimer (banque de texte) — rouge marque réservé à l'action destructive */
.pt-atl-del {
  background: transparent;
  border: 0;
  color: var(--pt-ink-4);
  cursor: pointer;
  display: inline-flex;
}
.pt-atl-del:hover {
  color: var(--pt-red);
}
.pt-atl-chat__input-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.pt-atl-chat__input {
  flex: 1;
  min-width: 0;
  resize: none;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  font-family: var(--pt-font-ui);
  font-size: 12px;
  padding: 6px 8px;
  line-height: 1.3;
  max-height: 110px;
  overflow-y: auto;
}
.pt-atl-chat__input::placeholder {
  color: var(--pt-ink-4);
}
.pt-atl-chat__send {
  flex: none;
  width: 34px;
  display: grid;
  place-items: center;
  background: var(--pt-red);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.pt-atl-chat__send:hover {
  background: var(--pt-red-ink);
}
.pt-atl-chat__send:disabled {
  background: var(--pt-surface-3);
  color: var(--pt-ink-4);
  cursor: not-allowed;
}
/* Roue dentée — réglages IA du copilote (à côté d'Envoyer) */
.pt-atl-chat__gear {
  flex: none;
  width: 34px;
  display: grid;
  place-items: center;
  background: var(--pt-surface-3);
  color: var(--pt-ink-3);
  border: 1px solid var(--pt-line);
  cursor: pointer;
}
.pt-atl-chat__gear:hover {
  color: var(--pt-ink);
  border-color: var(--pt-line-strong);
}

/* Grande modale d'édition de skill */
wa-dialog.pt-skill-dialog {
  --width: 760px;
}

/* Consignes — panneau dominant (flex:1), écrit par Claude, éditable.
   min-height : reste éditable même quand les accordéons sont déroulés (le
   pilotage défile alors au lieu d'écraser la zone). */
.pt-atl-panel--consignes {
  flex: 1;
  min-height: 220px;
}
/* Consignes relogées en tête de la colonne Sortie (au-dessus des rendus) :
   hauteur bornée + scroll interne pour ne pas écraser la grille de rendus. */
.pt-atl-panel--consignes-sortie {
  flex: none;
  min-height: 0;
  max-height: 40%;
  margin: 12px 18px 0;
}
/* Corps des consignes : champs structurés + zone libre, scroll interne */
.pt-atl-cbody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--pt-surface-2);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
/* Deux colonnes : champs éditoriaux | notes libres (Claude) */
.pt-atl-cbody--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.pt-atl-ccol {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.pt-atl-ccol--libre {
  min-height: 0;
}
.pt-atl-cfield {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pt-atl-cfield--libre {
  flex: 1;
  min-height: 120px;
}
.pt-atl-cfield__l {
  font-family: var(--pt-font-cond);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
}
.pt-atl-cfield__hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--pt-ink-4);
}
.pt-atl-cinput {
  width: 100%;
  resize: none;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  color: var(--pt-ink);
  font-family: var(--pt-font-ui);
  font-size: 12.5px;
  line-height: 1.4;
  padding: 6px 8px;
}
.pt-atl-cinput:focus {
  outline: none;
  border-color: var(--pt-line-strong);
}
.pt-atl-cinput::placeholder {
  color: var(--pt-ink-4);
}
.pt-atl-cinput--libre {
  flex: 1;
  min-height: 100px;
}

/* Prix / offre + CTA côte à côte (deux champs courts sur une ligne) */
.pt-atl-crow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  align-items: start;
}

/* Champs structurés qui s'étirent à la hauteur disponible (saisie confortable).
   La zone éditable (textarea) prend toute la place restante du champ. */
.pt-atl-cfield--grow {
  flex: 1;
  min-height: 0;
}
.pt-atl-cfield--grow .pt-atl-cinput {
  flex: 1;
  min-height: 44px;
}
/* Ligne Prix/CTA étirée : les deux champs partagent la MÊME hauteur (grille
   stretch + les deux en pt-atl-cfield--grow → textareas de hauteur égale). */
.pt-atl-crow--grow {
  flex: 1;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}

/* Groupes de propositions cliquables affichés DANS le fil du chat (sous un
   message assistant). Réutilisent .pt-atl-copts/.pt-atl-copt pour les chips ;
   n'apportent que le label de groupe discret + l'espacement vertical. */
.pt-atl-chatopts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.pt-atl-chatopts + .pt-atl-chatopts {
  margin-top: 10px;
}
.pt-atl-chatopts__l {
  font-family: var(--pt-font-cond);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}

/* Champs à choix : propositions de Claude en chips sélectionnables.
   Disposées EN LIGNE (row + wrap) : chaque chip épouse la largeur de son
   texte et passe à la ligne suivante quand la place manque. */
.pt-atl-copts {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
}
.pt-atl-copt {
  /* Le cadre épouse le contenu (pas d'étirement pleine largeur). */
  flex: 0 0 auto;
  max-width: 100%;
  text-align: left;
  font-family: var(--pt-font-ui);
  font-size: 12px;
  line-height: 1.35;
  padding: 5px 10px;
  /* Coins arrondis ASSUMÉS (dérogation aux « coins nets » du handoff) : signale
     visuellement que ces tags sont des propositions sélectionnables, distinctes
     du reste de l'UI éditoriale à angles droits. */
  border-radius: 8px;
  background: var(--pt-surface-3);
  color: var(--pt-ink-2);
  border: 1px solid var(--pt-line);
  cursor: pointer;
}
.pt-atl-copt:hover {
  border-color: var(--pt-line-strong);
  color: var(--pt-ink);
}
.pt-atl-copt[aria-pressed="true"] {
  background: var(--pt-ink);
  color: var(--pt-bg);
  border-color: var(--pt-ink);
}

/* Copilote : indicateur « en cours » — 3 points animés + chrono, dépliable */
.pt-atl-thinking {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: flex-start;
}
.pt-atl-thinking__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-3);
  cursor: pointer;
}
.pt-atl-thinking__btn:hover {
  border-color: var(--pt-line-strong);
  color: var(--pt-ink-2);
}
.pt-atl-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pt-atl-dots > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pt-ink-3);
  animation: pt-atl-dot 1.2s infinite ease-in-out both;
}
.pt-atl-dots > span:nth-child(1) {
  animation-delay: -0.32s;
}
.pt-atl-dots > span:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes pt-atl-dot {
  0%,
  80%,
  100% {
    opacity: 0.2;
    transform: scale(0.7);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
.pt-atl-thinking__time {
  font-family: var(--pt-font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--pt-ink-4);
}
.pt-atl-thinking__chev {
  font-size: 12px;
  color: var(--pt-ink-4);
}
.pt-atl-thinking__panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 88%;
  padding: 7px 9px;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
}
.pt-atl-thinking__line {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--pt-ink-2);
}
.pt-atl-thinking__meta {
  font-family: var(--pt-font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--pt-ink-4);
}

/* Banque d'images : grille de références sélectionnables + bouton d'ajout */
.pt-atl-bank-sub {
  font-family: var(--pt-font-cond);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
  margin: 12px 0 6px;
}
.pt-atl-bimg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pt-atl-bimg {
  position: relative;
  height: 50px;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: block;
}
.pt-atl-bimg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pt-atl-bimg--on {
  border: 2px solid var(--pt-blue);
}
.pt-atl-bimg__check {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pt-blue);
  color: #fff;
  font-size: 9px;
}
.pt-atl-bimg__del {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--pt-ink-2);
  font-size: 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}
.pt-atl-bimg:hover .pt-atl-bimg__del {
  opacity: 1;
}
.pt-atl-bimg__del:hover {
  background: var(--pt-red);
  color: #fff;
}
.pt-atl-bimg--add {
  display: grid;
  place-items: center;
  color: var(--pt-ink-4);
  border-style: dashed;
  border-color: var(--pt-line-strong);
}
.pt-atl-bimg--add:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-ink-3);
}
.pt-spin {
  animation: pt-atl-spin 0.9s linear infinite;
}
@keyframes pt-atl-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Génération — collée en bas du pilotage */
.pt-atl-gen {
  flex: none;
  border-top: 1px solid var(--pt-line-strong);
  background: var(--pt-surface-2);
  padding: 13px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
/* Carte génération relogée dans la colonne droite (entre consignes et rendus) */
.pt-atl-gen--sortie {
  border-bottom: 1px solid var(--pt-line-strong);
}

/* Console live « ce que fait Claude » — sous le bouton Générer */
.pt-atl-console-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pt-atl-console-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pt-ink-4);
}
.pt-atl-console-h__t {
  font-weight: 600;
}
.pt-atl-console-h__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pt-red);
  font-weight: 700;
}
.pt-atl-console-h__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pt-red);
  animation: pt-atl-spin 1.2s ease-in-out infinite;
}
.pt-atl-console {
  max-height: 150px;
  overflow-y: auto;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  border-radius: 4px;
  padding: 7px 9px;
  font-family: var(--pt-font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--pt-ink-2);
}
.pt-atl-console__l {
  white-space: pre-wrap;
  word-break: break-word;
}
.pt-atl-console__l--dim {
  color: var(--pt-ink-4);
  font-style: italic;
}
.pt-atl-gen__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pt-atl-gen__klab {
  font-family: var(--pt-font-cond);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
}
.pt-atl-gen__hint {
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-atl-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pt-atl-chip {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  font-family: var(--pt-font-mono);
  font-weight: 600;
  font-size: 11px;
  padding: 4px 7px;
  background: var(--pt-surface-2);
  color: var(--pt-ink-3);
  border: 1px solid var(--pt-line-strong);
  cursor: pointer;
}
.pt-atl-chip:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-ink-3);
}
.pt-atl-chip[aria-pressed="true"] {
  background: var(--pt-ink);
  color: var(--pt-bg);
  border-color: var(--pt-ink);
}
.pt-atl-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pt-atl-progress {
  flex: 1;
  height: 6px;
  background: var(--pt-surface-3);
  position: relative;
  overflow: hidden;
}
.pt-atl-progress > i {
  position: absolute;
  top: 0;
  height: 100%;
  width: 38%;
  background: var(--pt-blue);
  animation: pt-atl-indef 1.1s linear infinite;
}
.pt-atl-chrono {
  font-family: var(--pt-font-mono);
  font-size: 11px;
  color: var(--pt-ink-2);
}
.pt-atl-genbtn {
  display: flex;
}
.pt-atl-genbtn__b {
  flex: 1;
  text-align: center;
  background: var(--pt-red);
  color: #fff;
  border: 0;
  padding: 11px;
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.pt-atl-genbtn__b:hover {
  background: var(--pt-red-ink);
}
.pt-atl-genbtn__b:disabled {
  background: var(--pt-surface-3);
  color: var(--pt-ink-4);
  cursor: not-allowed;
}
.pt-atl-genbtn__v {
  width: 38px;
  display: grid;
  place-items: center;
  background: var(--pt-red-ink);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.pt-atl-genbtn__v:disabled {
  background: var(--pt-surface-3);
  color: var(--pt-ink-4);
  cursor: not-allowed;
}
.pt-atl-genmode {
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  font-size: 12px;
}
.pt-atl-genmode__on {
  padding: 6px 10px;
  color: var(--pt-ink-2);
}
.pt-atl-genmode__off {
  padding: 6px 10px;
  color: var(--pt-ink-4);
  border-top: 1px solid var(--pt-line);
}

/* ===== Sortie (droite) ===== */
.pt-atl__sortie {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--pt-surface-2);
}

/* Zone haute redimensionnable (consignes + génération) ; hauteur pilotée en JS */
.pt-atl__top {
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 140px;
  margin: 12px 18px 0;
}
.pt-atl__top > .pt-atl-panel--consignes-sortie {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0;
}
/* Poignée de redimensionnement haut/bas */
.pt-atl-splitter {
  flex: none;
  height: 12px;
  margin: 2px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: row-resize;
}
.pt-atl-splitter::before {
  content: "";
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--pt-line-strong);
  transition: background 0.12s;
}
.pt-atl-splitter:hover::before {
  background: var(--pt-ink-3);
}

/* Génération relogée sous les notes libres (colonne de droite) */
.pt-atl-gen--libre {
  flex: none;
  padding: 10px 0 0;
  margin-top: 6px;
  background: transparent;
  border-top: 1px solid var(--pt-line);
  border-bottom: 0;
  gap: 8px;
}
/* Bouton « Générer » réduit dans la colonne étroite : largeur au contenu */
.pt-atl-gen--libre .pt-atl-genbtn__b {
  flex: 0 0 auto;
  padding: 6px 16px;
  font-size: 12px;
}
.pt-atl-gen--libre .pt-atl-genbtn__v {
  width: 28px;
}
/* Groupe Générer remonté sur la ligne des journaux : poussé à droite, popover
   inventaire ancré à ce groupe (position:relative). */
.pt-atl-genbtn--inline {
  flex: none;
  margin-left: auto;
  position: relative;
}
/* Journaux + détail modèle sur une seule ligne : pas de retour des chips,
   le réglage absorbe le reste et tronque proprement (titre au survol). */
.pt-atl-gen--libre .pt-atl-gen__row .pt-atl-chips {
  flex-wrap: nowrap;
}
.pt-atl-genreglage--inline {
  flex: 1;
  min-width: 0;
  margin: 0 0 0 auto;
  text-align: right;
}
/* Barre d'actions : Résumé + Console à gauche, détail du modèle à droite */
.pt-atl-genactions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}
.pt-atl-genaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-family: var(--pt-font-cond);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-3);
  cursor: pointer;
}
.pt-atl-genaction:hover {
  border-color: var(--pt-line-strong);
  color: var(--pt-ink-2);
}
.pt-atl-genaction[aria-pressed="true"] {
  background: var(--pt-ink);
  border-color: var(--pt-ink);
  color: var(--pt-bg);
}
.pt-atl__sortie-h {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-atl__sortie-t {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--pt-ink);
}
.pt-atl__sortie-x {
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-atl-note {
  flex: none;
  margin: 12px 18px 0;
  padding: 9px 12px;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-3);
  font-size: 11.5px;
  color: var(--pt-ink-3);
}
.pt-atl-note--err {
  border-color: var(--pt-red);
  background: var(--pt-red-bg);
  color: var(--pt-red-ink);
}

/* Grille des cadres comparables (1 piste par journal cochée).
   Cadres petits, top-alignés, largeur plafonnée → vignettes 9:16 « contain »
   (jamais croppées) côte à côte ; scroll si la fenêtre est courte. */
.pt-atl-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pt-atl-grid--empty {
  align-items: center;
  justify-content: center;
  color: var(--pt-ink-4);
  font-size: 12px;
}

/* ===== Fil d'Ariane : une ligne par journal, versions de gauche à droite ===== */
.pt-atl-grid--tl {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.pt-atl-tlrow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-atl-tlrow:not(:last-child) {
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--pt-line);
}
.pt-atl-tlrow__main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pt-atl-tlrow__head {
  flex: none;
  width: 70px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pt-atl-tlrow__code {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
}
.pt-atl-tltrack {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pt-atl-tlstep {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pt-atl-tlnode {
  position: relative;
  flex: none;
  height: 112px;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pt-atl-tlnode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}
.pt-atl-tlnode--ok {
  cursor: pointer;
}
.pt-atl-tlnode--ok:hover {
  border-color: var(--pt-line-strong);
}
.pt-atl-tlnode--next {
  flex-direction: column;
  gap: 3px;
  border-style: dashed;
  border-color: var(--pt-line-strong);
  color: var(--pt-ink-4);
  cursor: pointer;
}
.pt-atl-tlnode--next:hover {
  border-color: var(--pt-red);
  color: var(--pt-red);
}
.pt-atl-tlnode--open {
  border-style: solid;
  border-color: var(--pt-red);
  color: var(--pt-red);
}
.pt-atl-tlnode--run {
  flex-direction: column;
  gap: 8px;
  border-color: var(--pt-blue);
  color: var(--pt-blue);
}
.pt-atl-tlnode--err {
  border-color: var(--pt-red);
  color: var(--pt-red);
}
.pt-atl-tlnode__tag {
  position: absolute;
  bottom: 3px;
  left: 3px;
  font-family: var(--pt-font-mono);
  font-size: 9px;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.pt-atl-tlnode__lab {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  white-space: nowrap;
}
.pt-atl-tlacts {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pt-atl-tlacts a,
.pt-atl-tlacts button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  color: var(--pt-ink-3);
  cursor: pointer;
}
.pt-atl-tlacts a:hover,
.pt-atl-tlacts button:hover {
  color: var(--pt-ink);
  border-color: var(--pt-line-strong);
}
.pt-atl-tlacts button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pt-atl-tlsep {
  flex: none;
  color: var(--pt-ink-4);
  font-size: 18px;
  line-height: 1;
}
/* Raffinage dans la piste, juste à côté du nœud « +v2 » et centré sur sa hauteur
   (align-items:center de la piste) ; bloc à largeur fixe, la piste scrolle si besoin. */
.pt-atl-raff--tl {
  flex: none;
  width: 300px;
  align-self: center;
}
.pt-atl-track {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.pt-atl-jcard {
  width: 100%;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pt-atl-jhead {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pt-atl-jhead__code {
  font-family: var(--pt-font-brand);
  font-weight: 700;
  font-size: 11px;
}
.pt-atl-jst {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--pt-ink-3);
}
.pt-atl-jst__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
/* Cadre 9:16 « contain » : pilote la hauteur (flex:1) mais ne déborde jamais la
   piste (max-width:100%) → N journaux côte à côte restent tous visibles. Ajout
   minimal au mockup (height-driven seul) pour éviter le clip à 5 journaux. */
.pt-atl-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-3);
}
.pt-atl-frame--wait {
  border-style: dashed;
  border-color: var(--pt-line-strong);
  background: var(--pt-surface-2);
}
.pt-atl-frame--run {
  border-color: var(--pt-blue);
  background: var(--pt-surface-2);
}
.pt-atl-frame--err {
  border-style: dashed;
  border-color: var(--pt-red);
  background: var(--pt-red-bg);
}
.pt-atl-frame--ok {
  cursor: zoom-in;
}
.pt-atl-frame__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pt-atl-frame__tag {
  font-family: var(--pt-font-mono);
  font-size: 8px;
  color: var(--pt-ink-4);
}
.pt-atl-frame__tag--over {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--pt-ink-2);
  padding: 1px 5px;
}
.pt-atl-frame__miniprog {
  width: 60%;
  height: 4px;
  background: var(--pt-surface-3);
  position: relative;
  overflow: hidden;
}
.pt-atl-frame__miniprog > i {
  position: absolute;
  top: 0;
  height: 100%;
  width: 40%;
  background: var(--pt-blue);
  animation: pt-atl-indef 1.1s linear infinite;
}
.pt-atl-frame__run-t {
  font-family: var(--pt-font-mono);
  font-size: 9px;
  color: var(--pt-blue);
}
.pt-atl-frame__err-b {
  font-size: 18px;
  color: var(--pt-red);
  line-height: 1;
}
.pt-atl-frame__err-t {
  font-family: var(--pt-font-mono);
  font-size: 9px;
  color: var(--pt-red);
}
.pt-atl-jactions {
  flex: none;
  display: flex;
  gap: 5px;
}
.pt-atl-jactions button,
.pt-atl-jactions a {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  padding: 5px 0;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface);
  color: var(--pt-ink-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.pt-atl-jactions button:hover,
.pt-atl-jactions a:hover {
  border-color: var(--pt-line-strong);
}
.pt-atl-jactions button:disabled,
.pt-atl-jactions a[aria-disabled="true"] {
  color: var(--pt-line-strong);
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* Navigation entre versions d'un rendu (plus récente d'abord) */
.pt-atl-vers {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pt-atl-vers__b {
  font-family: var(--pt-font-mono);
  font-size: 9px;
  padding: 2px 5px;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface);
  color: var(--pt-ink-4);
  cursor: pointer;
}
.pt-atl-vers__b:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-line-strong);
}
.pt-atl-vers__b--on {
  color: var(--pt-bg);
  background: var(--pt-ink);
  border-color: var(--pt-ink);
}

/* Boîte de raffinage : commentaire → nouvelle version */
.pt-atl-raff {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--pt-line);
  background: var(--pt-surface);
}
.pt-atl-raff__input {
  width: 100%;
  resize: none;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  color: var(--pt-ink);
  font-family: var(--pt-font-ui);
  font-size: 11px;
  line-height: 1.35;
  padding: 5px 6px;
}
.pt-atl-raff__input:focus {
  outline: none;
  border-color: var(--pt-line-strong);
}
.pt-atl-raff__input::placeholder {
  color: var(--pt-ink-4);
}
.pt-atl-raff__actions {
  display: flex;
  gap: 5px;
}
.pt-atl-raff__go {
  flex: 1;
  min-width: 0;
  text-align: center;
  background: var(--pt-red);
  color: #fff;
  border: 0;
  padding: 6px;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.pt-atl-raff__go:hover {
  background: var(--pt-red-ink);
}
.pt-atl-raff__go:disabled {
  background: var(--pt-surface-3);
  color: var(--pt-ink-4);
  cursor: not-allowed;
}
.pt-atl-raff__cancel {
  flex: none;
  background: transparent;
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-3);
  padding: 6px 9px;
  font-size: 11px;
  cursor: pointer;
}
.pt-atl-raff__cancel:hover {
  color: var(--pt-ink);
  border-color: var(--pt-line-strong);
}

@keyframes pt-atl-indef {
  0% {
    left: -38%;
  }
  100% {
    left: 100%;
  }
}

/* ---------- Lightbox : voir un rendu en grand (overlay plein écran) ---------- */
.pt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.82);
}
.pt-lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  max-height: 100%;
}
.pt-lightbox__img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  box-shadow: var(--pt-shadow-lg);
}
.pt-lightbox__cap {
  font-family: var(--pt-font-mono, "JetBrains Mono", monospace);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--pt-ink-3);
}
.pt-lightbox__close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--pt-ink-2);
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-sm);
  cursor: pointer;
}
.pt-lightbox__close:hover {
  color: var(--pt-ink);
  border-color: var(--pt-red);
}

/* ---------- Login (placeholder front, code partagé) ---------- */
/* x-cloak : masque les éléments pilotés par x-show tant qu'Alpine n'a pas
   démarré → pas de flash (login + app visibles ensemble) au chargement. */
/* x-cloak : masque les éléments x-show avant le démarrage d'Alpine (anti-flash).
   Sélecteur doublé (0,2,0) pour l'emporter sur les utilitaires Tailwind comme
   .flex (0,1,0) sans recourir à !important. */
[x-cloak][x-cloak] {
  display: none;
}
.pt-login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--pt-bg);
}
.pt-login-card {
  width: 360px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 28px 26px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-lg);
  box-shadow: var(--pt-shadow-lg);
}
.pt-login-brand {
  margin-bottom: 4px;
}
.pt-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-login-field > span {
  font-family: var(--pt-font-cond);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
}
.pt-login-field input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--pt-font-ui);
  font-size: 14px;
  color: var(--pt-ink);
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-sm);
}
.pt-login-field input:focus {
  outline: none;
  border-color: var(--pt-blue);
}
.pt-login-error {
  margin: -6px 0 0;
  font-size: 12.5px;
  color: var(--pt-red-ink);
}
.pt-login-submit {
  width: 100%;
  justify-content: center;
}

/* ---------- Entête globale (spec 2026-07-15) ---------- */
.pt-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--pt-line);
  background: var(--pt-surface);
}
.pt-topbar__spacer {
  flex: 1;
}
.pt-topbar__btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  color: var(--pt-ink-3);
  cursor: pointer;
}
.pt-topbar__btn:hover:not(:disabled) {
  color: var(--pt-ink);
  border-color: var(--pt-line-strong);
}
.pt-topbar__btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ---------- Profil connecté dans le rail ---------- */
.pt-profil {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pt-profil__avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #fff;
}
.pt-profil__infos {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.2;
  min-width: 0;
  max-width: 100%;
}
.pt-profil__nom {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-profil__poste {
  font-size: 11px;
  color: var(--pt-ink-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Profil cliquable → ouvre « Mon compte » (le logout a migré dans la topbar). */
.pt-profil {
  cursor: pointer;
  border-radius: var(--pt-r-sm);
  padding: 4px;
}
.pt-profil:hover .pt-profil__nom {
  color: var(--pt-red-ink);
}

/* ============================================================
   Hauteur unifiée des contrôles (boutons + champs) — au pixel près.
   Variable --pt-control-h (cf. :root). En fin de fichier pour l'emporter,
   par ordre source, sur les définitions plus haut (.pt-iconbtn, .pt-search
   input…). Le login (.pt-login*) reste hors périmètre (écran à part).
   ============================================================ */

/* Boutons icône (info…) — carré à la hauteur des contrôles. */
.pt-iconbtn {
  width: var(--pt-control-h);
  height: var(--pt-control-h);
}

/* Boutons Web Awesome : hauteur pilotée par la variable WA (sinon em-based). */
wa-button {
  --wa-form-control-height: var(--pt-control-h);
}

/* Champ de recherche (conteneur) à la hauteur des contrôles. */
.pt-search {
  height: var(--pt-control-h);
}

/* Champs de saisie des pages Ads (.pt-page) et Autopromo (.pt-legacy) + champs
   .pt-input des modales (injectées dans <body>, hors wrappers de page) : même
   hauteur que les boutons. Padding vertical neutralisé (py-2 Tailwind / 9px du
   champ recherche) → le texte se centre dans la hauteur fixe. type=file exclu
   (le ::file-selector-button gère sa propre hauteur). */
.pt-page
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
  [type="file"]
),
.pt-page select,
.pt-legacy
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
    [type="file"]
  ),
.pt-legacy select,
.pt-input {
  height: var(--pt-control-h);
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- Menu contextuel : clic droit sur un jour du calendrier ---------- */
.pt-daymenu {
  position: fixed;
  z-index: 1000;
  width: 236px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-md);
  box-shadow: var(--pt-shadow-lg);
}
.pt-daymenu__head {
  padding: 2px 4px;
  font-family: var(--pt-font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 11px;
  color: var(--pt-ink-3);
}
.pt-daymenu__new {
  display: flex;
  gap: 6px;
}
.pt-daymenu__new input {
  flex: 1;
  min-width: 0;
  height: var(--pt-control-h);
  padding: 0 9px;
  font-family: var(--pt-font-ui);
  font-size: 12px;
  color: var(--pt-ink);
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-sm);
}
.pt-daymenu__new input:focus {
  outline: none;
  border-color: var(--pt-blue);
}
.pt-daymenu__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 184px;
  overflow-y: auto;
  padding-top: 6px;
  border-top: 1px solid var(--pt-line);
}
.pt-daymenu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--pt-r-sm);
  font-family: var(--pt-font-ui);
  font-size: 12.5px;
  color: var(--pt-ink-2);
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.pt-daymenu__item:hover {
  background: var(--pt-surface-2);
  color: var(--pt-ink);
}
.pt-daymenu__ico {
  flex: none;
  font-size: 12px;
  color: var(--pt-ink-4);
}
.pt-daymenu__empty {
  padding: 4px 8px;
  font-size: 11.5px;
  color: var(--pt-ink-4);
}

/* ============================================================
   Archives Ads — galerie du corpus passé (images + vidéos),
   groupée par campagne, filtrable par type/ratio, + lightbox.
   ============================================================ */
.pt-arch-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pt-arch-ratios {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pt-arch-rchip {
  font-family: var(--pt-font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-ink-3);
  background: transparent;
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-pill);
  padding: 5px 12px;
  cursor: pointer;
  transition:
    color 0.12s,
    border-color 0.12s,
    background 0.12s;
}
.pt-arch-rchip:hover {
  color: var(--pt-ink);
}
.pt-arch-rchip[aria-pressed="true"] {
  color: var(--pt-ink);
  background: var(--pt-surface-3);
}

.pt-arch-group {
  margin-bottom: 28px;
}
.pt-arch-group__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-arch-group__title {
  font-size: 16px;
  text-transform: capitalize;
}
.pt-arch-group__count {
  font-size: 12px;
  color: var(--pt-ink-4);
}

.pt-arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.pt-arch-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  background: var(--pt-surface);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.14s,
    transform 0.14s,
    box-shadow 0.14s;
}
.pt-arch-card:hover {
  border-color: var(--pt-line-strong);
  transform: translateY(-2px);
  box-shadow: var(--pt-shadow-md);
}
.pt-arch-card__media {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 70% 12%, #243038 0%, #14181c 62%);
  overflow: hidden;
}
.pt-arch-card__media img,
.pt-arch-card__media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.pt-arch-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0.85;
}
.pt-arch-card:hover .pt-arch-card__play {
  opacity: 0;
}
.pt-arch-card__ratio {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--pt-r-xs);
  padding: 2px 6px;
}
.pt-arch-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
}
.pt-arch-card__variante {
  font-family: var(--pt-font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pt-ink-2);
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-arch-card__brands {
  margin-left: auto;
  display: flex;
  gap: 5px;
  flex: none;
}
.pt-arch-card__brand {
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--pt-ink-4);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-xs);
  padding: 1px 5px;
  flex: none;
}

/* ---- Lightbox (aperçu plein format) ---- */
.pt-arch-lb {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  background: rgba(8, 10, 12, 0.86);
  backdrop-filter: blur(3px);
}
.pt-arch-lb__stage {
  display: grid;
  place-items: center;
  max-width: 100%;
}
.pt-arch-lb__stage img,
.pt-arch-lb__stage video {
  max-width: min(92vw, 1100px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--pt-r-md);
  box-shadow: var(--pt-shadow-lg);
}
.pt-arch-lb__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--pt-ink-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-sm);
  cursor: pointer;
}
.pt-arch-lb__close:hover {
  color: var(--pt-ink);
}
.pt-arch-lb__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--pt-ink-2);
}
.pt-arch-lb__meta .pt-display {
  font-size: 15px;
  text-transform: capitalize;
}
.pt-arch-lb__sub {
  font-size: 12px;
  color: var(--pt-ink-4);
}

/* ===== Sélection timeline → export / déclinaison ===== */
.pt-atl-declsel {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  cursor: pointer;
}
.pt-atl-declsel--off {
  opacity: 0.3;
  cursor: not-allowed;
}
.pt-atl-declsel input {
  width: 15px;
  height: 15px;
  accent-color: var(--pt-red);
  cursor: inherit;
}
/* Case par création : superposée, ancrée en haut à droite du visuel (ne décale
   plus l'image — l'ancien inline-flex la posait à côté dans le flex du nœud). */
.pt-atl-declsel--node {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  margin: 0;
  padding: 0;
}
.pt-atl-declsel--node input {
  display: block;
}
.pt-atl-declbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
}
.pt-atl-declbar__n {
  font-size: 12px;
  color: var(--pt-ink-2);
}
.pt-atl-declbar__spacer {
  flex: 1;
}
.pt-atl-declbar__go {
  padding: 7px 16px;
  background: var(--pt-red);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.pt-atl-declbar__go:hover {
  filter: brightness(1.08);
}

/* ===== Page Déclinaison ===== */
.pt-decl-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.pt-decl-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-decl-title {
  flex: 1;
  margin: 0;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 18px;
  color: var(--pt-ink);
}
/* Slider GLOBAL de taille des miniatures (en-tête déclinaison). Encadré de deux
   icônes image (petite / grande). Coins nets, tokens --pt-* uniquement. */
.pt-decl-rowh {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pt-decl-rowh__ico {
  color: var(--pt-ink-3);
}
.pt-decl-rowh__ico--sm {
  font-size: 12px;
}
.pt-decl-rowh__ico--lg {
  font-size: 18px;
}
.pt-decl-rowh__range {
  width: 110px;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--pt-line-strong);
  cursor: pointer;
}
.pt-decl-rowh__range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--pt-red);
  border: none;
}
.pt-decl-rowh__range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--pt-red);
  border: none;
}
.pt-decl-i {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--pt-line-strong);
  background: none;
  color: var(--pt-ink-3);
  font-style: italic;
  cursor: pointer;
}

/* ---- Roue déclinaison : panneau de réglages condensé (moteur + chips) ----
   Un toggle moteur (.pt-seg) en tête, puis SEULS les réglages du moteur choisi,
   en chips qui wrappent. État actif = surface-3 (jamais rouge : règle SSOT). */
.pt-decl-set {
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.pt-decl-set__row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pt-decl-set__lab {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
.pt-decl-set__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pt-decl-chip {
  padding: 4px 10px;
  font-family: var(--pt-font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--pt-ink-3);
  border: 1px solid var(--pt-line-strong);
  border-radius: var(--pt-r-sm);
  transition:
    background 0.14s,
    color 0.14s,
    border-color 0.14s;
}
.pt-decl-chip:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-ink-4);
}
.pt-decl-chip[aria-pressed="true"] {
  background: var(--pt-surface-3);
  color: var(--pt-ink);
}
.pt-decl-set__ta {
  width: 100%;
  background: var(--pt-surface-2);
  color: var(--pt-ink);
  border: 1px solid var(--pt-line);
  border-radius: 0;
  font-family: var(--pt-font-mono);
  font-size: 11px;
  padding: 6px;
  resize: vertical;
}
.pt-decl-set__note {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--pt-ink-4);
}
.pt-decl-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.pt-decl-cat {
  width: 300px;
  flex: none;
  overflow-y: auto;
  border-right: 1px solid var(--pt-line);
  padding: 12px;
}
.pt-decl-cat__h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pt-decl-cat__t {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--pt-ink);
}
.pt-decl-cat__n {
  font-size: 11px;
  color: var(--pt-ink-3);
}
.pt-decl-grp {
  margin-bottom: 12px;
}
.pt-decl-grp__h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--pt-line);
  margin-bottom: 4px;
}
.pt-decl-grp__t {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-ink-2);
}
.pt-decl-grp__n {
  font-size: 10px;
  color: var(--pt-ink-3);
}
.pt-decl-grp__all {
  background: none;
  border: none;
  color: var(--pt-ink-3);
  font-size: 10px;
  text-transform: uppercase;
  cursor: pointer;
}
.pt-decl-grp__all:hover {
  color: var(--pt-ink);
}
.pt-decl-fmt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  cursor: pointer;
}
.pt-decl-fmt input {
  width: 14px;
  height: 14px;
  accent-color: var(--pt-ink);
}
.pt-decl-fmt__l {
  flex: 1;
  font-size: 12px;
  color: var(--pt-ink-2);
}
.pt-decl-fmt__d {
  font-size: 11px;
  color: var(--pt-ink-3);
}
.pt-decl-grid {
  flex: 1;
  overflow: auto;
  padding: 16px;
}
.pt-decl-empty {
  color: var(--pt-ink-3);
  font-size: 13px;
  padding: 24px;
}
/* ===== Page Déclinaison — grille ===== */
.pt-decl-row {
  border-bottom: 1px solid var(--pt-line);
  padding: 12px 0;
}
.pt-decl-row__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pt-decl-row__code {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 15px;
}
.pt-decl-row__nom {
  flex: 1;
  font-size: 12px;
  color: var(--pt-ink-3);
}
.pt-decl-row__gen {
  background: none;
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}
.pt-decl-row__gen:hover:not(:disabled) {
  color: var(--pt-ink);
}
.pt-decl-row__gen:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pt-decl-track {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.pt-decl-cell {
  position: relative;
  flex: none;
  /* La largeur suit la miniature (.pt-decl-ph), elle-même dérivée de la hauteur
     réglée × l'aspect-ratio. Plus de largeur fixe. */
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pt-decl-ph {
  /* Hauteur pilotée GLOBALEMENT par le slider de l'en-tête (CSS var posée sur
     .pt-decl-page) ; la largeur suit l'aspect-ratio inline de chaque cellule.
     Repli 120px si la var n'est pas posée. */
  height: var(--decl-row-h, 120px);
  width: auto;
  background: var(--pt-surface-2);
  border: 1px dashed var(--pt-line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pt-decl-ph--src {
  border-style: solid;
}
.pt-decl-ph--src img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pt-decl-ph--done {
  border-style: solid;
  border-color: var(--pt-line-strong);
  background: var(--pt-surface-3, var(--pt-surface-2));
}
.pt-decl-ph__v {
  font-size: 13px;
  color: var(--pt-ink-2);
}
.pt-decl-ph__gen {
  background: none;
  border: none;
  color: var(--pt-ink-3);
  font-size: 11px;
  cursor: pointer;
}
.pt-decl-ph__gen:hover {
  color: var(--pt-ink);
}
/* Bouton « + » en fin de piste : ajouter / retirer des formats de la ligne.
   Contrôle secondaire discret (jamais rouge). Hérite de .pt-decl-ph pour la
   hauteur pilotée + le cadre pointillé ; on neutralise le style natif du bouton
   et on pose un « + » sobre en ink-3, qui s'éclaire au survol. */
.pt-decl-ph__add {
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--pt-ink-3);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.pt-decl-ph__add:hover {
  color: var(--pt-ink);
  border-color: var(--pt-ink-3);
}
.pt-decl-cell__lab {
  font-size: 10px;
  color: var(--pt-ink-3);
  text-align: center;
  line-height: 1.2;
}
.pt-decl-cell__d {
  font-size: 10px;
  color: var(--pt-ink-4, var(--pt-ink-3));
}
.pt-decl-cell__re {
  background: none;
  border: none;
  color: var(--pt-ink-3);
  font-size: 10px;
  text-transform: uppercase;
  cursor: pointer;
}
.pt-decl-cell__re:hover {
  color: var(--pt-ink);
}
.pt-decl-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--pt-line);
}
.pt-decl-foot__n {
  font-size: 12px;
  color: var(--pt-ink-2);
}
.pt-decl-foot__spacer {
  flex: 1;
}

/* ===== Page PNG — barre d'actions fixe, seul le feed défile ===== */
.pt-png-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pt-png-bar {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pt-line);
}

/* ===== Labo POC ===== */
.pt-poc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}
.pt-poc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
}
.pt-poc-card--wide {
  grid-column: 1 / -1;
}
.pt-poc-card__t {
  margin: 0;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 15px;
  color: var(--pt-ink);
}
.pt-poc-card__src {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--pt-ink-3);
  text-transform: none;
}
.pt-poc-in,
.pt-poc-sel,
.pt-poc-file {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  padding: 7px 9px;
  font-size: 13px;
}
.pt-poc-in {
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}
.pt-poc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pt-poc-sel {
  flex: 1;
  min-width: 0;
}
.pt-poc-lab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--pt-ink-3);
}
.pt-poc-hint {
  font-size: 11px;
  color: var(--pt-ink-3);
}
.pt-poc-go {
  margin-left: auto;
  padding: 7px 16px;
  background: var(--pt-red);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.pt-poc-go:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pt-poc-go:not(:disabled):hover {
  filter: brightness(1.08);
}
.pt-poc-out {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--pt-line);
}
.pt-poc-img,
.pt-poc-vid {
  max-width: 100%;
  border: 1px solid var(--pt-line);
}
.pt-poc-audio {
  width: 100%;
}
.pt-poc-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--pt-ink-2);
}
.pt-poc-dl {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.pt-poc-dl:hover {
  color: var(--pt-ink);
}
.pt-poc-err {
  margin: 0;
  color: var(--pt-red);
  font-size: 12px;
}

/* ===== Déclinaison — états de cellule (rendu réel) ===== */
.pt-decl-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Cellule rendue cliquable : ouvre la lightbox globale au clic + bouton
   « agrandir » au survol (réutilise le câblage de l'écran Création). */
.pt-decl-ph--zoomable {
  cursor: zoom-in;
}
.pt-decl-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
.pt-decl-img-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pt-decl-ph__zoom {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--pt-line-strong);
  background: var(--pt-surface);
  color: var(--pt-ink);
  cursor: zoom-in;
  opacity: 0;
  transition: opacity 120ms ease;
}
.pt-decl-ph:hover .pt-decl-ph__zoom,
.pt-decl-ph:focus-within .pt-decl-ph__zoom {
  opacity: 1;
}
.pt-decl-ph__diff {
  font-size: 10px;
  color: var(--pt-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pt-decl-ph__err {
  font-size: 11px;
  color: var(--pt-ink-2);
  text-transform: uppercase;
}
.pt-decl-ph__spin {
  display: inline-block;
  width: 60%;
  height: 3px;
  background: var(--pt-line-strong);
  overflow: hidden;
  position: relative;
}
.pt-decl-ph__spin i {
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--pt-ink-2);
  animation: pt-decl-spin 1.1s ease-in-out infinite;
}
@keyframes pt-decl-spin {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

/* Indicateur « en cours » — spinner neutre + chrono écoulé (pas de rouge,
   réservé à l'action). */
.pt-decl-jauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pt-decl-jauge__spin {
  font-size: 20px;
  color: var(--pt-ink-2);
}
.pt-decl-jauge__lab {
  font-size: 10px;
  color: var(--pt-ink-2);
  line-height: 1;
}

/* ===== Écran Italiques ===== */
.pt-ital-date {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  padding: 4px 8px;
  font-size: 13px;
}
/* Carrousel de dates (port du composant Angular, habillage PT, coins nets) */
.pt-ital-car {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.pt-ital-car-chev {
  flex-shrink: 0;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  width: 24px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.pt-ital-car-chev:hover {
  background: var(--pt-surface-2);
}
.pt-ital-car-wrap {
  position: relative;
  overflow: hidden;
  width: 320px;
}
.pt-ital-car-track {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  touch-action: pan-x;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
}
.pt-ital-car-track::-webkit-scrollbar {
  display: none;
}
.pt-ital-car-track::before,
.pt-ital-car-track::after {
  content: "";
  flex-shrink: 0;
  width: calc(50% - 29px);
}
.pt-ital-car-item {
  flex-shrink: 0;
  min-width: 58px;
  padding: 4px 6px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  white-space: nowrap;
  scroll-snap-align: center;
  color: var(--pt-ink);
  background: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.pt-ital-car-item:hover {
  background: var(--pt-surface);
}
.pt-ital-car-item--today {
  border-color: var(--pt-line-strong);
}
.pt-ital-car-item--on .pt-ital-car-date {
  font-weight: 700;
}
.pt-ital-car-jour {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pt-ink-2);
}
.pt-ital-car-date {
  font-size: 12px;
  line-height: 1.2;
}
.pt-ital-car-frame {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  border: 2px solid var(--pt-line-strong);
  pointer-events: none;
  z-index: 1;
}
.pt-ital-car-picker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
}
.pt-ital-car-calwrap {
  position: relative;
  flex-shrink: 0;
}
.pt-ital-car-cal {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  width: 30px;
  height: 30px;
  cursor: pointer;
  pointer-events: none;
  font-size: 14px;
}
.pt-ital-car-calinput {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.pt-ital-car-calinput::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.pt-ital-nav {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
  padding: 14px 18px;
}
.pt-ital-col {
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  max-height: 230px;
  overflow-y: auto;
}
.pt-ital-col__t {
  position: sticky;
  top: 0;
  background: var(--pt-surface-2);
  padding: 8px 10px;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--pt-ink-2);
  border-bottom: 1px solid var(--pt-line);
}
.pt-ital-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--pt-line);
  color: var(--pt-ink);
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}
.pt-ital-item:hover {
  background: var(--pt-surface);
}
.pt-ital-item--on {
  background: var(--pt-surface);
  box-shadow: inset 3px 0 0 var(--pt-red);
}
.pt-ital-quinte {
  margin-left: auto;
  background: var(--pt-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
}
.pt-ital-horse,
.pt-ital-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--pt-line);
  font-size: 13px;
}
.pt-ital-horse__rk,
.pt-ital-row__rk {
  color: var(--pt-ink-2);
  min-width: 22px;
}
.pt-ital-horse__jk {
  margin-left: auto;
  color: var(--pt-ink-3);
  font-size: 12px;
}
.pt-ital-prod {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.9fr;
  gap: 12px;
  padding: 0 18px 18px;
}
.pt-ital-zone {
  border: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.pt-ital-zone__t {
  margin: 0;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--pt-ink);
}
.pt-ital-row__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pt-ital-row__nom {
  font-weight: 600;
}
.pt-ital-row__txt {
  margin: 0;
  color: var(--pt-ink-2);
  font-size: 12px;
}
.pt-ital-check input {
  accent-color: var(--pt-red);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.pt-ital-text,
.pt-ital-sel {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  padding: 8px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.pt-ital-text {
  resize: vertical;
}
.pt-ital-voixrow {
  display: flex;
  gap: 8px;
}
.pt-ital-go {
  align-self: flex-start;
  padding: 7px 16px;
  background: var(--pt-red);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.pt-ital-go:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pt-ital-video,
.pt-ital-audio {
  width: 100%;
}
.pt-ital-novideo {
  border: 1px dashed var(--pt-line-strong);
  padding: 20px;
  text-align: center;
  color: var(--pt-ink-3);
  font-size: 13px;
}
.pt-ital-empty {
  color: var(--pt-ink-3);
  font-size: 13px;
  margin: 0;
}

/* --- Déclinaison v2 : sous-blocs plateforme (RS) + badge média --- */
.pt-decl-plat {
  margin-bottom: 2px;
}
.pt-decl-plat__h {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 3px 0 3px 4px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.pt-decl-plat__chev {
  width: 12px;
  font-size: 10px;
  color: var(--pt-ink-3);
}
.pt-decl-plat__t {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--pt-ink-2);
}
.pt-decl-plat__n {
  font-size: 10px;
  color: var(--pt-ink-3);
}
.pt-decl-plat__body {
  padding-left: 16px;
}
.pt-decl-media {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-3);
}
.pt-decl-media--vid {
  background: var(--pt-surface-2);
  color: var(--pt-ink-2);
}

/* --- Déclinaison v3 : formats par ligne (Ajouter / retirer) + modale --- */
.pt-decl-zoom {
  cursor: zoom-in;
}
.pt-decl-row__add {
  background: none;
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}
.pt-decl-row__add:hover {
  color: var(--pt-ink);
  border-color: var(--pt-ink-3);
}
.pt-decl-row__vide {
  font-size: 11px;
  color: var(--pt-ink-3);
  padding: 8px 2px;
}
/* Bouton « retirer » superposé en haut-droite de la cellule (ne décale pas). */
.pt-decl-cell__x {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 18px;
  height: 18px;
  line-height: 1;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pt-decl-cell:hover .pt-decl-cell__x {
  opacity: 1;
}
.pt-decl-cell__x:hover {
  /* Survol neutre (jamais le rouge primaire CTA, réservé action/live/primaire) :
     contrôle secondaire discret, cohérent avec .pt-decl-ph__add. */
  color: var(--pt-ink);
  border-color: var(--pt-ink-3);
}
.pt-decl-grp__body {
  padding: 2px 0 4px;
}
.pt-decl-grp__vide {
  font-size: 11px;
  color: var(--pt-ink-4, var(--pt-ink-3));
  padding: 4px 2px;
}
.pt-decl-grp--off .pt-decl-grp__t,
.pt-decl-fmt--off {
  opacity: 0.5;
}
.pt-decl-fmt--off {
  cursor: not-allowed;
}

/* Modale « Ajouter des formats » */
.pt-decl-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 24px;
}
.pt-decl-modal__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  background: var(--pt-surface-1, var(--pt-surface-2));
  border: 1px solid var(--pt-line-strong);
}
.pt-decl-modal__h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-decl-modal__t {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--pt-ink);
}
.pt-decl-modal__sub {
  font-size: 12px;
  color: var(--pt-ink-3);
}
.pt-decl-modal__spacer {
  flex: 1;
}
.pt-decl-modal__close {
  width: 24px;
  height: 24px;
  line-height: 1;
  padding: 0;
  background: none;
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  font-size: 15px;
  cursor: pointer;
}
.pt-decl-modal__close:hover {
  color: var(--pt-ink);
}
.pt-decl-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}
.pt-decl-modal__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--pt-line);
}
.pt-decl-modal__cnt {
  font-size: 12px;
  color: var(--pt-ink-2);
}

/* ===== Italiques — refonte « Voix » (handoff Claude Design, scopé .pt-ital) ===== */
/* Densité : la maquette pose les tailles en px inline (non surchargeables sans
   !important) → un léger dézoom global ramène toute la fenêtre à l'échelle de
   l'app. Réglable d'un seul cran (0.85 = plus petit, 0.95 = plus grand). */
.pt-ital {
  zoom: 0.9;
}
.pt-ital .card {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
}
.pt-ital .card-h {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pt-line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pt-ital .nav-li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--pt-line);
  cursor: pointer;
  transition: background 0.12s;
}
.pt-ital .nav-li:hover {
  background: var(--pt-surface-2);
}
.pt-ital .nav-li--on {
  background: var(--pt-surface-2);
  box-shadow: inset 3px 0 0 var(--pt-red);
}
.pt-ital .v-disp {
  font-family: var(--pt-font-display, "Oswald", sans-serif);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pt-ink);
}
.pt-ital .v-eyebrow {
  font-family: var(--pt-font-cond, "Oswald", sans-serif);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pt-ink-3);
}
.pt-ital .v-mono {
  font-family: var(--pt-font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
}
.pt-ital .v-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  padding: 7px 12px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 2px;
  transition: 0.14s;
}
.pt-ital .v-chip--on {
  background: var(--pt-ink);
  color: var(--pt-bg);
  border-color: var(--pt-ink);
}
.pt-ital .v-chip:hover {
  border-color: var(--pt-ink-3);
  color: var(--pt-ink);
}
.pt-ital .v-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--pt-surface-2);
  color: var(--pt-ink-3);
}
.pt-ital .v-pill--ok {
  background: var(--pt-green-bg);
  color: var(--pt-green-ink);
}
.pt-ital .v-pill--run {
  background: var(--pt-blue-bg);
  color: var(--pt-blue-ink);
}
.pt-ital .v-pill--err {
  background: var(--pt-red-bg);
  color: var(--pt-red-ink);
}
.pt-ital .v-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pt-ital .v-x {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-4);
  cursor: pointer;
  font-size: 13px;
  border-radius: 2px;
  transition: 0.14s;
}
.pt-ital .v-x:hover {
  border-color: var(--pt-red);
  color: var(--pt-red-ink);
}
.pt-ital .v-play {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  cursor: pointer;
  border-radius: 2px;
  transition: 0.14s;
}
.pt-ital .v-play--on {
  background: var(--pt-ink);
  color: var(--pt-bg);
  border-color: var(--pt-ink);
}
.pt-ital .v-play:hover {
  border-color: var(--pt-ink-3);
}
.pt-ital .v-keep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 700;
  font-size: 11px;
  padding: 6px 9px;
  background: transparent;
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink-2);
  cursor: pointer;
  border-radius: 2px;
  transition: 0.14s;
  white-space: nowrap;
}
.pt-ital .v-keep--on {
  background: var(--pt-red);
  border-color: var(--pt-red);
  color: #fff;
}
.pt-ital .v-keep:hover {
  border-color: var(--pt-ink-3);
  color: var(--pt-ink);
}
.pt-ital .v-split {
  display: flex;
}
.pt-ital .v-split > button {
  background: var(--pt-red);
  color: #fff;
  border: 0;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.pt-ital .v-split > button:first-child {
  padding: 10px 16px;
}
.pt-ital .v-split > button:last-child {
  padding: 10px 9px;
  border-left: 1px solid rgba(0, 0, 0, 0.28);
}
.pt-ital .v-split > button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.pt-ital .v-row {
  display: grid;
  grid-template-columns: 36px 1.5fr 1.7fr 60px 104px 108px 30px;
  gap: 14px;
  align-items: center;
}
.pt-ital .v-track {
  height: 3px;
  background: var(--pt-line-strong);
  position: relative;
}
.pt-ital .v-track > i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--pt-ink-3);
}
.pt-ital .v-ind {
  height: 3px;
  background: var(--pt-line);
  overflow: hidden;
  position: relative;
}
.pt-ital .v-ind > i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34%;
  background: var(--pt-blue);
  animation: vslide 1.1s ease-in-out infinite;
}
@keyframes vslide {
  0% {
    left: -34%;
  }
  100% {
    left: 100%;
  }
}

/* ===== Italiques — export ffmpeg (bouton + modale + progression) ===== */
.pt-ital .v-export {
  display: inline-flex;
  align-items: center;
  background: var(--pt-red);
  color: #fff;
  border: 1px solid var(--pt-red);
  font-family: var(--pt-font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 2px;
}
.pt-ital .v-export:disabled {
  background: transparent;
  color: var(--pt-ink-4);
  border-color: var(--pt-line-strong);
  cursor: not-allowed;
}
.pt-ital .v-export:not(:disabled):hover {
  filter: brightness(1.08);
}
.pt-ital-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.66);
  display: grid;
  place-items: center;
  padding: 24px;
}
.pt-ital-modal-box {
  width: min(640px, 94vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.pt-ital-modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pt-line);
}
.pt-ital-prog {
  height: 8px;
  background: var(--pt-line);
  border-radius: 2px;
  overflow: hidden;
}
.pt-ital-prog > i {
  display: block;
  height: 100%;
  background: var(--pt-red);
  transition: width 0.3s ease;
}
.pt-ital-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 248px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line-strong);
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 12px 13px;
}
.pt-ital-sel {
  width: 100%;
  margin-top: 4px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  color: var(--pt-ink);
  font-family: var(--pt-font-ui);
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 2px;
}

/* ===== Italiques — timeline de montage (fenêtres éditables) ===== */
.pt-tl-track {
  position: relative;
  height: 42px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  border-radius: 3px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.pt-tl-track--audio {
  height: 30px;
}
.pt-tl-seg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  min-width: 16px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-ink-3);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  overflow: hidden;
}
.pt-tl-seg:active {
  cursor: grabbing;
}
.pt-tl-lbl {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  color: var(--pt-ink-2);
  white-space: nowrap;
  pointer-events: none;
  padding: 0 4px;
}
.pt-tl-h {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9px;
  cursor: ew-resize;
  background: var(--pt-ink-3);
  opacity: 0.45;
}
.pt-tl-h--l {
  left: 0;
}
.pt-tl-h--r {
  right: 0;
}
.pt-tl-h:hover {
  opacity: 0.9;
}
.pt-tl-audio {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  background: var(--pt-surface);
  border: 1px solid var(--pt-blue);
  border-left: 3px solid var(--pt-blue);
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  overflow: hidden;
}
/* Curseur de survol : barre rouge verticale qui suit la souris sur la piste
   (repère de lecture/position — rouge = live, pas décoratif). */
.pt-tl-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--pt-red);
  pointer-events: none;
  z-index: 5;
}
/* Sablier « génération en cours » : pulsation douce (bouton Résumé + prises). */
.pt-ital .pt-spin {
  animation: pt-spin-pulse 1.1s ease-in-out infinite;
}
@keyframes pt-spin-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}
/* Graduations de secondes : fins traits verticaux en fond de piste. */
.pt-tl-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--pt-line);
  opacity: 0.55;
  pointer-events: none;
}
/* Règle des secondes sous la piste (labels mono centrés sur le trait). */
.pt-tl-ruler {
  position: relative;
  height: 13px;
  margin-top: 3px;
}
.pt-tl-ruler-lbl {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--pt-font-mono);
  font-size: 9px;
  color: var(--pt-ink-4);
  white-space: nowrap;
}
/* Bouton supprimer une fenêtre — coin haut-droit INTÉRIEUR (le track est en
   overflow:hidden), au-dessus des poignées ; visible au survol du segment. */
.pt-tl-del {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line-strong);
  border-radius: 2px;
  color: var(--pt-ink-3);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 4;
}
.pt-tl-seg:hover .pt-tl-del {
  opacity: 1;
}
.pt-tl-del:hover {
  color: var(--pt-red-ink);
  border-color: var(--pt-red);
}

/* ============================================================================
   Console « Sessions live » — panneau rétractable (bord droit) qui agrège les
   runs en cours (autopromo agentique + rendus Ads). Dark-only, tokens --pt-*.
   Rouge réservé au live/erreur (badge, point, statut) — jamais décoratif.
   ============================================================================ */

/* Bouton d'ouverture — injecté dans chaque en-tête, à droite du « I ».
   Réutilise la classe du bouton « I » de la page (pt-iconbtn / pt-decl-i / inline)
   pour la MÊME hauteur et le MÊME alignement ; n'ajoute que le badge en pastille. */
.pt-console-btn {
  position: relative;
}
.pt-console-btn__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 9px;
  line-height: 1;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  background: var(--pt-red);
  color: #fff;
  border-radius: 7px;
  pointer-events: none;
}

/* Drawer. */
.pt-console {
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: 92vw;
  background: var(--pt-surface);
  border-left: 1px solid var(--pt-line-strong);
}
.pt-console--overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  box-shadow: -14px 0 34px rgba(0, 0, 0, 0.4);
}
/* Ancré : enfant flex en flux → pousse le <main>. */
.pt-console--docked {
  position: relative;
  flex: none;
  box-shadow: none;
}

.pt-console__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--pt-line);
  background: var(--pt-surface-2);
}
.pt-console__title {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pt-ink-2);
}
.pt-console__spacer {
  flex: 1;
}
.pt-console__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--pt-ink-4);
  text-transform: uppercase;
}
.pt-console__livedot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pt-green);
  animation: pt-pulse 1.2s ease-in-out infinite;
}
.pt-console__live--off {
  color: var(--pt-red);
}
.pt-console__live--off .pt-console__livedot {
  background: var(--pt-red);
  animation: none;
}
.pt-console__btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  color: var(--pt-ink-3);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.pt-console__btn:hover {
  color: var(--pt-ink-2);
  border-color: var(--pt-line-strong);
}
.pt-console__btn--on {
  color: var(--pt-ink);
  border-color: var(--pt-ink-3);
  background: var(--pt-surface-3);
}

.pt-console__body {
  flex: 1;
  overflow-y: auto;
  padding: 5px 0 12px;
}
.pt-console__section + .pt-console__section {
  margin-top: 5px;
  border-top: 1px solid var(--pt-line);
  padding-top: 5px;
}
.pt-console__legend {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
  padding: 5px 12px 3px;
}
.pt-console__empty {
  font-size: 10.5px;
  color: var(--pt-ink-4);
  padding: 4px 12px 9px;
}

.pt-console__row {
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
}
/* Ligne du haut : point + texte + heure. Les zones log/err/prompt passent en
   dessous, EN PLEINE LARGEUR (jusqu'au bord droit, sous l'heure). */
.pt-console__rowhead {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
/* Zones pleine largeur sous l'en-tête : indentées sous le texte (point 7px +
   gap 8px), étendues jusqu'au bord droit (au-delà de l'heure). */
.pt-console__log,
.pt-console__err,
.pt-console__promptbtn,
.pt-console__prompt {
  margin-left: 15px;
}
.pt-console__row + .pt-console__row {
  border-top: 1px solid color-mix(in srgb, var(--pt-line) 55%, transparent);
}
.pt-console__row--active {
  background: var(--pt-surface-2);
}
.pt-console__dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--pt-ink-4);
}
.pt-console__dot--live {
  background: var(--pt-red);
  animation: pt-pulse 1.2s ease-in-out infinite;
}
.pt-console__main {
  flex: 1;
  min-width: 0;
}
.pt-console__line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.pt-console__kind {
  flex: none;
  font-family: var(--pt-font-display);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  padding: 1px 4px;
}
.pt-console__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pt-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-console__detail {
  font-family: var(--pt-font-mono);
  font-size: 9.5px;
  color: var(--pt-ink-3);
  margin-top: 2px;
  word-break: break-word;
}
.pt-console__err {
  font-family: var(--pt-font-mono);
  font-size: 9.5px;
  color: var(--pt-red);
  margin-top: 2px;
  word-break: break-word;
}
.pt-console__chrono {
  flex: none;
  font-family: var(--pt-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--pt-ink-3);
  margin-top: 1px;
}
/* Mini-log live : lignes de progression (artefacts) sous une session active. */
.pt-console__log {
  margin-top: 4px;
  padding: 4px 7px;
  border-left: 2px solid var(--pt-line-strong);
  background: var(--pt-surface-3);
  border-radius: 0 var(--pt-r-sm) var(--pt-r-sm) 0;
}
.pt-console__logline {
  font-family: var(--pt-font-mono);
  font-size: 9px;
  line-height: 1.5;
  color: var(--pt-ink-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-console__logline:last-child {
  color: var(--pt-ink-2);
}
/* Prompt agentique de la session — repliable, scrollable. */
.pt-console__promptbtn {
  margin-top: 4px;
  padding: 0;
  background: none;
  border: none;
  color: var(--pt-blue);
  font-family: var(--pt-font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  cursor: pointer;
  /* Ancré à gauche : sinon le bouton s'étire (colonne flex) et son texte se
     centre. align-self le réduit à son contenu, text-align cale le libellé. */
  align-self: flex-start;
  text-align: left;
}
.pt-console__promptbtn:hover {
  color: var(--pt-blue-ink);
}
.pt-console__prompt {
  margin-top: 4px;
  max-height: 200px;
  overflow: auto;
  padding: 6px 8px;
  background: var(--pt-surface-3);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  font-family: var(--pt-font-mono);
  font-size: 9px;
  line-height: 1.5;
  color: var(--pt-ink-3);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Déclinaison — menus moteur (split-button) + pastille moteur */
.pt-decl-ph__gen-wrap,
.pt-decl-cell__re-wrap,
.pt-decl-row__gen-wrap,
.pt-decl-foot__tout {
  position: relative;
  display: inline-flex;
}
/* Actions sous les cartes (Régénérer · Télécharger…) : aérées — vaut pour les
   écrans déclinaison, Décliner un PNG et Décliner en vidéo. */
.pt-decl-cell__re-wrap {
  gap: 12px;
}
.pt-decl-moteur-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
}
.pt-modes__hint {
  display: block;
  font-size: 10px;
  color: var(--pt-ink-4);
}
.pt-decl-moteur {
  display: inline-block;
  margin-top: 2px;
  padding: 0 6px;
  font-family: var(--pt-font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-3);
}
.pt-decl-moteur--banana {
  color: var(--pt-ink);
  border-color: var(--pt-ink-3);
}

/* ============================================================
   COPILOTE — fil de chat conversationnel (éditeur)
   Colonne gauche à onglets Chat / Déclinaisons. Bulles user
   (droite) / assistant (gauche), cartes-variantes cliquables,
   composer. Tokens --pt-* uniquement, dark-only. Rouge --pt-red
   réservé accent d'action (bord de carte, bouton envoyer, filet
   d'onglet actif) — jamais fond décoratif. L'indicateur
   « réfléchit… » réutilise .pt-atl-dots (défini plus haut).
   ============================================================ */

/* ---- Conteneur racine du copilote (colonne à onglets) ---- */
.pt-copilote {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* ---- Onglets Chat / Déclinaisons ---- */
.pt-copilote__tabs {
  display: flex;
  gap: 2px;
  flex: none;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--pt-line);
}
.pt-copilote__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--pt-ink-3);
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    color 0.14s,
    border-color 0.14s;
}
.pt-copilote__tab:hover {
  color: var(--pt-ink-2);
}
.pt-copilote__tab--active {
  color: var(--pt-ink);
  border-bottom-color: var(--pt-red);
}

/* ---- Conteneur colonne du chat ---- */
.pt-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* ---- Corps scrollable du fil ---- */
.pt-chat__fil {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
}

/* ---- Message (rangée) : user à droite, assistant à gauche ---- */
.pt-chat__msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 88%;
}
.pt-chat__msg--user {
  align-self: flex-end;
  align-items: flex-end;
}
.pt-chat__msg--assistant,
.pt-chat__msg--error {
  align-self: flex-start;
  align-items: flex-start;
}

/* ---- Bulle de texte ---- */
.pt-chat__bulle {
  padding: 9px 12px;
  border-radius: var(--pt-r-md);
  font-family: var(--pt-font-ui);
  font-size: 13px;
  line-height: 1.45;
  color: var(--pt-ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.pt-chat__msg--user .pt-chat__bulle {
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
}
.pt-chat__msg--assistant .pt-chat__bulle {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  color: var(--pt-ink-2);
}
/* Bulle d'erreur (échec Gemini) : filet gauche rouge discret, pas de fond rouge. */
.pt-chat__msg--error .pt-chat__bulle {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  box-shadow: inset 3px 0 0 var(--pt-red);
  color: var(--pt-ink-3);
}

/* ---- Cartes-variantes sous un message assistant ---- */
.pt-chat__variantes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.pt-vcard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  border-left: 2px solid var(--pt-red);
  border-radius: var(--pt-r-sm);
  transition:
    border-color 0.14s,
    background 0.14s,
    box-shadow 0.14s;
}
.pt-vcard:hover {
  background: var(--pt-surface-3);
  border-color: var(--pt-line-strong);
  border-left-color: var(--pt-red);
  box-shadow: var(--pt-shadow-sm);
}
.pt-vcard__accroche {
  font-family: var(--pt-font-display);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.15;
  color: var(--pt-ink);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.pt-vcard__sous {
  font-size: 12px;
  line-height: 1.35;
  color: var(--pt-ink-2);
}
.pt-vcard__cta {
  font-family: var(--pt-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
/* Badge « utilisée » (span interne) : petit label discret sous la carte appliquée. */
.pt-vcard__used {
  font-family: var(--pt-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
/* État « utilisée » sur le BOUTON .pt-vcard : variante déjà appliquée à l'active —
   atténuée, accent rouge éteint (l'action a été consommée). Reste cliquable
   (ré-application). Ciblé via .pt-vcard.pt-vcard__used pour ne pas toucher le badge. */
.pt-vcard.pt-vcard__used {
  opacity: 0.55;
  border-left-color: var(--pt-line-strong);
}
.pt-vcard.pt-vcard__used:hover {
  opacity: 0.75;
  border-left-color: var(--pt-line-strong);
}
.pt-vcard.pt-vcard__used .pt-vcard__accroche {
  color: var(--pt-ink-3);
}

/* ---- Composer (textarea + bouton envoyer) ---- */
.pt-chat__composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--pt-line);
  background: var(--pt-surface);
}
.pt-chat__input {
  flex: 1;
  min-height: var(--pt-control-h);
  max-height: 140px;
  resize: none;
  padding: 8px 10px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  color: var(--pt-ink);
  font-family: var(--pt-font-ui);
  font-size: 13px;
  line-height: 1.4;
}
.pt-chat__input::placeholder {
  color: var(--pt-ink-4);
}
.pt-chat__input:focus {
  outline: none;
  border-color: var(--pt-line-strong);
}
/* Bouton envoyer : rouge plein (accent d'action). Le #fff sur --pt-red est
   conforme au précédent du fichier (boutons rouges existants). */
.pt-chat__send {
  flex: none;
  height: var(--pt-control-h);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pt-red);
  color: #fff;
  border: 0;
  border-radius: var(--pt-r-sm);
  cursor: pointer;
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 12px;
  transition: background 0.14s;
}
.pt-chat__send:hover:not(:disabled) {
  background: var(--pt-red-ink);
}
.pt-chat__send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---- Champs de la déclinaison active (colonne droite, au-dessus du plan) ---- */
.pt-active {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-md);
  margin-bottom: 12px;
}
.pt-active__label {
  font-family: var(--pt-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
.pt-active__fields {
  display: grid;
  gap: 8px;
}

/* Modale de sélection des journaux : lignes à cocher enrichies. La « case »
   est un carré piloté par aria-pressed (pas de <input> natif → pas de revert
   visuel quand une confirmation de retrait est annulée). Barre d'accent à
   gauche = identité du journal (couleur `--j-accent` posée en inline). */
.pt-journaux-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pt-journaux-head__c {
  font-family: var(--pt-font-cond);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pt-ink-4);
}
.pt-journaux-head__act {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.pt-journaux-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pt-journaux-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-line);
  border-left: 3px solid var(--j-accent, var(--pt-line));
  color: var(--pt-ink-2);
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}
.pt-journaux-row:hover {
  background: var(--pt-surface-3);
  border-color: var(--pt-line-strong);
}
.pt-journaux-row[aria-pressed="true"] {
  background: var(--pt-surface-3);
  border-color: var(--pt-line-strong);
  color: var(--pt-ink);
}
.pt-journaux-check {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid var(--pt-line-strong);
  background: transparent;
}
.pt-journaux-row[aria-pressed="true"] .pt-journaux-check {
  background: var(--pt-ink);
  border-color: var(--pt-ink);
}
.pt-journaux-row[aria-pressed="true"] .pt-journaux-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  color: var(--pt-bg);
}
.pt-journaux-code {
  flex: 0 0 auto;
  font-family: var(--pt-font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pt-journaux-nom {
  font-size: 13px;
  color: var(--pt-ink-3);
}
.pt-journaux-row[aria-pressed="true"] .pt-journaux-nom {
  color: var(--pt-ink-2);
}
.pt-journaux-count {
  margin-left: auto;
  font-family: var(--pt-font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--pt-ink-4);
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  padding: 2px 6px;
}
/* Bouton d'ouverture de la modale sur la ligne Génération : contrairement aux
   chips-codes (grille 30px centrée), il porte un libellé → largeur auto,
   alignement horizontal, pas de retour à la ligne. */
.pt-atl-journaux-btn {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
  padding: 5px 12px;
}
/* Récap des codes sélectionnés sur la ligne Génération. */
.pt-atl-journaux-recap {
  font-size: 12px;
  color: var(--pt-ink-3);
}
