/* Composants FOXUS CRM. */

/* ---- Logo FOXUS CRM (components/brand_logo.html): renard colore par la palette de l'accueil (--brand-*) ---- */
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.fx-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 6px 24px 4px; color: var(--brand-200, #dcc0fb); }
.fx-logo-fox { width: 44px; height: 56px; flex-shrink: 0; overflow: visible; transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), filter 0.35s ease; }
.fx-logo-text { display: flex; flex-direction: column; line-height: 1; }
.fx-logo-name { font-size: 29px; font-weight: 500; letter-spacing: 0.3px; }
.fx-logo-sub { font-size: 18px; font-weight: 400; letter-spacing: 1.2px; margin-top: 5px; }
.fx-logo:hover .fx-logo-fox { transform: translateY(-1px) rotate(-3deg) scale(1.05); filter: drop-shadow(0 0 9px rgba(var(--brand-400-rgb, 196, 154, 246), 0.45)); }
.fx-logo-shine { animation: fx-logo-shine 11s ease-in-out 2.5s infinite; }
.fx-logo:hover .fx-logo-shine { animation-duration: 2.2s; animation-delay: 0s; }
@keyframes fx-logo-shine { 0% { transform: translateX(0); } 14%, 100% { transform: translateX(470px); } }
.mobile-topbar .fx-logo { padding: 0; gap: 7px; }
.mobile-topbar .fx-logo-fox { width: 25px; height: 32px; }
.mobile-topbar .fx-logo-name { font-size: 17px; }
.mobile-topbar .fx-logo-sub { font-size: 10.5px; margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
  .fx-logo-shine { animation: none; display: none; }
  .fx-logo:hover .fx-logo-fox { transform: none; }
}

/* ---- Marque (ancien logo texte, garde pour reference) ---- */
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; padding: 4px 6px 22px; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.2px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16); }
.brand b { color: var(--accent); font-weight: 800; }
.mobile-topbar .brand { padding: 0; }

/* ---- Sous-dossiers de nav (ex: Facebook > Bibliotheque/Captions/Livrables) ---- */
.navitem--child { padding-left: 34px; font-size: 13px; }
.navitem--child.active { padding-left: 32px; }

/* ---- Sidebar: groupes (identique aux autres outils FOXUS) ---- */
.nav-group + .nav-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid #202024; }
.nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: #62626b; padding: 0 14px 6px;
}
.soon-tag {
  margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px;
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.navitem-logo { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; opacity: 0.75; }
.navitem:hover .navitem-logo, .navitem.active .navitem-logo { opacity: 1; }

/* ---- Selecteur d'espace FOXUS (identique aux autres outils) ---- */
.ws { position: relative; }
.ws-current {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  color: var(--text); font-weight: 500;
}
.ws-current:hover:not(:disabled) { border-color: rgba(var(--accent-rgb), 0.45); filter: none; transform: none; }
.ws-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ws-text { flex: 1; min-width: 0; }
.ws-name { display: block; font-size: 13px; font-weight: 600; }
.ws-tag { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-chevron { color: var(--muted); flex-shrink: 0; transition: transform 0.18s ease; }
.ws.open .ws-chevron { transform: rotate(180deg); }
.ws-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 50;
  background: #101013; border: 1px solid var(--border); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.ws-menu--down { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; min-width: 240px; }
.ws-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--text);
}
.ws-item:hover { background: #1a1a1f; }
.ws-item.current { background: rgba(var(--accent-rgb), 0.08); }
.ws-item .check { margin-left: auto; color: var(--accent); }
.ws--profile { border-top: 1px solid #202024; padding-top: 12px; }
.ws--profile .ws-current { background: transparent; border-color: transparent; padding: 7px 8px; }
.ws--profile .ws-current:hover:not(:disabled) { background: #1a1a1f; border-color: transparent; }
.ws--profile .ws-name { font-size: 13px; }
.ws-menu__label { padding: 6px 10px 8px; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.ws-logout { margin: 4px 0 0; border-top: 1px solid #202024; padding-top: 4px; }
.ws-logout .ws-item { width: 100%; background: transparent; border: 0; color: var(--muted); font-weight: 500; text-align: left; }
.ws--icon .ws-current { width: auto; padding: 2px; min-height: 0; border-radius: 50%; background: transparent; border-color: transparent; }
.ws--icon .ws-text, .ws--icon .ws-chevron { display: none; }

/* ---- KPI / stat cards (Accueil) ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
}
.stat-card .stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; }
.stat-card .stat-sub { font-size: 12px; color: var(--muted); }
.stat-card.accent .stat-value { color: var(--accent-2); }
.stat-correct-link {
  background: transparent; border: none; padding: 0; box-shadow: none; color: var(--muted);
  font-size: 11px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; margin-top: 4px;
}
.stat-correct-link:hover:not(:disabled) { color: var(--accent-2); transform: none; filter: none; }
.wallet-edit-form { display: flex; flex-direction: column; gap: 8px; }
.wallet-edit-form label { font-size: 11px; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.wallet-edit-form input { padding: 5px 8px; font-size: 13px; }

/* ---- Panneaux / cartes de section ---- */
.panel { background: var(--panel); border: 1px solid var(--card-border); border-radius: var(--card-radius); padding: var(--card-pad); margin-bottom: var(--frame-gap); }
.panel h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.panel .panel-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.panel-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 960px) { .panel-grid { grid-template-columns: 1fr; } }

/* ---- Formulaires compacts ---- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
.form-grid textarea { resize: vertical; min-height: 60px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.instruction-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; font-weight: 400; }

/* ---- Grille de pages a cocher (modales de dispatch): petites cases avatar + nom, pas une longue liste ---- */
.page-select-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px;
  max-height: 280px; overflow-y: auto; padding: 2px;
}
.page-select-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 96px; padding: 10px 6px; border-radius: 10px; cursor: pointer; font-weight: 500; text-align: center;
  background: var(--panel-alt); border: 1.5px solid var(--border);
}
.page-select-item:hover { border-color: rgba(var(--accent-rgb), 0.4); }
.page-select-item:has(input:checked) { background: rgba(var(--accent-rgb), 0.12); border-color: var(--accent); }
.page-select-item input[type="checkbox"] {
  position: absolute; top: 0; left: 0; width: 16px; height: 16px; margin: 0; opacity: 0; pointer-events: none;
}
.page-select-avatar {
  display: block; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--panel);
}
.page-select-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-select-avatar .avatar-fallback { width: 100%; height: 100%; font-size: 13px; }
.page-select-name {
  font-size: 11px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table-wrap--limited { max-height: 260px; overflow-y: auto; }
.table-more { display: flex; justify-content: center; margin-top: 14px; }
.table-more button { font-size: 13px; }

/* ---- Barre de defilement fine, assortie au theme sombre (au lieu de la barre grise par defaut) ---- */
.table-wrap--limited, .modal-card {
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.table-wrap--limited::-webkit-scrollbar, .modal-card::-webkit-scrollbar { width: 8px; }
.table-wrap--limited::-webkit-scrollbar-track, .modal-card::-webkit-scrollbar-track { background: transparent; }
.table-wrap--limited::-webkit-scrollbar-thumb, .modal-card::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 999px;
}
.table-wrap--limited::-webkit-scrollbar-thumb:hover, .modal-card::-webkit-scrollbar-thumb:hover { background: var(--muted); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px; border-bottom: 1px solid #1c1c21; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .muted { color: var(--muted); font-size: 12px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-platform { background: rgba(var(--accent-rgb), 0.12); color: var(--accent-2); }
.badge-status { text-transform: capitalize; }
.badge-status.actif { background: rgba(61, 220, 132, 0.14); color: var(--ok); }
.badge-status.pause { background: rgba(var(--warn-rgb), 0.14); color: #ffb02e; }
.badge-status.banni { background: rgba(var(--ko-rgb), 0.14); color: var(--ko); }
.badge-status.a_configurer { background: rgba(147, 147, 156, 0.14); color: var(--muted); }

/* ---- Fiches de pages reseaux sociaux ---- */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.page-card {
  position: relative; background: var(--panel-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 14px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  font-family: 'Baloo 2', 'Poppins', sans-serif;
}
.page-card-name {
  font-size: 17px; font-weight: 700; margin-bottom: 14px; line-height: 1.2;
}
.page-card-photo-wrap { position: relative; width: 108px; height: 108px; margin-bottom: 16px; }
.page-card-photo {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel);
  border: 4px solid var(--border); display: block;
}
.page-card-photo-wrap .avatar-fallback { width: 100%; height: 100%; font-size: 30px; border: 4px solid var(--border); }
.platform-badge {
  position: absolute; right: -4px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 12px;
  border: 3px solid var(--panel-alt); letter-spacing: -0.2px;
}
.platform-badge svg { width: 16px; height: 16px; }
.page-group-tag { overflow: hidden; font-size: 10px; }
.page-group-tag img { width: 100%; height: 100%; object-fit: cover; }
.page-card-stats { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.page-card-stat-line { font-size: 14px; font-weight: 700; color: var(--text); }
.page-card-stat-line .label { font-weight: 600; color: var(--muted); }
.page-card-stat-line form { display: inline; }
.page-card-stat-line input[type="number"] {
  width: 60px; text-align: center; padding: 2px 4px; font-size: 13px; font-weight: 700; font-family: inherit;
  background: var(--panel); border-color: var(--border); -moz-appearance: textfield;
}
.stat-toggle { cursor: pointer; user-select: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.stat-toggle:hover .label { color: var(--accent-2); }
.stat-dots { display: flex; gap: 4px; }
.stat-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }
.stat-dots span.active { background: var(--accent); }

.stat-followers .stat-display {
  cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.stat-followers .stat-display:hover { color: var(--accent-2); }
.stat-followers .stat-display svg { color: var(--muted); flex-shrink: 0; }
.stat-followers form { display: flex; align-items: center; justify-content: center; gap: 6px; }

.badge-dot-form { position: absolute; left: -2px; top: -2px; opacity: 0; transition: opacity 0.15s ease; }
.page-card-photo-wrap:hover .badge-dot-form { opacity: 1; }
.badge-dot-form select {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; padding: 0; border-radius: 50%;
  border: 2px solid var(--panel-alt); cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.page-card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s ease; }
.page-card:hover .page-card-actions { opacity: 1; }
.page-card-actions button, .page-card-actions .icon-btn { padding: 5px; }

.page-card-add {
  background: transparent; border: 1.5px dashed var(--border); color: var(--muted);
  justify-content: center; min-height: 220px; font-weight: 600; font-size: 13px; gap: 10px;
}
.page-card-add svg { color: var(--muted); }
.page-card-add:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-2); background: rgba(var(--accent-rgb), 0.04);
  transform: none; filter: none;
}

/* ---- Groupes de pages reseaux sociaux (meme forme qu'une fiche de page, en plus petit) ---- */
.page-group { margin-bottom: 24px; }
.page-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-group-photo-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.page-group-photo {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel);
  border: 3px solid var(--border); display: block;
}
.page-group-avatar { width: 100%; height: 100%; font-size: 18px; border: 3px solid var(--border); }
.page-group-name { margin: 0; font-size: 16px; font-weight: 700; flex: 1; font-family: 'Baloo 2', 'Poppins', sans-serif; }
.page-group-name.muted { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; }
.page-group-actions { display: flex; gap: 4px; }

/* ---- Fiches de liens Taapit (bulles independantes, comme sur taap.it) ---- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.link-card {
  position: relative; background: var(--panel-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; font-family: 'Poppins', sans-serif;
}
.link-card-gear { position: absolute; top: 10px; right: 10px; padding: 5px; }
.link-card-head { display: flex; align-items: center; gap: 9px; padding-right: 30px; }
.link-card-glyph {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(var(--accent-rgb), 0.14); color: var(--accent-2); overflow: hidden;
  font-weight: 800; font-size: 11px;
}
.link-card-glyph img { width: 100%; height: 100%; object-fit: cover; }
.link-card-name { font-size: 14px; font-weight: 700; line-height: 1.25; word-break: break-word; }

/* ---- Groupes de liens Taapit ---- */
.link-group { margin-bottom: 22px; }
.link-group-head {
  display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.link-group-head--plain { border-bottom-color: var(--border); }
.link-group-logo {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 800; font-size: 11px; overflow: hidden;
}
.link-group-logo img { width: 100%; height: 100%; object-fit: cover; }
.link-group-name { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.link-group-name.muted { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; }
.link-group-actions { display: flex; gap: 4px; }
.link-card-stats { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.link-card-stat {
  display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; color: var(--text);
}
.link-card-stat svg { color: var(--muted); flex-shrink: 0; }
.link-card-stat .muted { font-size: 12px; font-weight: 500; color: var(--muted); }

.link-card-add {
  align-items: center; justify-content: center; flex-direction: row; gap: 8px; min-height: 96px;
  background: transparent; border: 1.5px dashed var(--border); color: var(--muted); font-weight: 600; font-size: 13px;
}
.link-card-add svg { color: var(--muted); }
.link-card-add:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-2); background: rgba(var(--accent-rgb), 0.04);
  transform: none; filter: none;
}

/* ---- Carte modale (ajout compact, plutot qu'un gros panneau) ---- */
.modal-card { width: 100%; max-width: 400px; max-height: 88vh; overflow-y: auto; font-family: 'Poppins', sans-serif; }
.modal-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.modal-card-head h2 { margin: 0; }
.modal-card input[type="file"] { padding: 7px 10px; font-size: 13px; }

/* ---- En-tete de service (Taapit/Dropfan): logo + statut de synchro ---- */
.service-logo {
  width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0; letter-spacing: -0.3px;
}
.service-wordmark { height: 64px; width: auto; flex-shrink: 0; }
.page-header-title { display: flex; align-items: center; gap: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sync-bar { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sync-bar-icons { display: flex; align-items: center; gap: 4px; }
.sync-bar .last-sync { font-size: 12px; color: var(--muted); }
.sync-hint { font-size: 12px; color: var(--muted); }

/* ---- Objectif de C.A. (barre de progression) ---- */
.goal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.goal-head > div { flex: 1; }
.goal-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb), 0.14); color: var(--accent-2); flex-shrink: 0;
}
.goal-label { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.goal-value-display { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.goal-label input[type="number"] { width: 100px; padding: 3px 6px; font-size: 14px; font-weight: 600; }
.goal-pct { font-size: 22px; font-weight: 800; margin-top: 2px; }
.goal-track { height: 10px; border-radius: 999px; background: var(--panel-alt); border: 1px solid var(--border); overflow: hidden; }
.goal-fill { height: 100%; border-radius: 999px; background: var(--goal-grad, var(--grad)); transition: width 0.4s ease; }
.goal-sub { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 10px; }

/* ---- Roue crantee: reglages de couleurs par page ---- */
.theme-gear-wrap { position: relative; }
.theme-popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 260px;
  background: #101013; border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.theme-popover-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.theme-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-picker label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.theme-picker input[type="color"] { width: 32px; height: 30px; padding: 2px; cursor: pointer; }
.theme-picker button { padding: 6px 10px; font-size: 12px; margin-left: auto; }
.theme-popover .sync-hint { margin-top: 10px; }

/* ---- Bandeaux (succes / erreur) ---- */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 18px; }
.flash svg { flex-shrink: 0; }
.flash-error { background: rgba(var(--ko-rgb), 0.1); color: var(--ko); border: 1px solid rgba(var(--ko-rgb), 0.3); }
.flash-success { background: rgba(var(--accent-rgb), 0.1); color: var(--accent-2); border: 1px solid rgba(var(--accent-rgb), 0.3); }

/* ---- Graphique (aire simple, une serie): specs skill dataviz ---- */
.chart-panel { position: relative; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.period-toggle { display: flex; background: var(--panel-alt); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.period-toggle button, .period-toggle a {
  background: transparent; border: none; color: var(--muted); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; box-shadow: none; text-decoration: none; line-height: 1.4;
}
.period-toggle button:hover:not(:disabled), .period-toggle a:hover { transform: none; filter: none; color: var(--text); }
.period-toggle button.active, .period-toggle a.active { background: var(--accent); color: var(--on-accent); }
.chart-hero { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.chart-hero-value { font-size: 34px; font-weight: 800; font-variant-numeric: proportional-nums; }
.chart-hero-trend { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.chart-hero-trend.up { color: var(--ok); background: rgba(61, 220, 132, 0.12); }
.chart-hero-trend.down { color: var(--ko); background: rgba(var(--ko-rgb), 0.12); }
.chart-wrap { position: relative; margin-top: 10px; }
.area-chart { width: 100%; height: 220px; display: block; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-size: 10px; font-family: 'Poppins', sans-serif; }
.chart-area { fill: var(--accent); fill-opacity: 0.1; stroke: none; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; opacity: 0; transition: opacity 0.1s ease; }
.chart-dot--active { opacity: 1; }
.area-chart circle:last-of-type.chart-dot { opacity: 1; }
.chart-end-label { fill: var(--text); font-size: 12px; font-weight: 700; font-family: 'Poppins', sans-serif; }
.chart-tooltip {
  position: absolute; transform: translate(-50%, -130%); pointer-events: none;
  background: #101013; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  font-size: 12px; white-space: nowrap; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); z-index: 10;
  display: flex; flex-direction: column; gap: 2px;
}
.chart-tooltip b { font-size: 13px; }
.chart-tooltip span { color: var(--muted); font-size: 11px; }

/* ---- Graphique multi-series (Acquisition Stats): clics/demandes (axe gauche), conversion % (axe droit) ---- */
.chart-axis-label--rate { fill: var(--conv-color, #f59e0b); }
.chart-line--clicks, .chart-dot--clicks { stroke: var(--accent); }
.chart-dot--clicks { fill: var(--accent); }
.chart-line--demandes, .chart-dot--demandes { stroke: #6366f1; }
.chart-dot--demandes { fill: #6366f1; }
.chart-line--rate { stroke: var(--conv-color, #f59e0b); stroke-width: 2.5; stroke-dasharray: 5 4; }
.chart-dot--rate { fill: var(--conv-color, #f59e0b); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.legend-item {
  display: flex; align-items: center; gap: 6px; background: transparent; border: none; padding: 2px 0;
  font-size: 12px; font-weight: 600; color: var(--text); opacity: 1; transition: opacity 0.15s ease;
}
.legend-item:hover:not(:disabled) { transform: none; filter: none; color: var(--text); }
.legend-item.off { opacity: 0.4; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-dot--clicks { background: var(--accent); }
.legend-dot--demandes { background: #6366f1; }
.legend-dot--rate { background: var(--conv-color, #f59e0b); }

/* ---- Etat vide ---- */
.empty-state { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-state svg { color: #3a3a40; margin-bottom: 10px; }
.empty-state p { margin: 0; font-size: 13px; }

/* ---- Onglets de categories (Bibliotheque Cowork) ---- */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.category-tab {
  padding: 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none;
}
.category-tab:hover { color: var(--text); border-color: rgba(var(--accent-rgb), 0.4); }
.category-tab.active { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.category-tab--add { display: inline-flex; align-items: center; gap: 4px; background: transparent; border-style: dashed; cursor: pointer; font: inherit; }
.category-tab--add:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-2); }
.category-tab--drop { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.18); color: var(--accent-2); }

/* ---- Glisser-deposer de fichiers dans la Bibliotheque Cowork ---- */
.panel--drop { border-color: rgba(var(--accent-rgb), 0.5); }
.drop-hint {
  position: absolute; inset: 14px; border: 2px dashed var(--accent); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(10, 10, 12, 0.88); color: var(--accent-2); font-weight: 600; font-size: 13px;
  text-align: center; padding: 20px; pointer-events: none; z-index: 5;
}

/* ---- Bibliotheque Cowork (photos importees depuis Design) ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-pick {
  position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 2px solid transparent; aspect-ratio: 1; background: var(--panel-alt);
}
.photo-pick input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pick:has(input:checked) { border-color: var(--accent); }
.photo-pick-check {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(10, 10, 12, 0.6); border: 1.5px solid rgba(255, 255, 255, 0.5); color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.photo-pick:has(input:checked) .photo-pick-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.photo-pick-badge {
  position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700; padding: 3px 7px;
  border-radius: 999px; background: rgba(10, 10, 12, 0.75); color: #fff;
}
.photo-pick.is-used img { opacity: 0.55; }

/* ---- Calendrier de posts Facebook (Co-work) ---- */
/* ---- Selecteur de compte: photo + nom du compte affiche, clic pour choisir parmi les autres ---- */
.account-switcher { position: relative; }
.account-switcher-current {
  display: flex; align-items: center; gap: 10px; background: transparent; border: none; box-shadow: none;
  padding: 2px; color: var(--text); font-weight: 700; font-size: 16px; font-family: 'Baloo 2', 'Poppins', sans-serif;
}
.account-switcher-current:hover:not(:disabled) { transform: none; filter: none; color: var(--accent-2); }
.account-switcher-current svg { color: var(--muted); flex-shrink: 0; }
.account-switcher-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: block; flex-shrink: 0;
  background: var(--panel); border: 2px solid transparent;
}
.account-switcher-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-switcher-avatar .avatar-fallback { width: 100%; height: 100%; font-size: 15px; }
.account-switcher-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 230px; max-height: 320px;
  overflow-y: auto; background: #101013; border: 1px solid var(--border); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.account-switcher-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none;
  color: var(--text); font-size: 13px; font-weight: 600;
}
.account-switcher-item:hover { background: #1a1a1f; }
.account-switcher-item.active { background: rgba(var(--accent-rgb), 0.1); color: var(--accent-2); }
.account-switcher-item .account-switcher-avatar { width: 30px; height: 30px; }
.account-switcher-item .account-switcher-avatar .avatar-fallback { font-size: 11px; }
.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 18px; }
.calendar-nav-label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; min-width: 160px; justify-content: center; }
.calendar-nav-label-text { cursor: pointer; }
.calendar-nav-label-text:hover { color: var(--accent-2); }
/* Champ natif garde pour son selecteur de mois (showPicker), mais invisible: son propre affichage du
   mois faisait doublon avec calendar-nav-label-text juste a cote. */
.calendar-jump-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---- Palette de couleurs (compte / page): pastilles rondes plutot que des codes hex en texte ---- */
.badge-swatches { display: flex; flex-wrap: wrap; gap: 8px; max-width: 200px; }
.badge-swatch {
  width: 22px; height: 22px; border-radius: 50%; padding: 0; border: 2px solid transparent;
  box-shadow: none; flex-shrink: 0;
}
.badge-swatch:hover:not(:disabled) { transform: scale(1.12); filter: none; }
.badge-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.badge-swatch--none { background: var(--panel); border-color: var(--border); }

/* ---- Calendrier en colonnes (planning brouillon + vue Semaine du calendrier Facebook) ---- */
.calendar-days { display: flex; flex-direction: column; }
.calendar-row { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid #1c1c21; }
.calendar-row:last-child { border-bottom: none; }
.calendar-row.is-today .calendar-row-label { color: var(--accent-2); }
.calendar-row-date {
  flex-shrink: 0; width: 56px; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 2px; padding-top: 4px;
}
.calendar-row-weekday { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.calendar-row-label { font-size: 14px; font-weight: 700; }
.calendar-row-cards { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Colonnes de tranches dans le planning brouillon (Matin | Midi | Soir cote a cote, meme jour) ---- */
.planning-slots { flex: 1; min-width: 0; display: flex; gap: 14px; }
.planning-slot { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.planning-slot-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.planning-slot .calendar-row-cards { flex-wrap: wrap; }
@media (max-width: 900px) { .planning-slots { flex-direction: column; gap: 10px; } }

/* ---- Calendrier (grille, orientation semaine Lun-Dim) ---- */
.calendar-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 8px; }
.calendar-grid-head span {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted);
  text-align: center;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(92px, auto); gap: 10px; }
.calendar-day {
  position: relative; background: var(--panel-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.calendar-day.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.calendar-day-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-day-num { font-size: 12px; font-weight: 700; color: var(--muted); }
.calendar-day.is-today .calendar-day-num { color: var(--accent-2); }
.calendar-day-num--clickable { cursor: pointer; }
.calendar-day-num--clickable:hover { color: var(--accent-2); }
.calendar-day-posts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; align-content: flex-start; }
.calendar-day-thumb {
  position: relative; flex: 1 1 56px; max-width: 72px; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  cursor: zoom-in; background: var(--panel);
}
.calendar-day-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Pas de photo: la caption prend l'espace restant a cote des vignettes photo du meme jour (pas en dessous). */
.calendar-day-thumb--text {
  flex: 1 1 70px; max-width: none; aspect-ratio: auto; min-height: 44px; background: transparent;
}
.calendar-day-thumb-caption {
  margin: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 11px; line-height: 1.4; color: var(--text); cursor: pointer;
}
.calendar-day-thumb.status-programme::after {
  content: ""; position: absolute; left: 4px; bottom: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.7);
}
/* Etiquette de tranche (Matin/Midi/Soir...): distingue deux posts differents qui partagent le meme jour. */
.calendar-day-thumb-tranche {
  position: absolute; left: 3px; top: 3px; z-index: 1; max-width: calc(100% - 6px); pointer-events: none;
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; padding: 1px 4px;
  border-radius: 4px; background: rgba(10, 10, 12, 0.72); color: #fff; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
/* ---- Marqueur "posté" (rond en haut a droite du carre du jour, VA + admin) ---- */
.calendar-day-check-form { position: absolute; top: 6px; right: 6px; z-index: 2; }
.calendar-day-check {
  display: block; width: 15px; height: 15px; border-radius: 50%;
  background: rgba(10, 10, 12, 0.55); border: 1.5px solid rgba(255, 255, 255, 0.55); cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.calendar-day-check input { position: absolute; opacity: 0; pointer-events: none; }
.calendar-day-check:has(input:checked) {
  background: #39ff7a; border-color: #39ff7a;
  box-shadow: 0 0 9px 2px rgba(57, 255, 122, 0.85);
}
@media (max-width: 720px) {
  .calendar-grid-head, .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .calendar-grid-head span { font-size: 9px; }
}

/* ---- Fenetre de visualisation d'une publication: photo + caption cote a cote ---- */
.post-view-layout { display: flex; flex-direction: column; gap: 14px; }
.post-view-image { max-height: 280px; width: auto; max-width: 100%; object-fit: contain; border-radius: 8px; background: var(--panel-alt); display: block; margin: 0 auto; }
.post-view-body {
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; max-height: 30vh; overflow-y: auto;
}
.post-view-body .view-caption { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.6; }
.post-card {
  position: relative; background: var(--panel-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; width: 220px; flex-shrink: 0;
}
.post-card-image {
  display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 8px;
  background: var(--panel);
}
.post-card-image-preview {
  display: block; max-height: 200px; width: auto; max-width: 100%; object-fit: contain; border-radius: 8px;
  margin: 2px auto 0; background: var(--panel-alt);
}
.post-card-caption { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; padding-right: 44px; }
.post-card-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s ease; }
.post-card:hover .post-card-actions { opacity: 1; }
.post-card-actions button, .post-card-actions .icon-btn { padding: 4px; }
.post-card-actions form { display: inline; }
.post-card-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 220px; flex-shrink: 0;
  background: transparent; border: 1.5px dashed var(--border); color: var(--muted); font-weight: 600; font-size: 12px;
}
.post-card-add:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-2); background: rgba(var(--accent-rgb), 0.04);
  transform: none; filter: none;
}

/* ---- Statut d'une carte (a_faire/programme/poste): liseret discret sur le bord gauche ---- */
.post-card.status-programme { border-left: 3px solid #f59e0b; }
.post-card.status-poste { border-left: 3px solid var(--ok); }
.post-card-time { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.post-card-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.post-status-form { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.post-status-check {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid var(--border); color: transparent; cursor: pointer; flex-shrink: 0;
}
.post-status-check:has(input:checked) { background: var(--ok); border-color: var(--ok); color: #0a0a0c; }
.post-status-check input { position: absolute; opacity: 0; pointer-events: none; }
.post-status-form select { padding: 3px 6px; font-size: 11px; }

/* ---- Page "bientot" ---- */
.coming-soon { max-width: 560px; margin: 60px auto; text-align: center; }
.coming-soon .icon-wrap {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent-2); margin: 0 auto 18px;
}
.coming-soon h1 { font-size: 20px; margin: 0 0 10px; }
.coming-soon p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Semaines recues de Foxus Design (17 oct 2026) */
.week-folders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 16px; }

/* ---- Co-work > Semaines : reseau -> page -> semaines (18 oct 2026) ---- */
.cw-small { font-size: 12px; }
.cw-warn { color: #ffb02e; }
.cw-ko { color: var(--ko); }
.cw-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cw-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.cw-crumbs a:hover { color: var(--text); }
.cw-tab { display: inline-flex; align-items: center; gap: 7px; }
.cw-tab-count { font-size: 11px; opacity: 0.7; }
.cw-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cw-inline-form input { min-width: 220px; flex: 1; }
.cw-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cw-manage-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cw-manage-row:last-of-type { border-bottom: none; }
.cw-unrouted { border-color: rgba(var(--warn-rgb), 0.45); }
.cw-unrouted h2 { display: flex; align-items: center; gap: 8px; color: #ffb02e; }
.cw-unrouted-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }

.cw-avatar { position: relative; display: inline-flex; flex-shrink: 0; border-radius: 50%; border: 3px solid var(--border); background: var(--panel); }
.cw-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.cw-avatar-initials { margin: auto; font-weight: 700; color: var(--muted); }
.cw-avatar-network { position: absolute; right: -5px; bottom: -5px; display: flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel); }
.network-logo { display: block; flex-shrink: 0; }

.cw-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.cw-folder { position: relative; }
.cw-folder-link {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 26px 14px 16px; background: var(--panel-alt); border: 1px solid var(--border); border-radius: 4px var(--radius) var(--radius) var(--radius);
  color: var(--text); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease;
}
.cw-folder-link:hover { border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-2px); }
.cw-folder-tab { position: absolute; top: -9px; left: -1px; width: 72px; height: 10px; background: var(--panel-alt); border: 1px solid var(--border); border-bottom: none; border-radius: 6px 10px 0 0; }
.cw-folder-name { font-weight: 700; font-size: 14px; margin-top: 6px; word-break: break-word; }
.cw-folder-meta { font-size: 12px; color: var(--muted); }
.cw-folder-drive { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.cw-folder-drive.is-on { color: var(--accent-2); }
.cw-folder-move { margin-top: 6px; }
.cw-folder-move select { width: 100%; font-size: 12px; padding: 5px 8px; }

.cw-drive-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.cw-drive-form { display: flex; flex-direction: column; gap: 8px; min-width: min(420px, 100%); }

.cw-week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 22px; }
.cw-week-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.cw-week-card.is-past { opacity: 0.55; filter: grayscale(0.6); }
.cw-week-card.is-past:hover { opacity: 0.9; filter: none; }
.cw-week-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; height: 120px; background: var(--panel-alt); text-decoration: none; }
.cw-week-preview img, .cw-week-preview video { width: 100%; height: 120px; object-fit: cover; display: block; background: #000; }
.cw-week-preview-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; }
.cw-week-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cw-week-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.cw-week-title a { color: var(--text); text-decoration: none; }
.cw-week-dates { font-size: 12px; color: var(--muted); margin-top: -4px; }
.cw-week-name { font-size: 12px; }
.cw-counters { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-counter { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel-alt); border: 1px solid var(--border); }
.cw-counter b { color: var(--accent-2); }
.cw-counter--muted b { color: var(--muted); }
.cw-states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cw-state { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cw-state-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cw-state .cw-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
.cw-week-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.cw-week-actions a { text-decoration: none; }
.cw-week-actions button { padding: 7px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }

.cw-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.cw-pill--ok { background: rgba(61, 220, 132, 0.14); color: var(--ok); }
.cw-pill--warn { background: rgba(var(--warn-rgb), 0.14); color: #ffb02e; }
.cw-pill--ko { background: rgba(var(--ko-rgb), 0.14); color: var(--ko); }
.cw-pill--muted { background: rgba(147, 147, 156, 0.14); color: var(--muted); }

.cw-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cw-detail-grid .panel { margin-bottom: 22px; }
@media (max-width: 1180px) { .cw-detail-grid { grid-template-columns: 1fr; } }
.cw-state-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cw-state-line { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; }
.cw-state-line .cw-pill { justify-self: start; white-space: normal; }
.cw-progress { margin: 10px 0; }
.cw-progress-bar { height: 8px; border-radius: 999px; background: var(--panel-alt); overflow: hidden; margin-bottom: 6px; }
.cw-progress-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }
.cw-blockers { margin: 8px 0 12px; padding-left: 18px; font-size: 13px; color: #ffb02e; }
.cw-file-list { margin: 6px 0 0; padding-left: 18px; max-height: 220px; overflow: auto; }
.cw-spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: cw-spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes cw-spin { to { transform: rotate(360deg); } }

.cw-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 12px; }
.cw-posts--carousel { grid-template-columns: 1fr; }
.cw-post { background: var(--panel-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.cw-post-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.cw-post-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cw-posts:not(.cw-posts--carousel) .cw-post-media { grid-template-columns: 1fr; }
.cw-media { position: relative; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 4 / 5; }
.cw-media--video { aspect-ratio: 9 / 16; }
.cw-media img, .cw-media video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cw-media img { cursor: zoom-in; }
.cw-media-order { position: absolute; top: 6px; left: 6px; z-index: 2; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 11px; font-weight: 700; }
.cw-media-dl { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; padding: 6px; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; }
.cw-media-dl:hover { background: var(--accent); color: var(--on-accent); }
.cw-media-missing { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; background: var(--panel); }

.cw-sim { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; border: 1px solid var(--border); }
.cw-sim.is-ok { border-color: rgba(61, 220, 132, 0.4); }
.cw-sim.is-ko { border-color: rgba(var(--warn-rgb), 0.45); }
.cw-log { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; max-height: 340px; overflow: auto; }
.cw-log li { padding: 5px 0; border-bottom: 1px solid #1c1c21; }
.cw-log .cw-log--warning { color: #ffb02e; }
.cw-log .cw-log--error { color: var(--ko); }
.cw-lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.88); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.cw-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
@media (max-width: 720px) {
  .cw-state-line { grid-template-columns: 1fr; gap: 4px; }
  .cw-inline-form input { min-width: 0; }
}
.cw-tabs .category-tab--add { font-size: 13px; font-weight: 600; padding: 7px 14px; }

/* ---- Co-work > Livrables : une ligne par compte (18 oct 2026) ---- */
.lv-summary { font-size: 13px; color: var(--muted); }
.lv-summary b { font-size: 22px; color: var(--accent-2); margin-right: 4px; }
.lv-table { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lv-head, .lv-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 1.4fr 1fr 1fr 1fr 150px; gap: 14px; align-items: start; padding: 14px 18px; }
.lv-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--panel-alt); border-bottom: 1px solid var(--border); }
.lv-row { border-bottom: 1px solid var(--border); }
.lv-row:last-child { border-bottom: none; }
.lv-row:hover { background: rgba(255, 255, 255, 0.015); }
.lv-account { display: flex; gap: 12px; align-items: center; min-width: 0; }
.lv-account-name { font-weight: 700; color: var(--text); text-decoration: none; }
.lv-account a { text-decoration: none; }
.lv-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lv-ready { display: flex; gap: 6px; align-items: center; }
.lv-ready .lv-chip { flex: 1; }
.lv-ready .icon-btn { padding: 6px; }
.lv-chip { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--panel-alt); color: var(--text); text-decoration: none; font-size: 12px; min-width: 0; }
.lv-chip span { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-chip:hover { border-color: rgba(var(--accent-rgb), 0.5); }
.lv-chip--ready { border-left: 3px solid var(--accent); }
.lv-chip--running { border-left: 3px solid #ffb02e; }
.lv-chip--delivered { border-left: 3px solid var(--ok); opacity: 0.85; }
.lv-chip--receiving { border-left: 3px solid var(--muted); opacity: 0.8; }
.lv-chip.is-past { filter: grayscale(0.6); }
.lv-chip-counts { color: var(--accent-2) !important; }
.lv-actions { display: flex; flex-direction: column; gap: 6px; }
.lv-actions button { width: 100%; font-size: 12px; padding: 7px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
@media (max-width: 1100px) {
  .lv-head { display: none; }
  .lv-row { grid-template-columns: 1fr; gap: 10px; }
  .lv-cell::before { content: attr(data-label); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
}

/* ---- Work > Taches (pages/taches.html) ---- */
.muted-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel-alt); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }
.muted-line { color: var(--muted); font-size: 13px; margin: 0; }
.focus-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.focus-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-alt); }
.focus-item.is-done .focus-title { text-decoration: line-through; color: var(--muted); }
.focus-rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(var(--accent-rgb), 0.16); color: var(--accent-2); flex-shrink: 0; }
.focus-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-title .muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.task-new { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr; gap: 10px 12px; align-items: end; }
.task-new label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.task-new input, .task-new select { width: 100%; }
.task-new .task-new-pin { display: flex; align-items: center; gap: 8px; margin: 0; grid-column: 1 / 4; font-weight: 500; color: var(--text); font-size: 13px; }
.task-new .task-new-pin input { width: auto; }
.task-new-submit { grid-column: 4 / -1; display: flex; justify-content: flex-end; }
.task-new-submit button { display: inline-flex; align-items: center; gap: 6px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row { border-bottom: 1px solid #1c1c21; padding: 10px 0; scroll-margin-top: 80px; }
.task-row:last-child { border-bottom: none; }
.task-row:target { background: rgba(var(--accent-rgb), 0.06); border-radius: var(--radius-sm); }
.task-main { display: flex; align-items: center; gap: 12px; }
.task-check-form { display: contents; }
.task-check { width: 22px; height: 22px; padding: 0; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; background: transparent; border: 2px solid #5b5b66; color: var(--on-accent); }
.task-check.checked { background: var(--accent); border-color: var(--accent); }
.task-check:hover:not(:disabled) { border-color: var(--accent); filter: none; }
.task-text { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 600; }
.task-row.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.task-when.tone-warn { color: #ffb02e; }
.task-when.tone-ko { color: var(--ko); }
.task-prio { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); }
.prio-haute .task-prio { color: #ff9b9b; border-color: rgba(var(--high-rgb), 0.4); }
.prio-basse .task-prio { color: var(--muted); }
.task-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-2); text-decoration: none; }
.task-link:hover { text-decoration: underline; }
.task-focus-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-2); }
.task-actions { display: flex; align-items: center; gap: 6px; }
.task-actions select { padding: 5px 8px; font-size: 12px; }
.task-actions .icon-btn.is-on { color: var(--accent-2); border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.1); }
.task-edit { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr; gap: 8px; align-items: center; }
.task-edit input, .task-edit select { width: 100%; }
.task-edit-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.task-done-panel summary { cursor: pointer; list-style: none; }
.task-done-panel summary::-webkit-details-marker { display: none; }
.task-done-panel summary h2 { display: inline; }
.task-done-panel[open] summary { margin-bottom: 10px; }
@media (max-width: 960px) {
  .task-new, .task-edit { grid-template-columns: 1fr 1fr; }
  .task-new-title { grid-column: 1 / -1; }
  .task-new .task-new-pin, .task-new-submit { grid-column: 1 / -1; }
  .task-main { flex-wrap: wrap; }
  .task-actions { width: 100%; justify-content: flex-end; }
}

/* ---- Panneau de couleurs (identique a celui de l'accueil): Dropfan, Taapit (components/palette_panel.html) ---- */
.hp-palette { position: relative; }
.hp-palette-btn {
  width: var(--action-size); height: var(--action-size); padding: 0; display: grid; place-items: center; border-radius: 12px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--hp-line, rgba(255, 255, 255, 0.12)); color: #e6e3f0;
}
.hp-palette-btn:hover:not(:disabled) { border-color: rgba(var(--accent-rgb), 0.6); color: var(--brand-200); filter: none; }
.hp-popover {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 268px; padding: 16px;
  background: #14151d; border: 1px solid var(--hp-line, rgba(255, 255, 255, 0.12)); border-radius: 14px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}
.hp-popover-title { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hp-soft, #a19caf); margin-bottom: 12px; }
.hp-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hp-swatch {
  aspect-ratio: 1; width: 100%; padding: 0; border-radius: 10px; border: 2px solid transparent;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.45), transparent 55%), var(--sw);
}
.hp-swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
.hp-custom { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: #dcd9e6; cursor: pointer; }
.hp-custom input { width: 38px; height: 32px; padding: 2px; border-radius: 8px; cursor: pointer; }
.hp-custom code { color: var(--hp-soft, #a19caf); font-size: 12px; margin-left: 4px; }
.hp-reset {
  margin-top: 14px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1px solid var(--hp-line, rgba(255, 255, 255, 0.12)); color: #e6e3f0; font-weight: 500; font-size: 13px; padding: 9px;
}
.hp-reset:hover:not(:disabled) { border-color: rgba(var(--accent-rgb), 0.6); filter: none; }
.hp-hint { margin: 10px 0 0; font-size: 12px; color: var(--hp-soft-2, #77727f); line-height: 1.45; }
.hp-hint--err { color: var(--ko); }


/* ---- Menu lateral reorganisable (static/js/nav-sort.js), administrateur, ecran large ---- */
.sidebar nav[data-nav-sortable] { position: relative; }
@media (min-width: 861px) {
  .sidebar nav[data-nav-sortable] .nav-group-label[draggable="true"] { cursor: grab; border-radius: 6px; outline: none; }
  .sidebar nav[data-nav-sortable] .nav-group-label[draggable="true"]:hover,
  .sidebar nav[data-nav-sortable] .nav-group-label[draggable="true"]:focus-visible { color: var(--text); }
  .sidebar nav[data-nav-sortable] .nav-group-label[draggable="true"]:focus-visible { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.5); }
}
.sidebar .is-dragging { opacity: 0.35; }
.nav-drop-line {
  display: none; position: absolute; right: 8px; height: 2px; border-radius: 2px; pointer-events: none; z-index: 5;
  background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
}
.sidebar nav.is-saving { cursor: progress; }
@media (max-width: 860px) { .nav-drop-line { display: none !important; } }

/* ---- Separations du menu: 0,5 s de survol -> « + Nouvelle categorie »; categories creees renommables / supprimables ---- */
.nav-sep { position: absolute; right: 6px; z-index: 4; display: flex; align-items: center; justify-content: center; cursor: copy; }
.nav-sep::before { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: transparent; transition: background 0.2s ease; }
.nav-sep.is-open::before { background: rgba(var(--accent-rgb), 0.55); box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.6); }
.nav-sep-btn {
  position: relative; opacity: 0; pointer-events: none; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #15151a; color: var(--accent-2, #ddd); border: 1px solid rgba(var(--accent-rgb), 0.6); box-shadow: none; transition: opacity 0.15s ease;
}
.nav-sep.is-open .nav-sep-btn, .nav-sep-btn:focus-visible { opacity: 1; pointer-events: auto; }
.nav-sep-btn:hover:not(:disabled) { transform: none; filter: brightness(1.15); }
.nav-name-input { position: relative; width: 100%; padding: 4px 8px; font-size: 12px; border-radius: 6px; z-index: 5; }
.nav-group-label { position: relative; }
.nav-group--custom .nav-group-label { display: flex; align-items: center; gap: 6px; }
.nav-group--custom .nav-group-name { flex: 1; min-width: 0; }
.nav-group-del {
  margin-left: auto; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border-radius: 50%; font-size: 13px; line-height: 1;
  background: transparent; border: none; color: var(--muted); opacity: 0; box-shadow: none; transition: opacity 0.15s ease;
}
.nav-group-label:hover .nav-group-del, .nav-group-label:focus-within .nav-group-del, .nav-group-del:focus-visible { opacity: 1; }
.nav-group-del:hover:not(:disabled) { color: var(--ko); background: rgba(var(--ko-rgb), 0.12); transform: none; filter: none; }
.nav-group-empty { margin: 2px 14px 4px; padding: 8px 10px; border: 1px dashed rgba(255, 255, 255, 0.14); border-radius: 8px; font-size: 11.5px; color: var(--muted); }
@media (max-width: 860px) { .nav-sep, .nav-group-del, .nav-group-empty { display: none !important; } }
