/* =====================================================================
   CRM â€” habillage AGENCE (Projets Immobiliers)
   Reprend la mise en page et les composants de la maquette de reference,
   avec l'identite de l'agence : aubergine #722272 / #3D103A, magenta
   #A4498F, laiton #B8965A, parchemin #FCFAF6, encre #211A20,
   Cormorant Garamond (titres) + Manrope (texte).

   PORTEE DU PILOTE : chrome partage (rail, barre superieure) + tableau
   de bord. Aucune modification de balisage, de comportement ni de route.
   Cette feuille est purement additive : elle se superpose a
   crm-theme-modern.php (couches Apimo / Liquid Glass / iOS / Apple Pro)
   sans la reecrire. Le prefixe .crmapp.crmapp.crmapp eleve la
   specificite au-dessus de cette pile, qui use largement de !important.
   ===================================================================== */

body.crm-mode{
	--ag-nuit:#3D103A; --ag-nuit-clair:#571850; --ag-nuit-actif:#722272;
	--ag-accent:#722272; --ag-accent-fonce:#571850; --ag-accent-pale:#F1E4EF; --ag-accent-tres-pale:#F9F1F7;
	--ag-magenta:#A4498F; --ag-laiton:#B8965A; --ag-laiton-pale:#F0E7D3;
	--ag-fond:#FCFAF6; --ag-carte:#FFFFFF; --ag-survol:#FBF7F2;
	--ag-filet:#EDE6DA; --ag-filet-fort:#E0D7C7;
	--ag-encre:#211A20; --ag-texte:#463B45; --ag-doux:#6E6470;
	--ag-vert:#3E7C52; --ag-rouge:#B23A3A;
	--ag-rayon:10px; --ag-rayon-s:6px; --ag-barre:264px;
	--ag-ombre:0 1px 2px rgba(33,26,32,.05),0 8px 24px -16px rgba(33,26,32,.25);
	--ag-sans:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;
	--ag-serif:'Cormorant Garamond','Hoefler Text',Georgia,'Times New Roman',serif;
}

/* ---------- socle : fond parchemin, plus de degrades ni de verre ---------- */
html body.crm-mode{background:var(--ag-fond) !important;background-image:none !important;background-attachment:scroll !important}

body.crm-mode .crmapp.crmapp.crmapp,
body.crm-mode .crmapp.crmapp.crmapp input, body.crm-mode .crmapp.crmapp.crmapp select, body.crm-mode .crmapp.crmapp.crmapp textarea, body.crm-mode .crmapp.crmapp.crmapp button, body.crm-mode .crmapp.crmapp.crmapp table, body.crm-mode .crmapp.crmapp.crmapp .crm-side, body.crm-mode .crmapp.crmapp.crmapp .crm-topbar{
	font-family:var(--ag-sans) !important;
}
body.crm-mode .crmapp.crmapp.crmapp{color:var(--ag-encre);font-size:14px;line-height:1.55}

body.crm-mode .crmapp.crmapp.crmapp h1, body.crm-mode .crmapp.crmapp.crmapp h2, body.crm-mode .crmapp.crmapp.crmapp h3, body.crm-mode .crmapp.crmapp.crmapp h4{
	font-family:var(--ag-serif) !important;
	font-weight:600 !important;
	color:var(--ag-encre) !important;
	letter-spacing:-.01em !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-h{
	font-family:var(--ag-serif) !important;font-weight:600 !important;
	color:var(--ag-encre) !important;font-size:24px;padding-left:0;margin:0 0 14px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-h .crm-h__ic{color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-h .crm-h__ic svg{filter:none}

/* ---------- rail lateral -> barre de navigation libellee ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-side{
	background:var(--ag-nuit) !important;
	border-right:0 !important;
	box-shadow:none !important;
	color:#E9DCE6;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-brand{
	background:transparent !important;
	display:flex;align-items:center;gap:12px;
	padding:22px 8px 24px !important;margin:0 !important;
	justify-content:flex-start !important;
	border-bottom:0 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-brand img{height:34px;width:auto;filter:none !important;margin:0 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-brand span{
	display:block !important;
	font-family:var(--ag-serif) !important;font-size:20px;font-weight:500;
	letter-spacing:.01em;color:#fff;line-height:1.1;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-top__id{
	display:flex !important;align-items:center;gap:8px;flex-wrap:wrap;
	padding:0 10px 18px !important;margin:0 0 6px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-top__hi{color:#fff;font-size:13px;font-weight:600}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-badge{
	background:rgba(184,150,90,.22) !important;color:var(--ag-laiton) !important;
	border:1px solid rgba(184,150,90,.38);
	padding:2px 9px;border-radius:999px;font-size:10px;font-weight:700;
	letter-spacing:.08em;text-transform:uppercase;box-shadow:none !important;
}

body.crm-mode .crmapp.crmapp.crmapp .crm-navgrp{
	background:transparent !important;border:0 !important;
	border-radius:0 !important;padding:0 !important;margin:0 0 6px !important;gap:2px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-navgrp + .crm-navgrp{
	margin-top:8px !important;padding-top:8px !important;
	border-top:1px solid rgba(255,255,255,.11) !important;
}

body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab{
	display:flex !important;align-items:center !important;justify-content:flex-start !important;
	width:100% !important;height:auto !important;
	gap:12px !important;padding:11px 14px !important;margin:0 !important;
	border-radius:8px !important;border:0 !important;box-shadow:none !important;
	background:transparent !important;
	color:#C9B4C6 !important;font-size:14px !important;font-weight:500 !important;
	text-align:left !important;position:relative;
	transition:background-color .16s,color .16s !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab:hover{
	background:var(--ag-nuit-clair) !important;color:#fff !important;transform:none !important;
	box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab:active{transform:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab.is-active,
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg.is-active .crm-navg__b{
	background:var(--ag-nuit-actif) !important;color:#fff !important;
	border:0 !important;
	box-shadow:inset 3px 0 0 var(--ag-laiton) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab.is-active .crm-tab__ic svg{filter:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab__ic{
	width:20px !important;height:20px;flex:0 0 auto;font-size:0 !important;
	display:inline-flex;align-items:center;justify-content:center;opacity:.9;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab__ic svg{width:20px;height:20px}
/* Le libelle redevient un vrai libelle en ligne (fini l'info-bulle au survol) */
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab .crm-tab__tx,
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab:hover .crm-tab__tx{
	display:block !important;position:static !important;
	transform:none !important;margin:0 !important;padding:0 !important;
	background:none !important;box-shadow:none !important;
	color:inherit !important;font-size:14px !important;font-weight:500 !important;
	white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
	flex:1 1 auto;z-index:auto !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tab__mini{display:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-tab__badge{
	position:static !important;margin-left:auto !important;
	min-width:20px;height:20px;padding:0 6px;
	background:var(--ag-rouge) !important;color:#fff !important;
	border-radius:999px;font-size:11px;font-weight:700;
	display:inline-flex;align-items:center;justify-content:center;
	box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__car{display:inline !important;margin-left:auto;opacity:.5;font-size:11px}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__menu{
	background:var(--ag-carte) !important;
	border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon) !important;
	box-shadow:0 18px 40px -14px rgba(33,26,32,.38) !important;
	padding:6px !important;min-width:236px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__title{
	font-family:var(--ag-sans) !important;color:var(--ag-doux) !important;
	font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
	opacity:1;padding:8px 12px 6px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__i{
	color:var(--ag-texte) !important;font-weight:500;border-radius:var(--ag-rayon-s);
	padding:9px 12px;display:flex;align-items:center;gap:10px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__i:hover{background:var(--ag-accent-tres-pale) !important;color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__i.is-active{background:var(--ag-accent) !important;color:#fff !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__iic{color:inherit;display:inline-flex}

body.crm-mode .crmapp.crmapp.crmapp .crm-side__foot{
	margin-top:auto !important;align-items:stretch !important;gap:2px !important;
	padding-top:14px !important;
	border-top:1px solid rgba(255,255,255,.11) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-logout{
	display:flex !important;align-items:center !important;justify-content:flex-start !important;
	width:100% !important;height:auto !important;
	gap:12px !important;padding:11px 14px !important;margin:0 !important;
	border-radius:8px !important;border:0 !important;background:transparent !important;
	box-shadow:none !important;color:#C9B4C6 !important;
	font-size:14px;font-weight:500;line-height:1.4 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-logout:hover{background:var(--ag-nuit-clair) !important;color:#fff !important;transform:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-logout .crm-logout__tx{display:inline !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-logout__ic{display:inline-flex;width:20px;height:20px}

/* ---------- barre superieure ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar{
	background:rgba(255,255,255,.9) !important;
	-webkit-backdrop-filter:saturate(150%) blur(10px) !important;backdrop-filter:saturate(150%) blur(10px) !important;
	border-bottom:1px solid var(--ag-filet) !important;
	box-shadow:none !important;
	padding:14px 34px !important;gap:16px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar .crm-search input{
	background:#fff !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;padding:9px 13px !important;
	font-size:14px !important;box-shadow:none !important;color:var(--ag-encre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar .crm-search input:focus{
	border-color:var(--ag-accent) !important;
	box-shadow:0 0 0 3px rgba(114,34,114,.15) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar .crm-bell{
	order:0 !important;background:transparent !important;
	width:38px;min-width:38px;height:38px;border-radius:999px !important;
	box-shadow:none !important;color:var(--ag-texte) !important;
	transition:background-color .16s;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar .crm-bell:hover{background:var(--ag-accent-tres-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar .crm-bell__ic{color:var(--ag-texte)}
body.crm-mode .crmapp.crmapp.crmapp .crm-topbar .crm-bell__dot{background:var(--ag-rouge) !important;box-shadow:0 0 0 2px #fff}
body.crm-mode .crmapp.crmapp.crmapp .crm-bell__menu{
	background:#fff !important;border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon) !important;
	box-shadow:0 18px 40px -14px rgba(33,26,32,.35) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-bell__h{font-family:var(--ag-sans) !important;color:var(--ag-doux) !important;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
body.crm-mode .crmapp.crmapp.crmapp .crm-bell__i{color:var(--ag-texte) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-bell__i:hover{background:var(--ag-accent-tres-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-new{
	background:var(--ag-accent) !important;background-image:none !important;
	color:#fff !important;border:1px solid transparent !important;
	border-radius:var(--ag-rayon-s) !important;
	padding:11px 18px !important;font-size:13px !important;font-weight:700 !important;
	box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-new:hover{background:var(--ag-accent-fonce) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-burger{
	border:1px solid var(--ag-filet-fort) !important;background:#fff !important;
	border-radius:var(--ag-rayon-s) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-burger span{background:var(--ag-encre) !important}

/* ---------- geometrie (desktop uniquement : le tiroir mobile reste intact) ---------- */
@media (min-width:821px){
	body.crm-mode .crmapp.crmapp.crmapp .crm-side{
		width:var(--ag-barre) !important;
		padding:0 16px 18px !important;
		overflow-y:auto;overflow-x:hidden;
	}
	body.crm-mode .crmapp.crmapp.crmapp .crm-main{margin-left:var(--ag-barre) !important;padding:96px 34px 60px !important}
	body.crm-mode .crmapp.crmapp.crmapp .crm-topbar{left:var(--ag-barre) !important}

	/* CORRECTIF (regression de cette feuille) â€” le rail defile verticalement, ce qui en
	   fait une boite de defilement : en CSS, overflow-x:visible associe a overflow-y:auto
	   est recalcule en overflow-x:auto. Le sous-menu pose a droite du rail (left:100%)
	   en sortait donc et se retrouvait rogne : invisible ET non cliquable. Les 16 vues
	   des groupes Marketing / RH / Pilotage / Reglages devenaient inatteignables.
	   On replie le sous-menu dans la largeur du rail, sous son bouton, exactement comme
	   le fait deja le tiroir mobile. Aucune route ni aucun comportement ne change. */
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__menu{
		left:0 !important;right:0 !important;width:auto !important;
		min-width:0 !important;max-width:none !important;
		margin-left:0 !important;margin-right:0 !important;
		top:100% !important;bottom:auto !important;
		margin-top:4px !important;margin-bottom:0 !important;
		max-height:min(58vh,420px) !important;overflow-y:auto !important;
	}
	/* Groupe du pied de rail (Reglages) : il s'ouvre vers le haut. */
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg--up .crm-navg__menu{
		top:auto !important;bottom:100% !important;
		margin-top:0 !important;margin-bottom:4px !important;
	}
	/* Le pont de survol passe du flanc gauche au bord haut (ou bas) du menu. */
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__menu::before{
		left:0 !important;right:0 !important;width:auto !important;
		top:-6px !important;bottom:auto !important;height:6px !important;
	}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg--up .crm-navg__menu::before{
		top:auto !important;bottom:-6px !important;
	}

	/* CORRECTIF â€” ouverture au clavier. La pile n'ouvrait le sous-menu que sur :hover
	   ou sur la classe .is-open posee par le JS (survol souris / appui tactile). Au
	   clavier, le bouton de groupe prend le focus mais n'ouvre rien : les memes 16 vues
	   etaient inatteignables sans souris. :focus-within corrige cela sans toucher au JS
	   (qui neutralise deja la prise de focus a la souris via preventDefault sur
	   mousedown, donc le menu ne restera pas fige apres un clic). */
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg:focus-within .crm-navg__menu{display:block !important}
}

/* ---------- cartes ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-card,
body.crm-mode .crmapp.crmapp.crmapp .crm-tablewrap,
body.crm-mode .crmapp.crmapp.crmapp .crm-dashcard,
body.crm-mode .crmapp.crmapp.crmapp .crm-dispatch,
body.crm-mode .crmapp.crmapp.crmapp .crm-tile,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi,
body.crm-mode .crmapp.crmapp.crmapp .crm-netcard{
	background:var(--ag-carte) !important;background-image:none !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
	border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon) !important;
	box-shadow:var(--ag-ombre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-card{padding:20px 22px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-card:hover{background:var(--ag-carte) !important;box-shadow:var(--ag-ombre) !important}
/* Le titre de carte devient une vraie tete de carte, filet compris */
body.crm-mode .crmapp.crmapp.crmapp .crm-card > h3{
	margin:-20px -22px 18px !important;padding:16px 22px !important;
	border-bottom:1px solid var(--ag-filet) !important;
	font-family:var(--ag-serif) !important;font-size:18px !important;font-weight:600 !important;
	display:flex;align-items:center;gap:10px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-card > h3 .crm-h__ic{color:var(--ag-accent) !important;display:inline-flex}
body.crm-mode .crmapp.crmapp.crmapp .crm-tablewrap{overflow:auto}

/* ---------- indicateurs (tuiles de rappel + KPI) ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-remind{gap:20px !important;margin-bottom:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-kpis{gap:20px !important;margin-bottom:24px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi{
	display:flex !important;align-items:flex-start !important;gap:16px !important;
	padding:20px 22px !important;text-decoration:none;
	transition:border-color .16s,box-shadow .16s;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi:hover{border-color:var(--ag-filet-fort) !important;box-shadow:0 2px 4px rgba(33,26,32,.06),0 14px 30px -18px rgba(33,26,32,.32) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile__ic,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__ic{
	width:52px !important;height:52px !important;flex:0 0 auto;
	display:grid;place-items:center;border-radius:var(--ag-rayon-s) !important;
	background:var(--ag-accent-pale) !important;color:var(--ag-accent) !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--late .crm-tile__ic{background:#F4E2E0 !important;color:var(--ag-rouge) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--ca .crm-tile__ic{background:var(--ag-laiton-pale) !important;color:#846227 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--won .crm-tile__ic{background:var(--ag-accent-pale) !important;color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--rate .crm-tile__ic{background:#E6CFE2 !important;color:var(--ag-magenta) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--pipe .crm-tile__ic{background:var(--ag-laiton-pale) !important;color:#846227 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile__txt,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__b{display:flex;flex-direction:column;min-width:0;gap:2px}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile__n,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__n{
	font-size:27px !important;font-weight:700 !important;line-height:1.15 !important;
	color:var(--ag-encre) !important;order:2;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile__l,
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__l{font-size:13px !important;font-weight:500 !important;color:var(--ag-texte) !important;order:1}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--late .crm-tile__n{color:var(--ag-rouge) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tile--ca .crm-tile__n{color:#846227 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__delta{order:3;margin-top:4px;font-size:12px;color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__delta.up{color:var(--ag-vert) !important;font-weight:700}
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__delta.down{color:var(--ag-rouge) !important;font-weight:700}
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__delta.flat{color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-kpi__delta em{font-style:normal;color:var(--ag-doux) !important;font-weight:500}

/* ---------- tableaux ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-table{border-collapse:collapse;width:100%}
body.crm-mode .crmapp.crmapp.crmapp .crm-table th{
	background:transparent !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
	padding:10px 18px !important;text-align:left;
	font-size:11px !important;font-weight:600 !important;letter-spacing:.06em;text-transform:uppercase;
	color:var(--ag-doux) !important;border-bottom:1px solid var(--ag-filet) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-table td{padding:13px 18px !important;border-bottom:1px solid #F5F1EA !important;vertical-align:middle;color:var(--ag-texte)}
body.crm-mode .crmapp.crmapp.crmapp .crm-table tbody tr:last-child td{border-bottom:0 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-table tbody tr{transition:background-color .14s}
body.crm-mode .crmapp.crmapp.crmapp .crm-table tbody tr:hover{background:var(--ag-survol) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-table td a{color:var(--ag-accent);font-weight:600}
body.crm-mode .crmapp.crmapp.crmapp .crm-table td a:hover{color:var(--ag-accent-fonce);text-decoration:underline}

/* ---------- listes (activite recente, mandats) ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-feed{display:flex;flex-direction:column;margin:0 -22px -20px}
body.crm-mode .crmapp.crmapp.crmapp .crm-feeditem{
	display:block;padding:13px 22px !important;
	border-bottom:1px solid #F5F1EA !important;
	color:var(--ag-texte) !important;text-decoration:none;
	transition:background-color .14s;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-feeditem:last-child{border-bottom:0 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-feeditem:hover{background:var(--ag-survol) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-feeditem strong{color:var(--ag-encre)}
body.crm-mode .crmapp.crmapp.crmapp .crm-feed__t{
	display:inline-block;padding:3px 10px;border-radius:999px;
	background:var(--ag-accent-pale) !important;color:var(--ag-accent) !important;
	font-size:11px;font-weight:700;letter-spacing:.02em;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-feed__n{color:var(--ag-doux)}
body.crm-mode .crmapp.crmapp.crmapp .crm-feed__d{display:block;margin-top:4px;font-size:12px;color:var(--ag-doux)}

/* Etat vide, faÃ%on maquette */
body.crm-mode .crmapp.crmapp.crmapp .crm-feed > .crm-muted,
body.crm-mode .crmapp.crmapp.crmapp .crm-card > h3 + p.crm-muted:last-child{
	padding:38px 22px !important;text-align:center;color:var(--ag-doux) !important;font-size:13px;
}
/* CORRECTIF (vague 3) â€” la regle ci-dessus visait au depart tout
   .crm-card > p.crm-muted : elle centrait et espacait aussi les phrases
   d'introduction des cartes de reglages, de communication, de bareme et
   d'import. Elle est desormais reservee au cas de l'etat vide : un titre,
   puis un unique paragraphe qui termine la carte. */

/* ---------- entonnoir ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-funnel{display:flex;flex-direction:column;gap:8px}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn{display:flex;align-items:center;gap:14px;text-decoration:none;padding:4px 0;border-radius:var(--ag-rayon-s)}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn:hover{background:var(--ag-survol)}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn__l{flex:0 0 128px;font-size:13px;color:var(--ag-texte)}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn__bar{flex:1 1 auto;background:#F3EDE3 !important;border-radius:999px;overflow:hidden;height:26px}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn__fill{height:26px;border-radius:999px;display:flex;align-items:center;justify-content:flex-end;padding-right:10px}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn__fill b{color:#fff;font-size:12px;font-weight:700}
body.crm-mode .crmapp.crmapp.crmapp .crm-fn__p{flex:0 0 46px;text-align:right;font-size:12px;color:var(--ag-doux);font-variant-numeric:tabular-nums}

/* ---------- prospection, raccourcis ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-netmini{display:flex;gap:12px;flex-wrap:wrap}
body.crm-mode .crmapp.crmapp.crmapp .crm-netcard{
	flex:1 1 90px;display:flex;flex-direction:column;gap:2px;align-items:flex-start;
	padding:14px 16px !important;text-decoration:none;color:var(--ag-texte) !important;
	box-shadow:none !important;background:var(--ag-accent-tres-pale) !important;
	border:1px solid var(--ag-accent-pale) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-netcard:hover{background:var(--ag-accent-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-netcard__n{font-size:22px;font-weight:700;color:var(--ag-accent) !important;line-height:1.1}
body.crm-mode .crmapp.crmapp.crmapp .crm-quick{display:flex;flex-wrap:wrap;gap:10px}
body.crm-mode .crmapp.crmapp.crmapp .crm-quick__b,
body.crm-mode .crmapp.crmapp.crmapp .crm-card > a.crm-tab{
	display:inline-flex !important;align-items:center;gap:9px;
	width:auto !important;
	padding:9px 14px !important;border-radius:var(--ag-rayon-s) !important;
	border:1px solid var(--ag-filet-fort) !important;background:#fff !important;
	color:var(--ag-texte) !important;font-size:13px !important;font-weight:600 !important;
	text-decoration:none;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-quick__b:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-card > a.crm-tab:hover{background:var(--ag-accent-tres-pale) !important;color:var(--ag-accent) !important;border-color:var(--ag-accent-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-quick__ic{display:inline-flex;color:var(--ag-accent)}

/* ---------- barre d'affectation + interrupteur ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-dispatch{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 18px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-dispatch__l{font-size:13px;font-weight:600;color:var(--ag-texte)}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt{background:transparent !important;border:0 !important;box-shadow:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt__lbl{font-size:12px;color:var(--ag-doux) !important;font-weight:600}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt__lbl.is-on{color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt--disp.is-on .crm-swt__sw{background:var(--ag-accent) !important}

/* ---------- boutons, champs ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-btn{
	background:#fff !important;background-image:none !important;
	border:1px solid var(--ag-filet-fort) !important;
	color:var(--ag-texte) !important;border-radius:var(--ag-rayon-s) !important;
	font-weight:700 !important;font-size:13px !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn:hover{background:var(--ag-accent-tres-pale) !important;color:var(--ag-accent) !important;border-color:var(--ag-accent-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-main input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),
body.crm-mode .crmapp.crmapp.crmapp .crm-main select,
body.crm-mode .crmapp.crmapp.crmapp .crm-main textarea{
	background:#fff !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
	border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;
	color:var(--ag-encre) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main input:not([type=checkbox]):not([type=radio]):focus,
body.crm-mode .crmapp.crmapp.crmapp .crm-main select:focus,
body.crm-mode .crmapp.crmapp.crmapp .crm-main textarea:focus{
	background:#fff !important;border-color:var(--ag-accent) !important;
	box-shadow:0 0 0 3px rgba(114,34,114,.15) !important;outline:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main ::placeholder{color:var(--ag-doux)}

/* ---------- focus clavier visible ---------- */
body.crm-mode .crmapp.crmapp.crmapp a:focus-visible,
body.crm-mode .crmapp.crmapp.crmapp button:focus-visible,
body.crm-mode .crmapp.crmapp.crmapp input:focus-visible,
body.crm-mode .crmapp.crmapp.crmapp select:focus-visible,
body.crm-mode .crmapp.crmapp.crmapp textarea:focus-visible{
	outline:2px solid var(--ag-accent) !important;outline-offset:2px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side a:focus-visible,
body.crm-mode .crmapp.crmapp.crmapp .crm-side button:focus-visible{
	outline:2px solid var(--ag-laiton) !important;outline-offset:2px !important;
}

/* ---------- divers ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-muted{color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-charts{gap:20px}
body.crm-mode .crmapp.crmapp.crmapp .crm-dash2{gap:20px}
body.crm-mode .crmapp.crmapp.crmapp .crm-main .crm-card,
body.crm-mode .crmapp.crmapp.crmapp .crm-main .crm-tablewrap,
body.crm-mode .crmapp.crmapp.crmapp .crm-main .crm-dispatch,
body.crm-mode .crmapp.crmapp.crmapp .crm-main .crm-remind{margin-bottom:20px !important}

/* ---------- adaptation du tiroir (<=820px) ---------- */
@media (max-width:820px){
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__menu{
		background:transparent !important;border:0 !important;box-shadow:none !important;
		border-radius:0 !important;padding:0 0 4px 34px !important;min-width:0 !important;margin-left:0 !important;
	}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__i{color:#C9B4C6 !important}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__i:hover{background:var(--ag-nuit-clair) !important;color:#fff !important}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__i.is-active{background:var(--ag-nuit-actif) !important;color:#fff !important}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__title{display:none !important}
	body.crm-mode .crmapp.crmapp.crmapp .crm-topbar{padding:10px 14px !important}
	body.crm-mode .crmapp.crmapp.crmapp .crm-main{padding-left:16px !important;padding-right:16px !important}
}

/* =====================================================================
   VAGUE 2 - declinaison de la charte sur les vues metier.
   Feuille de style uniquement : aucun balisage, aucun comportement,
   aucune route touches. Les couleurs de statut et de projet arrivent en
   variables inline (--c, --pc) depuis pib_lead_statuses() et
   pib_lead_projects() : leur teinte n'est jamais redefinie ici, seule la
   geometrie des composants qui les portent est reprise.
   ===================================================================== */

/* ---------- partage : barre de filtres et puces ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-filters,
body.crm-mode .crmapp.crmapp.crmapp .crm-pipefilters{
	display:flex !important;flex-wrap:wrap !important;align-items:center !important;
	gap:10px !important;margin:0 0 18px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-chip{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;
	padding:8px 13px !important;
	font-family:var(--ag-sans) !important;font-size:13px !important;font-weight:600 !important;
	letter-spacing:0 !important;color:var(--ag-texte) !important;
	box-shadow:none !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
	transition:background-color .16s,border-color .16s,color .16s !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-chip:hover{
	background:var(--ag-accent-tres-pale) !important;border-color:var(--ag-accent) !important;
	color:var(--ag-accent) !important;transform:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-chip:active{transform:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-chip.is-active{
	background:var(--ag-accent) !important;background-image:none !important;
	border-color:var(--ag-accent) !important;color:#fff !important;box-shadow:none !important;
}
/* Puce "A affecter" : accent laiton, elle signale une action a mener. */
body.crm-mode .crmapp.crmapp.crmapp .crm-chip--assign{
	border-color:var(--ag-laiton) !important;color:#7A6329 !important;background:var(--ag-laiton-pale) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-chip--assign.is-active{
	background:var(--ag-laiton) !important;border-color:var(--ag-laiton) !important;color:#fff !important;
}

/* ---------- partage : pastilles de statut (geometrie seule) ----------
   La teinte vient de --pc / --c : on ne la touche pas. */
body.crm-mode .crmapp.crmapp.crmapp .crm-pill,
body.crm-mode .crmapp.crmapp.crmapp .crm-pill[style]{
	display:inline-flex !important;align-items:center !important;gap:6px !important;
	padding:4px 11px !important;border-radius:999px !important;
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.02em !important;white-space:nowrap !important;
	text-shadow:none !important;box-shadow:none !important;
}

/* ---------- partage : interrupteur Pipeline / Liste ----------
   Le vert iOS de la pile precedente laisse place a l'aubergine. */
body.crm-mode .crmapp.crmapp.crmapp .crm-swt__sw{
	background:var(--ag-filet-fort) !important;background-image:none !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt.is-cal .crm-swt__sw,
body.crm-mode .crmapp.crmapp.crmapp .crm-swt--disp.is-on .crm-swt__sw{
	background:var(--ag-accent) !important;background-image:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt__knob{
	background:#fff !important;box-shadow:0 1px 3px rgba(33,26,32,.30) !important;
}

/* ---------- partage : boutons ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-btn{
	display:inline-flex !important;align-items:center !important;justify-content:center !important;gap:9px !important;
	padding:10px 16px !important;border:1px solid transparent !important;
	border-radius:var(--ag-rayon-s) !important;
	background:var(--ag-accent) !important;background-image:none !important;color:#fff !important;
	font-family:var(--ag-sans) !important;font-size:13px !important;font-weight:700 !important;
	box-shadow:none !important;text-shadow:none !important;transform:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn:hover{
	background:var(--ag-accent-fonce) !important;transform:none !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn--ghost{
	background:transparent !important;border-color:var(--ag-filet-fort) !important;color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn--ghost:hover{
	background:var(--ag-survol) !important;border-color:var(--ag-accent) !important;color:var(--ag-accent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn--sm{padding:7px 12px !important;font-size:12px !important}

/* ---------- vue LEADS : liste filtrable ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-table td a{font-weight:600 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-table td strong{font-weight:700 !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-assignsel{
	padding:8px 11px !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;background:#fff !important;
	font-family:var(--ag-sans) !important;font-size:13px !important;font-weight:500 !important;
	color:var(--ag-texte) !important;box-shadow:none !important;
}
/* Lead non affecte : rappel laiton, coherent avec la puce "A affecter". */
body.crm-mode .crmapp.crmapp.crmapp .crm-assignsel.is-empty{
	border-color:var(--ag-laiton) !important;background:var(--ag-laiton-pale) !important;
	color:#7A6329 !important;font-weight:700 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-assignsel:focus{
	border-color:var(--ag-accent) !important;box-shadow:0 0 0 3px rgba(114,34,114,.15) !important;outline:none !important;
}

/* ---------- vue LEAD : la fiche ----------
   Mise en page reprise de la maquette : colonne principale + volet lateral
   en panneau colle. Les pastilles de projet et de statut gardent leur teinte. */
body.crm-mode .crmapp.crmapp.crmapp .crm-back{
	color:var(--ag-accent) !important;font-weight:600 !important;font-size:13px !important;
	margin-bottom:16px !important;text-decoration:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-back:hover{color:var(--ag-accent-fonce) !important;text-decoration:underline !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-lead{gap:20px !important;align-items:start !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-lead__main,
body.crm-mode .crmapp.crmapp.crmapp .crm-pro__card,
body.crm-mode .crmapp.crmapp.crmapp .crm-actbox,
body.crm-mode .crmapp.crmapp.crmapp .crm-side__box{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon) !important;
	box-shadow:var(--ag-ombre) !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-lead__side{gap:16px !important}
/* Volet lateral : intitules en petites capitales, comme la maquette. */
body.crm-mode .crmapp.crmapp.crmapp .crm-side__box{padding:18px 20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-side__box label{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.08em !important;text-transform:uppercase !important;
	color:var(--ag-doux) !important;margin-bottom:10px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side__box select{
	padding:10px 12px !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;background:#fff !important;
	font-family:var(--ag-sans) !important;font-size:14px !important;color:var(--ag-encre) !important;
	box-shadow:none !important;
}
/* Lead non affecte : le rappel laiton plutot que le violet de la pile precedente. */
body.crm-mode .crmapp.crmapp.crmapp .crm-side__box--assign{
	border-color:var(--ag-laiton) !important;background:var(--ag-laiton-pale) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-side__box--assign label{color:#7A6329 !important}

/* Bandeau d'etape (mandat signe, compromis...) : parchemin et laiton. */
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone{
	background:var(--ag-laiton-pale) !important;background-image:none !important;
	border:1px solid #E2D2AE !important;border-radius:var(--ag-rayon) !important;
	padding:18px 20px !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone__t{
	font-family:var(--ag-serif) !important;font-size:19px !important;font-weight:600 !important;
	color:#7A6329 !important;letter-spacing:-.01em !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone p{color:var(--ag-texte) !important;font-size:13px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone.is-done{
	background:#EEF5F0 !important;background-image:none !important;border-color:#CBE0D2 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone.is-done .crm-milestone__t{color:var(--ag-vert) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone__btn{
	background:var(--ag-accent) !important;background-image:none !important;color:#fff !important;
	border:1px solid transparent !important;border-radius:var(--ag-rayon-s) !important;
	padding:9px 15px !important;font-size:13px !important;font-weight:700 !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone__btn:hover{background:var(--ag-accent-fonce) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone__btn--ghost{
	background:transparent !important;border-color:var(--ag-filet-fort) !important;color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone__btn--ghost:hover{background:var(--ag-survol) !important;color:var(--ag-encre) !important}
/* Sur une etape franchie, le bouton est un retour arriere : registre discret. */
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone.is-done .crm-milestone__btn{
	background:transparent !important;border-color:#BFD6C6 !important;color:#2F6242 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-milestone.is-done .crm-milestone__btn:hover{background:#E4EFE8 !important}

/* ---------- vue TACHES (espace de noms ptask-*) ----------
   La teinte de gravite arrive en --kc (retard / du jour / a venir) : conservee. */
body.crm-mode .crmapp.crmapp.crmapp .ptask-top{margin-bottom:18px !important}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpis{gap:16px !important;margin:0 0 20px !important}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpi{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:18px 20px !important;box-shadow:var(--ag-ombre) !important;gap:14px !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpi:hover{
	transform:none !important;border-color:var(--ag-filet-fort) !important;box-shadow:var(--ag-ombre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpi.is-active{
	border-color:var(--kc) !important;
	box-shadow:0 0 0 2px color-mix(in srgb,var(--kc) 30%,transparent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpi__n{
	font-family:var(--ag-serif) !important;font-size:27px !important;font-weight:600 !important;
	line-height:1.15 !important;color:var(--ag-encre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpi__l{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.08em !important;text-transform:uppercase !important;color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-kpi__ic{color:var(--kc) !important}
/* Formulaire de creation : carte parchemin. */
body.crm-mode .crmapp.crmapp.crmapp .ptask-form{
	background:var(--ag-survol) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:18px 20px !important;margin-bottom:20px !important;box-shadow:none !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-fld{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.06em !important;text-transform:uppercase !important;color:var(--ag-doux) !important;gap:6px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-fld input,
body.crm-mode .crmapp.crmapp.crmapp .ptask-fld select{
	padding:10px 12px !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;background:#fff !important;
	font-family:var(--ag-sans) !important;font-size:14px !important;font-weight:500 !important;
	color:var(--ag-encre) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptask-fld input:focus,
body.crm-mode .crmapp.crmapp.crmapp .ptask-fld select:focus{
	border-color:var(--ag-accent) !important;box-shadow:0 0 0 3px rgba(114,34,114,.15) !important;outline:none !important;
}
/* Groupes de jours + lignes de tache : liste sobre, plus d'empilement d'ombres. */
body.crm-mode .crmapp.crmapp.crmapp .ptaskgroup{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:8px 14px !important;margin-bottom:16px !important;box-shadow:var(--ag-ombre) !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptaskwrap .ptask{
	background:transparent !important;background-image:none !important;
	border:0 !important;border-bottom:1px solid var(--ag-filet) !important;border-radius:0 !important;
	padding:12px 4px !important;box-shadow:none !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .ptaskwrap .ptask:last-child{border-bottom:0 !important}
body.crm-mode .crmapp.crmapp.crmapp .ptask__title{font-size:14px !important;color:var(--ag-encre) !important;font-weight:600 !important}
body.crm-mode .crmapp.crmapp.crmapp .ptask.is-done .ptask__title{color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .ptask-prog{margin:0 0 20px !important}

/* ---------- vue AGENDA ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-calhead{margin-bottom:18px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-hint,
body.crm-mode .crmapp.crmapp.crmapp .crm-muted{color:var(--ag-doux) !important;font-size:13px !important}
/* Petits liens d'action dans les cellules (ajout au calendrier, bon de visite).
   Cible restreinte au contenu : le rail garde ses propres regles. */
body.crm-mode .crmapp.crmapp.crmapp .crm-main .crm-tab{
	display:inline-flex !important;align-items:center !important;gap:6px !important;
	background:#fff !important;background-image:none !important;
	border:1px solid var(--ag-filet-fort) !important;border-radius:var(--ag-rayon-s) !important;
	padding:6px 11px !important;font-family:var(--ag-sans) !important;
	font-size:12px !important;font-weight:600 !important;color:var(--ag-texte) !important;
	text-decoration:none !important;box-shadow:none !important;width:auto !important;height:auto !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main .crm-tab:hover{
	background:var(--ag-accent-tres-pale) !important;border-color:var(--ag-accent) !important;
	color:var(--ag-accent) !important;transform:none !important;
}

/* ---------- vue PIPELINE (kanban) ----------
   La teinte de colonne arrive en --col depuis pib_lead_statuses() et le badge
   de projet en style inline : ni l'une ni l'autre n'est redefinie ici. */
body.crm-mode .crmapp.crmapp.crmapp .crm-pipebar{margin:0 0 14px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-pipesearch,
body.crm-mode .crmapp.crmapp.crmapp .crm-pipefilters select{
	padding:9px 13px !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;background:#fff !important;
	font-family:var(--ag-sans) !important;font-size:14px !important;color:var(--ag-encre) !important;
	box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pipesearch:focus,
body.crm-mode .crmapp.crmapp.crmapp .crm-pipefilters select:focus{
	border-color:var(--ag-accent) !important;box-shadow:0 0 0 3px rgba(114,34,114,.15) !important;outline:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-col{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;
	/* Le filet superieur porte la couleur d'etape (--col, pib_lead_statuses) :
	   il est explicitement conserve, la regle ci-dessus l'aurait efface. */
	border-top:3px solid var(--col,#8e8e93) !important;
	border-radius:var(--ag-rayon) !important;
	box-shadow:var(--ag-ombre) !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-col__h{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.03em !important;text-transform:uppercase !important;
	padding:11px 12px !important;border-radius:0 !important;gap:8px !important;
	border-bottom:1px solid var(--ag-filet) !important;box-shadow:none !important;
	min-width:0 !important;align-items:center !important;
}
/* Intitules d'etape : ils doivent tenir dans une colonne etroite. */
body.crm-mode .crmapp.crmapp.crmapp .crm-col__h{
	overflow:hidden !important;white-space:nowrap !important;text-overflow:ellipsis !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-col__h span{
	background:var(--ag-accent-tres-pale) !important;color:var(--ag-accent) !important;
	border-radius:999px !important;padding:1px 8px !important;font-size:11px !important;
	letter-spacing:0 !important;flex:0 0 auto !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-col__b{padding:12px !important;gap:10px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-col__b.crm-over{background:var(--ag-accent-tres-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2{
	background:#fff !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon-s) !important;
	padding:12px 13px !important;box-shadow:none !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2:hover{
	transform:none !important;border-color:var(--ag-accent) !important;
	box-shadow:var(--ag-ombre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2:active{transform:none !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__t{font-size:14px !important;font-weight:700 !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__m,
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__a,
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__d,
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__src{color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__budget{color:var(--ag-vert) !important;font-weight:700 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__mandat.ok{color:var(--ag-vert) !important}
/* Badge de projet : la couleur vient de pib_lead_projects(), geometrie seule. */
body.crm-mode .crmapp.crmapp.crmapp .crm-card2__proj{
	border-radius:999px !important;padding:3px 9px !important;font-size:10px !important;
	font-weight:700 !important;letter-spacing:.04em !important;text-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-fitbtn{border-radius:var(--ag-rayon-s) !important}

/* ---------- vue NOSBIENS ---------- */
/* Les puces employees comme etiquettes dans les lignes du tableau restent menues. */
body.crm-mode .crmapp.crmapp.crmapp .crm-table .crm-chip{
	padding:5px 10px !important;font-size:12px !important;font-weight:600 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-bthumb{
	border-radius:var(--ag-rayon-s) !important;border:1px solid var(--ag-filet) !important;
	background-color:var(--ag-survol) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-otag{
	padding:4px 10px !important;border-radius:999px !important;
	font-size:11px !important;font-weight:700 !important;letter-spacing:.02em !important;
}
/* Statut du bien : la teinte est derivee de --pc (palette metier). La regle
   generique du pilote sur .crm-main select l'avait aplatie en blanc ; elle est
   retablie ici telle que le module la definit. Geometrie seule au-dela. */
body.crm-mode .crmapp.crmapp.crmapp .crm-main select.crm-bstatut{
	background:color-mix(in srgb, var(--pc,#8e8e93) 24%, #fff) !important;
	color:color-mix(in srgb, var(--pc,#8e8e93) 88%, #000) !important;
	border:0 !important;
	border-radius:999px !important;font-family:var(--ag-sans) !important;
	font-size:12px !important;font-weight:700 !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main select.crm-bstatut option{background:#fff !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-btrash{
	border:1px solid var(--ag-filet-fort) !important;border-radius:var(--ag-rayon-s) !important;
	background:#fff !important;color:var(--ag-doux) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btrash:hover{
	background:#FBF2F2 !important;border-color:var(--ag-rouge) !important;color:var(--ag-rouge) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-trashbox{
	background:var(--ag-carte) !important;border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon) !important;padding:14px 18px !important;margin-top:22px !important;
	box-shadow:none !important;
}

/* Pastille de contact direct (telephone) : aubergine, plus le bleu iOS. */
body.crm-mode .crmapp.crmapp.crmapp .crm-wa{
	background:var(--ag-accent) !important;background-image:none !important;color:#fff !important;
	border-radius:999px !important;padding:4px 12px !important;font-size:12px !important;font-weight:700 !important;
	box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-wa:hover{background:var(--ag-accent-fonce) !important;color:#fff !important}

/* Fil d'activite : filet accent a gauche, comme les listes de la maquette. */
body.crm-mode .crmapp.crmapp.crmapp .crm-timeline{gap:2px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tl{
	border-left:2px solid var(--ag-accent-pale) !important;
	padding:8px 0 8px 14px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tl:first-child{border-left-color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tl__t{font-weight:700 !important;font-size:13px !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tl__d{color:var(--ag-doux) !important;font-size:12px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-tl__n{font-size:13px !important;color:var(--ag-texte) !important}

/* Taches de la fiche + listes. */
body.crm-mode .crmapp.crmapp.crmapp .crm-task{
	padding:9px 0 !important;border-bottom:1px solid var(--ag-filet) !important;gap:10px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-task:last-child{border-bottom:0 !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-task__lbl{font-size:13px !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-task__d{font-size:12px !important;color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-task.is-done .crm-task__lbl{color:var(--ag-doux) !important}

/* Documents : depose en pointilles, teinte agence. */
body.crm-mode .crmapp.crmapp.crmapp .crm-docs{border-top:1px solid var(--ag-filet) !important;margin-top:18px !important;padding-top:14px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-docs__hint{font-size:12px !important;color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-file{
	border:1px dashed var(--ag-accent) !important;border-radius:var(--ag-rayon-s) !important;
	color:var(--ag-accent) !important;background:#fff !important;
	padding:9px 14px !important;font-size:13px !important;font-weight:600 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-file:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-file.has-file{background:var(--ag-accent-tres-pale) !important}

/* Champs des blocs d'action (activite, visite, acquereur). */
body.crm-mode .crmapp.crmapp.crmapp .crm-actgrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-actgrid select,
body.crm-mode .crmapp.crmapp.crmapp .crm-vplan input,
body.crm-mode .crmapp.crmapp.crmapp .crm-vplan select,
body.crm-mode .crmapp.crmapp.crmapp .crm-buygrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-buygrid select{
	padding:10px 12px !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;background:#fff !important;
	font-family:var(--ag-sans) !important;font-size:14px !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-buygrid label{
	font-size:11px !important;font-weight:700 !important;letter-spacing:.06em !important;
	text-transform:uppercase !important;color:var(--ag-doux) !important;
}
/* Priorite du lead : l'echelle chaud / tiede / froid est une donnee metier,
   sa teinte arrive en style inline et n'est pas retouchee ici. */
body.crm-mode .crmapp.crmapp.crmapp .crm-prio__badge{
	border-radius:999px !important;padding:4px 11px !important;font-size:11px !important;font-weight:700 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-prio__sc{font-family:var(--ag-serif) !important;font-size:20px !important;font-weight:600 !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-prio__bar{background:var(--ag-filet) !important;border-radius:999px !important;overflow:hidden !important}

/* =====================================================================
   VAGUE 3 - vues secondaires : reglages, moncompte, conseillers,
   direction, stats, facturation, objectifs, bareme, acquereurs,
   mandats, campagnes, diffusion, communication, recrutement, postes,
   juridique, pige, importbiens, audit, new, bien.

   Feuille de style uniquement : aucun balisage, aucun comportement,
   aucune route touches. Les couleurs metier (--pc, --c, --col, --kc,
   --sc, echelles DPE / GES) ne sont jamais redefinies : seule la
   geometrie des composants qui les portent est reprise.
   ===================================================================== */

/* ---------- remappage des variables heritees ----------
   27 fichiers du plugin posent leur propre <style> inline et s'appuient
   sur les variables de la pile precedente (--pl bleu iOS, --ink, --line,
   --muted...). Les redefinir en un seul point evite d'ecrire une regle
   par fichier et retire d'un coup le bleu residuel des vues secondaires.
   AUCUNE variable de statut metier n'est touchee : --pc, --c, --col,
   --kc et --sc arrivent en style inline depuis le PHP. */
body.crm-mode .crmapp.crmapp.crmapp{
	--pl:#722272; --pl-dark:#571850;
	--pl-soft:rgba(114,34,114,.10); --pl-tint:#F9F1F7;
	--pl-grad:linear-gradient(180deg,#8A2C87,#722272);
	--coral-grad:linear-gradient(180deg,#8A2C87,#722272);
	--green:#722272; --green-dark:#571850;
	--ink:#211A20; --muted:#6E6470;
	--line:#EDE6DA; --bg:#FCFAF6; --card:#FFFFFF;
	--sh:0 1px 2px rgba(33,26,32,.05),0 8px 24px -16px rgba(33,26,32,.25);
}

/* ---------- partage : le CTA a couleur metier retrouve sa teinte ----------
   crm-theme-modern.php fait des .crm-btn portant un --pc inline les vrais
   primaires (vert << Marquer VENDU >>, << Publier le bien >>...). La regle
   .crm-btn de la vague 2 les avait aplatis en aubergine : la teinte metier
   est retablie ici, la geometrie reste celle de la charte (plat, sans
   degrade ni ombre portee). */
body.crm-mode .crmapp.crmapp.crmapp .crm-btn[style*="--pc"]{
	background:var(--pc) !important;background-image:none !important;
	color:#fff !important;border-color:transparent !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn[style*="--pc"]:hover{
	background:color-mix(in srgb, var(--pc) 84%, #000) !important;opacity:1 !important;
}

/* ---------- partage : barres d'outils de vue ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-exportbar,
body.crm-mode .crmapp.crmapp.crmapp .crm-camptools,
body.crm-mode .crmapp.crmapp.crmapp .crm-diffbar{
	background:var(--ag-carte);border:1px solid var(--ag-filet);
	border-radius:var(--ag-rayon);padding:12px 16px;box-shadow:var(--ag-ombre);
}
body.crm-mode .crmapp.crmapp.crmapp .crm-exportbar > span:first-child{
	font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
	color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-camptools > label{
	font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
	color:var(--ag-doux) !important;
}
/* Le libelle passe en petites capitales, pas le menu deroulant qu'il contient. */
body.crm-mode .crmapp.crmapp.crmapp .crm-camptools > label select,
body.crm-mode .crmapp.crmapp.crmapp .crm-exportbar select{
	text-transform:none;letter-spacing:0;font-weight:600 !important;
}

/* ---------- partage : code, champs fichier, cases a cocher ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-main code{
	background:var(--ag-survol);border:1px solid var(--ag-filet);
	border-radius:4px;padding:2px 6px;
	font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
	font-size:12px;color:var(--ag-accent-fonce);
}
/* Une reference (numero de facture, en-tete CSV) ne se coupe pas : dans un
   tableau dense elle partait sinon sur trois lignes. Le tableau, lui,
   defile deja horizontalement (.crm-tablewrap). */
body.crm-mode .crmapp.crmapp.crmapp .crm-table code{white-space:nowrap;padding:2px 7px}
/* Tableaux denses (8 colonnes ou plus : acquereurs, facturation, diffusion,
   audit). Le rembourrage genereux des colonnes coupait les noms, les
   telephones et les montants sur deux lignes. On resserre l'espacement
   horizontal ; au-dela, .crm-tablewrap defile deja lateralement. */
body.crm-mode .crmapp.crmapp.crmapp .crm-table:has(thead th:nth-child(8)) th,
body.crm-mode .crmapp.crmapp.crmapp .crm-table:has(thead th:nth-child(8)) td{
	padding-left:11px !important;padding-right:11px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-table:has(thead th:nth-child(8)) th{white-space:nowrap}
body.crm-mode .crmapp.crmapp.crmapp .crm-main input[type=file]{
	background:transparent !important;border:0 !important;box-shadow:none !important;
	padding:0 !important;font-size:13px;color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main input[type=file]::file-selector-button{
	margin-right:12px;padding:9px 15px;cursor:pointer;
	border:1px solid var(--ag-filet-fort);border-radius:var(--ag-rayon-s);
	background:#fff;color:var(--ag-texte);
	font-family:var(--ag-sans);font-size:13px;font-weight:700;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main input[type=file]::file-selector-button:hover{
	background:var(--ag-accent-tres-pale);color:var(--ag-accent);border-color:var(--ag-accent-pale);
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main input[type=checkbox],
body.crm-mode .crmapp.crmapp.crmapp .crm-main input[type=radio]{accent-color:var(--ag-accent)}

/* ---------- partage : messages de retour AJAX ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-rmsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-agmsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-agcmsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-imsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-rlmsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-rgpdmsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-memsg,
body.crm-mode .crmapp.crmapp.crmapp .crm-pwmsg{
	margin-left:10px;font-size:13px !important;font-weight:600;
}

/* ---------- vue REGLAGES ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-icssync__h{
	font-family:var(--ag-sans) !important;font-size:11px;font-weight:700;
	letter-spacing:.08em;text-transform:uppercase;color:var(--ag-doux);
	margin-bottom:6px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-icssync__row{
	display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0 8px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-icssync__row input{
	flex:1 1 320px;min-width:0;font-size:13px !important;
	font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace !important;
	padding:9px 12px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tplblock{
	background:var(--ag-survol) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:16px 18px !important;margin-bottom:14px !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tplblock strong{color:var(--ag-encre)}
body.crm-mode .crmapp.crmapp.crmapp .crm-tplblock input,
body.crm-mode .crmapp.crmapp.crmapp .crm-tplblock textarea{
	padding:10px 12px !important;margin-top:9px !important;
	font-size:13px !important;line-height:1.5;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-tplblock textarea{resize:vertical;font-family:var(--ag-sans) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-exprow{gap:10px !important;align-items:center}
body.crm-mode .crmapp.crmapp.crmapp .crm-exprow label{
	font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
	color:var(--ag-doux);display:inline-flex;align-items:center;gap:8px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agform label,
body.crm-mode .crmapp.crmapp.crmapp .crm-agcform label,
body.crm-mode .crmapp.crmapp.crmapp .crm-acfield,
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid label,
body.crm-mode .crmapp.crmapp.crmapp .crm-fgrid label,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid label,
body.crm-mode .crmapp.crmapp.crmapp .pib-smtpcard .crm-buygrid label{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.06em !important;text-transform:uppercase !important;
	color:var(--ag-doux) !important;gap:7px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agform label input,
body.crm-mode .crmapp.crmapp.crmapp .crm-agcform label input,
body.crm-mode .crmapp.crmapp.crmapp .crm-acfield input,
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid label input,
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid label select,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid label input,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid label select,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid label textarea,
body.crm-mode .crmapp.crmapp.crmapp .pib-smtpcard .crm-buygrid input,
body.crm-mode .crmapp.crmapp.crmapp .pib-smtpcard .crm-buygrid select{
	text-transform:none !important;letter-spacing:0 !important;
	font-size:14px !important;font-weight:500 !important;color:var(--ag-encre) !important;
	padding:10px 12px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agform,
body.crm-mode .crmapp.crmapp.crmapp .crm-agcform{gap:14px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-fldgrid{gap:12px 14px}
body.crm-mode .crmapp.crmapp.crmapp .crm-fld{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.06em !important;text-transform:uppercase !important;
	color:var(--ag-doux) !important;gap:7px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-fld input,
body.crm-mode .crmapp.crmapp.crmapp .crm-fld select,
body.crm-mode .crmapp.crmapp.crmapp .crm-fld textarea{
	text-transform:none !important;letter-spacing:0 !important;
	font-size:14px !important;font-weight:500 !important;color:var(--ag-encre) !important;
	padding:10px 12px !important;
}

/* ---------- vue MONCOMPTE ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-acctgrid{gap:20px !important;align-items:start}
body.crm-mode .crmapp.crmapp.crmapp .crm-acfield{margin-bottom:16px !important}

/* ---------- vue CONSEILLERS ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-agc-chk{
	text-transform:none !important;letter-spacing:0 !important;
	font-size:13px !important;color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agreset,
body.crm-mode .crmapp.crmapp.crmapp .crm-agdis{
	background:#fff !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:var(--ag-rayon-s) !important;padding:6px 12px !important;
	font-family:var(--ag-sans) !important;font-size:12px !important;font-weight:700 !important;
	color:var(--ag-texte) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agreset:hover{
	background:var(--ag-accent-tres-pale) !important;border-color:var(--ag-accent-pale) !important;
	color:var(--ag-accent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agdis{color:var(--ag-rouge) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-agdis:hover{
	background:#FBF2F2 !important;border-color:var(--ag-rouge) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-agacts{white-space:nowrap}

/* ---------- vue DIRECTION (et graphiques) ----------
   Les jeux de couleurs de Chart.js sont poses en JS : rien ici ne les touche. */
body.crm-mode .crmapp.crmapp.crmapp .crm-dashgrid{gap:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-dashcard{padding:20px 22px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-dashcard h3{
	font-family:var(--ag-serif) !important;font-size:18px !important;font-weight:600 !important;
	color:var(--ag-encre) !important;
	margin:-20px -22px 18px !important;padding:16px 22px !important;
	border-bottom:1px solid var(--ag-filet) !important;
	display:flex;align-items:center;gap:10px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-dash__ic{color:var(--ag-accent) !important}

/* ---------- vue STATS ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-card--wide{width:auto}

/* ---------- vue FACTURATION ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-exportbar{margin-bottom:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-table td .crm-btn + .crm-btn,
body.crm-mode .crmapp.crmapp.crmapp .crm-table td .crm-btn + a.crm-btn{margin-left:6px}

/* ---------- vue OBJECTIFS ----------
   Les jauges sont posees en style inline (barre grise + remplissage bleu de
   la pile precedente). On ne peut les atteindre que par leur geometrie ; le
   ciblage est volontairement etroit (hauteur 7px), il ne concerne qu'elles. */
body.crm-mode .crmapp.crmapp.crmapp .crm-table td div[style*="height:7px"]{
	background:var(--ag-filet) !important;
}
/* Le REMPLISSAGE, lui, n'est pas touche : pib_obj_gauge() le colore selon
   l'atteinte de l'objectif (vert >= 100%, orange >= 60%, accent en deca).
   C'est une couleur metier, elle reste telle quelle. */
body.crm-mode .crmapp.crmapp.crmapp .crm-table tbody tr[style*="rgba(0,122,255"]{
	background:var(--ag-accent-tres-pale) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-table tbody tr[style*="rgba(0,122,255"] td{
	color:var(--ag-encre) !important;font-weight:700;
}

/* ---------- vue BAREME ----------
   Le lien << Voir la page publique >> se donne un fond blanc en inline :
   c'est un bouton secondaire, on lui rend le registre fantome. */
body.crm-mode .crmapp.crmapp.crmapp .crm-btn[style*="background:#fff"]{
	background:transparent !important;border-color:var(--ag-filet-fort) !important;
	color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-btn[style*="background:#fff"]:hover{
	background:var(--ag-survol) !important;border-color:var(--ag-accent) !important;
	color:var(--ag-accent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-table td input[type=text]{font-size:13px !important}

/* ---------- vue ACQUEREURS ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-bcount{
	display:inline-flex;align-items:center;
	background:var(--ag-accent-pale) !important;color:var(--ag-accent) !important;
	box-shadow:none !important;border:1px solid rgba(114,34,114,.22) !important;
	border-radius:999px !important;padding:4px 11px !important;
	font-family:var(--ag-sans) !important;font-size:12px !important;font-weight:700 !important;
	text-decoration:none !important;white-space:nowrap;
}
body.crm-mode .crmapp.crmapp.crmapp a.crm-bcount:hover{
	background:var(--ag-accent) !important;color:#fff !important;
	border-color:var(--ag-accent) !important;filter:none !important;transform:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-bcount--0{
	background:var(--ag-survol) !important;color:var(--ag-doux) !important;
	border-color:var(--ag-filet-fort) !important;box-shadow:none !important;
}

/* ---------- vues MANDATS et POSTES (formulaire partage) ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-mandform{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:20px 22px !important;margin-bottom:20px !important;
	box-shadow:var(--ag-ombre) !important;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-mandform > h3{
	font-family:var(--ag-serif) !important;font-size:18px !important;font-weight:600 !important;
	margin:-20px -22px 18px !important;padding:16px 22px !important;
	border-bottom:1px solid var(--ag-filet) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid{gap:14px !important;margin-bottom:16px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid label small{
	text-transform:none;letter-spacing:0;font-weight:500;color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-macts{white-space:nowrap;text-align:right}
body.crm-mode .crmapp.crmapp.crmapp .crm-medit,
body.crm-mode .crmapp.crmapp.crmapp .crm-mdel,
body.crm-mode .crmapp.crmapp.crmapp .crm-msend,
body.crm-mode .crmapp.crmapp.crmapp .crm-mmanual,
body.crm-mode .crmapp.crmapp.crmapp .crm-mdoc,
body.crm-mode .crmapp.crmapp.crmapp .crm-iconbtn{
	border:1px solid var(--ag-filet-fort) !important;border-radius:var(--ag-rayon-s) !important;
	background:#fff !important;color:var(--ag-doux) !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-medit:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-msend:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-mmanual:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-mdoc:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-iconbtn:hover{
	background:var(--ag-accent-tres-pale) !important;border-color:var(--ag-accent) !important;
	color:var(--ag-accent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-mdel,
body.crm-mode .crmapp.crmapp.crmapp .crm-iconbtn--del{border-color:var(--ag-filet-fort) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-mdel:hover,
body.crm-mode .crmapp.crmapp.crmapp .crm-iconbtn--del:hover{
	background:#FBF2F2 !important;border-color:var(--ag-rouge) !important;color:var(--ag-rouge) !important;
}
/* Etat de signature du mandat : signal metier, on garde le vert / l'ambre
   et on n'en reprend que la geometrie (pastille, petites capitales). */
body.crm-mode .crmapp.crmapp.crmapp .crm-msign{
	border-radius:999px !important;padding:0 11px !important;
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.02em !important;box-shadow:none !important;
}

/* ---------- vue POSTES ----------
   L'interrupteur reste VERT : crm-postes.php ecrit noir sur blanc
   << interrupteur vert ci-dessous >>. Le repeindre en aubergine
   contredirait l'aide affichee ; seule sa geometrie est reprise. */
body.crm-mode .crmapp.crmapp.crmapp .crm-onoff{
	font-family:var(--ag-sans) !important;font-size:12px !important;font-weight:700 !important;
	letter-spacing:.04em;color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-onoff__sw{background:var(--ag-filet-fort) !important}
/* La piste allumee doit rester verte : c'est le signal << en ligne sur le
   site >>, et le texte d'aide de la vue y renvoie explicitement. La regle
   ci-dessus l'avait aplatie, l'annonce publiee devenait indiscernable. */
body.crm-mode .crmapp.crmapp.crmapp .crm-onoff input:checked + .crm-onoff__sw{
	background:var(--ag-vert) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-onoff input:checked ~ .crm-onoff__t{
	color:var(--ag-vert) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-onoff__sw::after{box-shadow:0 1px 3px rgba(33,26,32,.30) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-onoff input:focus-visible + .crm-onoff__sw{
	outline:2px solid var(--ag-accent) !important;outline-offset:2px !important;
}

/* ---------- vue JURIDIQUE ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-juridgrid{gap:16px !important;margin-bottom:26px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-juridcard{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:16px 18px !important;box-shadow:var(--ag-ombre) !important;
	transition:border-color .16s,box-shadow .16s !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-juridcard:hover{
	transform:none !important;border-color:var(--ag-accent) !important;
	box-shadow:0 2px 4px rgba(33,26,32,.06),0 14px 30px -18px rgba(33,26,32,.32) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-juridcard__ic{
	background:var(--ag-accent-pale) !important;border-radius:var(--ag-rayon-s) !important;
	width:48px !important;height:48px !important;font-size:22px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-juridcard__t{
	font-family:var(--ag-serif) !important;font-size:17px !important;font-weight:600 !important;
	color:var(--ag-encre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-juridcard__s{font-size:12px !important;color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-juridcard__go{
	font-size:11px !important;font-weight:700 !important;letter-spacing:.06em !important;
	text-transform:uppercase !important;color:var(--ag-accent) !important;
}

/* ---------- vues PIGE et RECRUTEMENT ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-filleul{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:20px 22px !important;box-shadow:var(--ag-ombre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-add__t{
	font-family:var(--ag-serif) !important;font-size:19px !important;font-weight:600 !important;
	color:var(--ag-encre) !important;
	margin:-20px -22px 18px !important;padding:16px 22px !important;
	border-bottom:1px solid var(--ag-filet) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-add__t span{
	font-family:var(--ag-sans) !important;font-size:12px !important;color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-add__t svg{color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-m--sep{border-top-color:var(--ag-filet) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-m__lbl{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.06em !important;text-transform:uppercase !important;color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-m__lbl b{
	background:var(--ag-accent) !important;color:#fff !important;
	font-size:11px !important;letter-spacing:0 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-row{gap:10px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-fgrid{gap:12px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-empty{
	background:var(--ag-carte);border:1px solid var(--ag-filet);
	border-radius:var(--ag-rayon);box-shadow:var(--ag-ombre);
	color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-empty svg{color:var(--ag-accent) !important;opacity:.55}
body.crm-mode .crmapp.crmapp.crmapp .crm-pige-empty strong{
	font-family:var(--ag-serif) !important;font-size:19px !important;font-weight:600 !important;
	color:var(--ag-encre) !important;
}
/* Kanban de recrutement : meme registre que le pipeline. La teinte de
   colonne, quand elle existe, reste celle du PHP. */
body.crm-mode .crmapp.crmapp.crmapp .crm-rk__b{
	background:var(--ag-survol) !important;border-radius:0 0 var(--ag-rayon) var(--ag-rayon) !important;
	padding:12px !important;gap:10px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-rk__b.crm-over{background:var(--ag-accent-tres-pale) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-rcard{
	background:#fff !important;border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon-s) !important;padding:12px 13px !important;box-shadow:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-rcard:hover{border-color:var(--ag-accent) !important;box-shadow:var(--ag-ombre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-rcard__t{font-size:14px !important;color:var(--ag-encre) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-rcard__c{color:var(--ag-magenta) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-rcard__a,
body.crm-mode .crmapp.crmapp.crmapp .crm-rcard__d{color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-fsub{
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	letter-spacing:.08em !important;text-transform:uppercase !important;color:var(--ag-doux) !important;
}

/* ---------- vue COMMUNICATION ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-switch{
	font-size:13px !important;font-weight:600 !important;color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .pib-smtpcard .crm-buygrid{gap:14px !important}

/* ---------- vue DIFFUSION ----------
   La teinte de chaque portail arrive en --sc (style inline) : elle n'est
   jamais redefinie, seule la geometrie de la pastille est reprise. */
body.crm-mode .crmapp.crmapp.crmapp .crm-feedlist{gap:12px !important;margin-bottom:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-feedrow,
body.crm-mode .crmapp.crmapp.crmapp .crm-statusbox{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:14px 18px !important;box-shadow:var(--ag-ombre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-statusbox{margin-bottom:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-feedrow__h{font-size:14px !important;margin-bottom:6px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-feedrow__h strong{color:var(--ag-encre)}
body.crm-mode .crmapp.crmapp.crmapp .crm-feedrow__b{gap:10px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-main code.crm-feedurl{
	background:var(--ag-survol) !important;border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon-s) !important;padding:8px 11px !important;
	font-size:12px !important;color:var(--ag-texte) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-feeddup{
	background:var(--ag-laiton-pale) !important;color:#7A6329 !important;
	border-radius:999px !important;padding:2px 9px !important;
	font-size:11px !important;font-weight:700 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-feedrow__lr{font-size:12px !important;color:var(--ag-doux) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-feedrow__lr.is-read{color:var(--ag-vert) !important;font-weight:600}
body.crm-mode .crmapp.crmapp.crmapp .crm-statusbox__legend{
	font-size:12px !important;color:var(--ag-doux) !important;
	gap:8px 16px !important;padding-top:10px;border-top:1px solid var(--ag-filet);
}
body.crm-mode .crmapp.crmapp.crmapp .crm-diffbar{margin-bottom:16px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-diffchips,
body.crm-mode .crmapp.crmapp.crmapp .crm-annchips{gap:8px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-diffpill{
	background:#fff !important;background-image:none !important;
	border:1px solid var(--ag-filet-fort) !important;border-radius:999px !important;
	padding:3px 10px !important;margin:2px 4px 2px 0 !important;
	font-family:var(--ag-sans) !important;font-size:11px !important;font-weight:700 !important;
	color:var(--ag-texte) !important;box-shadow:none !important;
}
/* Au survol, le filet reprend la couleur d'etat du portail (--sc). */
body.crm-mode .crmapp.crmapp.crmapp .crm-diffpill:hover{
	background:var(--ag-survol) !important;border-color:var(--sc) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-swt--feed.is-on .crm-swt__sw{
	background:var(--ag-accent) !important;background-image:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-embbox{
	background:var(--ag-carte) !important;border:1px solid var(--ag-filet) !important;
	border-radius:var(--ag-rayon) !important;padding:6px 20px !important;
	box-shadow:var(--ag-ombre) !important;margin-bottom:20px;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-embbox > summary{
	font-family:var(--ag-serif) !important;font-size:18px !important;font-weight:600 !important;
	color:var(--ag-encre) !important;padding:12px 0 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-embbox > summary:focus-visible{
	outline:2px solid var(--ag-accent) !important;outline-offset:2px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-embbox__hint{
	font-family:var(--ag-sans) !important;font-size:12px !important;
	font-weight:500 !important;color:var(--ag-doux) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-embpre{
	background:var(--ag-nuit) !important;color:#EFE3EC !important;
	border-radius:var(--ag-rayon-s) !important;font-size:12px !important;
}

/* ---------- vue IMPORTBIENS ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-main form label input[type=checkbox]{margin:0}

/* ---------- vue NEW (creation de lead) ----------
   Ecran d'action : habillage seul, aucun envoi, aucune valeur par defaut. */
body.crm-mode .crmapp.crmapp.crmapp .crm-newlead{
	background:var(--ag-carte) !important;background-image:none !important;
	border:1px solid var(--ag-filet) !important;border-radius:var(--ag-rayon) !important;
	padding:22px 24px !important;box-shadow:var(--ag-ombre) !important;max-width:860px;
	-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-newlead > h2{
	font-family:var(--ag-serif) !important;font-size:22px !important;font-weight:600 !important;
	margin:-22px -24px 4px !important;padding:18px 24px 0 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-newlead > p.crm-muted{
	margin:0 -24px 20px !important;padding:0 24px 16px !important;
	border-bottom:1px solid var(--ag-filet) !important;font-size:13px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid{gap:16px !important;margin-bottom:20px}
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid .crm-full{grid-column:1 / -1}
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid textarea{min-height:110px;resize:vertical}

/* ---------- vue BIEN (fiche editable) ---------- */
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__top{
	background:var(--ag-carte);border:1px solid var(--ag-filet);
	border-radius:var(--ag-rayon);box-shadow:var(--ag-ombre);
	padding:14px 18px;margin-bottom:20px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__title{
	font-family:var(--ag-serif) !important;font-size:21px !important;font-weight:600 !important;
	letter-spacing:-.01em !important;color:var(--ag-encre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__acts{gap:8px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__msg.ok{color:var(--ag-vert) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__msg.err{color:var(--ag-rouge) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__grid{gap:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__col{gap:20px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit .crm-h__ic{color:var(--ag-accent) !important}
/* CORRECTIF â€” les menus DPE / GES tirent leur teinte de --pc (echelle
   energie du PHP). La regle generique du pilote sur .crm-main select les
   aurait aplatis en blanc, comme cela s'etait produit sur .crm-bstatut :
   la definition metier est retablie ici a l'identique. */
body.crm-mode .crmapp.crmapp.crmapp .crm-main select.crm-dpesel{
	background:color-mix(in srgb, var(--pc,#c7c7cc) 24%, #fff) !important;
	color:color-mix(in srgb, var(--pc,#c7c7cc) 86%, #000) !important;
	border:0 !important;border-radius:var(--ag-rayon-s) !important;
	font-family:var(--ag-sans) !important;font-size:13px !important;font-weight:700 !important;
	box-shadow:inset 0 0 0 1.6px color-mix(in srgb, var(--pc,#c7c7cc) 55%, transparent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-main select.crm-dpesel option{
	background:#fff !important;color:var(--ag-encre) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-checkset{gap:8px !important;margin:4px 0 10px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-checkchip{
	background:#fff !important;border:1px solid var(--ag-filet-fort) !important;
	border-radius:999px !important;padding:5px 12px !important;
	font-family:var(--ag-sans) !important;font-size:12px !important;font-weight:600 !important;
	color:var(--ag-texte) !important;text-transform:none !important;letter-spacing:0 !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-checkchip:hover{
	background:var(--ag-accent-tres-pale) !important;border-color:var(--ag-accent-pale) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-checkchip:has(input:checked){
	background:var(--ag-accent-pale) !important;border-color:var(--ag-accent) !important;
	color:var(--ag-accent-fonce) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-checkchip input{accent-color:var(--ag-accent) !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-checkchip:focus-within{
	outline:2px solid var(--ag-accent) !important;outline-offset:2px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photogrid{gap:10px !important;margin-bottom:12px !important}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoit{
	border-radius:var(--ag-rayon-s) !important;background:var(--ag-survol) !important;
	box-shadow:inset 0 0 0 1px var(--ag-filet) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoit__star{
	background:rgba(255,255,255,.92) !important;color:var(--ag-laiton) !important;
	box-shadow:0 2px 6px rgba(33,26,32,.28) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoit:first-child .crm-photoit__star{
	background:var(--ag-laiton) !important;color:#fff !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoit__del{
	background:rgba(33,26,32,.58) !important;color:#fff !important;
	box-shadow:0 2px 6px rgba(33,26,32,.28) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoit__main{
	background:var(--ag-accent) !important;background-image:none !important;
	color:#fff !important;font-size:10px !important;padding:3px !important;
	letter-spacing:.08em !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoadd{
	background:var(--ag-accent-tres-pale) !important;
	border:2px dashed var(--ag-accent-pale) !important;
	border-radius:var(--ag-rayon-s) !important;
	color:var(--ag-accent) !important;
	font-family:var(--ag-sans) !important;font-size:13px !important;font-weight:700 !important;
	padding:12px !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoadd:hover{
	background:var(--ag-accent-pale) !important;border-color:var(--ag-accent) !important;
}
body.crm-mode .crmapp.crmapp.crmapp .crm-photoadd:focus-within{
	outline:2px solid var(--ag-accent) !important;outline-offset:2px !important;
}

/* ---------- adaptation du tiroir et des grilles (<=700px) ----------
   Plusieurs grilles sont posees en style inline sans requete media :
   elles ne se repliaient pas sous 700px. */
@media (max-width:700px){
	body.crm-mode .crmapp.crmapp.crmapp .crm-acctgrid,
	body.crm-mode .crmapp.crmapp.crmapp .crm-agform,
	body.crm-mode .crmapp.crmapp.crmapp .crm-agcform,
	body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid,
	body.crm-mode .crmapp.crmapp.crmapp .crm-fgrid,
	body.crm-mode .crmapp.crmapp.crmapp .crm-fldgrid,
	body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid,
	body.crm-mode .crmapp.crmapp.crmapp .crm-dashgrid,
	body.crm-mode .crmapp.crmapp.crmapp .pib-smtpcard .crm-buygrid{
		grid-template-columns:1fr !important;
	}
	body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__title{max-width:none;white-space:normal}
	body.crm-mode .crmapp.crmapp.crmapp .crm-exportbar,
	body.crm-mode .crmapp.crmapp.crmapp .crm-camptools,
	body.crm-mode .crmapp.crmapp.crmapp .crm-diffbar{padding:12px 14px}
	body.crm-mode .crmapp.crmapp.crmapp .crm-icssync__row input{flex:1 1 100%}
}

/* ---------- CORRECTIF (vague 3) : grilles de formulaire compressibles ----------
   Un menu deroulant a longues options (liste des biens, liste des vendeurs)
   impose sa largeur minimale a sa colonne de grille : la carte debordait,
   max-width comprise, et les derniers champs sortaient de l'ecran.
   min-width:0 rend la colonne compressible ; les champs suivent. */
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-fgrid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-fldgrid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-acctgrid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-agform > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-agcform > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-buygrid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-bedit__grid > *,
body.crm-mode .crmapp.crmapp.crmapp .crm-mandform,
body.crm-mode .crmapp.crmapp.crmapp .crm-filleul{min-width:0}
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid select,
body.crm-mode .crmapp.crmapp.crmapp .crm-mgrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-fgrid select,
body.crm-mode .crmapp.crmapp.crmapp .crm-fgrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid select,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-newgrid textarea,
body.crm-mode .crmapp.crmapp.crmapp .crm-acctgrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-agform input,
body.crm-mode .crmapp.crmapp.crmapp .crm-agcform input,
body.crm-mode .crmapp.crmapp.crmapp .crm-buygrid input,
body.crm-mode .crmapp.crmapp.crmapp .crm-buygrid select{max-width:100%;box-sizing:border-box}

body.crm-mode .crmapp.crmapp.crmapp .crm-obj__bar{background:var(--ag-filet) !important}


/* ==========================================================================
   VAGUE 4 â€” sous-menus a droite (demande client)
   La vague precedente les repliait dans la largeur du rail pour contourner
   le rognage : la navigation devenait impraticable. On revient a l'ouverture
   laterale, et c'est crm-skin-flyout.js qui sort le menu de la boite de
   defilement en position fixed. Le repli en accordeon reste sous 820 px.
   ========================================================================== */
@media (min-width:821px){
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__menu{
		left:100% !important;right:auto !important;width:auto !important;
		min-width:236px !important;max-width:320px !important;
		margin-left:6px !important;margin-right:0 !important;
		top:0 !important;bottom:auto !important;
		margin-top:0 !important;margin-bottom:0 !important;
	}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg--up .crm-navg__menu{
		top:0 !important;bottom:auto !important;margin-bottom:0 !important;
	}
	/* Le pont de survol revient sur le flanc gauche du menu. */
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg__menu::before{
		left:-8px !important;right:auto !important;width:8px !important;
		top:0 !important;bottom:0 !important;height:auto !important;
	}
	body.crm-mode .crmapp.crmapp.crmapp .crm-side .crm-navg--up .crm-navg__menu::before{
		top:0 !important;bottom:0 !important;
	}
}


/* ==========================================================================
   DEFILEMENT CRM (correctif)
   Le corps de page etait bloque en hauteur : sur un ecran court, le bas des
   formulaires longs (creation d'annonce de recrutement) tombait hors de la
   fenetre sans aucun moyen d'y acceder. On rend le defilement vertical au
   document, en gardant le garde-fou horizontal.
   ========================================================================== */
html:has(body.crm-mode){ overflow-y: auto !important; height: auto !important; }
body.crm-mode{ overflow-y: visible !important; overflow-x: hidden !important; height: auto !important; min-height: 100vh; position: static !important; }
body.crm-mode .crmapp, body.crm-mode .crmapp .crm-main{ height: auto !important; min-height: 0 !important; overflow: visible !important; }
body.crm-mode .crm-shell, body.crm-mode .wp-site-blocks{ height: auto !important; overflow: visible !important; }
