/* ============================================================
 * AS Classement Investisseurs — Réseau Social de la communauté
 * Page /reseau-social-argent-salaire/ (layout pleine largeur).
 *
 * Tout est scopé sous .as-cres-wrap (cadre sombre .as-scope). Les couleurs,
 * rayons et polices viennent des tokens de as-core.css. Accent par type
 * d'évènement (plateforme / emprunteur / projet / forum) et couleurs de
 * paliers pour la gamification.
 * ============================================================ */

.as-cres-wrap {
	font-family: var(--as-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	color: var(--as-ink);
	background: var(--as-bg);
	line-height: 1.55;
	max-width: 1260px;
	margin: 0 auto;
	padding: 14px 16px 34px;
	border-radius: 18px;
	--as-sticky-bg: rgba(14, 21, 37, 0.92);
	--as-cres-gold: #f0c46a;
	--as-cres-silver: #c4cfe4;
	--as-cres-bronze: #d99b6c;
	/* Accents par type d'évènement. */
	--as-cres-plateforme: #7c8df0;
	--as-cres-emprunteur: #5fd9a0;
	--as-cres-projet: #f0c46a;
	--as-cres-forum: #57c7d4;
}
.as-cres-wrap * { box-sizing: border-box; }
.as-cres-wrap a { color: var(--as-accent); text-decoration: none; }
.as-cres-wrap a:hover { color: var(--as-accent-2); }
.as-cres-wrap p { line-height: 1.7; }
.as-cres-lien { font-size: 13px; font-weight: 600; }

/* ---------- Titres ---------- */
.as-cres-h1 {
	font-family: var(--as-font-head);
	font-size: clamp(24px, 4vw, 38px);
	font-weight: 700;
	color: var(--as-ink);
	margin: 0 0 12px;
	line-height: 1.14;
}
.as-cres-h2 {
	font-family: var(--as-font-head);
	font-size: clamp(18px, 2.6vw, 24px);
	font-weight: 600;
	color: var(--as-ink);
	margin: 0 0 16px;
}
.as-cres-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--as-accent);
	font-weight: 600;
	margin: 0 0 10px;
}

/* ============================================================
 * HERO
 * ============================================================ */
.as-cres-hero {
	padding: 26px 20px 22px;
	margin-bottom: 16px;
	text-align: center;
	background:
		radial-gradient(ellipse at 12% 0%, rgba(124, 141, 240, 0.20), transparent 55%),
		radial-gradient(ellipse at 88% 6%, rgba(87, 199, 212, 0.12), transparent 52%),
		var(--as-card);
	border: 1px solid var(--as-line);
	border-radius: var(--as-radius);
}
.as-cres-lead {
	max-width: 860px;
	margin: 0 auto 20px;
	color: var(--as-ink-2);
	font-size: 15px;
	text-align: left;
}
.as-cres-live-dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--as-pos, #5fd9a0);
	box-shadow: 0 0 0 0 rgba(95, 217, 160, 0.55);
	animation: as-cres-pulse 2s infinite;
	flex-shrink: 0;
}
@keyframes as-cres-pulse {
	0% { box-shadow: 0 0 0 0 rgba(95, 217, 160, 0.55); }
	70% { box-shadow: 0 0 0 8px rgba(95, 217, 160, 0); }
	100% { box-shadow: 0 0 0 0 rgba(95, 217, 160, 0); }
}

/* ---------- Tuiles de compteurs (temps forts) ---------- */
.as-cres-hero-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	max-width: 900px;
	margin: 0 auto 20px;
}
.as-cres-tile {
	background: var(--as-bg-2);
	border: 1px solid var(--as-line);
	border-radius: var(--as-radius-sm);
	padding: 14px 10px;
}
.as-cres-tile-val {
	display: block;
	font-family: var(--as-font-head);
	font-size: clamp(19px, 2.6vw, 26px);
	font-weight: 700;
	color: var(--as-ink);
}
.as-cres-tile-lbl { display: block; font-size: 12px; color: var(--as-muted); margin-top: 4px; }
.as-cres-tile-live { color: var(--as-pos, #5fd9a0); }

/* ============================================================
 * PANNEAU « VOTRE ACTIVITÉ » / APPEL VISITEUR
 * ============================================================ */
.as-cres-moi {
	max-width: 900px;
	margin: 0 auto;
	text-align: left;
	background: var(--as-bg-2);
	border: 1px solid var(--as-line-2);
	border-radius: var(--as-radius-sm);
	padding: 16px 18px;
}
.as-cres-moi-guest {
	background:
		linear-gradient(120deg, rgba(124, 141, 240, 0.12), rgba(87, 199, 212, 0.08)),
		var(--as-bg-2);
	border-color: rgba(124, 141, 240, 0.35);
}
.as-cres-moi-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.as-cres-moi-emoji { font-size: 30px; line-height: 1; flex-shrink: 0; }
.as-cres-moi-kicker {
	margin: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
	color: var(--as-muted); font-weight: 600;
}
.as-cres-moi-level { margin: 2px 0 0; font-size: 15px; color: var(--as-ink); }
.as-cres-moi-prog { margin: 8px 0 12px; }
.as-cres-moi-track {
	height: 9px; border-radius: var(--as-radius-pill);
	background: var(--as-card-2); overflow: hidden; border: 1px solid var(--as-line);
}
.as-cres-moi-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--as-accent), var(--as-accent-2));
	border-radius: var(--as-radius-pill);
	transition: width .5s ease;
}
.as-cres-moi-next { margin: 8px 0 0; font-size: 13px; color: var(--as-ink-2); }
.as-cres-moi-max { color: var(--as-cres-gold); font-weight: 600; }
.as-cres-moi-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.as-cres-chip-act {
	font-size: 12.5px; font-weight: 600;
	color: var(--as-ink-2);
	background: var(--as-card);
	border: 1px solid var(--as-line-2);
	border-radius: var(--as-radius-pill);
	padding: 6px 13px;
	transition: all .15s ease;
}
.as-cres-wrap a.as-cres-chip-act:hover { color: var(--as-ink); border-color: var(--as-accent); background: var(--as-accent-bg); }

/* ============================================================
 * BARRE DE FILTRES (sticky)
 * ============================================================ */
.as-cres-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 4px;
	margin-bottom: 16px;
}
.as-cres-filter {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--as-font-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--as-muted);
	background: var(--as-card-2);
	border: 1px solid var(--as-line);
	border-radius: var(--as-radius-pill);
	padding: 7px 14px;
	cursor: pointer;
	transition: all .15s ease;
	white-space: nowrap;
}
.as-cres-filter:hover { color: var(--as-ink); border-color: var(--as-accent); }
.as-cres-filter.is-active { color: var(--as-ink); border-color: var(--as-accent); background: var(--as-accent-bg); }
.as-cres-filter-count {
	font-size: 11px; font-weight: 700;
	color: var(--as-muted);
	background: var(--as-bg-2);
	border-radius: var(--as-radius-pill);
	padding: 1px 8px;
}
.as-cres-filter.is-active .as-cres-filter-count { color: var(--as-accent); }

/* ============================================================
 * GRILLE : FIL + RAIL
 * ============================================================ */
.as-cres-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 22px;
	align-items: start;
}
.as-cres-main { min-width: 0; }
.as-cres-rail { position: sticky; top: var(--as-sticky-top, 12px); display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
 * CARTES DU FIL
 * ============================================================ */
.as-cres-feed { display: flex; flex-direction: column; gap: 12px; }
.as-cres-item {
	display: flex;
	gap: 13px;
	background: var(--as-card);
	border: 1px solid var(--as-line);
	border-left: 3px solid var(--as-line-2);
	border-radius: var(--as-radius-sm);
	padding: 15px 16px;
	transition: border-color .15s ease, transform .1s ease;
}
.as-cres-item:hover { border-color: var(--as-line-2); }
.as-cres-item[data-type="plateforme"] { border-left-color: var(--as-cres-plateforme); }
.as-cres-item[data-type="emprunteur"] { border-left-color: var(--as-cres-emprunteur); }
.as-cres-item[data-type="projet"]     { border-left-color: var(--as-cres-projet); }
.as-cres-item[data-type="forum"]       { border-left-color: var(--as-cres-forum); }

.as-cres-item-ava { flex-shrink: 0; }
.as-cres-avatar {
	width: 44px; height: 44px; border-radius: 50%;
	object-fit: cover; display: block;
	border: 1px solid var(--as-line-2);
	background: var(--as-card-2);
}
.as-cres-avatar-fb {
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 20px;
}
.as-cres-item-body { flex: 1; min-width: 0; }
.as-cres-item-head {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
	font-size: 14px; color: var(--as-ink-2);
	margin-bottom: 8px;
}
.as-cres-item-user { font-weight: 700; color: var(--as-ink); }
.as-cres-wrap a.as-cres-item-user:hover { color: var(--as-accent); text-decoration: underline; }
.as-cres-item-verbe { color: var(--as-muted); }
.as-cres-item-cible {
	display: inline-flex; align-items: center; gap: 6px;
	font-weight: 700; color: var(--as-ink);
}
.as-cres-wrap a.as-cres-item-cible:hover { color: var(--as-accent); text-decoration: underline; }
.as-cres-item-cible img {
	width: 20px; height: 20px; border-radius: 5px; object-fit: contain;
	background: #fff; padding: 1px;
}
.as-cres-flag { font-size: 15px; }

.as-cres-tbadge {
	margin-left: auto;
	font-size: 10.5px; font-weight: 700;
	padding: 2px 9px;
	border-radius: var(--as-radius-pill);
	white-space: nowrap;
	color: var(--as-muted);
	background: var(--as-bg-2);
	border: 1px solid var(--as-line);
}
.as-cres-tbadge-plateforme { color: var(--as-cres-plateforme); border-color: rgba(124,141,240,0.4); }
.as-cres-tbadge-emprunteur { color: var(--as-cres-emprunteur); border-color: rgba(95,217,160,0.4); }
.as-cres-tbadge-projet     { color: var(--as-cres-projet); border-color: rgba(240,196,106,0.4); }
.as-cres-tbadge-forum       { color: var(--as-cres-forum); border-color: rgba(87,199,212,0.4); }

.as-cres-item-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
	margin-bottom: 8px;
}
.as-cres-note { display: inline-flex; align-items: center; gap: 7px; }
.as-cres-note-val { font-size: 13.5px; color: var(--as-ink); }
.as-cres-stars { display: inline-flex; gap: 1px; font-size: 14px; line-height: 1; }
.as-cres-star.is-full { color: var(--as-cres-gold); }
.as-cres-star.is-empty { color: var(--as-line-2); }
.as-cres-star.is-half {
	background: linear-gradient(90deg, var(--as-cres-gold) 50%, var(--as-line-2) 50%);
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.as-cres-pill {
	font-size: 11px; font-weight: 600;
	padding: 3px 10px; border-radius: var(--as-radius-pill); white-space: nowrap;
}
.as-cres-pill-pos { color: var(--as-pos, #5fd9a0); background: rgba(95, 217, 160, 0.14); }
.as-cres-pill-neg-soft { color: var(--as-cres-gold); background: rgba(240, 196, 106, 0.12); }

.as-cres-item-chip {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 11.5px; font-weight: 600;
	color: var(--as-muted);
	background: var(--as-bg-2);
	border: 1px solid var(--as-line);
	border-radius: var(--as-radius-pill);
	padding: 3px 10px;
}
.as-cres-item-chip img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; background: #fff; }

.as-cres-item-txt {
	margin: 0 0 8px;
	font-size: 13.5px;
	color: var(--as-ink-2);
	line-height: 1.6;
}
.as-cres-item-txt-forum {
	background: var(--as-bg-2);
	border-radius: var(--as-radius-sm);
	padding: 9px 12px;
	border: 1px solid var(--as-line);
}
.as-cres-item-txt-sub { font-size: 12.5px; color: var(--as-muted); }
.as-cres-item-tag {
	display: inline-block;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
	color: var(--as-cres-forum);
	margin-right: 4px;
}
.as-cres-item-links { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; }
.as-cres-item-links span { color: var(--as-muted); }

.as-cres-item-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.as-cres-item-date { font-size: 12px; color: var(--as-muted); }
.as-cres-item-cta {
	font-size: 12px; font-weight: 600;
	color: var(--as-muted);
	opacity: .85;
	transition: opacity .15s ease, color .15s ease;
}
.as-cres-item:hover .as-cres-item-cta { opacity: 1; color: var(--as-accent); }

/* ---------- Vide + charger plus ---------- */
.as-cres-feed-empty {
	text-align: center; color: var(--as-muted);
	background: var(--as-card); border: 1px dashed var(--as-line-2);
	border-radius: var(--as-radius-sm); padding: 30px 20px; margin: 12px 0;
}
.as-cres-more-wrap { text-align: center; margin: 18px 0 4px; }
.as-cres-more {
	font-family: var(--as-font-body);
	font-size: 13.5px; font-weight: 600;
	color: var(--as-ink-2);
	background: var(--as-card-2);
	border: 1px solid var(--as-line-2);
	border-radius: var(--as-radius-pill);
	padding: 10px 22px;
	cursor: pointer;
	transition: all .15s ease;
}
.as-cres-more:hover:not(:disabled) { color: var(--as-ink); border-color: var(--as-accent); background: var(--as-accent-bg); }
.as-cres-more:disabled { opacity: .6; cursor: default; }
.as-cres-more-end { color: var(--as-muted); font-size: 13px; margin: 10px 0 0; }
.as-cres-more-spin {
	display: inline-block; width: 22px; height: 22px; margin-top: 8px;
	border: 2px solid var(--as-line-2); border-top-color: var(--as-accent);
	border-radius: 50%; animation: as-cres-spin .7s linear infinite;
}
@keyframes as-cres-spin { to { transform: rotate(360deg); } }

/* ============================================================
 * RAIL — encart membres actifs + niveaux/badges
 * ============================================================ */
.as-cres-rail-title {
	font-family: var(--as-font-head);
	font-size: 15.5px; font-weight: 700; color: var(--as-ink);
	margin: 0 0 12px;
}
.as-cres-lead, .as-cres-cta-card {
	background: var(--as-card);
	border: 1px solid var(--as-line);
	border-radius: var(--as-radius);
	padding: 18px 16px;
}
.as-cres-lead-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.as-cres-lead-head .as-cres-rail-title { margin: 0; }
.as-cres-lead-switch { display: inline-flex; gap: 4px; background: var(--as-bg-2); border-radius: var(--as-radius-pill); padding: 3px; }
.as-cres-lead-tab {
	font-size: 11.5px; font-weight: 600; color: var(--as-muted);
	background: transparent; border: 0; border-radius: var(--as-radius-pill);
	padding: 4px 11px; cursor: pointer; transition: all .15s ease;
}
.as-cres-lead-tab.is-active { color: var(--as-ink); background: var(--as-card); }
.as-cres-lead-tab:disabled { opacity: .4; cursor: default; }

.as-cres-membre-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.as-cres-membre {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 6px;
	border-radius: var(--as-radius-sm);
	transition: background .15s ease;
}
.as-cres-membre:hover { background: var(--as-card-2); }
.as-cres-membre.is-podium { background: linear-gradient(90deg, rgba(240,196,106,0.08), transparent); }
.as-cres-membre-rang {
	flex-shrink: 0; width: 26px; text-align: center;
	font-family: var(--as-font-head); font-weight: 700; font-size: 14px; color: var(--as-muted);
}
.as-cres-membre.is-podium .as-cres-membre-rang { font-size: 17px; }
.as-cres-membre-ava { flex-shrink: 0; }
.as-cres-membre-ava .as-cres-avatar { width: 38px; height: 38px; }
.as-cres-membre-id { flex: 1; min-width: 0; }
.as-cres-membre-nom {
	display: block; font-weight: 700; font-size: 13.5px; color: var(--as-ink);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-cres-wrap a.as-cres-membre-nom:hover { color: var(--as-accent); }
.as-cres-membre-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.as-cres-membre-val { flex-shrink: 0; text-align: right; }
.as-cres-membre-val strong { display: block; font-family: var(--as-font-head); font-size: 15px; color: var(--as-ink); }
.as-cres-membre-val em { font-style: normal; font-size: 10px; color: var(--as-muted); }
.as-cres-fire { font-size: 10.5px; font-weight: 600; color: #f0975f; white-space: nowrap; }

.as-cres-lead-note { font-size: 11.5px; color: var(--as-muted); margin: 12px 0 0; line-height: 1.6; }

/* ---------- Badges de niveau ---------- */
.as-cres-lvl {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 10.5px; font-weight: 700;
	padding: 2px 8px; border-radius: var(--as-radius-pill);
	white-space: nowrap;
	border: 1px solid transparent;
}
.as-cres-lvl.is-compact { font-size: 10px; padding: 1px 7px; }
.as-cres-lvl-emoji { font-size: 11px; }
.as-cres-lvl-lecteur      { color: var(--as-muted); background: var(--as-bg-2); border-color: var(--as-line); }
.as-cres-lvl-nouveau      { color: var(--as-pos, #5fd9a0); background: rgba(95,217,160,0.12); border-color: rgba(95,217,160,0.3); }
.as-cres-lvl-actif        { color: var(--as-cres-gold); background: rgba(240,196,106,0.12); border-color: rgba(240,196,106,0.32); }
.as-cres-lvl-contributeur { color: #f0975f; background: rgba(240,151,95,0.13); border-color: rgba(240,151,95,0.34); }
.as-cres-lvl-pilier       { color: var(--as-cres-forum); background: rgba(87,199,212,0.13); border-color: rgba(87,199,212,0.34); }
.as-cres-lvl-legende      { color: #d7a2f0; background: rgba(215,162,240,0.14); border-color: rgba(215,162,240,0.36); }

/* ---------- Carte « passez à l'action » ---------- */
.as-cres-cta-card p { font-size: 13px; color: var(--as-ink-2); margin: 0 0 12px; }
.as-cres-cta-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.as-cres-cta-list a {
	display: block; font-size: 13.5px; font-weight: 600;
	color: var(--as-ink-2);
	background: var(--as-bg-2);
	border: 1px solid var(--as-line);
	border-radius: var(--as-radius-sm);
	padding: 10px 13px;
	transition: all .15s ease;
}
.as-cres-cta-list a:hover { color: var(--as-ink); border-color: var(--as-accent); background: var(--as-accent-bg); }

/* ============================================================
 * CONTENU SEO
 * ============================================================ */
.as-cres-seo { margin-top: 28px; max-width: 900px; }
.as-cres-seo p { color: var(--as-ink-2); font-size: 14.5px; margin: 0 0 16px; }
.as-cres-seo-list { margin: 0 0 18px; padding-left: 0; list-style: none; }
.as-cres-seo-list li {
	position: relative;
	padding: 10px 14px; margin-bottom: 8px;
	background: var(--as-card); border: 1px solid var(--as-line);
	border-radius: var(--as-radius-sm);
	font-size: 14px; color: var(--as-ink-2);
}

.as-cres-disclosure { margin-top: 24px; }

/* ---------- Module mutualisé (extrait de fil) ---------- */
.as-cres-module { padding: 0; background: transparent; border-radius: 0; max-width: none; }
.as-cres-module-more { margin: 14px 0 0; }

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media (max-width: 940px) {
	.as-cres-grid { grid-template-columns: 1fr; }
	.as-cres-rail { position: static; order: -1; }
}
@media (max-width: 760px) {
	.as-cres-wrap { padding: 12px 10px 40px; }
	.as-cres-hero { padding: 22px 14px 18px; }
	.as-cres-item { padding: 13px 13px; gap: 10px; }
	.as-cres-avatar { width: 40px; height: 40px; }
	.as-cres-tbadge { margin-left: 0; }
	.as-cres-item-head { gap: 5px; }
}
@media (max-width: 520px) {
	.as-cres-hero-tiles { grid-template-columns: repeat(2, 1fr); }
	.as-cres-moi-actions { gap: 6px; }
	.as-cres-item-ava .as-cres-avatar { width: 36px; height: 36px; }
}

/* Respect des préférences de mouvement réduit. */
@media (prefers-reduced-motion: reduce) {
	.as-cres-live-dot, .as-cres-more-spin, .as-cres-moi-fill { animation: none; transition: none; }
}
