/* ==========================================================================
   Suivi de prospection — « Mes contacts »
   ========================================================================== */

/* Barre d'étapes au-dessus du tableau */
.wpgl-pl-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.wpgl-pl-bar__item {
	display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
	border: 1px solid var(--wpgl-border, #e3e8f2); background: var(--wpgl-surface, #fff);
	color: var(--wpgl-text-2, #4a5571); font-size: 12.5px; font-weight: 600; text-decoration: none;
	transition: border-color .15s, background .15s, color .15s;
}
.wpgl-pl-bar__item:hover { border-color: var(--wpgl-brand-300, #9db3ff); color: var(--wpgl-text-1, #111a33); }
.wpgl-pl-bar__item:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-pl-bar__n {
	min-width: 18px; padding: 0 5px; border-radius: 999px; text-align: center;
	background: var(--wpgl-surface-2, #f0f3f9); color: var(--wpgl-text-3, #7b86a2); font-size: 11.5px; line-height: 18px;
}
.wpgl-pl-bar__item.is-active { background: var(--wpgl-text-1, #111a33); border-color: var(--wpgl-text-1, #111a33); color: #fff; }
.wpgl-pl-bar__item.is-active .wpgl-pl-bar__n { background: rgba(255, 255, 255, .18); color: #fff; }
.wpgl-pl-bar__item.is-due { border-color: #f5c27a; background: #fff8ec; color: #9a5b00; }
.wpgl-pl-bar__item.is-due .wpgl-pl-bar__n { background: #f59e0b; color: #fff; }
.wpgl-pl-bar__item.is-due.is-active { background: #9a5b00; border-color: #9a5b00; color: #fff; }

/* Ligne de suivi sous le nom du contact */
.wpgl-pl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; position: relative; }
.wpgl-pl.is-saving { opacity: .7; }

.wpgl-pl__stage select {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	padding: 3px 24px 3px 10px; border-radius: 999px; border: 1px solid transparent;
	font: inherit; font-size: 12px; font-weight: 600; line-height: 18px;
	background: var(--pl-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237b86a2' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 9px center / 9px 6px;
	color: var(--pl-fg);
}
.wpgl-pl__stage select:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-pl                           { --pl-bg: #f0f3f9; --pl-fg: #4a5571; }
.wpgl-pl[data-stage="called"]      { --pl-bg: #e8f0ff; --pl-fg: #2145c4; }
.wpgl-pl[data-stage="follow"]      { --pl-bg: #fff3dc; --pl-fg: #9a5b00; }
.wpgl-pl[data-stage="interested"]  { --pl-bg: #f1eaff; --pl-fg: #6b35c9; }
.wpgl-pl[data-stage="won"]         { --pl-bg: #e3f7ec; --pl-fg: #127a43; }
.wpgl-pl[data-stage="lost"]        { --pl-bg: #f6f0f0; --pl-fg: #8a5a5a; }

.wpgl-pl__date {
	display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 7px; border-radius: 999px;
	color: var(--wpgl-text-3, #7b86a2); border: 1px solid var(--wpgl-border, #e3e8f2);
}
.wpgl-pl__date svg { width: 13px; height: 13px; flex: none; }
.wpgl-pl__date input {
	border: 0; background: transparent; padding: 1px 0; font: inherit; font-size: 12px; color: inherit; width: 112px; min-height: 0; box-shadow: none;
}
.wpgl-pl__date input:focus { outline: none; }
.wpgl-pl__date:focus-within { box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-pl[data-due] .wpgl-pl__date { color: #b45309; border-color: #f5c27a; background: #fff8ec; font-weight: 600; }

.wpgl-pl__note summary {
	display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none;
	padding: 2px 8px; border-radius: 999px; font-size: 12px; color: var(--wpgl-text-3, #7b86a2);
}
.wpgl-pl__note summary::-webkit-details-marker { display: none; }
.wpgl-pl__note summary svg { width: 13px; height: 13px; }
.wpgl-pl__note summary:hover { color: var(--wpgl-text-1, #111a33); background: var(--wpgl-surface-2, #f0f3f9); }
.wpgl-pl__note summary:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-pl__note[data-has-note] summary { color: var(--wpgl-brand-700, #2145c4); background: var(--wpgl-brand-50, #eef2ff); font-weight: 600; }
.wpgl-pl__pop {
	position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); width: min(340px, 80vw); box-sizing: border-box;
	padding: 10px; border-radius: 12px; border: 1px solid var(--wpgl-border, #e3e8f2); background: var(--wpgl-surface, #fff);
	box-shadow: 0 12px 32px rgba(17, 26, 51, .14);
}
.wpgl-pl__note textarea {
	width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--wpgl-border, #e3e8f2);
	font: inherit; font-size: 13px; line-height: 1.45; resize: vertical;
}
.wpgl-pl__note textarea:focus { outline: none; border-color: var(--wpgl-brand-300, #9db3ff); }

.wpgl-pl__saved { font-size: 11.5px; color: #127a43; opacity: 0; transition: opacity .2s; }
.wpgl-pl__saved.is-on { opacity: 1; }
.wpgl-pl__saved.is-error { color: #b42318; }

@media (max-width: 720px) {
	.wpgl-pl__pop { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
	.wpgl-pl__note[open] { flex-basis: 100%; }
}
.wpgl-pl-bar__item[hidden] { display: none; }

/* Pas encore de date : bouton « Relance » compact, le calendrier s'ouvre au clic */
.wpgl-pl__date-add { display: none; font-size: 12px; }
.wpgl-pl__date[data-empty] { cursor: pointer; padding-right: 9px; border-style: dashed; position: relative; }
.wpgl-pl__date[data-empty]:hover { color: var(--wpgl-text-1, #111a33); }
.wpgl-pl__date[data-empty] .wpgl-pl__date-add { display: inline; }
.wpgl-pl__date[data-empty] input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ==========================================================================
   Modèles d'email (bouton « Écrire » et fenêtre)
   ========================================================================== */
.wpgl-pl__write {
	display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--wpgl-brand-300, #9db3ff); background: var(--wpgl-surface, #fff);
	color: var(--wpgl-brand-700, #2145c4); font: inherit; font-size: 12px; font-weight: 600; line-height: 18px;
}
.wpgl-pl__write svg { width: 13px; height: 13px; }
.wpgl-pl__write:hover { background: var(--wpgl-brand-50, #eef2ff); }
.wpgl-pl__write:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }

.wpgl-tpl {
	width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 16px;
	background: var(--wpgl-surface, #fff); color: var(--wpgl-text-1, #111a33); box-shadow: 0 24px 64px rgba(17, 26, 51, .28);
}
.wpgl-tpl::backdrop { background: rgba(17, 26, 51, .45); }
.wpgl-tpl__box { display: flex; flex-direction: column; margin: 0; }
.wpgl-tpl__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 8px; }
.wpgl-tpl__title { margin: 0; font-size: 17px; font-weight: 700; }
.wpgl-tpl__x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--wpgl-text-3, #7b86a2); padding: 4px 8px; border-radius: 8px; }
.wpgl-tpl__x:hover { background: var(--wpgl-surface-2, #f0f3f9); color: var(--wpgl-text-1, #111a33); }
.wpgl-tpl__pane { display: flex; flex-direction: column; gap: 10px; padding: 8px 20px 18px; }
.wpgl-tpl__pane[hidden] { display: none; }
.wpgl-tpl__row { display: flex; align-items: flex-end; gap: 8px; }
.wpgl-tpl__row .wpgl-tpl__field { flex: 1; }
.wpgl-tpl__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--wpgl-text-2, #4a5571); }
.wpgl-tpl__field input, .wpgl-tpl__field select, .wpgl-tpl__field textarea {
	width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--wpgl-border, #e3e8f2);
	background: var(--wpgl-surface, #fff); font: inherit; font-size: 14px; font-weight: 400; color: var(--wpgl-text-1, #111a33); box-sizing: border-box;
}
.wpgl-tpl__field input[readonly] { background: var(--wpgl-surface-2, #f0f3f9); }
.wpgl-tpl__field textarea { resize: vertical; line-height: 1.5; }
.wpgl-tpl__field :focus { outline: none; border-color: var(--wpgl-brand-300, #9db3ff); box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-tpl__hint { margin: -2px 0 0; font-size: 12px; color: #9a5b00; }
.wpgl-tpl__check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wpgl-text-2, #4a5571); }
.wpgl-tpl__check[hidden] { display: none; }
.wpgl-tpl__vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-tpl__var {
	padding: 2px 8px; border-radius: 6px; border: 1px solid var(--wpgl-border, #e3e8f2); background: var(--wpgl-surface-2, #f0f3f9);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; cursor: pointer; color: var(--wpgl-brand-700, #2145c4);
}
.wpgl-tpl__var:hover { border-color: var(--wpgl-brand-300, #9db3ff); }
.wpgl-tpl__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.wpgl-tpl__spacer { flex: 1; }
.wpgl-tpl__status { font-size: 12.5px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-tpl__danger { color: #b42318; }
.wpgl-tpl__danger:disabled { opacity: .4; cursor: default; }
@media (max-width: 560px) {
	.wpgl-tpl__foot .wpgl-btn { flex: 1 1 auto; justify-content: center; }
	.wpgl-tpl__spacer { display: none; }
}

/* Bandeau « relances du jour » */
.wpgl-due {
	display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px;
	background: #fff8ec; border: 1px solid #f5c27a; color: #7a4700;
}
.wpgl-due > svg { width: 22px; height: 22px; flex: none; color: #d97706; }
.wpgl-due p { margin: 0; flex: 1; font-size: 14px; line-height: 1.4; }
.wpgl-due p span { color: #9a5b00; }
.wpgl-due .wpgl-btn { flex: none; }
.wpgl-due__x { flex: none; border: 0; background: none; font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 8px; cursor: pointer; color: #9a5b00; }
.wpgl-due__x:hover { background: rgba(217, 119, 6, .12); }
@media (max-width: 560px) {
	.wpgl-due { flex-wrap: wrap; }
	.wpgl-due p { flex-basis: calc(100% - 80px); }
	.wpgl-due .wpgl-btn { order: 3; flex: 1; justify-content: center; }
}

/* Étape sur les cartes débloquées de la recherche (le thème force le blanc sur ces cartes) */
.wpgl-place-card.contact-unlocked .wpgl-pl-chip.wpgl-pl-chip {
	display: inline-block; align-self: flex-start; justify-self: start; width: auto; max-width: max-content; margin: 0 0 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 18px;
	background: #f0f3f9; color: #4a5571;
}
.wpgl-place-card.contact-unlocked .wpgl-pl-chip[data-stage="called"]     { background: #e8f0ff; color: #2145c4; }
.wpgl-place-card.contact-unlocked .wpgl-pl-chip[data-stage="follow"]     { background: #fff3dc; color: #9a5b00; }
.wpgl-place-card.contact-unlocked .wpgl-pl-chip[data-stage="interested"] { background: #f1eaff; color: #6b35c9; }
.wpgl-place-card.contact-unlocked .wpgl-pl-chip[data-stage="won"]        { background: #e3f7ec; color: #127a43; }
.wpgl-place-card.contact-unlocked .wpgl-pl-chip[data-stage="lost"]       { background: #f6f0f0; color: #8a5a5a; }

/* Bilan de prospection */
.wpgl-bilan { margin: 0 0 12px; border: 1px solid var(--wpgl-border, #e3e8f2); border-radius: 14px; background: var(--wpgl-surface, #fff); }
.wpgl-bilan__summary {
	display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none;
	font-size: 13.5px; color: var(--wpgl-text-2, #4a5571); border-radius: 14px;
}
.wpgl-bilan__summary::-webkit-details-marker { display: none; }
.wpgl-bilan__summary svg { width: 18px; height: 18px; flex: none; color: var(--wpgl-brand-700, #2145c4); }
.wpgl-bilan__summary strong { color: var(--wpgl-text-1, #111a33); margin-right: 6px; }
.wpgl-bilan__summary::after {
	content: ""; margin-left: auto; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg) translateY(-2px); opacity: .6; transition: transform .15s;
}
.wpgl-bilan[open] .wpgl-bilan__summary::after { transform: rotate(225deg); }
.wpgl-bilan__summary:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-bilan__body { padding: 0 14px 14px; }
.wpgl-bilan__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wpgl-bilan__tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--wpgl-surface-2, #f6f8fc); }
.wpgl-bilan__label { font-size: 12px; font-weight: 600; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-bilan__value { font-size: 24px; line-height: 1.2; color: var(--wpgl-text-1, #111a33); font-variant-numeric: tabular-nums; }
.wpgl-bilan__sub { font-size: 12px; color: var(--wpgl-text-2, #4a5571); }
.wpgl-bilan__table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; }
.wpgl-bilan__table caption { text-align: left; font-size: 12px; font-weight: 700; color: var(--wpgl-text-3, #7b86a2); text-transform: uppercase; letter-spacing: .04em; padding: 4px 0 6px; }
.wpgl-bilan__table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--wpgl-text-3, #7b86a2); padding: 6px 8px; border-bottom: 1px solid var(--wpgl-border, #e3e8f2); }
.wpgl-bilan__table td { padding: 7px 8px; border-bottom: 1px solid var(--wpgl-border, #eef1f6); color: var(--wpgl-text-1, #111a33); }
.wpgl-bilan__table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wpgl-bilan__table tr:last-child td { border-bottom: 0; }
/* Graphiques du bilan */
.wpgl-bilan__charts { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.wpgl-bilan__chart { margin: 0; padding: 12px 14px; border: 1px solid var(--wpgl-border, #e3e8f2); border-radius: 12px; }
.wpgl-bilan__chart figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--wpgl-text-3, #7b86a2); text-transform: uppercase; letter-spacing: .04em; }
.wpgl-bilan__legend { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.wpgl-bilan__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #c9d6ff; }
.wpgl-bilan__legend i.is-in { margin-left: 6px; background: #2145c4; }
.wpgl-bilan__funnel { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wpgl-bilan__step { display: grid; grid-template-columns: 190px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--wpgl-text-2, #4a5571); }
.wpgl-bilan__track { height: 14px; border-radius: 99px; background: var(--wpgl-surface-2, #f1f4fa); overflow: hidden; }
.wpgl-bilan__fill { display: block; height: 100%; min-width: 4px; border-radius: 99px; background: #2145c4; }
.wpgl-bilan__step[data-step="0"] .wpgl-bilan__fill { background: #9db3ff; }
.wpgl-bilan__step[data-step="1"] .wpgl-bilan__fill { background: #6f8fff; }
.wpgl-bilan__step[data-step="2"] .wpgl-bilan__fill { background: #3d6bff; }
.wpgl-bilan__step[data-step="4"] .wpgl-bilan__fill { background: #16a34a; }
.wpgl-bilan__step-label em { font-style: normal; font-size: 11.5px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-bilan__step-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--wpgl-text-1, #111a33); }
.wpgl-bilan__months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 8px; height: 150px; margin: 0; padding: 0; list-style: none; }
.wpgl-bilan__month { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.wpgl-bilan__month-n { font-size: 12px; font-weight: 600; color: var(--wpgl-text-1, #111a33); font-variant-numeric: tabular-nums; }
.wpgl-bilan__bar { position: relative; display: flex; align-items: flex-end; width: 100%; max-width: 44px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: #c9d6ff; overflow: hidden; }
.wpgl-bilan__area { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; min-height: 0; }
.wpgl-bilan__bar-in { display: block; width: 100%; background: #2145c4; }
.wpgl-bilan__month-label { font-size: 12px; color: var(--wpgl-text-3, #7b86a2); }
@media (max-width: 900px) {
	.wpgl-bilan__charts { grid-template-columns: minmax(0, 1fr); }
	.wpgl-bilan__step { grid-template-columns: 150px minmax(0, 1fr) 40px; }
}
@media (max-width: 520px) {
	.wpgl-bilan__step { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 36px; }
}
.wpgl-bilan__hint { margin: 10px 0 0; font-size: 12.5px; color: var(--wpgl-text-3, #7b86a2); }
@media (max-width: 720px) {
	.wpgl-bilan__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wpgl-bilan__table th:nth-child(3), .wpgl-bilan__table td:nth-child(3) { display: none; }
}

/* Enregistrer dans le téléphone (vCard) */
.wpgl-pl__vcard {
	display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px;
	color: var(--wpgl-text-3, #7b86a2); border: 1px solid var(--wpgl-border, #e3e8f2);
}
.wpgl-pl__vcard svg { width: 14px; height: 14px; }
.wpgl-pl__vcard:hover { color: var(--wpgl-text-1, #111a33); background: var(--wpgl-surface-2, #f0f3f9); }
.wpgl-pl__vcard:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }

/* Priorité du contact */
.wpgl-prio { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--wpgl-text-3, #7b86a2); cursor: help; }
.wpgl-prio__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.wpgl-prio__bars i { display: block; width: 4px; border-radius: 1px; background: var(--wpgl-border, #dfe4ee); }
.wpgl-prio__bars i:nth-child(1) { height: 5px; }
.wpgl-prio__bars i:nth-child(2) { height: 8px; }
.wpgl-prio__bars i:nth-child(3) { height: 12px; }
.wpgl-prio[data-level="high"] { color: #127a43; }
.wpgl-prio[data-level="high"] .wpgl-prio__bars i { background: #16a34a; }
.wpgl-prio[data-level="mid"] { color: #9a5b00; }
.wpgl-prio[data-level="mid"] .wpgl-prio__bars i:nth-child(-n+2) { background: #f59e0b; }
.wpgl-prio[data-level="low"] .wpgl-prio__bars i:nth-child(1) { background: #9aa4bb; }
.wpgl-pl-bar__item.is-prio { border-color: #9be3b8; background: #effbf3; color: #127a43; }
.wpgl-pl-bar__item.is-prio .wpgl-pl-bar__n { background: #16a34a; color: #fff; }
.wpgl-pl-bar__item.is-prio.is-active { background: #127a43; border-color: #127a43; color: #fff; }
.wpgl-pl-bar__sep { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--wpgl-border, #e3e8f2); }

/* Listes personnalisées */
.wpgl-tag {
	display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 999px;
	background: #eef4ff; color: #2145c4; border: 1px solid #d5e1ff; font-size: 12px; font-weight: 600; line-height: 18px; text-decoration: none;
}
a.wpgl-tag { padding-right: 9px; }
a.wpgl-tag:hover { border-color: var(--wpgl-brand-300, #9db3ff); }
a.wpgl-tag.is-active { background: #2145c4; border-color: #2145c4; color: #fff; }
.wpgl-tag__n { font-size: 11px; opacity: .7; }
.wpgl-tag__x { border: 0; background: none; padding: 0 4px; border-radius: 999px; font-size: 14px; line-height: 16px; color: inherit; opacity: .55; cursor: pointer; }
.wpgl-tag__x:hover, .wpgl-tag__x:focus-visible { opacity: 1; background: rgba(33, 69, 196, .12); outline: none; }
.wpgl-pl__tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wpgl-pl__tag-add {
	border: 1px dashed var(--wpgl-border, #d3daea); background: none; border-radius: 999px; padding: 2px 9px;
	font: inherit; font-size: 12px; line-height: 18px; color: var(--wpgl-text-3, #7b86a2); cursor: pointer;
}
.wpgl-pl__tag-add:hover { color: var(--wpgl-brand-700, #2145c4); border-color: var(--wpgl-brand-300, #9db3ff); }
.wpgl-pl__tag-add:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-pl__tag-add[hidden] { display: none; }
.wpgl-pl__tag-input {
	width: 140px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--wpgl-brand-300, #9db3ff);
	font: inherit; font-size: 12px; line-height: 18px; min-height: 0; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18));
}
.wpgl-pl__tag-input:focus { outline: none; }
.wpgl-pl__tag-sugg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.wpgl-pl__tag-sugg[hidden] { display: none; }
.wpgl-pl__tag-opt {
	border: 1px solid #d5e1ff; background: #eef4ff; color: #2145c4; border-radius: 999px; padding: 2px 9px;
	font: inherit; font-size: 12px; font-weight: 600; line-height: 18px; cursor: pointer;
}
.wpgl-pl__tag-opt:hover, .wpgl-pl__tag-opt:focus-visible { background: #2145c4; border-color: #2145c4; color: #fff; outline: none; }
.wpgl-tags-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.wpgl-tags-bar__title { font-size: 12px; font-weight: 700; color: var(--wpgl-text-3, #7b86a2); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.wpgl-tags-bar__empty { font-size: 12px; color: var(--wpgl-text-3, #7b86a2); }

/* Actions groupées */
.wpgl-sel { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-right: 2px; cursor: pointer; }
.wpgl-sel input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--wpgl-brand-600, #3d6bff); }
.wpgl-sel--all { vertical-align: middle; margin-right: 6px; }
.wpgl-dt--contacts tr.is-selected td { background: #f3f6ff; }
.wpgl-bulk {
	position: fixed; z-index: 1000; left: 50%; bottom: 20px; transform: translateX(-50%);
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: calc(100vw - 24px); box-sizing: border-box;
	padding: 10px 14px; border-radius: 16px; background: #111a33; color: #fff; box-shadow: 0 18px 48px rgba(17, 26, 51, .35);
}
.wpgl-bulk[hidden] { display: none; }
.wpgl-bulk.is-busy { opacity: .75; pointer-events: none; }
.wpgl-bulk__count { font-size: 13.5px; white-space: nowrap; }
.wpgl-bulk select, .wpgl-bulk input[type="text"] {
	height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08);
	color: #fff; font: inherit; font-size: 13px; min-height: 0; box-sizing: border-box;
}
.wpgl-bulk select option { color: #111a33; }
.wpgl-bulk input[type="text"]::placeholder { color: rgba(255, 255, 255, .55); }
.wpgl-bulk input[type="text"] { width: 160px; }
.wpgl-bulk__tag { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.wpgl-bulk .wpgl-btn { height: 34px; padding: 0 12px; font-size: 13px; }
.wpgl-bulk .wpgl-btn--dark { background: #3d6bff; border-color: #3d6bff; color: #fff; }
.wpgl-bulk .wpgl-btn--ghost { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .25); }
.wpgl-bulk .wpgl-btn:disabled { opacity: .45; }
.wpgl-bulk__clear { border: 0; background: none; color: rgba(255, 255, 255, .7); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.wpgl-bulk__status { font-size: 12.5px; color: #9be3b8; }
@media (max-width: 720px) {
	.wpgl-bulk { left: 12px; right: 12px; bottom: 12px; transform: none; }
	.wpgl-bulk__tag { flex: 1 1 100%; }
	.wpgl-bulk input[type="text"] { flex: 1; width: auto; }
}

/* Historique et dernière action */
.wpgl-pl__last { font-size: 11.5px; color: var(--wpgl-text-3, #7b86a2); white-space: nowrap; }
.wpgl-pl__hist-title { margin: 10px 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-pl__hist { list-style: none; margin: 0; padding: 0 0 0 18px; max-height: 180px; overflow: auto; background: linear-gradient(var(--wpgl-border, #e3e8f2), var(--wpgl-border, #e3e8f2)) 4px 0 / 2px 100% no-repeat; }
.wpgl-pl__hist li { position: relative; padding: 3px 0 3px 4px; font-size: 12.5px; line-height: 1.35; color: var(--wpgl-text-1, #111a33); }
.wpgl-pl__hist li::before { content: ""; position: absolute; left: -17px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--wpgl-border, #cfd6e4); }
.wpgl-pl__hist li[data-type="stage"]::before { background: #3d6bff; }
.wpgl-pl__hist li[data-type="email"]::before, .wpgl-pl__hist li[data-type="copy"]::before { background: #16a34a; }
.wpgl-pl__hist li[data-type="follow"]::before { background: #f59e0b; }
.wpgl-pl__hist time { display: block; font-size: 11px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-pl__hist .is-loading { color: var(--wpgl-text-3, #7b86a2); }

/* Bascule Liste / Colonnes */
.wpgl-view-switch { display: inline-flex; gap: 2px; padding: 3px; margin: 4px 0 12px; border-radius: 10px; background: var(--wpgl-surface-2, #f1f4fa); border: 1px solid var(--wpgl-border, #e3e8f2); }
.wpgl-view-switch__btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--wpgl-text-2, #4a5675); text-decoration: none; }
.wpgl-view-switch__btn svg { width: 16px; height: 16px; }
.wpgl-view-switch__btn:hover { color: var(--wpgl-text-1, #111a33); }
.wpgl-view-switch__btn.is-active { background: var(--wpgl-surface, #fff); color: var(--wpgl-text-1, #111a33); box-shadow: 0 1px 3px rgba(17, 26, 51, .12); }

/* Dans la carte du tableau : même retrait horizontal que la barre d'outils */
.wpgl-dt-card > .wpgl-bilan { margin: 12px 14px; }
.wpgl-dt-card > .wpgl-pl-bar, .wpgl-dt-card > .wpgl-tags-bar { margin-left: 14px; margin-right: 14px; }
.wpgl-dt-card > .wpgl-view-switch { margin-left: 14px; }
.wpgl-dt-card > .wpgl-kb-wrap { padding: 0 14px 14px; }
@media (max-width: 760px) {
	.wpgl-dt-card > .wpgl-bilan { margin: 12px; }
	.wpgl-dt-card > .wpgl-pl-bar, .wpgl-dt-card > .wpgl-tags-bar { margin-left: 12px; margin-right: 12px; }
	.wpgl-dt-card > .wpgl-view-switch { margin-left: 12px; }
	.wpgl-dt-card > .wpgl-kb-wrap { padding: 0 12px 12px; }
}

/* Agenda à côté de la date de relance */
.wpgl-pl__ics { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--wpgl-text-2, #4a5675); }
.wpgl-pl__ics[hidden] { display: none; }
.wpgl-pl__ics svg { width: 16px; height: 16px; }
.wpgl-pl__ics:hover { background: var(--wpgl-surface-2, #f1f4fa); color: var(--wpgl-brand-600, #3d6bff); }

/* Vue en colonnes */
.wpgl-kb-hint { margin: 0 0 10px; font-size: 13px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(205px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.wpgl-kb__col { display: flex; flex-direction: column; min-height: 160px; max-height: 75vh; border-radius: 12px; background: var(--wpgl-surface-2, #f4f6fb); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.wpgl-kb__col.is-over { border-color: var(--wpgl-brand-300, #9db3ff); background: #eef2ff; }
.wpgl-kb__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.wpgl-kb__head h4 { margin: 0; font-size: 13px; font-weight: 700; color: var(--wpgl-text-1, #111a33); }
.wpgl-kb__dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.wpgl-kb__col[data-stage="called"] .wpgl-kb__dot { background: #3d6bff; }
.wpgl-kb__col[data-stage="follow"] .wpgl-kb__dot { background: #f59e0b; }
.wpgl-kb__col[data-stage="interested"] .wpgl-kb__dot { background: #8b5cf6; }
.wpgl-kb__col[data-stage="won"] .wpgl-kb__dot { background: #16a34a; }
.wpgl-kb__col[data-stage="lost"] .wpgl-kb__dot { background: #ef4444; }
.wpgl-kb__n { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--wpgl-surface, #fff); font-size: 12px; font-weight: 600; text-align: center; color: var(--wpgl-text-2, #4a5675); }
.wpgl-kb__list { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 10px; overflow-y: auto; }
.wpgl-kb__list:empty::after { content: "Glissez un contact ici"; display: block; padding: 18px 8px; border: 1.5px dashed var(--wpgl-border, #d5dceb); border-radius: 10px; font-size: 12px; text-align: center; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-kb__card { position: relative; padding: 10px 12px; border-radius: 10px; background: var(--wpgl-surface, #fff); border: 1px solid var(--wpgl-border, #e3e8f2); box-shadow: 0 1px 2px rgba(17, 26, 51, .05); cursor: grab; transition: box-shadow .15s, opacity .15s; }
.wpgl-kb__card:hover { box-shadow: 0 6px 16px rgba(17, 26, 51, .10); }
.wpgl-kb__card.is-dragging { opacity: .4; }
.wpgl-kb__card.is-saving { opacity: .7; }
.wpgl-kb__card.is-saved { box-shadow: 0 0 0 2px #86efac; }
.wpgl-kb__card[data-due] { border-left: 3px solid #f59e0b; }
.wpgl-kb__name { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--wpgl-text-1, #111a33); }
.wpgl-kb__meta { margin: 2px 0 0; font-size: 12px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-kb__info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12px; }
.wpgl-kb__info:empty { display: none; }
.wpgl-kb__tel { color: var(--wpgl-text-2, #4a5675); text-decoration: none; font-variant-numeric: tabular-nums; }
.wpgl-kb__tel:hover { color: var(--wpgl-brand-600, #3d6bff); }
.wpgl-kb__date, .wpgl-kb__note { padding: 1px 7px; border-radius: 999px; background: var(--wpgl-surface-2, #f1f4fa); color: var(--wpgl-text-2, #4a5675); font-weight: 600; }
.wpgl-kb__date[hidden] { display: none; }
.wpgl-kb__card[data-due] .wpgl-kb__date { background: #fef3c7; color: #92400e; }
.wpgl-kb__tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.wpgl-kb__tags span { padding: 1px 7px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 11px; font-weight: 600; }
.wpgl-kb__move { display: block; margin-top: 8px; }
.wpgl-kb__move select { width: 100%; padding: 4px 6px; border-radius: 7px; border: 1px solid var(--wpgl-border, #e3e8f2); background: var(--wpgl-surface, #fff); font: inherit; font-size: 12px; color: var(--wpgl-text-2, #4a5675); }
@media (hover: hover) and (pointer: fine) {
	.wpgl-kb__move { max-height: 0; margin-top: 0; overflow: hidden; opacity: 0; transition: max-height .15s, margin-top .15s, opacity .15s; }
	.wpgl-kb__card:hover .wpgl-kb__move, .wpgl-kb__move:focus-within { max-height: 40px; margin-top: 8px; opacity: 1; }
}
@media (max-width: 700px) {
	.wpgl-kb { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; }
	.wpgl-kb__col { scroll-snap-align: start; max-height: none; }
}
/* Colonnes : cartes au-delà des premières, « Afficher plus » */
.wpgl-kb__card[hidden] { display: none; }
.wpgl-kb__card:focus-visible { outline: none; box-shadow: var(--wpgl-ring, 0 0 0 4px rgba(61, 107, 255, .18)); }
.wpgl-kb__more { margin: 0 8px 10px; padding: 8px 10px; border-radius: 10px; border: 1.5px dashed var(--wpgl-border, #d5dceb); background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--wpgl-text-2, #4a5675); cursor: pointer; }
.wpgl-kb__more:hover { border-color: var(--wpgl-brand-300, #9db3ff); color: var(--wpgl-text-1, #111a33); background: var(--wpgl-surface, #fff); }
.wpgl-kb__more[hidden] { display: none; }
.wpgl-kb__more span { font-weight: 500; color: var(--wpgl-text-3, #7b86a2); }

/* Fiche détaillée d'un contact (clic sur une carte) */
.wpgl-cd { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px; background: var(--wpgl-surface, #fff); color: var(--wpgl-text-1, #111a33); box-shadow: 0 24px 64px rgba(17, 26, 51, .28); overflow: auto; }
.wpgl-cd::backdrop { background: rgba(17, 26, 51, .45); }
.wpgl-cd__close { position: sticky; top: 10px; float: right; z-index: 2; width: 34px; height: 34px; margin: 10px 10px 0 0; border: 0; border-radius: 10px; background: var(--wpgl-surface-2, #f1f4fa); font-size: 20px; line-height: 1; color: var(--wpgl-text-2, #4a5675); cursor: pointer; }
.wpgl-cd__close:hover { color: var(--wpgl-text-1, #111a33); }
.wpgl-cd__body { padding: 20px 22px 22px; }
.wpgl-cd__loading { margin: 8px 0; color: var(--wpgl-text-3, #7b86a2); font-size: 14px; }
.wpgl-cd__head { padding-right: 36px; }
.wpgl-cd__name { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; }
.wpgl-cd__addr { margin: 4px 0 0; font-size: 13.5px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-cd__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: var(--wpgl-text-2, #4a5675); }
.wpgl-cd__sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--wpgl-border, #e3e8f2); }
.wpgl-cd__sec h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-cd__facts { display: grid; gap: 4px; margin: 10px 0 0; font-size: 13px; }
.wpgl-cd__facts div { display: flex; gap: 10px; }
.wpgl-cd__facts dt { min-width: 92px; color: var(--wpgl-text-3, #7b86a2); }
.wpgl-cd__facts dd { margin: 0; }
.wpgl-cd .wpgl-pl { margin-top: 0; }
.wpgl-cd .wpgl-pl__pop { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
.wpgl-cd .wpgl-pl__pop .wpgl-pl__hist-title, .wpgl-cd .wpgl-pl__pop [data-pl-history] { display: none; }
.wpgl-cd .wpgl-pl__note[open] { flex-basis: 100%; }
.wpgl-cd .wpgl-pl__hist { max-height: 220px; overflow: auto; }

/* Priorité sur les cartes de la vue en colonnes */
.wpgl-kb__card .wpgl-prio { display: flex; margin: 6px 0 0; font-size: 11.5px; }

/* Croix sur le filtre rapide actif : un clic le retire */
.wpgl-chip-x { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: 14px; font-weight: 700; line-height: 1; }
.wpgl-pl-bar__item.is-active:hover .wpgl-chip-x, .wpgl-tag.is-active:hover .wpgl-chip-x { background: rgba(255, 255, 255, .38); }
