/* ============================================================
   aibiza-components.css — Composants AI.biza (reconstruction)
   ------------------------------------------------------------
   Accent jaune (#EFFF02) : réservé aux fonds/bordures/surbrillances.
   JAMAIS en texte sur fond clair (illisible) → texte lisible.
   Complète bootstrap-bridge.css. Chargé APRÈS layout.css.
   ============================================================ */

/* ---- Texte « accent » : le jaune n'est pas lisible sur clair ---- */
.logo-text-ai, .text-aibiza { color: var(--c-text) !important; }

/* ---- En-têtes de marque réseaux sociaux (publications) ----
   Couleurs = tokens DS. Sélecteur composé .card-header.social-header--X pour passer
   DEVANT le .card-header neutre du bridge (même spécificité sinon). Identique clair/sombre :
   fond de marque + texte/icône blancs, lisibles dans les deux thèmes. */
.card-header.social-header--instagram,
.card-header.social-header--facebook,
.card-header.social-header--x,
.card-header.social-header--linkedin {
  color: var(--c-on-social);
  border-bottom: none;
  padding: 0.4rem 1.25rem;
}
.card-header.social-header--instagram { background-color: var(--c-social-instagram); }
.card-header.social-header--facebook  { background-color: var(--c-social-facebook); }
.card-header.social-header--x          { background-color: var(--c-social-x); }
.card-header.social-header--linkedin   { background-color: var(--c-social-linkedin); }
.card-header[class*="social-header--"] i { color: var(--c-on-social); }

/* ---- Modale d'alerte de quota (generate-audio / generate-text) ----
   Tokenisée → s'adapte clair/sombre sans bloc dédié. Ex style-standard (variante box). */
.quota-alert-overlay {
  position: fixed; inset: 0; z-index: 1060;
  display: none; justify-content: center; align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
}
.quota-alert-overlay.show { display: flex; }
.quota-alert-box {
  background-color: var(--c-surface); color: var(--c-text);
  padding: var(--sp-5); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 90%; max-width: 500px;
  transform: scale(0.9); transition: transform 0.2s ease-in-out;
}
.quota-alert-overlay.show .quota-alert-box { transform: scale(1); }
.quota-alert-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 10px; margin-bottom: 15px;
}
.quota-alert-title { margin-bottom: 0; font-size: var(--fs-h3); color: var(--c-text); }
.quota-alert-close { border: none; background: transparent; font-size: 1.5rem; cursor: pointer; color: var(--c-text-muted); }
.quota-alert-close:hover { color: var(--c-text); }
.quota-alert-body { margin-bottom: 15px; color: var(--c-text); }
.quota-alert-body .progress { background-color: var(--c-surface-2); }
.quota-alert-footer { text-align: right; }

/* ============================================================
   Pages Artistes (ex style-standard) — tokenisé, clair + sombre auto.
   artist-view, artist-trends, artist-profile(-new).
   ============================================================ */
/* Tags (artist-profile) */
.tag-input-wrapper { position: relative; }
.tag-pill-linked { border-color: var(--accent); background-color: var(--accent-soft); }
.tag-pill-link { display: inline-flex; align-items: center; margin-right: 0.4rem; color: var(--c-text-muted); text-decoration: none; font-size: 0.8em; }
.tag-pill-link:hover { color: var(--c-text); }

/* Profil artiste (artist-view) */
.profile-header { background-color: var(--c-surface-2); border-bottom: 1px solid var(--c-border); }
.profile-stat-label { font-size: 0.85em; color: var(--c-text-muted); text-transform: uppercase; font-weight: var(--fw-semibold); }
.profile-stat-value { font-size: 1.1em; font-weight: var(--fw-medium); }
.profile-bio { white-space: pre-wrap; font-size: 0.95em; }
.social-link { font-size: 1.5rem; color: var(--c-text-muted); transition: color 0.2s; }
.social-link:hover { color: var(--c-text); }
.library-thumbnail { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); background-color: var(--c-surface-2); }
.song-title { font-weight: var(--fw-medium); color: var(--c-text); }
.song-artist-sub { font-size: 0.9em; color: var(--c-text-muted); }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background-color: var(--c-surface-2); }
.popularity-badge { min-width: 40px; display: inline-block; text-align: center; font-weight: var(--fw-semibold); font-size: 0.85rem; }
.page-artist-view .popularity-badge { font-size: 1rem; padding: 0.4em 0.7em; border-radius: var(--radius-sm); }

/* Trends artistes (artist-trends) */
.artist-avatar-small { width: 50px; height: 50px; object-fit: cover; border-radius: 50%; border: 2px solid var(--c-surface); box-shadow: var(--shadow-sm); }
.artist-name-hover { cursor: help; border-bottom: 1px dotted var(--c-border); }
.rank-badge { font-size: 1.2rem; font-weight: var(--fw-bold); color: var(--c-text-muted); width: 40px; text-align: center; }
.rank-1 { color: #ffd700; }  /* or / argent / bronze : couleurs médailles, hors thème */
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }
.trait-bar .trait-bar__fill--score { background: linear-gradient(90deg, var(--accent) 0%, #f97316 100%); }
.trend-up { color: var(--c-success); }
.trend-down { color: var(--c-danger); }
.trend-flat { color: var(--c-text-muted); }
.header-title-row { display: block; width: 100%; margin-bottom: 0.25rem; }
.header-subtitle-row { display: block; width: 100%; font-size: 0.85em; line-height: 1.4; color: var(--c-text-muted); }
.header-subtitle-strong { font-weight: var(--fw-bold); color: var(--c-text); margin-right: 4px; }

/* Image de profil (artist-view) — taille contrainte (ex style-standard #artist-image-view) */
#artist-image-view {
  width: 150px; height: 150px; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--c-surface); box-shadow: var(--shadow);
}
#artist-image-view.placeholder {
  display: flex; align-items: center; justify-content: center;
  background-color: var(--c-surface-2); border: 4px solid var(--c-border);
  color: var(--c-text-faint); font-size: 2rem;
}

/* artists-management (ex style-standard) : liens, boutons d'action, pagination, tags */
.artist-name-link { color: var(--c-text); font-weight: var(--fw-semibold); transition: color 0.2s ease; }
.artist-name-link:hover { color: var(--c-text); text-decoration: underline; }
.action-buttons { display: inline-flex; gap: 0.4rem; white-space: nowrap; }
.btn-action { padding: 0.35rem 0.6rem; font-size: var(--fs-sm); line-height: 1; border-radius: var(--radius-sm); }
.action-btn { cursor: pointer; font-size: 1.1rem; }
.text-compact { font-size: 0.85rem; line-height: 1.4; }
.text-compact-date { font-size: 0.8rem; line-height: 1.3; color: var(--c-text-muted); }
.label-tag { font-size: 0.7rem; padding: 0.25rem 0.5rem; font-weight: var(--fw-medium); }
.pagination-controls .btn { background-color: var(--c-surface); border: 1px solid var(--c-border-strong); color: var(--c-text); }
.pagination-controls .btn:hover:not(:disabled) { background-color: var(--c-surface-2); }
.pagination-info { color: var(--c-bg); background-color: var(--c-text); padding: 0.375rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; }

/* logs (journaux système) — ex style-standard, tokenisé */
.log-entry { font-family: 'Courier New', Courier, monospace; font-size: 0.9em; padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; background-color: var(--c-info-soft); }
.log-card { border: 1px solid var(--c-border); border-left: 4px solid var(--accent); padding: 1rem; margin-bottom: 1rem; border-radius: var(--radius-sm); background-color: var(--c-surface); }
.log-card-alert { border-left-color: var(--c-danger); }
.reasoning, .scoring-details { font-size: 0.9em; padding: 0.5rem; background-color: var(--c-surface-2); border-radius: var(--radius-sm); margin-top: 0.5rem; }
.suggestion-accordion-item { border: 1px solid var(--c-border); margin-bottom: 0.5rem; background-color: var(--c-surface); border-radius: var(--radius-sm); }
.suggestion-accordion-item .accordion-button { font-size: 0.9rem; font-weight: var(--fw-medium); padding: 0.75rem 1rem; background-color: transparent; color: inherit; box-shadow: none; border: none; }
.suggestion-accordion-item .accordion-button:not(.collapsed) { background-color: var(--accent-soft); }

/* prompt-studio — ex style-standard */
.workspace-placeholder { min-height: 500px; }
.duplicate-prompt-btn { cursor: pointer; display: inline-block; padding: 0 5px; }
.duplicate-prompt-btn:hover i { color: var(--c-text) !important; }

/* favorites — ex style-standard */
.favorite-card { display: flex; flex-direction: column; height: 100%; }
.favorite-card .card-body { flex-grow: 1; display: flex; flex-direction: column; }
.favorite-card .card-footer { background-color: var(--c-surface-2); }
.favorite-card .card-title { font-weight: var(--fw-semibold); }
.favorite-card summary { cursor: pointer; font-size: 0.9em; color: var(--c-text-muted); }

/* audio-content — ex style-standard */
.audio-player-row { background-color: var(--c-surface-2); }

/* visual-creator-modal (éditeur visuel) — ex style-standard */
.canvas-container { background-color: var(--c-surface-2); display: flex; justify-content: center; align-items: center; border-radius: var(--radius); padding: 2rem; min-height: 600px; overflow: hidden; box-shadow: inset 0 0 20px rgba(0,0,0,0.05); }
.controls-panel { height: calc(100vh - 140px); overflow-y: auto; padding-right: 10px; }
.layer-preview { width: 100%; height: 100px; object-fit: contain; background-color: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.range-wrap { padding: 0.5rem 0; }
.upload-zone { border: 2px dashed var(--c-border-strong); border-radius: var(--radius-sm); padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s ease; background-color: var(--c-surface); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background-color: var(--accent-soft); }

/* competitive-intelligence — ex style-standard, tokenisé */
.favorite-btn { border-color: var(--c-warning); color: var(--c-warning); }
.favorite-btn:hover { background-color: var(--c-warning); color: #000; }
.report-controls { max-width: 450px; margin-left: auto; }
.report-item-actions { opacity: 0; transition: opacity 0.2s ease-in-out; }
.list-group-item:hover .report-item-actions { opacity: 1; }
/* Anneau de score : composant DS .score-ring (cards.css) — le legacy
   .score-circle a été entièrement migré, ses règles sont supprimées. */
/* Cartes de tendance */
.trend-card { border: 1px solid var(--c-border); border-radius: var(--radius-lg); background-color: var(--c-surface); box-shadow: var(--shadow-xs); }
.trend-card-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--c-border); }
.trend-title { font-size: 1.1rem; font-weight: var(--fw-medium); margin: 0; }
.trend-card-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.trend-card-body { padding: 1.25rem; }
/* Tags de tendance */
.trend-tags-container { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 0; }
.trend-tag { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: var(--fw-medium); padding: 0.25rem 0.6rem; border-radius: var(--radius-pill); border: 1px solid var(--c-border); }
.trend-tag.type-keyword { background-color: var(--accent-soft); color: var(--c-text); border-color: var(--accent); }
.trend-tag.type-keyword i { color: var(--accent); }
.trend-tag.type-competitor { background-color: var(--c-surface-2); color: var(--c-text-muted); }

/* ============================================================
   Dashboard (ex style-standard) — tokenisé
   ============================================================ */
.dashboard-card { background-color: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); height: 100%; color: var(--c-text); }
.dashboard-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-border); background-color: var(--c-surface-2); font-weight: var(--fw-semibold); display: flex; justify-content: space-between; align-items: center; }
.dashboard-card > .dashboard-card-header { border-top-left-radius: calc(var(--radius-lg) - 1px); border-top-right-radius: calc(var(--radius-lg) - 1px); }
.dashboard-card-body { padding: 1.25rem; }
.dashboard-card-body-flush { padding: 0; }
.dashboard-card .list-group-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; }
.dashboard-card .list-group-item .project-info { display: flex; flex-direction: column; overflow: hidden; }
.dashboard-card .list-group-item .project-title { font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-card .list-group-item .project-meta { font-size: 0.85em; color: var(--c-text-muted); }

.stat-item { padding: 0.5rem; }
.stat-item.border-end { border-right: 1px solid var(--c-border) !important; }
@media (min-width: 768px) {
  .stat-item:nth-child(1), .stat-item:nth-child(2), .stat-item:nth-child(3) { border-right: 1px solid var(--c-border) !important; }
  .stat-item:nth-child(4) { border-right: none !important; }
}
@media (max-width: 767.98px) {
  .stat-item:nth-child(2n) { border-right: none !important; }
  .stat-item:nth-child(2n-1) { border-right: 1px solid var(--c-border) !important; }
}
.stat-value-aibiza { font-size: 2.25rem; font-weight: var(--fw-semibold); color: var(--c-text); line-height: 1; }
.stat-label-aibiza { font-size: 0.9rem; color: var(--c-text-muted); margin-top: 0.25rem; }
.stat-item a { text-decoration: none; color: inherit; display: block; padding: 0.5rem; border-radius: var(--radius); transition: background-color 0.2s ease; }
.stat-item a:hover { background-color: var(--c-surface-2); }

.quick-access-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.btn-primary-outline-aibiza { border: 1px solid var(--c-text); color: var(--c-text); background-color: var(--c-surface); text-align: left; padding: 0.75rem 1rem; font-weight: var(--fw-medium); transition: all 0.2s ease; }
.btn-primary-outline-aibiza:hover { background-color: var(--accent); color: var(--accent-contrast); }
.btn-primary-outline-aibiza i { width: 24px; margin-right: 0.5rem; }

.birthday-card-header { background-color: var(--accent); color: var(--accent-contrast); }
.birthday-list-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--c-border); transition: background-color 0.2s ease; }
.birthday-list-item:last-child { border-bottom: none; }
.birthday-info { display: flex; flex-direction: column; }
.birthday-name { font-weight: var(--fw-semibold); }
.birthday-date { font-size: 0.9em; color: var(--c-text-muted); }
.birthday-age { font-weight: var(--fw-bold); font-size: 1.1rem; color: var(--c-success); }
.birthday-list-item.is-urgent { background-color: var(--c-warning-soft); border-left: 4px solid var(--c-warning); }
.birthday-list-item.is-urgent .birthday-name::after { content: '\01F525'; margin-left: 8px; font-size: 0.9em; }

.widget-loader, .list-placeholder { padding: 2rem 1rem; text-align: center; color: var(--c-text-muted); min-height: 120px; display: flex; justify-content: center; align-items: center; gap: 0.5rem; }

/* Badges d'activité (dashboard) — couleurs de marque */
.badge.bg-wordpress { background-color: #21759b !important; color: #fff !important; }
.badge.bg-instagram { background-color: #c13584 !important; color: #fff !important; }
.badge.bg-playlist  { background-color: #1db954 !important; color: #fff !important; }
.badge.bg-voice     { background-color: #0d6efd !important; color: #fff !important; }
.badge.bg-trend     { background-color: #ffc107 !important; color: #212529 !important; }
.badge.bg-alert     { background-color: #dc3545 !important; color: #fff !important; }

/* ============================================================
   brand-management (ex style-standard) — bm-* + aperçu logo
   ============================================================ */
.bm-logo-thumb { height: 28px; max-height: 28px; width: auto; max-width: 120px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--c-border); background: var(--c-surface); }
.bm-tags-surface { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; min-height: 45px; border: 1px solid var(--c-border-strong); border-radius: var(--radius); background-color: var(--c-surface); cursor: text; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
.bm-tags-surface:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bm-tag-badge { display: inline-flex; align-items: center; background-color: var(--c-surface-2); color: var(--c-text); padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: var(--fw-medium); user-select: none; }
.bm-tag-remove { margin-left: 0.5rem; cursor: pointer; opacity: 0.6; font-weight: bold; display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.bm-tag-remove:hover { opacity: 1; color: var(--c-danger); }
.bm-tags-input-field { border: none; outline: none; background: transparent; flex-grow: 1; min-width: 120px; color: var(--c-text); padding: 0; margin: 0; font-size: 1rem; }
.logo-preview-container { width: 100px; height: 100px; border: 1px dashed var(--c-border-strong); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background-color: var(--c-surface-2); overflow: hidden; flex-shrink: 0; }
.logo-preview-container img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ============================================================
   Long tail (ex style-standard) — en-têtes colorés, alertes CI,
   cartes à bord coloré, badges. Tokenisé.
   ============================================================ */
/* En-têtes de cartes colorés génériques */
.card-header-primary { background-color: var(--accent); color: var(--accent-contrast); border-bottom: none; }
.card-header-secondary { background-color: var(--c-text-muted); color: #fff; border-bottom: none; }
.card-header-dark { background-color: var(--c-text); color: var(--c-bg); border-bottom: none; }
/* En-têtes de marque sociaux (alias legacy card-header-* — mêmes couleurs que social-header--*) */
.card-header-instagram { background-color: var(--c-social-instagram) !important; color: var(--c-on-social) !important; border-bottom: none; }
.card-header-facebook  { background-color: var(--c-social-facebook) !important;  color: var(--c-on-social) !important; border-bottom: none; }
.card-header-x         { background-color: var(--c-social-x) !important;         color: var(--c-on-social) !important; border-bottom: none; }
.card-header-linkedin  { background-color: var(--c-social-linkedin) !important;  color: var(--c-on-social) !important; border-bottom: none; }
.card-header-instagram i, .card-header-facebook i, .card-header-x i, .card-header-linkedin i { color: var(--c-on-social) !important; }

/* Cartes à bord gauche coloré (artist-trends) */
.card-top-chart, .card-movers { border-left-width: 4px; border-left-style: solid; }
.card-top-chart { border-left-color: var(--accent); }
.card-movers { border-left-color: var(--c-success); }
.card-header-block { width: 100%; display: block; }

/* Badge station (artist-view) */
.badge-station { margin-right: 0.25rem; font-size: 0.75em; background-color: var(--c-text-muted); }

/* Alertes (competitive-intelligence) */
.alert-item { display: flex; align-items: flex-start; gap: 1rem; border: 1px solid var(--c-border); padding: 1rem; border-radius: var(--radius-sm); }
.alert-item .alert-info { flex-grow: 1; }
.alert-action-btn { color: var(--c-text-muted); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: transparent; transition: all 0.15s ease; }
.alert-action-btn:hover { color: var(--c-info); border-color: var(--c-info); background-color: var(--c-info-soft); }
.alert-action-dismiss:hover { color: var(--c-danger); border-color: var(--c-danger); background-color: var(--c-danger-soft); }
.alert-action-resolve:hover { color: var(--c-success); border-color: var(--c-success); background-color: var(--c-success-soft); }

/* ============================================================
   transcriptions (éditeur) — ex style-standard, tokenisé
   ============================================================ */
.article-preview { min-height: 400px; font-size: 0.9rem; line-height: 1.6; }
.article-preview h1 { font-size: 1.5rem; }
.article-preview h2 { font-size: 1.25rem; }
.article-preview h3 { font-size: 1.1rem; }
.article-preview p { font-size: 0.9rem; margin-bottom: 0.75rem; }
.article-preview img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 0.5rem 0; box-shadow: var(--shadow-xs); }
.article-preview.drag-over { outline: 2px dashed var(--accent); outline-offset: -4px; background-color: var(--accent-soft) !important; }
/* Éditeur publications : onglets internes + étape d'édition.
   #editing-step-wp DOIT rester en block (empile toolbar + contenu) : le JS lui pose un
   display:flex à l'affichage, qui mettrait ses enfants en colonnes (toolbar verticale). */
#editorTab .nav-link { font-size: 0.85rem; padding: 0.5rem 0.9rem; }
#editing-step-wp { display: block !important; }
.auto-resize-textarea { overflow: hidden; resize: none; }
.empty-tab-state { padding: 4rem 2rem; text-align: center; }
.empty-tab-state i { color: var(--c-border); }
.prompt-info-icon { cursor: help; }
.scrollable-content-area { flex-grow: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; min-height: 0; }
.speaker-management-section { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--c-border); }

/* Surlignages éditeur */
.segment-playing { background-color: var(--c-info-soft) !important; transition: background-color 0.2s ease-in-out; }
.inconsistency-highlight { background-color: var(--c-warning-soft); color: var(--c-text); cursor: pointer; border-bottom: 2px dotted var(--c-warning); }

/* Dialogue centré de suggestion IA (correction de segment + relecture globale) */
.suggestion-modal-overlay { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.45); padding: 1rem; }
.suggestion-modal { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--radius-sm); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); width: min(640px, 100%); max-height: 80vh; display: flex; flex-direction: column; }
.suggestion-modal-header { padding: 0.75rem 1rem; font-weight: var(--fw-medium); border-bottom: 1px solid var(--c-border); }
.suggestion-modal-body { padding: 1rem; overflow-y: auto; }
.suggestion-modal-body .suggestion-original { background: var(--c-warning-soft); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; }
.suggestion-modal-body .suggestion-text { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; }
.suggestion-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--c-border); }
.block-has-suggestion { border-left: 3px solid var(--c-warning) !important; background-color: var(--c-warning-soft); color: var(--c-text); }

/* Barre d'en-tête + toolbar de l'éditeur — épuré (label discret + liste compacte, sans boîte) */
.editor-header-bar { position: sticky; top: 0; z-index: 1020; background-color: var(--c-surface); }
.editor-card-header { padding: 0.5rem 1rem !important; min-height: auto !important; background-color: var(--c-surface) !important; }
.editor-toolbar-group { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.editor-toolbar-label { font-size: 0.65rem; text-transform: uppercase; font-weight: var(--fw-bold); color: var(--c-text-muted); letter-spacing: 0.03em; margin: 0; display: block; line-height: 1.2; }
.editor-toolbar-separator { width: 1px; background-color: var(--c-border); align-self: stretch; margin: 4px 2px; }

/* Table des projets (transcriptions) */
.table-projects > :not(caption) > * > * { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.table-projects thead th { font-weight: var(--fw-semibold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--c-text-muted); border-bottom: 2px solid var(--c-border); white-space: nowrap; }
.table-projects tbody tr { transition: background-color 0.15s ease; cursor: pointer; }
.table-projects tbody tr:hover { background-color: var(--c-surface-2); }

/* ============================================================
   publications — ex style-standard, tokenisé
   ============================================================ */
.char-counter { font-size: 0.8em; font-weight: normal; white-space: nowrap; }
.char-counter.badge { font-weight: var(--fw-medium); color: var(--c-text-muted); }
.char-counter.good { color: var(--c-success); background-color: var(--c-success-soft) !important; }
.char-counter.warn { color: var(--c-warning); background-color: var(--c-warning-soft) !important; }
.char-counter.bad  { color: var(--c-danger);  background-color: var(--c-danger-soft) !important; }

.btn-copy { padding: 0.1rem 0.4rem; font-size: 0.8em; line-height: 1.2; border-color: var(--c-border-strong); transition: background-color 0.2s, border-color 0.2s; }
.btn-copy:hover { background-color: var(--c-surface-2); }
.btn-copy.btn-success { background-color: var(--c-success) !important; border-color: var(--c-success) !important; color: #fff; }
.btn-convert-ig, .badge-ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; border: none; }
.btn-convert-ig:hover { opacity: 0.9; color: #fff; }
.badge-wp { background-color: var(--accent); color: var(--accent-contrast); }
.badge-wp, .badge-ig { font-size: 0.7rem; padding: 0.25rem 0.5rem; font-weight: var(--fw-semibold); }

.filter-btn { cursor: pointer; padding: 0.3rem 0.75rem; border-radius: 50rem; background-color: var(--c-surface-2); color: var(--c-text-muted); font-size: 0.9em; font-weight: var(--fw-medium); margin-right: 0.5rem; transition: background-color 0.2s, color 0.2s; border: 1px solid var(--c-border); }
.filter-btn:hover { background-color: var(--c-border); }
.filter-btn.active { color: #fff; border-color: transparent !important; }
.filter-btn[data-filter="all"].active { background-color: var(--c-info); }
.filter-btn[data-filter="wordpress"].active { background-color: var(--accent); color: var(--accent-contrast); }
.filter-btn[data-filter="instagram"].active { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.section-label { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; color: var(--c-text-muted); margin-bottom: 0.5rem; font-weight: var(--fw-semibold); display: flex; align-items: center; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--c-border); margin-left: 0.5rem; }
.yoast-section { border-left: 4px solid #a4286a; padding-left: 1rem; background-color: var(--c-surface-2); }
.wp-section { border-left: 4px solid #2271b1; padding-left: 1rem; background-color: var(--c-surface-2); }
.category-list-container { max-height: 200px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 0.5rem; background: var(--c-surface); }
.list-group-header { background-color: var(--c-surface-2); border-bottom: 2px solid var(--c-border); }
.list-group-header .row { font-size: 0.75rem !important; letter-spacing: 0.5px; color: var(--c-text-muted); }

.ibiza-entities-list { min-height: 60px; background-color: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 0.5rem; }
.ibiza-entity-badge { display: inline-flex; align-items: center; gap: 0.4rem; background-color: var(--c-info); color: #fff; padding: 0.35rem 0.65rem; border-radius: var(--radius-sm); margin: 0.25rem; font-size: 0.85rem; font-weight: var(--fw-medium); }
.ibiza-count { font-size: 0.7rem; padding: 0.2rem 0.4rem; }

.autocomplete-results { position: relative; max-height: 200px; overflow-y: auto; background-color: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-top: 0.25rem; display: none; }
.autocomplete-results.show { display: block; }
.autocomplete-result-item { padding: 0.5rem 0.75rem; cursor: pointer; border-bottom: 1px solid var(--c-border); display: flex; justify-content: space-between; align-items: center; }
.autocomplete-result-item:last-child { border-bottom: none; }
.autocomplete-result-item:hover { background-color: var(--c-surface-2); }

.scrollable-result { max-height: 250px; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word; background-color: var(--c-surface-2); }
.cropper-wrapper { max-height: 300px; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; background: var(--c-surface-2); }

.editor-toolbar .fmt-btn { padding: 0.2rem 0.45rem; font-size: 0.78rem; line-height: 1; border-color: var(--c-border); color: var(--c-text-muted); }
.editor-toolbar .fmt-btn:hover { background-color: var(--c-surface-2); border-color: var(--c-border-strong); color: var(--c-text); }
.editor-toolbar .fmt-btn.active { background-color: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

/* Aperçus WYSIWYG (article + SERP Google) — volontairement CLAIRS (prévisualisent le rendu publié) */
.preview-article-container { background: #fff; color: #212529; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto; }
.preview-article-container img { max-width: 100%; height: auto; }
.preview-seo-box { background: #f8f9fa; border-left: 4px solid var(--accent); padding: 1rem; margin-top: 1rem; border-radius: var(--radius-sm); }
.preview-seo-title { color: #1a0dab; font-size: 1.25rem; font-weight: 500; margin-bottom: 0.25rem; text-decoration: none; }
.preview-seo-url { color: #006621; font-size: 0.875rem; margin-bottom: 0.5rem; }
.preview-seo-description { color: #545454; font-size: 0.875rem; line-height: 1.5; }

/* ============================================================
   visual-creator — ex style-standard, tokenisé
   ============================================================ */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.blink { animation: blink 1s ease-in-out infinite; }
.btn-spotify { background-color: var(--c-spotify); border-color: var(--c-spotify); color: #fff; font-weight: var(--fw-medium); }
.safety-toggle-wrapper { background-color: var(--c-surface); }
.spacing-value { font-size: 0.75rem; font-weight: var(--fw-semibold); }
/* Barres de l'éditeur vidéo : sombres dans les deux thèmes (intentionnel) */
.video-recording-bar { background-color: var(--c-sidebar-bg); border-top: 1px solid rgba(255,255,255,0.1); padding: 0.75rem 1.25rem; color: #ccc; }
.video-timeline { background-color: var(--c-sidebar-bg); border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 1.25rem; color: #ccc; }
/* Zone de dépôt d'image */
#drop-zone { border: 2px dashed var(--c-border-strong); border-radius: var(--radius-lg); padding: 40px; text-align: center; transition: border-color 0.3s, background-color 0.3s; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 200px; }
#drop-zone.dragover { border-color: var(--accent); background-color: var(--accent-soft); }
body.mode-modal #back-to-project-btn { display: none !important; }

/* ---- Cartes AI.biza ---- */
.np-card, .feature-card, .brand-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
}
.np-card:hover, .feature-card:hover, .brand-card:hover {
  box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent);
}
.np-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }

/* ---- Icône de carte (fond accent doux, icône lisible) ---- */
.np-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--c-text);
  display: grid; place-items: center; font-size: 1.2rem;
}
.np-card-title { font-weight: var(--fw-semibold); color: var(--c-text); }
.np-card-desc { color: var(--c-text-muted); font-size: var(--fs-sm); }

/* ---- Badges de carte ---- */
.np-card-badge, .np-card-badge-ai, .np-card-badge-manual {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  padding: 0.15rem 0.55rem; border-radius: var(--radius-pill);
}
.np-card-badge-ai { background: var(--accent-soft); color: var(--c-text); }
.np-card-badge-manual { background: var(--c-surface-2); color: var(--c-text-muted); }
.np-card-empty { color: var(--c-text-muted); }

/* ---- Boutons de studio ---- */
.studio-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

/* ============================================================
   Réglages & Campagnes — porté depuis style-standard.css (tokenisé)
   Pages : global-settings, playlist-campaign-manager.
   Thème géré par tokens (pas de bloc dark séparé).
   ============================================================ */

/* ---- En-tête de tableau emphasé (ex. thead-primary) ---- */
.table .thead-primary th {
    background-color: var(--c-surface-2);
    color: var(--c-text);
    border-color: var(--c-border);
}

/* ---- Navigation interne en pills (Visual Creator Config, etc.) ---- */
.nav-pills-custom .nav-link {
    color: var(--c-text-muted);
    font-weight: var(--fw-medium, 500);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}
.nav-pills-custom .nav-link.active {
    background-color: var(--accent);
    color: var(--accent-contrast);
}

/* ---- Densité « settings-compact » (tables/formulaires resserrés) ---- */
.settings-compact .table > :not(caption) > * > * { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.settings-compact .table thead th {
    font-weight: var(--fw-semibold, 600);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c-text-muted);
    border-bottom: 2px solid var(--c-border);
    white-space: nowrap;
}
.settings-compact .table .thead-primary th {
    color: var(--c-text);
    border-bottom-color: var(--c-border);
}
.settings-compact .table tbody tr { transition: background-color 0.15s ease; }
.settings-compact .table tbody tr:hover { background-color: var(--c-surface-2); }
.settings-compact .card-header h6 { font-size: 0.9rem; font-weight: var(--fw-semibold, 600); }
.settings-compact .card-body { font-size: 0.9rem; }
.settings-compact .form-label { font-size: 0.85rem; margin-bottom: 0.35rem; }
.settings-compact .form-control,
.settings-compact .form-select { font-size: 0.85rem; padding: 0.4rem 0.6rem; }
.settings-compact .form-text { font-size: 0.75rem; }
.settings-compact .nav-tabs .nav-link { font-size: 0.85rem; padding: 0.5rem 0.9rem; }

/* ---- Stepper de campagne (playlist-campaign-manager) ---- */
.campaign-step { display: none; }
.campaign-step.active { display: block; }

.stepper-container {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 30px; background: var(--c-surface-2); border-radius: var(--radius-lg);
}
.stepper-step {
    display: flex; flex-direction: column; align-items: center; cursor: pointer;
    transition: all 0.3s ease; position: relative; z-index: 1;
}
.stepper-step:hover .stepper-circle { transform: scale(1.1); }
.stepper-circle {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--c-surface); border: 3px solid var(--c-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--c-text-muted); transition: all 0.3s ease; position: relative;
}
.stepper-circle i:not(.stepper-check) { display: block; }
.stepper-check { display: none; position: absolute; }
.stepper-label { margin-top: 8px; font-size: 13px; font-weight: var(--fw-medium, 500); color: var(--c-text-muted); text-align: center; }
.stepper-line { flex: 1; height: 3px; background: var(--c-border); margin: 0 10px 30px; transition: all 0.3s ease; }

.stepper-step.active .stepper-circle {
    background: var(--accent); border-color: var(--accent); color: var(--accent-contrast);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.stepper-step.active .stepper-label { color: var(--c-text); font-weight: var(--fw-semibold, 600); }
.stepper-step.completed .stepper-circle { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.stepper-step.completed .stepper-circle i:not(.stepper-check) { display: none; }
.stepper-step.completed .stepper-check { display: block; }
.stepper-step.completed .stepper-label { color: var(--c-success); }
.stepper-line.completed { background: var(--c-success); }

/* Étape non encore débloquée (Playlist Publisher : avant validation de la revue) */
.stepper-step.is-locked { opacity: 0.45; cursor: not-allowed; }
.stepper-step.is-locked:hover .stepper-circle { transform: none; }

/* Playlist Publisher — sélecteur de passage musical P1 (façon Video Express) */
.pp-wave { margin-top: 8px; }
.pp-wave__strip {
    position: relative; height: 44px; background: var(--c-surface-2);
    border: 1px solid var(--c-border); border-radius: var(--radius-sm, 6px);
    overflow: hidden; cursor: grab; touch-action: none;
}
.pp-wave__strip:active { cursor: grabbing; }
.pp-wave__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-wave__window {
    position: absolute; top: 0; bottom: 0; pointer-events: none;
    border: 2px solid var(--accent); border-radius: 4px;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
}
/* Poignées d'ajustement du passage (début / fin) */
.pp-wave__handle {
    position: absolute; top: 0; bottom: 0; width: 12px;
    pointer-events: auto; cursor: ew-resize; touch-action: none;
    display: flex; align-items: center; justify-content: center;
}
.pp-wave__handle::before {
    content: ''; width: 3px; height: 55%; border-radius: 2px; background: var(--accent);
}
.pp-wave__handle--left { left: -7px; }
.pp-wave__handle--right { right: -7px; }
/* Bande zoomée (seule bande) : on y fait défiler le titre sous la sélection */
.pp-wave__strip--zoom { height: 56px; }
/* Fine barre de position : où se situe la sélection dans le titre entier */
.pp-wave__posbar {
    position: relative; height: 5px; margin-top: 4px; cursor: pointer;
    background: var(--c-surface-2); border-radius: 3px;
}
.pp-wave__posbar-window {
    position: absolute; top: 0; bottom: 0; border-radius: 3px;
    background: var(--accent); pointer-events: none;
}
/* Tête de lecture (visible pendant l'écoute du passage) */
.pp-wave__playhead {
    position: absolute; top: 0; bottom: 0; width: 2px; pointer-events: none;
    background: var(--c-text, #fff); opacity: 0.85; z-index: 1;
}

/* Onglets réseaux des légendes (Playlist Publisher) : la couleur de marque
   identifie le réseau (icône toujours colorée, soulignement quand actif).
   X : noir de marque illisible en thème sombre → couleur de texte du thème. */
.tab--net-instagram i { color: var(--c-social-instagram); }
.tab--net-facebook i { color: var(--c-social-facebook); }
.tab--net-x i { color: var(--c-text); }
.tab--net-linkedin i { color: var(--c-social-linkedin); }
.tab--net-instagram.is-active { border-bottom-color: var(--c-social-instagram); }
.tab--net-facebook.is-active { border-bottom-color: var(--c-social-facebook); }
.tab--net-x.is-active { border-bottom-color: var(--c-text); }
.tab--net-linkedin.is-active { border-bottom-color: var(--c-social-linkedin); }

@media (max-width: 768px) {
    .stepper-container { overflow-x: auto; justify-content: flex-start; }
    .stepper-label { font-size: 11px; }
    .stepper-circle { width: 40px; height: 40px; font-size: 14px; }
}

/* ---- Playlist Campaign : panneau de config + résultats étape 5 ---- */
#generation-config-card { border-left: 3px solid var(--accent); }

#step-results .nav-tabs { margin-bottom: 1rem; }
#step-results .nav-tabs .nav-link { display: flex; align-items: center; gap: 0.5rem; }
#step-results .nav-tabs .nav-link i { font-size: 1.1rem; }
#step-results .nav-tabs .nav-link:not(.active) { background-color: transparent; }

#step-results .card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
    transition: all 0.2s ease;
}
#step-results .card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
#step-results .card-header {
    background: var(--c-surface-2);
    font-weight: var(--fw-semibold, 600);
    font-size: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--c-border);
}
#step-results .tab-content { background-color: var(--c-surface); border-radius: 0 0.375rem 0.375rem 0.375rem; }

#step-results .result-textarea {
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 180px;
    background-color: var(--c-surface);
    color: var(--c-text);
}
#step-results .result-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

#step-results .copy-btn,
#step-results .ai-improve-toggle-btn {
    font-weight: var(--fw-semibold, 600);
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
#step-results .copy-btn:hover,
#step-results .ai-improve-toggle-btn:hover { transform: translateY(-1px); }

#step-results .ai-improve-panel { margin-top: 0.5rem; }
#step-results .ai-improve-panel .card-body {
    background: var(--c-info-soft);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
}
#step-results .ai-quick-action { font-size: 0.85rem; font-weight: var(--fw-medium, 500); white-space: nowrap; }
#step-results .ai-custom-instruction { border: 1px solid var(--c-border); }
#step-results .ai-custom-instruction:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-soft);
}
#step-results .regenerate-tab-btn { font-size: 0.85rem; margin-left: 0.5rem; }

@media (max-width: 768px) {
    #step-results .nav-tabs .nav-link { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    #step-results .ai-quick-action { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
}

/* ---- Playlist Campaign — étape 3 : provenance des handles ----
   Teinte de cellule : cyan (info) = proposé par l'IA, à contrôler ;
   vert (success) = validé par l'utilisateur ou trouvé en base.
   La teinte disparaît dès que le champ est modifié à la main. */
.handle-cell { transition: background-color 0.2s ease; }

.handle-cell--ai {
    background: var(--c-info-soft);
    box-shadow: inset 3px 0 0 var(--c-info);
}
.handle-cell--ai .form-control,
.handle-cell--ai .input-group-text {
    background: transparent;
    border-color: rgba(var(--c-info-rgb), 0.35);
}

.handle-cell--validated {
    background: var(--c-success-soft);
    box-shadow: inset 3px 0 0 var(--c-success);
}
.handle-cell--validated .form-control,
.handle-cell--validated .input-group-text {
    background: transparent;
    border-color: rgba(var(--c-success-rgb), 0.35);
}

/* Pastilles de la légende au-dessus du tableau */
.legend-swatch {
    display: inline-block; width: 14px; height: 14px;
    border-radius: var(--radius-sm); vertical-align: -2px; margin-right: 0.25rem;
}
.legend-swatch--ai { background: var(--c-info-soft); border-left: 3px solid var(--c-info); }
.legend-swatch--validated { background: var(--c-success-soft); border-left: 3px solid var(--c-success); }

/* ---- Beat Of Ibiza : vignette pochette (liste) ---- */
.beat-cover {
  width: 40px; height: 40px; flex-shrink: 0;
  object-fit: cover; border-radius: var(--radius);
  background: var(--c-surface-2);
}
.beat-cover--empty {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-text-faint);
}
.beat-cover-preview {
  width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius);
  background: var(--c-surface-2);
}

/* ---- Beat Of Ibiza : ligne cliquable ---- */
.beat-row { cursor: pointer; }
.beat-row:hover { background: var(--c-surface-2); }

/* ---- Beat Of Ibiza : modale à corps défilant (le <form> enveloppe body+footer) ---- */
.beat-modal-content { max-height: 90vh; overflow: hidden; }
.beat-modal-content > form {
  display: flex; flex-direction: column;
  min-height: 0; flex: 1 1 auto; overflow: hidden;
}
.beat-modal-content .modal-body { overflow-y: auto; min-height: 0; }
.beat-modal-content .modal-header, .beat-modal-content .modal-footer { flex-shrink: 0; }

/* ---- Planning Social (social-planner) ---- */
/* Vignette média d'une ligne du planning (image, ou pictogramme film/photo). */
.sp-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  object-fit: cover; border-radius: var(--radius);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
}
.sp-thumb--round { border-radius: 50%; }

/* Extrait de légende dans la ligne (discret, tronqué par le conteneur). */
.sp-caption-excerpt {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}

/* En-tête de groupe par jour du planning (micro-label uppercase). */
.sp-day-label {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text-faint);
}

/* Croix de retrait d'un média dans la modale de planification. */
.sp-thumb-remove {
  font-size: var(--fs-xs);
  background-color: var(--c-surface);
  border-radius: 50%;
  padding: var(--sp-1);
}

/* ---- Planning Social : vue calendrier (mois, drag & drop) ---- */
.sp-cal__head {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.sp-cal__month {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  margin-right: auto;
}
.sp-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-1);
}
.sp-cal__weekday {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text-faint);
  text-align: center;
  padding: var(--sp-1) 0;
}
.sp-cal__cell {
  min-height: 108px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--sp-1);
  display: flex; flex-direction: column; gap: var(--sp-1);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.sp-cal__cell.is-other { background: var(--c-surface-2); opacity: .55; }
.sp-cal__cell.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sp-cal__cell.is-dropover { background: var(--accent-soft); border-color: var(--accent); }
.sp-cal__daynum {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text-muted);
}
.sp-cal__chips {
  display: flex; flex-direction: column; gap: var(--sp-1);
  overflow: hidden; min-height: 0;
}
/* Chip de post : liseré gauche = statut (mêmes sémantiques que les pills). */
.sp-cal__chip {
  display: flex; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-xs);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-info);
  border-radius: var(--radius-sm, var(--radius));
  padding: 2px var(--sp-1);
  cursor: pointer;
  min-width: 0;
}
.sp-cal__chip[draggable="true"] { cursor: grab; }
.sp-cal__chip.is-dragging { opacity: .4; }
.sp-cal__chip--publishing { border-left-color: var(--c-warning); }
.sp-cal__chip--published  { border-left-color: var(--c-success); }
.sp-cal__chip--failed     { border-left-color: var(--c-danger); background: var(--c-danger-soft); }
.sp-cal__chip-time { font-weight: var(--fw-semibold); flex-shrink: 0; }
.sp-cal__chip-label {
  color: var(--c-text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Mini-vignette du média dans un chip (première image du post). */
.sp-cal__chip-thumb {
  width: 18px; height: 18px; flex-shrink: 0;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--c-border);
}
.sp-cal__chip-thumb--video {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 9px;
}

/* Créneaux recommandés (grille semaine) : teinte AUX COULEURS DU RÉSEAU —
   Instagram en rose, Facebook en bleu, les deux en dégradé partagé. */
.sp-week__slot.is-best-instagram { background: color-mix(in srgb, var(--c-social-instagram) 14%, transparent); }
.sp-week__slot.is-best-facebook  { background: color-mix(in srgb, var(--c-social-facebook) 14%, transparent); }
.sp-week__slot.is-best-both {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--c-social-instagram) 14%, transparent) 0 50%,
      color-mix(in srgb, var(--c-social-facebook) 14%, transparent) 50% 100%);
}
/* Pastilles de légende sous la grille. */
.sp-slot-legend {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px; vertical-align: -1px;
  border: 1px solid var(--c-border);
}
.sp-slot-legend--instagram { background: color-mix(in srgb, var(--c-social-instagram) 25%, transparent); }
.sp-slot-legend--facebook  { background: color-mix(in srgb, var(--c-social-facebook) 25%, transparent); }

/* Sélection multiple (vue liste) : case alignée avec la vignette. */
.sp-bulk-check { flex-shrink: 0; margin: 0; cursor: pointer; }
.sp-bulk-spacer { flex-shrink: 0; width: 16px; }

/* Badge d'échecs dans la sidebar (layout.js). */
.nav-badge-danger { font-size: 0.7rem; padding: 1px 7px; }

/* Mobile : cellules plus basses, libellés masqués (heure + icône suffisent). */
@media (max-width: 768px) {
  .sp-cal__cell { min-height: 72px; }
  .sp-cal__chip-label { display: none; }
}

/* ---- Planning Social : insights (Phase 3) ---- */
/* Métriques d'un post publié (likes/commentaires/partages) dans la liste. */
.sp-metrics {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
/* Trou éditorial : jour à venir (7 prochains jours) sans aucun post prévu. */
.sp-cal__cell.is-gap { border-style: dashed; border-color: var(--c-warning); }
.sp-gap-note { color: var(--c-warning); }

/* ---- Planning Social : vue Semaine (grille agenda, créneaux 30 min) ---- */
.sp-week__scroll {
  max-height: calc(100vh - 340px);
  min-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.sp-week__grid {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
}
/* En-têtes sticky : le coin (colonne heures) + les 7 jours restent visibles au scroll. */
.sp-week__corner,
.sp-week__dayhead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-strong, var(--c-border));
  padding: var(--sp-2) var(--sp-1);
}
.sp-week__dayhead {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text-muted);
  text-align: center;
  border-left: 1px solid var(--c-border);
}
.sp-week__dayhead.is-today { color: var(--c-text); box-shadow: inset 0 -2px 0 var(--accent); }
.sp-week__dayhead.is-gap { color: var(--c-warning); border-bottom-style: dashed; border-bottom-color: var(--c-warning); }
/* Colonne des heures : libellé seulement sur les heures pleines. */
.sp-week__time {
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  text-align: right;
  padding: 0 var(--sp-1);
  transform: translateY(-0.55em); /* le libellé chevauche la ligne de l'heure */
}
/* Créneau de 30 min : heure pleine = trait plein, demi-heure = trait discret. */
.sp-week__slot {
  min-height: 30px;
  border-left: 1px solid var(--c-border);
  border-top: 1px dotted color-mix(in srgb, var(--c-border) 55%, transparent);
  padding: 1px 2px;
  display: flex; flex-direction: column; gap: 2px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.sp-week__slot.is-hour { border-top: 1px solid var(--c-border); }
.sp-week__slot.is-todaycol { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.sp-week__slot:hover:not(.is-past) { background: var(--accent-soft); }
.sp-week__slot.is-dropover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sp-week__slot.is-past { background: var(--c-surface-2); opacity: .55; cursor: default; }

/* ---- Planning Social : médias de la modale Planifier (dropzone, vignettes, crop) ---- */
.ssm-dropzone {
  border: 2px dashed var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ssm-dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.ssm-dropzone__hint { color: var(--c-text-muted); font-size: var(--fs-sm); }
.ssm-dropzone__browse { color: var(--c-text); text-decoration: underline; cursor: pointer; }

/* Vignette média : numéro d'ordre + actions (recadrer/retirer) au survol. */
.ssm-thumb { position: relative; }
.ssm-thumb[draggable="true"] { cursor: grab; }
.ssm-thumb.is-dragging { opacity: .4; }
.ssm-thumb.is-dropover .sp-thumb { outline: 2px solid var(--accent); }
.ssm-thumb__num {
  position: absolute; top: 2px; left: 2px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  background: var(--c-surface); color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm, var(--radius));
  padding: 0 var(--sp-1); line-height: 1.4;
}
/* Badge « comptes identifiés sur cette image » (coin bas-gauche, même recette
   que __num) — le détail des handles est dans le title. */
.ssm-thumb__tagcount {
  position: absolute; bottom: 2px; left: 2px;
  display: inline-flex; align-items: center; gap: 2px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm, var(--radius));
  padding: 0 var(--sp-1); line-height: 1.4;
}
[data-product="aibiza"] .ssm-thumb__tagcount { color: var(--c-text); } /* jaune illisible en texte sur fond clair */

/* Badge « vidéo trop longue » (coin haut-droit) : rappelle de rogner la durée. */
.ssm-thumb__warn {
  position: absolute; top: 2px; right: 2px;
  display: inline-flex; align-items: center;
  font-size: var(--fs-xs);
  background: var(--c-danger-soft); color: var(--c-danger);
  border: 1px solid var(--c-danger);
  border-radius: var(--radius-sm, var(--radius));
  padding: 0 var(--sp-1); line-height: 1.4;
}

.ssm-thumb__actions {
  position: absolute; bottom: 2px; right: 2px;
  display: flex; gap: 2px;
  opacity: 0; transition: opacity var(--t-fast);
}
.ssm-thumb:hover .ssm-thumb__actions { opacity: 1; }
.ssm-thumb__btn {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  border-radius: var(--radius-sm, var(--radius));
  font-size: var(--fs-xs);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ssm-thumb__btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.ssm-thumb__btn--danger:hover { background: var(--c-danger-soft); border-color: var(--c-danger); color: var(--c-danger); }

/* Scène de recadrage (Cropper.js prend le relais sur l'image). */
.ssm-crop-stage { max-height: 55vh; overflow: hidden; background: var(--c-surface-2); border-radius: var(--radius); }
.ssm-crop-stage img { max-width: 100%; display: block; }

/* Rognage de la durée (vidéos) : aperçu + curseurs Début/Fin sous la scène. */
.ssm-crop-trim { border-top: 1px solid var(--c-border); padding-top: var(--sp-3); }
.ssm-crop-trim__video { width: 100%; max-height: 38vh; background: #000; border-radius: var(--radius); display: block; }

/* ---- Modale Planifier v2 : éditeur double-panneau type Metricool ---- */
/* Composition à gauche, aperçu live à droite ; empilé sous 992px. */
.ssm-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}
.ssm-editor__form { padding: var(--sp-4); }
.ssm-editor__preview {
  padding: var(--sp-4);
  background: var(--c-surface-2);
  border-left: 1px solid var(--c-border);
}
@media (max-width: 991px) {
  .ssm-editor { grid-template-columns: 1fr; }
  .ssm-editor__preview { border-left: none; border-top: 1px solid var(--c-border); }
}

/* Compte de destination : avatar sélectionnable (badge réseau en coin). */
.ssm-account {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
  background: none; border: none; padding: 0;
  cursor: pointer; max-width: 76px;
}
.ssm-account__avatar {
  position: relative;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--c-border);
  background: var(--c-surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  opacity: .55;
}
.ssm-account__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ssm-account__net {
  position: absolute;
  transform: translate(18px, 18px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs);
  opacity: .55;
  transition: opacity var(--t-fast);
}
.ssm-account.is-selected .ssm-account__avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  opacity: 1;
}
.ssm-account.is-selected .ssm-account__net { opacity: 1; }
.ssm-account__label {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ssm-account.is-selected .ssm-account__label { color: var(--c-text); font-weight: var(--fw-semibold); }

/* Grande zone de légende, sobre (bordure douce, focus accent). */
.ssm-caption-box { border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; }
.ssm-caption-input {
  display: block; width: 100%;
  border: none; outline: none; resize: vertical;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-body);
  padding: var(--sp-3);
  min-height: 140px;
}
.ssm-caption-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 0.2rem var(--accent-soft); }

/* Onglets d'aperçu (icônes réseau). */
.ssm-preview-tab {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: .55;
}
.ssm-preview-tab.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); opacity: 1; }

/* Cadre « téléphone » de l'aperçu. */
.ssm-phone {
  max-width: 340px;
  margin: 0 auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Carte d'aperçu du post (IG / FB). */
.ssm-pv { font-size: var(--fs-sm); }
.ssm-pv__head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
}
.ssm-pv__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--c-border);
}
.ssm-pv__avatar--empty {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-surface-2);
}
.ssm-pv__name { font-weight: var(--fw-semibold); }
.ssm-pv__meta { color: var(--c-text-muted); font-size: var(--fs-xs); }
.ssm-pv__media { position: relative; background: var(--c-surface-2); }
.ssm-pv__media img, .ssm-pv__media video { width: 100%; display: block; }
.ssm-pv__media--empty {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  color: var(--c-text-faint);
}
.ssm-pv__count {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  background: var(--c-text); color: var(--c-bg);
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  padding: 1px var(--sp-1);
  opacity: .85;
}
.ssm-pv__dots {
  position: absolute; bottom: var(--sp-2); left: 0; right: 0;
  display: flex; justify-content: center; gap: 4px;
}
.ssm-pv__dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-bg); opacity: .5;
}
.ssm-pv__dots span.is-active { opacity: 1; }
.ssm-pv__igbar {
  display: flex; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-h3);
}
.ssm-pv__fbbar {
  display: flex; justify-content: space-around;
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
}
.ssm-pv__text {
  padding: 0 var(--sp-3) var(--sp-3);
  white-space: normal;
  word-break: break-word;
}
.ssm-pv__tag { color: var(--c-info); }

/* Brouillon dans les calendriers : chip neutre en pointillés (pas engagé). */
.sp-cal__chip--draft {
  border-style: dashed;
  border-left-color: var(--c-text-faint);
  color: var(--c-text-muted);
}

/* ---- Modale Planifier : barre d'outils de légende + panneaux ---- */
/* Bouton-outil (emoji, hashtag, IA) : carré discret, accent au survol. */
.ssm-tool {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  border-radius: var(--radius);
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.ssm-tool:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--c-text); }

/* Panneau dépliant sous la barre d'outils (emojis, hashtags, génération IA). */
.ssm-popover {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow);
  padding: var(--sp-3);
}
.ssm-emoji-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  max-height: 160px;
  overflow-y: auto;
}
.ssm-emoji {
  border: none; background: none;
  font-size: var(--fs-h2);
  line-height: 1.3;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 2px;
}
.ssm-emoji:hover { background: var(--accent-soft); }
@media (max-width: 576px) { .ssm-emoji-grid { grid-template-columns: repeat(8, 1fr); } }

/* ---- Aperçu : carrousel navigable + « voir plus » + vertical Story/Reel ---- */
.ssm-pv__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  border: none; border-radius: 50%;
  width: 26px; height: 26px;
  background: var(--c-surface); color: var(--c-text);
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs);
  cursor: pointer;
  opacity: .85;
}
.ssm-pv__nav:hover { opacity: 1; }
.ssm-pv__nav--prev { left: var(--sp-2); }
.ssm-pv__nav--next { right: var(--sp-2); }
.ssm-pv__more { color: var(--c-text-faint); }

/* Story/Reel : scène verticale 9:16, média en cover, habillage par-dessus.
   Le noir du "plateau" est intrinsèque au format vidéo (indépendant du thème). */
.ssm-pv__vstage {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
}
.ssm-pv__vstage .ssm-pv__media { position: absolute; inset: 0; background: none; }
.ssm-pv__vstage .ssm-pv__media img,
.ssm-pv__vstage .ssm-pv__media video { width: 100%; height: 100%; object-fit: cover; }
.ssm-pv__voverlay-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  background: linear-gradient(rgba(0,0,0,.45), transparent);
  z-index: 1;
}
.ssm-pv__vname { text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ssm-pv__vicons {
  position: absolute; right: var(--sp-2); bottom: var(--sp-6, 48px);
  display: flex; flex-direction: column; gap: var(--sp-3);
  color: #fff; font-size: var(--fs-h2);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  z-index: 1;
}
.ssm-pv__vcaption {
  position: absolute; left: 0; right: 44px; bottom: 0;
  padding: var(--sp-2) var(--sp-3);
  color: #fff; font-size: var(--fs-xs);
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  z-index: 1;
}
.ssm-pv__vcaption .ssm-pv__tag { color: #fff; font-weight: var(--fw-semibold); }

/* ============================================================
   Playlist Publisher (pp-*) — rituel hebdo de publication
   des playlists antenne (playlist-publisher.html)
   ============================================================ */

/* Champ de recherche à suggestions riches (sélecteur Beat Of Ibiza,
   éditeur Trending Now) : wrapper relatif + panneau absolu sous le champ. */
.pp-suggest { position: relative; }
.pp-suggest__panel {
  position: absolute; top: calc(100% + var(--sp-1)); left: 0; right: 0;
  z-index: 40;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 320px; overflow-y: auto;
  padding: var(--sp-1);
}
.pp-suggest__item {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 100%; text-align: left;
  background: none; border: 0;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius);
  color: var(--c-text); cursor: pointer;
}
.pp-suggest__item:hover { background: var(--c-surface-2); }
.pp-suggest__empty {
  padding: var(--sp-2);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}

/* Petite pochette (suggestions, Trending Now) — déclinaison 36px du .sp-thumb. */
.pp-thumb-sm {
  width: 36px; height: 36px; flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  display: grid; place-items: center;
  color: var(--c-text-faint);
}

/* Ligne d'entrée détectée : état exclu du carrousel nouveautés. */
.pp-entry.is-excluded { opacity: .55; }
.pp-entry.is-excluded .row-card__title { text-decoration: line-through; }

/* Données informatives repliables d'une entrée (Ibiza Score, Spotify, Shazam). */
.pp-detail summary {
  cursor: pointer;
  color: var(--c-text-faint);
  font-size: var(--fs-sm);
  list-style: none;
}
.pp-detail summary::-webkit-details-marker { display: none; }
.pp-detail[open] summary { color: var(--c-text-muted); }
.pp-detail__body {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  padding-top: var(--sp-1);
}
