/* =====================================================================
   Influ Market — feuille de style principale
   Sombre par défaut, clair au basculement. Bootstrap 5 fournit la grille
   et les utilitaires ; tout le reste est défini ici.
   ===================================================================== */

:root {
  /* Marques */
  --ig-gradient: linear-gradient(135deg, #833ab4 0%, #c13584 35%, #fd1d1d 65%, #fcb045 100%);
  --tt-gradient: linear-gradient(135deg, #00f2ea 0%, #ffffff 45%, #ff0050 100%);
  --brand-gradient: linear-gradient(135deg, #7c3aed 0%, #d946a8 50%, #f97316 100%);

  --c-instagram: #e1306c;
  --c-tiktok: #00f2ea;
  --c-youtube: #ff0000;
  --c-facebook: #1877f2;
  --c-twitch: #9146ff;
  --c-x: #e6e8ee;
  --c-snapchat: #f5d90a;
  --c-linkedin: #0a66c2;

  /* Thème sombre (défaut) */
  --bg: #0b0d12;
  --bg-soft: #10131a;
  --surface: #171a21;
  --surface-2: #1e2129;
  --surface-3: #262a34;
  --border: #2b2f3a;
  --border-soft: #22262f;

  --text: #eef0f5;
  --text-muted: #9aa0b0;
  --text-dim: #6b7080;

  --primary: #7c3aed;
  --primary-hover: #6d2ee0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(124, 58, 237, .35);

  --nav-h: 68px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --surface-3: #e7eaf1;
  --border: #dfe3ea;
  --border-soft: #eaedf2;

  --text: #12141a;
  --text-muted: #5b6172;
  --text-dim: #878d9d;

  --c-x: #000000;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .14);
}

/* ---------------------------------------------------------------- */
/* Base                                                              */
/* ---------------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.02em; }

::selection { background: rgba(124, 58, 237, .35); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

/* Barre de défilement : assez contrastée pour qu'on la repère du premier coup
   d'œil, sur fond sombre comme sur fond clair. */
::-webkit-scrollbar { width: 14px; height: 14px; }

::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 8px;
  border: 3px solid var(--surface-2);
  min-height: 44px;
}

::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::-webkit-scrollbar-thumb:active { background: var(--primary); }
::-webkit-scrollbar-corner { background: var(--surface-2); }

/* Firefox, qui ne connaît pas les pseudo-éléments ci-dessus. */
* { scrollbar-width: auto; scrollbar-color: var(--text-dim) var(--surface-2); }

/* Dans la modale, la barre doit trancher sur le voile sombre du fond. */
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-color: transparent;
  background-clip: padding-box;
}

/* ---------------------------------------------------------------- */
/* Boutons                                                           */
/* ---------------------------------------------------------------- */

.btn {
  border-radius: var(--radius-pill);
  font-weight: 600;
  padding: .6rem 1.4rem;
  border: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}

.btn:active { transform: scale(.97); }

.btn-brand {
  background: var(--brand-gradient);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, .32);
}

.btn-brand:hover {
  color: #fff;
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, .45);
}

.btn-solid {
  background: var(--primary);
  color: #fff;
}
.btn-solid:hover { background: var(--primary-hover); color: #fff; }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-outline-brand {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline-brand:hover {
  border-color: var(--primary);
  color: var(--text);
  background: rgba(124, 58, 237, .08);
}

.btn-lg { padding: .85rem 1.9rem; font-size: 1.02rem; }
.btn-sm { padding: .4rem .95rem; font-size: .86rem; }

.btn-icon {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-icon:hover { background: var(--surface-3); color: var(--text); }

/* ---------------------------------------------------------------- */
/* Navigation                                                        */
/* ---------------------------------------------------------------- */

.navbar-im {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar-im .container { display: flex; align-items: center; gap: 18px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -.03em;
  flex-shrink: 0;
}

.brand__mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--brand-gradient);
  display: grid; place-items: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(124, 58, 237, .4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link-im {
  padding: .5rem .95rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-weight: 550;
  font-size: .94rem;
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease);
}

.nav-link-im:hover { background: var(--surface-2); color: var(--text); }
.nav-link-im.active { background: var(--surface-2); color: var(--text); font-weight: 650; }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Recherche de la barre de navigation */
.nav-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.nav-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text);
  font-size: .92rem;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}

.nav-search input::placeholder { color: var(--text-dim); }
.nav-search input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.nav-search .bi {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* ---------------------------------------------------------------- */
/* Autocomplétion de recherche                                       */
/* ---------------------------------------------------------------- */

.nav-search { position: relative; }

.ac-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1040;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}
.ac-item:hover,
.ac-item[aria-selected="true"] { background: var(--surface-2); color: var(--text); }

.ac-item img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-3);
}

.ac-item__body { min-width: 0; flex: 1; }
.ac-item__name {
  font-weight: 650;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item__name mark {
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  padding: 0;
}
.ac-item__meta { font-size: .78rem; color: var(--text-dim); }
.ac-item__count { font-size: .8rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }

.ac-empty, .ac-loading { padding: 18px; text-align: center; color: var(--text-dim); font-size: .88rem; }

.ac-more {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
}
.ac-more:hover { color: var(--text); }

/* Dans le hero, la barre est plus large : le panneau la suit. */
.search-hero { position: relative; }
.search-hero .ac-panel { top: calc(100% + 12px); }

/* Avatar + menu utilisateur */
.avatar-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: var(--brand-gradient);
  border: none;
  flex-shrink: 0;
}
.avatar-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }

.dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 240px;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .6rem .8rem;
  font-size: .92rem;
  font-weight: 500;
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--text); }
.dropdown-divider { border-color: var(--border); }
.dropdown-header { color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

/* Le libellé long du bouton d'inscription cède la place au court dès que
   la barre se resserre : deux textes, un seul visible. */
.nav-cta { display: inline-flex; align-items: center; gap: 7px; }
.nav-cta__short { display: none; }

/* Menu mobile */
.nav-toggle { display: none; }

@media (max-width: 991.98px) {
  .nav-links, .nav-search { display: none; }
  .nav-toggle { display: inline-grid; }

  /* Le thème se règle depuis le menu : une icône de moins dans la barre. */
  .nav-theme { display: none; }
}

@media (max-width: 575.98px) {
  :root { --nav-h: 60px; }

  .navbar-im .container {
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand { font-size: 1.05rem; gap: 8px; min-width: 0; }
  .brand__mark { width: 32px; height: 32px; border-radius: 9px; font-size: .9rem; }

  .nav-actions { gap: 8px; }
  .btn-icon { width: 36px; height: 36px; }

  .nav-cta { padding: .5rem .85rem; font-size: .84rem; }
  .nav-cta__long { display: none; }
  .nav-cta__short { display: inline; }

  .avatar-btn { width: 36px; height: 36px; }
}

/* Très petits écrans : le nom de marque disparaît, le logo suffit. */
@media (max-width: 359px) {
  .brand > span:not(.brand__mark) { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  z-index: 1029;
  padding: 20px;
  transform: translateX(-100%);
  transition: transform .28s var(--ease);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .nav-link-im { display: block; padding: .9rem 1rem; font-size: 1.05rem; }

/* Barre d'onglets mobile, façon Instagram */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1028;
  display: none;
  justify-content: space-around;
  align-items: center;
  height: 62px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-soft);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { color: var(--text-dim); font-size: 1.35rem; padding: 10px 18px; }
.tabbar a.active { color: var(--text); }

@media (max-width: 767.98px) {
  .tabbar { display: flex; }
  body { padding-bottom: 62px; }
}

/* ---------------------------------------------------------------- */
/* Hero                                                              */
/* ---------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 48px 0 24px;   /* compact : « Créateurs à la une » remonte */
  overflow: hidden;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}
.hero::before {
  width: 480px; height: 480px;
  background: #7c3aed;
  top: -160px; left: -120px;
}
.hero::after {
  width: 420px; height: 420px;
  background: #fd1d1d;
  top: -60px; right: -100px;
  animation-delay: -7s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
}

.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 1.06;
  margin-bottom: 14px;
}

.hero p.lead {
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Grande barre de recherche */
.search-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 660px;
  margin: 0 auto;
  padding: 8px 8px 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  transition: border-color .18s var(--ease);
}
.search-hero:focus-within { border-color: var(--primary); }
.search-hero .bi-search { color: var(--text-dim); font-size: 1.05rem; }
.search-hero input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  height: 46px;
}
.search-hero input:focus { outline: none; }
.search-hero input::placeholder { color: var(--text-dim); }

@media (max-width: 575.98px) {
  .search-hero { flex-wrap: wrap; border-radius: var(--radius); padding: 14px; }
  .search-hero input { width: 100%; flex: 1 1 100%; }
  .search-hero .btn { width: 100%; }
}

/* Suggestions sous la recherche */
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

.tag-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 500;
  transition: all .16s var(--ease);
}
.tag-pill:hover { background: var(--surface-3); color: var(--text); transform: translateY(-1px); }

/* Compteurs */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 56px;
}

.stat-box {
  text-align: center;
  padding: 22px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.stat-box strong { display: block; font-size: 1.85rem; letter-spacing: -.03em; }
.stat-box span { color: var(--text-muted); font-size: .84rem; }

/* ---------------------------------------------------------------- */
/* Cartes catégories                                                 */
/* ---------------------------------------------------------------- */

.cat-card {
  position: relative;
  display: block;
  padding: 24px 20px;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--cat-color, var(--primary));
  box-shadow: var(--shadow);
}

.cat-card::after {
  content: "";
  position: absolute;
  inset: auto -40% -60% auto;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--cat-color, var(--primary));
  opacity: .1;
  filter: blur(28px);
  transition: opacity .2s var(--ease);
}
.cat-card:hover::after { opacity: .26; }

.cat-card__icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.35rem;
  color: #fff;
  background: var(--cat-color, var(--primary));
  margin-bottom: 16px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--cat-color, var(--primary)) 40%, transparent);
}

.cat-card h3 { font-size: 1.03rem; margin-bottom: 5px; }
.cat-card p { color: var(--text-muted); font-size: .84rem; margin: 0; line-height: 1.5; }
.cat-card__count {
  margin-top: 14px;
  font-size: .8rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Carte influenceur                                                 */
/* ---------------------------------------------------------------- */

.inf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.inf-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.inf-card__cover {
  height: 96px;
  background: var(--brand-gradient);
  background-size: cover;
  background-position: center;
  position: relative;
}

.inf-card__body { padding: 0 20px 20px; text-align: center; margin-top: -38px; }

/* Anneau dégradé façon story Instagram */
.story-ring {
  display: inline-block;
  padding: 3px;
  border-radius: 50%;
  background: var(--ig-gradient);
  position: relative;
}
.story-ring img {
  display: block;
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  background: var(--surface-2);
}
.story-ring--lg img { width: 128px; height: 128px; border-width: 4px; }

.inf-card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 12px 0 2px;
}

.badge-verified {
  color: var(--info);
  font-size: .9em;
  flex-shrink: 0;
}

.inf-card__cat {
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.inf-card__bio {
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.inf-card__platforms {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .16s var(--ease);
}

.platform-chip .bi {
  color: var(--chip-color, var(--text-muted));
  font-size: 1.1em;
  line-height: 1;
}

/* Le nom du réseau porte l'information ; le chiffre la précise. */
.platform-chip__name { color: var(--text); font-weight: 650; }
.platform-chip__count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.platform-chip__count::before { content: "·"; margin: 0 4px; color: var(--text-dim); }

.platform-chip:hover {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--chip-color, var(--border));
  transform: translateY(-1px);
}

/* Sur les cartes étroites, une puce par ligne plutôt qu'un nom tronqué. */
@media (max-width: 400px) {
  .platform-chip { font-size: .8rem; padding: 6px 11px; }
}

/* Le lien du nom s'étire sur toute la carte : elle devient cliquable d'un bloc,
   sans imbriquer de lien dans un lien (interdit en HTML). */
.inf-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.inf-card__link:focus-visible::after {
  box-shadow: var(--ring);
  border-radius: var(--radius-lg);
}

/* Le bouton de contact repasse devant le lien de carte. */
.inf-card__cta { position: relative; z-index: 2; }
.inf-card__cta.disabled { opacity: .55; pointer-events: none; }

.inf-card__foot {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-soft);
}
.inf-card__followers { font-weight: 700; font-size: .95rem; }
.inf-card__followers small { display: block; font-weight: 400; font-size: .72rem; color: var(--text-dim); }

/* Rubans d'angle */
.ribbon {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, .45);
  color: #fff;
}
.ribbon--featured { background: linear-gradient(135deg, #f59e0b, #f97316); }

/* Niches */
.niche-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.niche-tag {
  font-size: .72rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border-soft);
}

/* ---------------------------------------------------------------- */
/* Profil influenceur                                                */
/* ---------------------------------------------------------------- */

.profile-cover {
  height: 280px;
  background: var(--brand-gradient);
  background-size: cover;
  background-position: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
}
.profile-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent 55%);
  border-radius: inherit;
}

@media (max-width: 767.98px) { .profile-cover { height: 170px; } }

.profile-head {
  margin-top: -70px;
  position: relative;
  z-index: 2;
}

.profile-name { font-size: clamp(1.5rem, 3.4vw, 2.2rem); display: flex; align-items: center; gap: 10px; }

.profile-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--text-muted); font-size: .9rem; }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Grille de statistiques par plateforme */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

.platform-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: var(--chip-color);
  color: var(--text);
}
/* Rendu en <button>, la carte hérite de la couleur de texte du navigateur :
   l'icône sortait sombre sur son fond coloré. On force le blanc sur le glyphe
   lui-même, et pas seulement sur son conteneur. */
.platform-card {
  color: var(--text);
  font: inherit;
  text-align: left;
  width: 100%;
}

.platform-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--chip-color, var(--primary));
  flex-shrink: 0;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--chip-color, var(--primary)) 35%, transparent);
}

.platform-card__icon .bi {
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

/* Le logo X est noir : sur fond noir, il faut inverser le carré. */
.platform-card__icon[data-platform="x"],
.social-input__badge[data-platform="x"] { background: #fff; }
.platform-card__icon[data-platform="x"] .bi,
.social-input__badge[data-platform="x"] .bi { color: #000; }

/* Snapchat est jaune vif : le glyphe blanc y devient illisible. */
.platform-card__icon[data-platform="snapchat"] .bi,
.social-input__badge[data-platform="snapchat"] .bi { color: #1a1a1a; }
.platform-card strong { display: block; font-size: 1.15rem; letter-spacing: -.02em; }
.platform-card span { font-size: .78rem; color: var(--text-dim); }

/* Panneau latéral collant */
.sticky-panel { position: sticky; top: calc(var(--nav-h) + 20px); }

/* ---------------------------------------------------------------- */
/* Cartes et panneaux génériques                                     */
/* ---------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
}
.panel--flush { padding: 0; overflow: hidden; }

.panel__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1.05rem; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .bi { font-size: 3rem; color: var(--text-dim); margin-bottom: 14px; display: block; }

/* ---------------------------------------------------------------- */
/* Formulaires                                                       */
/* ---------------------------------------------------------------- */

.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control, .form-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .94rem;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

/* En redéfinissant `background`, on effaçait le chevron que Bootstrap dessine
   sur les listes déroulantes : rien ne signalait plus qu'on pouvait choisir.
   On le redessine, teinté par le thème. */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239aa0b0'%3E%3Cpath d='M8 11.2 3.3 6.5a.75.75 0 0 1 1.06-1.06L8 9.08l3.64-3.64a.75.75 0 1 1 1.06 1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 15px 15px;
  cursor: pointer;
}

[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235b6172'%3E%3Cpath d='M8 11.2 3.3 6.5a.75.75 0 0 1 1.06-1.06L8 9.08l3.64-3.64a.75.75 0 1 1 1.06 1.06z'/%3E%3C/svg%3E");
}

/* Un champ adossé à un <datalist> n'affiche aucun indicateur : rien ne dit
   qu'une liste existe. On lui donne le même chevron, en plus discret puisque
   la saisie libre reste possible. */
.form-control[list] {
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7080'%3E%3Cpath d='M8 11.2 3.3 6.5a.75.75 0 0 1 1.06-1.06L8 9.08l3.64-3.64a.75.75 0 1 1 1.06 1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 14px 14px;
}

/* Chrome ajoute sa propre flèche sur les champs à datalist : on la masque. */
.form-control[list]::-webkit-calendar-picker-indicator { display: none !important; }

.form-control:focus, .form-select:focus {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-3); opacity: .7; }

.form-select option { background: var(--surface); color: var(--text); }

.form-check-input {
  background-color: var(--surface-3);
  border-color: var(--border);
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-label { font-size: .92rem; }

.form-text { color: var(--text-dim); font-size: .8rem; }

.input-group-text {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.is-invalid { border-color: var(--danger) !important; }
.invalid-feedback { color: var(--danger); font-size: .82rem; }

/* Champs sociaux du formulaire d'inscription */
.social-input {
  display: grid;
  grid-template-columns: 46px 1fr 170px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.social-input__badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  color: #fff;
  background: var(--chip-color);
}
.social-input .form-control { background: var(--surface); }

@media (max-width: 575.98px) {
  .social-input { grid-template-columns: 46px 1fr; }
  .social-input .followers-field { grid-column: 1 / -1; }
}

/* Sélection de niches par cases à cocher */
.niche-picker {
  max-height: 280px;
  overflow-y: auto;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.niche-picker__group + .niche-picker__group { margin-top: 16px; }
.niche-picker__group > strong {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.niche-check { display: inline-block; margin: 0 6px 6px 0; }
.niche-check input { position: absolute; opacity: 0; pointer-events: none; }
.niche-check span {
  display: inline-block;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .82rem;
  cursor: pointer;
  transition: all .14s var(--ease);
}
.niche-check input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.niche-check input:focus-visible + span { box-shadow: var(--ring); }

/* Sélecteur d'indicatif recherchable (combobox) + champ téléphone */
.phone-input { flex-wrap: nowrap; }
.phone-input .form-control[type="tel"] { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.combobox { position: relative; flex: 0 0 auto; }

.combobox__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
.combobox__toggle .bi { color: var(--text-dim); font-size: .8rem; }

.combobox__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1080;
  width: 260px;
  max-width: 78vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}

.combobox__search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .9rem;
  margin-bottom: 6px;
}
.combobox__search:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.combobox__list { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }

.combobox__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  cursor: pointer;
  text-align: left;
}
.combobox__item:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------- */
/* Captcha                                                           */
/* ---------------------------------------------------------------- */

.captcha {
  padding: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}
.captcha__label { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.captcha__row { display: flex; align-items: center; gap: 10px; }

.captcha__question {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  user-select: none;
  white-space: nowrap;
  /* Petit bruit visuel pour gêner l'OCR basique. */
  background-image: repeating-linear-gradient(45deg,
      transparent 0 6px,
      color-mix(in srgb, var(--primary) 8%, transparent) 6px 7px);
}

.captcha__refresh {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all .16s var(--ease);
}
.captcha__refresh:hover { color: var(--text); background: var(--surface-3); }
.captcha__refresh.spin .bi { animation: spin .5s var(--ease); }

@keyframes spin { to { transform: rotate(360deg); } }

.captcha__input { max-width: 150px; }

@media (max-width: 480px) {
  .captcha__row { flex-wrap: wrap; }
  .captcha__input { max-width: none; flex: 1 1 100%; }
}

/* Pot de miel : invisible pour l'humain, rempli par les robots. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ---------------------------------------------------------------- */
/* Filtres du listing                                                */
/* ---------------------------------------------------------------- */

.filter-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 0 9px;
  margin-bottom: 24px;
}

/* Bloc de filtres compact : puces plus fines, sélecteurs en pastilles. */
.filter-bar .chip-scroll { gap: 6px; padding-bottom: 0; margin-bottom: 0 !important; }

.filter-bar .chip {
  padding: 4px 11px;
  font-size: .8rem;
  font-weight: 550;
}
.filter-bar .chip .bi { font-size: .9em; }
.filter-bar .chip .text-dim { font-size: .92em; opacity: .7; }

/* Ligne de sélecteurs resserrée, arrondie, alignée sur les puces. */
.filter-bar form { margin-top: 8px; }
.filter-bar .form-select {
  border-radius: var(--radius-pill);
  padding: .4rem 2.1rem .4rem .95rem;
  font-size: .84rem;
  background-color: var(--surface-2);
  border-color: var(--border-soft);
}
.filter-bar .form-select:hover { border-color: var(--border); }

/* Sur grand écran les puces passent à la ligne : à la souris, un ruban à
   défilement horizontal est invisible et donc inutilisable. Sous 768px on
   repasse au ruban, où le geste de glissement est naturel. */
.chip-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}

@media (max-width: 767.98px) {
  .chip-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    /* Dégradé de bord : signale qu'il reste du contenu à droite. */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .chip-scroll::-webkit-scrollbar { display: none; }
}

.chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: .87rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all .16s var(--ease);
}
.chip:hover { color: var(--text); background: var(--surface-3); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------------------------------------------------------------- */
/* Alertes et badges                                                 */
/* ---------------------------------------------------------------- */

.alert {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: .9rem 1.1rem;
}
.alert .bi { flex-shrink: 0; margin-top: 2px; }

/* Variante compacte : dans une modale, un bandeau d'information ne doit pas
   pousser le formulaire hors de l'écran. */
.alert-sm {
  padding: .5rem .75rem;
  font-size: .82rem;
  line-height: 1.45;
  gap: 8px;
  align-items: center;
}
.alert-sm .bi { margin-top: 0; font-size: .95rem; }

.alert-success { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); color: #34d399; }
.alert-danger  { background: rgba(239, 68, 68, .1);  border-color: rgba(239, 68, 68, .3);  color: #f87171; }
.alert-warning { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); color: #fbbf24; }
.alert-info    { background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .3); color: #60a5fa; }

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-status.pending   { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.badge-status.approved,
.badge-status.forwarded { background: rgba(16, 185, 129, .14); color: #34d399; }
.badge-status.rejected,
.badge-status.suspended { background: rgba(239, 68, 68, .14);  color: #f87171; }
.badge-status.archived  { background: rgba(107, 114, 128, .18); color: #9aa0b0; }

/* Notification compteur */
.count-dot {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}

/* ---------------------------------------------------------------- */
/* Toasts                                                            */
/* ---------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast-im {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  animation: toast-in .3s var(--ease);
}
.toast-im.hide { animation: toast-out .25s var(--ease) forwards; }
.toast-im .bi { font-size: 1.15rem; }
.toast-im.success .bi { color: var(--success); }
.toast-im.danger .bi { color: var(--danger); }
.toast-im.warning .bi { color: var(--warning); }
.toast-im.info .bi { color: var(--info); }

@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(120%); opacity: 0; } }

@media (max-width: 575.98px) {
  .toast-stack { left: 12px; right: 12px; bottom: 74px; max-width: none; }
}

/* ---------------------------------------------------------------- */
/* Modale                                                            */
/* ---------------------------------------------------------------- */

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
}
.modal-header, .modal-footer { border-color: var(--border-soft); }
.modal-title { font-size: 1.15rem; }
.btn-close { filter: invert(1) grayscale(1) brightness(1.8); }
[data-theme="light"] .btn-close { filter: none; }
.modal-backdrop.show { opacity: .72; }

/* Un formulaire long peut dépasser la hauteur de l'écran. Plutôt que de faire
   défiler le corps de la modale — fragile, et qui a déjà masqué le bouton
   d'envoi — on laisse la modale entière défiler dans son conteneur, et on
   épingle le pied : le bouton d'envoi reste visible en toutes circonstances. */
.modal { overflow-y: auto; }

.modal-dialog { margin: 1.5rem auto; }

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--surface);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  /* Le contenu qui passe dessous ne doit pas sembler collé au bouton. */
  box-shadow: 0 -12px 20px -12px rgba(0, 0, 0, .45);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

/* Le formulaire de contact doit tenir dans un écran d'ordinateur portable :
   gouttières resserrées, champs moins hauts, zone de texte courte. */
.modal-body .row { --bs-gutter-y: .8rem; }
.modal-body .form-label { margin-bottom: 4px; }
.modal-body .form-text { margin-top: 2px; font-size: .76rem; }
.modal-body .form-control,
.modal-body .form-select { padding: .55rem .8rem; font-size: .9rem; }
.modal-body .form-select { padding-right: 2.4rem; }

.form-control-compact { min-height: 84px; resize: vertical; }

/* Captcha inséré dans le pied de modale : plus de cadre, plus de titre sur
   sa propre ligne — juste l'opération, le bouton et la réponse. */
.modal-footer .captcha {
  border: none;
  background: transparent;
  padding: 0;
  flex: 1 1 260px;
}
.modal-footer .captcha__label {
  font-size: .72rem;
  margin-bottom: 5px;
  color: var(--text-dim);
}
.modal-footer .captcha__question { font-size: 1.02rem; padding: 6px 12px; letter-spacing: .08em; }
.modal-footer .captcha__refresh { width: 36px; height: 36px; }
.modal-footer .captcha__input { max-width: 110px; padding: .45rem .7rem; }

@media (max-width: 575.98px) {
  .modal-footer .captcha { flex: 1 1 100%; }
  .modal-footer .d-flex.ms-auto { width: 100%; }
}

/* Sur petit écran, la modale occupe toute la largeur : plus de marge perdue. */
@media (max-width: 575.98px) {
  .modal-dialog { margin: 0; max-width: none; min-height: 100%; }
  .modal-content { border-radius: 0; border: none; min-height: 100vh; }
  .modal-header, .modal-footer { border-radius: 0; }
  .modal-footer .btn { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------- */
/* Tableaux (administration)                                         */
/* ---------------------------------------------------------------- */

.table-im {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .9rem;
}
.table-im th {
  text-align: left;
  padding: 12px 16px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-im td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.table-im tbody tr { transition: background .14s var(--ease); }
.table-im tbody tr:hover { background: var(--surface-2); }
.table-im tbody tr:last-child td { border-bottom: none; }

.table-wrap { overflow-x: auto; }

.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cell-user strong { display: block; font-weight: 650; }
.cell-user small { color: var(--text-dim); }

/* ---------------------------------------------------------------- */
/* Administration : mise en page                                     */
/* ---------------------------------------------------------------- */

.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.admin-side {
  background: var(--bg-soft);
  border-right: 1px solid var(--border-soft);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-side .brand { padding: 6px 8px 22px; }

.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .72rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 550;
  transition: all .14s var(--ease);
}
.admin-nav a .bi { font-size: 1.1rem; width: 20px; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-nav a.active .bi { color: #fff; }
.admin-nav a .count-dot { margin-left: auto; }

.admin-nav__label {
  padding: 16px 10px 6px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
  font-weight: 700;
}

.admin-main { padding: 28px 32px 60px; min-width: 0; }

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.admin-topbar h1 { font-size: 1.6rem; margin: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.kpi {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.kpi__icon {
  position: absolute;
  right: 16px; top: 16px;
  font-size: 1.6rem;
  opacity: .18;
}
.kpi strong { display: block; font-size: 2rem; letter-spacing: -.03em; line-height: 1.1; }
.kpi span { color: var(--text-muted); font-size: .84rem; }
.kpi--warn { border-color: rgba(245, 158, 11, .35); }
.kpi--warn strong { color: var(--warning); }

@media (max-width: 991.98px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform .26s var(--ease);
  }
  .admin-side.open { transform: translateX(0); }
  .admin-main { padding: 20px 16px 60px; }
}

/* Bandeau « vous consultez le compte de X » pendant une impersonation admin. */
.impersonate-bar {
  position: sticky;
  top: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 9px 18px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #1a1005;
  font-size: .9rem;
  font-weight: 600;
}
.impersonate-bar .btn {
  background: rgba(0, 0, 0, .82);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.impersonate-bar .btn:hover { background: #000; color: #fff; }

/* Secret affiché une seule fois : lien d'activation ou mot de passe provisoire. */
.secret-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.secret-box code {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: .82rem;
  word-break: break-all;
  user-select: all;   /* un clic sélectionne tout, pour le copier au clavier */
}
.secret-box .btn { flex-shrink: 0; }

/* ---------------------------------------------------------------- */
/* Messagerie interne                                                */
/* ---------------------------------------------------------------- */

.thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.thread__empty { text-align: center; padding: 40px 20px; }
.thread__empty .bi { font-size: 2.4rem; display: block; margin-bottom: 10px; color: var(--text-dim); }

.thread__system {
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: .82rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
}

.msg { max-width: 78%; align-self: flex-start; }
.msg--mine { align-self: flex-end; }

.msg__meta { font-size: .74rem; color: var(--text-dim); margin: 0 4px 4px; }
.msg--mine .msg__meta { text-align: right; }

.msg__bubble {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  border-top-left-radius: 4px;
  padding: 11px 14px;
}
.msg--mine .msg__bubble {
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  border-top-left-radius: 16px;
  border-top-right-radius: 4px;
}

.msg__body { white-space: pre-wrap; line-height: 1.55; font-size: .92rem; }

.msg__files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.msg__thumb {
  display: block;
  width: 110px; height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.msg__thumb img { width: 100%; height: 100%; object-fit: cover; }

.msg__file {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.msg__file:hover { color: var(--text); border-color: var(--primary); }
.msg__file .bi { font-size: 1.4rem; color: #e74c3c; }
.msg__file strong { display: block; font-size: .82rem; }
.msg__file small { color: var(--text-dim); font-size: .72rem; }

/* Zone de saisie + dépôt de fichiers */
.thread-form { margin-top: 4px; }

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.dropzone.is-dragover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, .06);
}

.thread-form__text {
  border: none;
  background: transparent;
  resize: vertical;
  padding: 4px;
}
.thread-form__text:focus { box-shadow: none; background: transparent; }

.dropzone__hint { font-size: .8rem; color: var(--text-muted); padding: 4px; }
.dropzone__hint .bi { margin-right: 4px; }

.linklike {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.dropzone__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dropzone__list:empty { display: none; }

.chip-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: .78rem;
}
.chip-file .bi { color: var(--text-dim); }
.chip-file button { border: none; background: none; color: var(--text-dim); cursor: pointer; padding: 0; line-height: 1; }
.chip-file button:hover { color: var(--danger); }
.chip-file.is-bad { border-color: var(--danger); color: var(--danger); }

.thread-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Fil de discussion d'un message modéré */
.msg-body {
  white-space: pre-wrap;
  line-height: 1.7;
  padding: 18px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.meta-list { display: grid; gap: 12px; }
.meta-list > div { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.meta-list dt, .meta-list .k { color: var(--text-dim); }
.meta-list .v { font-weight: 600; text-align: right; word-break: break-word; }

/* ---------------------------------------------------------------- */
/* Pied de page                                                      */
/* ---------------------------------------------------------------- */

.footer-im {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 28px;
  margin-top: 80px;
}
.footer-im h5 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); margin-bottom: 16px; }
.footer-im ul { list-style: none; padding: 0; margin: 0; }
.footer-im li { margin-bottom: 9px; }
.footer-im a { color: var(--text-muted); font-size: .9rem; transition: color .14s var(--ease); }
.footer-im a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: .85rem;
}

/* Bouton téléphone : le numéro d'abord, sa nature en dessous. */
.phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: .55rem 1.1rem .55rem .9rem;
  border-radius: var(--radius-pill);
}
.phone-btn .bi { font-size: 1.1rem; color: var(--success); }
.phone-btn strong { display: block; font-size: .95rem; letter-spacing: .01em; }
.phone-btn small { display: block; font-size: .72rem; color: var(--text-dim); font-weight: 500; }

.social-round {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  transition: all .16s var(--ease);
}
.social-round:hover { background: var(--chip-color, var(--primary)); color: #fff; border-color: transparent; transform: translateY(-2px); }

/* ---------------------------------------------------------------- */
/* Pagination                                                        */
/* ---------------------------------------------------------------- */

.pagination-im { display: flex; justify-content: center; gap: 6px; margin-top: 44px; flex-wrap: wrap; }
.pagination-im a, .pagination-im span {
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
  transition: all .14s var(--ease);
}
.pagination-im a:hover { background: var(--surface-3); color: var(--text); }
.pagination-im .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination-im .disabled { opacity: .4; pointer-events: none; }

/* ---------------------------------------------------------------- */
/* Divers                                                            */
/* ---------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.divider-text {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: .82rem;
  margin: 22px 0;
}
.divider-text::before, .divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Page de connexion */
.auth-wrap { display: grid; place-items: center; min-height: calc(100vh - var(--nav-h)); padding: 40px 16px; }
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) { .auth-card { padding: 26px 20px; } }

/* --- Sélecteur de langue (drapeaux) --- */
.lang-switch{display:inline-flex;align-items:center;gap:2px;background:var(--surface-2,rgba(255,255,255,.05));border:1px solid var(--border);border-radius:999px;padding:2px}
.lang-switch .lang-flag{display:inline-flex;align-items:center;justify-content:center;font-size:1rem;line-height:1;padding:4px 7px;border-radius:999px;text-decoration:none;opacity:.5;filter:grayscale(.6);transition:opacity .15s,filter .15s,background .15s}
.lang-switch .lang-flag:hover{opacity:.85;filter:grayscale(0)}
.lang-switch .lang-flag.active{opacity:1;filter:grayscale(0);background:var(--surface-3,rgba(255,255,255,.1))}
.lang-switch--menu{display:flex;gap:8px;background:none;border:0;padding:0}
.lang-switch--menu .lang-flag{gap:8px;font-size:.95rem;padding:10px 12px;width:100%;justify-content:flex-start;color:var(--text)}
.lang-switch--menu .lang-flag.active{background:var(--surface-3,rgba(255,255,255,.08))}
@media (max-width:991px){.nav-actions .lang-switch{display:none}}

/* Langues parlées par l'influenceur */
.lang-spoken{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}
.lang-spoken .lang-chip{display:inline-flex;align-items:center;gap:5px;font-size:.85rem;padding:3px 10px;border-radius:999px;background:var(--surface-2,rgba(255,255,255,.05));border:1px solid var(--border)}

/* Sélecteur de langues parlées (profil) */
.lang-picker{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.lang-pick{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--border);background:var(--surface-2,rgba(255,255,255,.04));cursor:pointer;user-select:none;font-size:.9rem;transition:border-color .15s,background .15s}
.lang-pick input{position:absolute;opacity:0;width:0;height:0}
.lang-pick:hover{border-color:var(--brand,#7c5cff)}
.lang-pick.checked,.lang-pick:has(input:checked){border-color:var(--brand,#7c5cff);background:color-mix(in srgb,var(--brand,#7c5cff) 16%,transparent)}

/* Drapeau langue sur la carte influenceur */
.inf-card__name .card-lang{font-size:.85rem;margin-left:4px;vertical-align:middle}

/* Badges langue texte (admin) — lisibles même sans emoji drapeau */
.lang-tag{display:inline-block;font-size:.62rem;font-weight:800;letter-spacing:.04em;line-height:1;padding:3px 6px;border-radius:5px;margin-left:6px;vertical-align:middle;color:#fff}
.lang-tag--fr{background:#3b5bdb}
.lang-tag--en{background:#c92a2a}
.lang-tag--es{background:#e67700}.lang-tag--de{background:#495057}.lang-tag--it{background:#2f9e44}
.lang-tag--pt{background:#2b8a3e}.lang-tag--nl{background:#e8590c}.lang-tag--ar{background:#087f5b}
.lang-tag--ru{background:#364fc7}.lang-tag--zh{background:#a61e4d}.lang-tag--ja{background:#c2255c}
.lang-tag--ko{background:#5f3dc4}.lang-tag--hi{background:#d9480f}.lang-tag--tr{background:#0b7285}
.lang-tag--pl{background:#862e9c}

/* Vrais drapeaux (flag-icons) : dimensionnement par contexte */
.fi{border-radius:2px;vertical-align:middle}
.inf-card__name .fi{font-size:1rem;margin-left:5px;box-shadow:0 0 0 1px rgba(0,0,0,.15)}
.lang-flags .fi{font-size:1rem;margin-left:6px;box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.lang-spoken .lang-chip .fi{font-size:.95rem}
.lang-switch .lang-flag .fi{font-size:1rem;filter:grayscale(.55);transition:filter .15s}
.lang-switch .lang-flag:hover .fi,.lang-switch .lang-flag.active .fi{filter:grayscale(0)}
.lang-switch--menu .lang-flag .fi{font-size:1.1rem;margin-right:4px}
