/* ════════════════════════════════════════════════════════════════
 * ESBanque Campus — UNIFIED SKIN (loads LAST, wins over page CSS)
 * Goal: harmonize every page to ONE design language without rewriting
 * each page's bespoke markup. Targets all historical class families
 * (.kpi / .stat / .ex-stat / .rstat / .cert-stat / .mg-kpi …) at once.
 *
 *  · ONE colored icon-tile palette (calm pastel gradient + saturated glyph)
 *  · ONE stat-card shell (radius / border / shadow / hover)
 *  · ONE page header (gradient teal tile + 28px title + subtitle)
 *  · ONE floating assistant button (teal)
 * ════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
 * 1) UNIFIED COLORED ICON-TILE PALETTE
 *    Pastel gradient background + saturated brand glyph (legible).
 *    Covers every family's icon class + every color-variant suffix.
 * ───────────────────────────────────────────────────────────── */
.kpi-ico, .stat-ico, .ex-stat-ico, .rstat-ico, .cert-stat-ico,
.mg-kpi-ico, .stat-icon, .stat__ico, .metric-ico, .page-ico, .page-head .page-ico {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
/* glossy sheen on every tile */
.kpi-ico::before, .stat-ico::before, .ex-stat-ico::before, .rstat-ico::before,
.cert-stat-ico::before, .mg-kpi-ico::before, .metric-ico::before {
  content:''; position:absolute; inset:0; border-radius:inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.45), rgba(255,255,255,0) 60%);
  pointer-events:none;
}
.kpi-ico svg, .stat-ico svg, .ex-stat-ico svg, .rstat-ico svg, .cert-stat-ico svg,
.mg-kpi-ico svg, .metric-ico svg,
.kpi-ico i, .stat-ico i, .ex-stat-ico i {
  position: relative; z-index: 1;
}

/* — color variants: one calm pastel set, saturated glyph — */
/* teal */
.kpi-ico.teal, .stat-ico.teal, .ex-stat-ico.teal, .rstat-ico.teal, .cert-stat-ico.teal, .mg-kpi-ico.teal,
.kpi-ico.primary, .stat-ico.primary {
  background: linear-gradient(135deg, #BDEEF0, #6FD3D8); color: #00767E;
}
/* blue */
.kpi-ico.blue, .stat-ico.blue, .ex-stat-ico.blue, .rstat-ico.blue, .cert-stat-ico.blue, .mg-kpi-ico.blue {
  background: linear-gradient(135deg, #CBE0FC, #8FB7F8); color: #174FE3;
}
/* green / success */
.kpi-ico.green, .stat-ico.green, .ex-stat-ico.green, .rstat-ico.green, .cert-stat-ico.green, .mg-kpi-ico.green,
.kpi-ico.success, .stat-ico.success {
  background: linear-gradient(135deg, #C9F2D4, #84E3A0); color: #0F7A47;
}
/* orange / amber / warning */
.kpi-ico.orange, .stat-ico.orange, .ex-stat-ico.orange, .rstat-ico.orange, .cert-stat-ico.orange, .mg-kpi-ico.orange,
.kpi-ico.amber, .stat-ico.amber, .ex-stat-ico.amber, .kpi-ico.warning, .stat-ico.warning {
  background: linear-gradient(135deg, #FFE3C6, #FCB87F); color: var(--on-soft-warning);
}
/* purple / violet / ai */
.kpi-ico.purple, .stat-ico.purple, .ex-stat-ico.purple, .rstat-ico.purple, .cert-stat-ico.purple, .mg-kpi-ico.purple,
.kpi-ico.violet, .stat-ico.violet, .ex-stat-ico.violet, .kpi-ico.ai, .stat-ico.ai {
  background: linear-gradient(135deg, #DDD2FC, #B79CF1); color: #5B3FD0;
}
/* pink / rose */
.kpi-ico.pink, .stat-ico.pink, .ex-stat-ico.pink, .rstat-ico.pink, .cert-stat-ico.pink, .mg-kpi-ico.pink,
.kpi-ico.rose, .stat-ico.rose, .ex-stat-ico.rose {
  background: linear-gradient(135deg, #FBD8E6, #F29DBF); color: #C0356B;
}

/* keep emoji glyphs readable on the pastel tile */
.kpi-ico, .stat-ico, .ex-stat-ico, .rstat-ico, .cert-stat-ico, .mg-kpi-ico, .metric-ico {
  font-size: 19px;
}

/* ─────────────────────────────────────────────────────────────
 * 2) UNIFIED STAT-CARD SHELL — one radius / border / shadow / hover
 * ───────────────────────────────────────────────────────────── */
.kpi, .stat, .ex-stat, .rstat, .cert-stat, .mg-kpi, .metric-card, .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out);
}
.kpi:hover, .stat:hover, .ex-stat:hover, .rstat:hover, .cert-stat:hover, .mg-kpi:hover, .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .kpi, [data-theme="dark"] .stat, [data-theme="dark"] .ex-stat,
[data-theme="dark"] .rstat, [data-theme="dark"] .cert-stat, [data-theme="dark"] .mg-kpi {
  background: var(--surface);
}

/* unify the big stat number across families */
.kpi-value, .stat-num, .ex-stat-value, .rstat-num, .cert-stat-value, .mg-kpi-value, .stat-card-num {
  font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
/* unify stat labels */
.kpi-label, .stat-label, .ex-stat-label, .rstat-label, .cert-stat-label, .mg-kpi-label {
  color: var(--ink-soft); font-weight: 600; letter-spacing: -0.005em;
}

/* ─────────────────────────────────────────────────────────────
 * 3) UNIFIED PAGE HEADER — gradient teal tile + 28px title + subtitle
 *    Make .page-head and .page-header visually identical.
 * ───────────────────────────────────────────────────────────── */
.page-head, .page-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px;
}
.page-head .page-ico, .page-header .page-ico, .page-head .page-icon, .page-header .page-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff !important;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -4px rgba(47,107,255,.4), inset 0 1px 0 rgba(255,255,255,.25);
  flex-shrink: 0; position: relative; overflow: hidden;
}
.page-head .page-ico::before, .page-header .page-ico::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(255,255,255,.3), transparent 55%);
  pointer-events:none;
}
.page-head .page-ico svg, .page-header .page-ico svg { color:#fff; position:relative; z-index:1; }
.page-head h1, .page-header h1, h1.page-title, .page-head .page-title, .page-header .page-title {
  font-size: 28px; font-weight: 800; margin: 0 0 4px;
  letter-spacing: -0.022em; color: var(--ink); line-height: 1.15;
}
.page-head .page-sub, .page-header .page-sub, .page-head p, .page-header p, p.page-sub {
  font-size: 13.5px; color: var(--ink-soft); margin: 0; max-width: 760px; line-height: 1.5;
}
/* allow a small text wrapper next to the icon */
.page-head > div, .page-header > div { min-width: 0; }

/* (A) — every page's bespoke header-icon class → ONE brand-teal gradient tile */
.cert-head-ico, .cm-head-ico, .ex-head-ico, .ss-head-ico, .mg-head-ico, .pm-head-ico,
.rs-head-ico, .cal-head-ico, .pc-head-ico {
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)) !important;
  color: #fff !important;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -4px rgba(47,107,255,.4), inset 0 1px 0 rgba(255,255,255,.25);
  flex-shrink: 0; position: relative; overflow: hidden;
}
.cert-head-ico::before, .cm-head-ico::before, .ex-head-ico::before, .ss-head-ico::before,
.mg-head-ico::before, .pm-head-ico::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(255,255,255,.3), transparent 55%);
  pointer-events:none;
}
.cert-head-ico svg, .cm-head-ico svg, .ex-head-ico svg, .ss-head-ico svg,
.mg-head-ico svg, .pm-head-ico svg { color:#fff !important; position:relative; z-index:1; }

/* ─────────────────────────────────────────────────────────────
 * 4) UNIFIED FLOATING ASSISTANT BUTTON — one teal treatment
 *    (.aria-fab was blue on some pages; .esbot-fab was teal on others)
 * ───────────────────────────────────────────────────────────── */
.aria-fab, .esbot-fab {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)) !important;
  box-shadow: 0 10px 28px -6px rgba(47,107,255,.5), inset 0 1px 0 rgba(255,255,255,.2) !important;
  color: #fff !important;
}
.aria-fab:hover, .esbot-fab:hover {
  box-shadow: 0 14px 36px -6px rgba(47,107,255,.55), inset 0 1px 0 rgba(255,255,255,.2) !important;
  transform: scale(1.06);
}
.aria-fab svg, .esbot-fab svg, .aria-fab i, .esbot-fab i { color:#fff; }

/* ─────────────────────────────────────────────────────────────
 * (B) DEEP TYPOGRAPHIC & RHYTHM HARMONY — applies to every page
 *     One title size, one section-heading size, one vertical rhythm.
 * ───────────────────────────────────────────────────────────── */
/* every page's main title → identical scale & tracking */
.ex-head h1, .cert-head h1, .ss-head h1, .cm-head h1, .mg-head h1, .pm-head h1,
.rs-head h1, .cal-head h1, .pc-head h1 {
  font-size: 27px !important; font-weight: 800;
  letter-spacing: -0.022em !important; color: var(--ink);
  line-height: 1.15; margin: 0 0 4px;
}
/* every page's title subtitle → identical */
.ex-head p, .cert-head p, .ss-head p, .cm-head p, .mg-head p, .pm-head p {
  font-size: 13.5px !important; color: var(--ink-soft); line-height: 1.5; margin: 0;
}
/* header block bottom rhythm */
.ex-head, .cert-head, .ss-head, .cm-head, .mg-head, .pm-head, .page-head, .page-header {
  margin-bottom: 24px;
}
/* section headings → one size / tracking across all families */
.ex-section-h h2, .cert-section-h h2, .pm-section-h h2, .mg-card-h h2,
.ss-section-h h2, .cm-section-h h2, .sec-title h2, .section-title h2 {
  font-size: 16.5px !important; font-weight: 800;
  letter-spacing: -0.018em !important; color: var(--ink);
}
.ex-section-h h2 + p, .cert-section-h h2 + p, .ss-section-h h2 + p {
  font-size: 11.5px; color: var(--ink-mute); margin: 2px 0 0;
}
/* stat-row vertical rhythm — equal breathing room under every stat grid */
.ex-stats, .stats-row, .cert-stats, .mg-kpis, .rstats, .kpi-row, .stat-grid {
  margin-bottom: 26px !important;
}
/* stat-card internal padding — consistent across families */
.ex-stat, .stat, .cert-stat, .mg-kpi, .rstat, .kpi {
  padding: 16px !important;
}

/* ─────────────────────────────────────────────────────────────
 * (IMG) — native initials avatar in header: perfect centering,
 *          on-brand gradient, no external image dependency.
 * ───────────────────────────────────────────────────────────── */
.esb-user-photo {
  background: linear-gradient(135deg, #4FC9D6, var(--primary)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.esb-user-photo.is-text {
  line-height: 1 !important; letter-spacing: .02em;
  font-weight: 800; color: #fff;
}

/* ─────────────────────────────────────────────────────────────
 * 5) SHARED CARD / SECTION POLISH — keep panels consistent
 * ───────────────────────────────────────────────────────────── */
.card, .panel, .widget, .side-card, .surface-card {
  border-radius: var(--r-lg);
}
/* consistent section titles everywhere */
.sec-title h2, .section-title h2, .panel-title, h2.sec-head {
  letter-spacing: -0.02em;
}

/* ════════════════════════════════════════════════════════════════
 * PREMIUM ICON-TILE DEPTH (site-wide)
 * Colored glow matching each tile's hue + inset highlight ring,
 * and a micro-lift when the parent card is hovered.
 * ════════════════════════════════════════════════════════════════ */
.kpi-ico, .stat-ico, .ex-stat-ico, .rstat-ico, .cert-stat-ico, .mg-kpi-ico, .metric-ico {
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
/* colored glow per variant (saturated hue, soft) */
.kpi-ico.teal,  .stat-ico.teal,  .ex-stat-ico.teal,  .rstat-ico.teal,  .cert-stat-ico.teal,  .mg-kpi-ico.teal,
.kpi-ico.primary, .stat-ico.primary {
  box-shadow: 0 7px 16px -6px rgba(0,126,134,.42), inset 0 1px 0 rgba(255,255,255,.5);
}
.kpi-ico.blue,  .stat-ico.blue,  .ex-stat-ico.blue,  .rstat-ico.blue,  .cert-stat-ico.blue,  .mg-kpi-ico.blue {
  box-shadow: 0 7px 16px -6px rgba(46,107,214,.42), inset 0 1px 0 rgba(255,255,255,.5);
}
.kpi-ico.green, .stat-ico.green, .ex-stat-ico.green, .rstat-ico.green, .cert-stat-ico.green, .mg-kpi-ico.green,
.kpi-ico.success, .stat-ico.success {
  box-shadow: 0 7px 16px -6px rgba(31,167,96,.40), inset 0 1px 0 rgba(255,255,255,.5);
}
.kpi-ico.orange, .stat-ico.orange, .ex-stat-ico.orange, .rstat-ico.orange, .cert-stat-ico.orange, .mg-kpi-ico.orange,
.kpi-ico.amber, .stat-ico.amber, .ex-stat-ico.amber, .kpi-ico.warning, .stat-ico.warning {
  box-shadow: 0 7px 16px -6px rgba(199,122,10,.42), inset 0 1px 0 rgba(255,255,255,.5);
}
.kpi-ico.purple, .stat-ico.purple, .ex-stat-ico.purple, .rstat-ico.purple, .cert-stat-ico.purple, .mg-kpi-ico.purple,
.kpi-ico.violet, .stat-ico.violet, .ex-stat-ico.violet, .kpi-ico.ai, .stat-ico.ai {
  box-shadow: 0 7px 16px -6px rgba(91,63,208,.42), inset 0 1px 0 rgba(255,255,255,.5);
}
.kpi-ico.pink, .stat-ico.pink, .ex-stat-ico.pink, .rstat-ico.pink, .cert-stat-ico.pink, .mg-kpi-ico.pink,
.kpi-ico.rose, .stat-ico.rose, .ex-stat-ico.rose {
  box-shadow: 0 7px 16px -6px rgba(192,53,107,.40), inset 0 1px 0 rgba(255,255,255,.5);
}
/* micro-lift: tile rises slightly when its card is hovered */
.kpi:hover .kpi-ico, .stat:hover .stat-ico, .ex-stat:hover .ex-stat-ico,
.rstat:hover .rstat-ico, .cert-stat:hover .cert-stat-ico, .mg-kpi:hover .mg-kpi-ico {
  transform: translateY(-2px) scale(1.04);
}

/* ════════════════════════════════════════════════════════════════
 * REFINED BUTTON / LINK ICONS (site-wide)
 * Crisp alignment + the signature "arrow slides on hover" micro-interaction.
 * ════════════════════════════════════════════════════════════════ */
/* icon wrappers inside buttons/links: perfectly centered, no baseline drift */
.btn [data-icon], button [data-icon], a [data-icon],
.ex-card-cta [data-icon], .cert-btn [data-icon], .cert-btn-linkedin [data-icon],
.rail-link [data-icon], .sec-link [data-icon], .see-all [data-icon],
.filter-advanced [data-icon], .skills-head-link [data-icon] {
  display: inline-flex; align-items: center; justify-content: center;
}
/* smooth transition on directional icons */
[data-icon="arrow-right"], [data-icon="chevron-right"] {
  transition: transform .22s var(--ease-out);
}
/* arrow glides right when its button / link is hovered */
button:hover [data-icon="arrow-right"],
.btn:hover [data-icon="arrow-right"],
.ex-card-cta:hover [data-icon="arrow-right"],
.cert-btn:hover [data-icon="arrow-right"],
.pcard-continue:hover [data-icon="arrow-right"],
a:hover > [data-icon="arrow-right"],
.see-all:hover [data-icon="arrow-right"],
.skills-head-link:hover [data-icon="arrow-right"],
.sec-link:hover [data-icon="arrow-right"] {
  transform: translateX(3px);
}
/* "Voir … ›" link chevrons nudge too (dropdown chevron-down stays put) */
.rail-link:hover [data-icon="chevron-right"],
.sec-link:hover [data-icon="chevron-right"],
.see-all:hover [data-icon="chevron-right"],
a.is-link:hover [data-icon="chevron-right"] {
  transform: translateX(2px);
}
/* slightly crisper directional glyphs on small button sizes */
.btn [data-icon="arrow-right"] svg, .ex-card-cta [data-icon="arrow-right"] svg,
.cert-btn [data-icon="arrow-right"] svg { stroke-width: 1.85; }
