/* CI-Clean UX — habillage des écrans de l'app ci-clean-core (Défis, Événements, Profil, Messagerie, Carte, Stats…)
   pour qu'ils aient la même apparence que le nouveau fil. Le mode sombre de l'app n'est pas touché. */
body.ciux-site:not([data-cc-theme="dark"]) {
	--cx-green: #0F5C36;
	--cx-green-50: #e7f4ec;
	--cx-bg: #F0F2F5;
	--cx-text: #1c1e21;
	--cx-muted: #65676b;
	--cx-line: #e4e6eb;
	--cx-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 1px 1px rgba(0, 0, 0, .04);
	--cx-font: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}

/* Fond et typo */
body.ciux-site:not([data-cc-theme="dark"]),
body.ciux-site:not([data-cc-theme="dark"]) .cc-shell-body,
body.ciux-site:not([data-cc-theme="dark"]) .cc-root { background: var(--cx-bg) !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-navbar,
body.ciux-site:not([data-cc-theme="dark"]) .cc-shell-body,
body.ciux-site:not([data-cc-theme="dark"]) .cc-root,
body.ciux-site:not([data-cc-theme="dark"]) .cc-shell-body h1,
body.ciux-site:not([data-cc-theme="dark"]) .cc-shell-body h2,
body.ciux-site:not([data-cc-theme="dark"]) .cc-shell-body h3,
body.ciux-site:not([data-cc-theme="dark"]) .cc-shell-body h4 { font-family: var(--cx-font) !important; color: var(--cx-text); }
body.ciux-site:not([data-cc-theme="dark"]) .cc-h1 { color: var(--cx-green) !important; font-weight: 800 !important; letter-spacing: -.01em; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-sub { color: var(--cx-muted) !important; }

/* Barre du haut : blanche, comme celle du nouveau fil */
body.ciux-site:not([data-cc-theme="dark"]) .cc-navbar { background: #fff !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .08) !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-navbar-link.active { background: var(--cx-green-50) !important; color: var(--cx-green) !important; }

/* Menu de gauche */
body.ciux-site:not([data-cc-theme="dark"]) .cc-sidebar-item { color: var(--cx-text) !important; border-radius: 10px !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-sidebar-item:hover { background: rgba(0, 0, 0, .05) !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-sidebar-item.active { background: #fff !important; color: var(--cx-green) !important; box-shadow: var(--cx-shadow) !important; }

/* Cartes blanches arrondies, sans bordure beige */
body.ciux-site:not([data-cc-theme="dark"]) .cc-card,
body.ciux-site:not([data-cc-theme="dark"]) .cc-post,
body.ciux-site:not([data-cc-theme="dark"]) .cc-stat-card,
body.ciux-site:not([data-cc-theme="dark"]) .cc-rightpanel,
body.ciux-site:not([data-cc-theme="dark"]) .cc-composer,
body.ciux-site:not([data-cc-theme="dark"]) .cc-fil-item,
body.ciux-site:not([data-cc-theme="dark"]) .cc-notif-panel {
	background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: var(--cx-shadow) !important;
}
body.ciux-site:not([data-cc-theme="dark"]) .cc-rightpanel h4,
body.ciux-site:not([data-cc-theme="dark"]) .cc-label {
	font-family: var(--cx-font) !important; text-transform: none !important; letter-spacing: 0 !important;
	font-size: 15px !important; font-weight: 700 !important; color: var(--cx-text) !important;
}
body.ciux-site:not([data-cc-theme="dark"]) .cc-label { font-size: 13px !important; color: var(--cx-muted) !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-rightpanel-row { border-color: var(--cx-line) !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-rightpanel-row strong,
body.ciux-site:not([data-cc-theme="dark"]) .cc-stat-value { color: var(--cx-green) !important; }

/* Boutons et pastilles */
body.ciux-site:not([data-cc-theme="dark"]) .cc-btn,
body.ciux-site:not([data-cc-theme="dark"]) .cc-navbar-btn { background: var(--cx-green) !important; color: #fff !important; border-radius: 8px !important; font-weight: 700 !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-btn-outline,
body.ciux-site:not([data-cc-theme="dark"]) .cc-navbar-btn-outline { border-radius: 8px !important; border-color: var(--cx-line) !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-chip { border-color: var(--cx-line) !important; font-weight: 600; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-chip.active { background: var(--cx-green) !important; border-color: var(--cx-green) !important; color: #fff !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-social-btn { border-radius: 8px !important; }

/* Champs de formulaire */
body.ciux-site:not([data-cc-theme="dark"]) .cc-input,
body.ciux-site:not([data-cc-theme="dark"]) .cc-select,
body.ciux-site:not([data-cc-theme="dark"]) .cc-textarea { border-color: var(--cx-line) !important; border-radius: 10px !important; }
body.ciux-site:not([data-cc-theme="dark"]) .cc-input:focus,
body.ciux-site:not([data-cc-theme="dark"]) .cc-select:focus,
body.ciux-site:not([data-cc-theme="dark"]) .cc-textarea:focus { border-color: var(--cx-green) !important; box-shadow: 0 0 0 3px rgba(15, 92, 54, .15) !important; }

/* Pages isolées (Signaler, Carte) : même typo */
body.ciux-site:not([data-cc-theme="dark"]) .cc-root h1,
body.ciux-site:not([data-cc-theme="dark"]) .cc-root h2,
body.ciux-site:not([data-cc-theme="dark"]) .cc-root h3,
body.ciux-site:not([data-cc-theme="dark"]) .cc-root .cc-h1 { font-family: var(--cx-font) !important; }

/* ---- Mode sombre de l'app : corrections de lisibilité ---- */
body.ciux-site[data-cc-theme="dark"] .cc-shell-body, body.ciux-site[data-cc-theme="dark"] .cc-root,
body.ciux-site[data-cc-theme="dark"] .cc-shell-body h1, body.ciux-site[data-cc-theme="dark"] .cc-shell-body h2,
body.ciux-site[data-cc-theme="dark"] .cc-shell-body h3, body.ciux-site[data-cc-theme="dark"] .cc-shell-body h4,
body.ciux-site[data-cc-theme="dark"] .cc-root h1, body.ciux-site[data-cc-theme="dark"] .cc-root h2, body.ciux-site[data-cc-theme="dark"] .cc-root h3 {
	font-family: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif !important;
}
body.ciux-site[data-cc-theme="dark"] .cc-h1 { color: #6FD39A !important; font-weight: 800 !important; }
body.ciux-site[data-cc-theme="dark"] .cc-shell-body h2, body.ciux-site[data-cc-theme="dark"] .cc-shell-body h3,
body.ciux-site[data-cc-theme="dark"] .cc-shell-body h4, body.ciux-site[data-cc-theme="dark"] .cc-root h2,
body.ciux-site[data-cc-theme="dark"] .cc-root h3 { color: #E6EFE9 !important; }
body.ciux-site[data-cc-theme="dark"] .cc-rightpanel h4, body.ciux-site[data-cc-theme="dark"] .cc-label {
	text-transform: none !important; letter-spacing: 0 !important; font-size: 15px !important; font-weight: 700 !important;
}
body.ciux-site[data-cc-theme="dark"] .cc-label { font-size: 13px !important; color: #9FB3A7 !important; }
body.ciux-site[data-cc-theme="dark"] .cc-stat-card { background: #16241C !important; border: 1px solid #24362B !important; }
body.ciux-site[data-cc-theme="dark"] .cc-stat-value { color: #6FD39A !important; }
body.ciux-site[data-cc-theme="dark"] .cc-stat-label { color: #9FB3A7 !important; }
body.ciux-site[data-cc-theme="dark"] .cc-chip, body.ciux-site[data-cc-theme="dark"] .cc-btn-outline {
	background: #16241C !important; color: #E6EFE9 !important; border-color: #24362B !important;
}
body.ciux-site[data-cc-theme="dark"] .cc-chip.active { background: #0F5C36 !important; border-color: #0F5C36 !important; color: #fff !important; }

/* ---- Panneau des notifications façon réseau social (v1.11) ---- */
body.ciux-site .cc-notif-btn { border: 0 !important; outline: none !important; box-shadow: none !important; border-radius: 50% !important; width: 40px; height: 40px; }
body.ciux-site .cc-notif-btn:hover { background: rgba(0, 0, 0, .06) !important; }
body.ciux-site .cc-notif-btn:focus-visible { box-shadow: 0 0 0 3px rgba(15, 92, 54, .35) !important; }
body.ciux-site .cc-notif-panel {
	width: 380px !important; max-width: calc(100vw - 24px) !important; max-height: min(70vh, 560px) !important;
	overflow-y: auto !important; padding: 8px !important; border: 0 !important; border-radius: 14px !important;
	box-shadow: 0 12px 28px rgba(0, 0, 0, .2), 0 2px 4px rgba(0, 0, 0, .1) !important;
	font-family: "Inter", "Segoe UI", Roboto, system-ui, sans-serif !important;
	scrollbar-width: thin; scrollbar-color: transparent transparent;
}
body.ciux-site .cc-notif-panel:hover { scrollbar-color: rgba(0, 0, 0, .25) transparent; }
body.ciux-site .cc-notif-panel::-webkit-scrollbar { width: 8px; }
body.ciux-site .cc-notif-panel::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
body.ciux-site .cc-notif-panel:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .25); }
body.ciux-site .cc-notif-panel-head {
	display: flex !important; align-items: center; justify-content: space-between; gap: 8px;
	padding: 6px 8px 10px !important; border: 0 !important; position: sticky; top: -8px; z-index: 1; background: inherit;
}
body.ciux-site .cc-notif-panel-head strong { font-size: 20px !important; font-weight: 800 !important; }
body.ciux-site .cc-notif-tout-lu {
	background: none !important; border: 0 !important; color: #0F5C36 !important; font-size: 13px !important;
	font-weight: 600 !important; padding: 6px 8px !important; border-radius: 6px !important; cursor: pointer;
}
body.ciux-site .cc-notif-tout-lu:hover { background: rgba(15, 92, 54, .08) !important; }
body.ciux-site .cc-notif-item {
	position: relative; display: grid !important; grid-template-columns: 44px 1fr; column-gap: 12px;
	padding: 10px 28px 10px 8px !important; margin: 0 !important; border: 0 !important; border-radius: 10px !important; cursor: pointer;
}
body.ciux-site .cc-notif-item::before {
	content: "🔔"; grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; font-size: 20px; background: #e7f4ec;
}
body.ciux-site .cc-notif-item:hover { background: rgba(0, 0, 0, .05) !important; }
body.ciux-site .cc-notif-message { font-size: 14px !important; line-height: 1.35 !important; margin: 0 !important; }
body.ciux-site .cc-notif-date { font-size: 12px !important; margin-top: 4px !important; color: #65676b !important; }
body.ciux-site .cc-notif-item.non-lue .cc-notif-message { font-weight: 600 !important; }
body.ciux-site .cc-notif-item.non-lue .cc-notif-date { color: #0F5C36 !important; font-weight: 600 !important; }
body.ciux-site .cc-notif-item.non-lue::after {
	content: ""; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
	border-radius: 50%; background: #0F5C36;
}
/* Clair */
body.ciux-site:not([data-cc-theme="dark"]) .cc-notif-panel, body.ciux-site:not([data-cc-theme="dark"]) .cc-notif-panel-head { background: #fff !important; color: #1c1e21 !important; }
/* Sombre */
body.ciux-site[data-cc-theme="dark"] .cc-notif-panel, body.ciux-site[data-cc-theme="dark"] .cc-notif-panel-head { background: #16241C !important; color: #E6EFE9 !important; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-item:hover { background: rgba(255, 255, 255, .06) !important; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-item::before { background: #1b3a29; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-date { color: #9FB3A7 !important; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-item.non-lue .cc-notif-date, body.ciux-site[data-cc-theme="dark"] .cc-notif-tout-lu { color: #6FD39A !important; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-item.non-lue::after { background: #6FD39A; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-btn:hover { background: rgba(255, 255, 255, .08) !important; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-panel:hover { scrollbar-color: rgba(255, 255, 255, .25) transparent; }
body.ciux-site[data-cc-theme="dark"] .cc-notif-panel:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); }
