/* ── CACA LAND - Design System ─────────────────────────── */

/* ── Logo global ─────────────────────────────────────── */
/* Connexion */
.auth-logo-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: .4rem; margin-bottom: 1.75rem;
}
.auth-logo {
  width: 64px; height: 64px; max-width: 64px; max-height: 64px;
  object-fit: cover; border-radius: 16px;
  animation: auth-logo-in .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes auth-logo-in {
  from { opacity:0; transform: scale(.6) translateY(-10px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.auth-brand-name {
  font-size: .72rem; font-weight: 900; letter-spacing: .18em;
  color: var(--muted); text-transform: uppercase;
}

/* Inscription (panneau gauche) */
.reg-brand-logo {
  width: 40px; height: 40px; max-width: 40px; max-height: 40px;
  object-fit: cover; border-radius: 10px;
}

/* Landing page hero */
.lp-hero-logo {
  display: flex; justify-content: center; margin-bottom: 1.25rem;
}
.lp-logo-img {
  width: 80px; height: 80px; max-width: 80px; max-height: 80px;
  object-fit: cover; border-radius: 20px;
  animation: lp-logo-float 4s ease-in-out infinite;
}
@keyframes lp-logo-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@media (max-width: 576px) {
  .lp-logo-img { width: 64px; height: 64px; max-width: 64px; max-height: 64px; }
}
:root {
  /* Palette */
  --dark:      #260F07;
  --dark-mid:  #601306;
  --accent:    #CD631F;
  --accent-hover: #b3541a;
  --blue:      #94BEEB;
  --light-blue:#CAE4E7;

  /* Alias sémantiques */
  --brown-900: #260F07;
  --brown-700: #601306;
  --brown-500: #CD631F;
  --brown-300: #94BEEB;
  --brown-100: #D8EEF0;
  --beige:     #F4FAFB;
  --beige-2:   #E5F2F4;
  --text:      #1a0903;
  --muted:     #7a6255;
  --radius:    .75rem;
  --shadow:    0 2px 12px rgba(38,15,7,.1);
}

* { box-sizing: border-box; }

body {
  background: var(--beige);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .95rem;
  font-feature-settings: "cv11", "ss01"; /* Inter : chiffres plus lisibles */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAVBAR ───────────────────────────────────────────── */
.navbar-caca {
  background: linear-gradient(135deg, var(--brown-900) 0%, #3a0d05 100%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: .45rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

/* Brand */
.navbar-caca .navbar-brand {
  font-size: 1.05rem; font-weight: 900; letter-spacing: .14em;
  color: #fff !important;
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none;
}
.navbar-caca .brand-logo {
  width: 28px; height: 28px; max-width: 28px; max-height: 28px;
  object-fit: cover; border-radius: 7px;
  transition: transform .2s;
}
.navbar-caca .navbar-brand:hover .brand-logo { transform: scale(1.08) rotate(-4deg); }
.navbar-caca .brand-text {
  background: linear-gradient(90deg,#fff,rgba(255,255,255,.7));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Nav links */
.navbar-caca .nav-link {
  color: rgba(255,255,255,.65) !important;
  font-size: .83rem; font-weight: 500;
  padding: .32rem .65rem !important;
  border-radius: .4rem;
  transition: color .15s, background .15s;
  display: flex; align-items: center; gap: .3rem;
}
.navbar-caca .nav-link:hover,
.navbar-caca .nav-link:focus   { color: #fff !important; background: rgba(255,255,255,.09); }
.navbar-caca .nav-link.active  { color: #fff !important; background: rgba(255,255,255,.12); }
.nav-icon-em { font-size: .82rem; line-height: 1; opacity: .85; }

/* Dropdown */
.navbar-caca .dropdown-menu {
  background: #2a0c04;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .6rem;
  padding: .4rem;
  min-width: 170px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.navbar-caca .dropdown-item {
  color: rgba(255,255,255,.75);
  border-radius: .35rem;
  font-size: .84rem;
  padding: .44rem .85rem;
  transition: background .12s, color .12s;
}
.navbar-caca .dropdown-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-divider { border-color: rgba(255,255,255,.08) !important; margin: .3rem .6rem !important; }
.dropdown-header-label {
  display: block; font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
  padding: .45rem .85rem .15rem; pointer-events: none;
}

/* Admin link */
.navbar-caca .nav-admin { color: var(--blue) !important; font-weight: 600; }
.navbar-caca .nav-admin:hover { color: #fff !important; background: rgba(100,160,255,.12) !important; }

/* ── DESKTOP ONLY : navbar plus grande & harmonisée ─────── */
@media (min-width: 992px) {
  .navbar-caca {
    padding: .65rem 0;
  }

  /* Brand plus présent */
  .navbar-caca .navbar-brand {
    font-size: 1.15rem;
    gap: .5rem;
  }
  .navbar-caca .brand-icon { font-size: 1.35rem; }

  /* Liens nav plus grands */
  .navbar-caca .nav-link {
    font-size: .92rem !important;
    font-weight: 600;
    padding: .5rem .85rem !important;
    border-radius: .5rem;
    gap: .4rem;
  }
  .nav-icon-em { font-size: .9rem; }

  /* Dropdown items plus lisibles */
  .navbar-caca .dropdown-menu {
    min-width: 190px;
    padding: .5rem;
    border-radius: .7rem;
  }
  .navbar-caca .dropdown-item {
    font-size: .88rem;
    padding: .52rem 1rem;
    border-radius: .4rem;
  }

  /* Bouton Shop */
  .btn-shop-nav {
    padding: .44rem 1.1rem !important;
    font-size: .88rem !important;
    border-radius: 2rem;
  }

  /* Bouton Entrée */
  .btn-new-entry {
    padding: .46rem 1.25rem !important;
    font-size: .9rem !important;
    border-radius: 2rem;
  }

  /* Cloche notifs */
  .navbar-notif-bell { font-size: 1.15rem; padding: .3rem .45rem; }

  /* User block */
  .nav-avatar { width: 36px; height: 36px; font-size: .95rem; }
  .navbar-username { font-size: .9rem; }
  .navbar-stat-coins, .navbar-stat-gems { font-size: .7rem; }
  .navbar-logout { min-height: 40px; padding: 0 .75rem; }
}

/* Message badge */
.msg-badge {
  position: absolute; top: 0; right: -2px;
  background: #dc3545; color: #fff;
  font-size: .56rem; font-weight: 800;
  min-width: 15px; height: 15px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1; pointer-events: none;
}
.nav-unread-pill {
  background: #dc3545; color: #fff;
  font-size: .62rem; font-weight: 700;
  padding: .1rem .45rem; border-radius: 2rem;
  line-height: 1.4;
}

/* ── Zone droite ─────────────────────────────────────── */
.navbar-right-zone {
  display: flex; align-items: center; gap: .6rem;
}
.navbar-ctas {
  display: flex; align-items: center; gap: .4rem;
}

/* Bouton Shop */
.btn-shop-nav {
  background: transparent;
  color: #f4c430 !important;
  border: 1.5px solid rgba(244,196,48,.35);
  border-radius: 2rem;
  padding: .32rem .85rem !important;
  font-size: .8rem; font-weight: 600;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-shop-nav:hover {
  background: rgba(244,196,48,.12);
  border-color: rgba(244,196,48,.65);
  color: #f4c430 !important;
}

/* Bouton Entrée */
.btn-new-entry {
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 2rem;
  padding: .34rem 1rem !important;
  font-size: .82rem;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(205,99,31,.4);
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}
.btn-new-entry:hover { background: var(--accent-hover); box-shadow: 0 4px 14px rgba(205,99,31,.55); transform: translateY(-1px); }

/* ─────────────────────────────────────────────────────────
   USER BLOCK  (desktop pill + mobile card)
   ───────────────────────────────────────────────────────── */

/* Conteneur global */
.navbar-user-block {
  display: flex; align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 2rem;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.navbar-user-block:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.11); }

/* Chip cliquable (avatar + infos) */
.navbar-user-chip {
  display: flex; align-items: center; gap: .55rem;
  padding: .28rem .7rem .28rem .28rem;
  text-decoration: none;
  transition: background .15s;
  min-width: 0;
}
.navbar-user-chip:hover { background: rgba(255,255,255,.05); }

/* ── Avatar ─── */
.navbar-avatar-wrap { position: relative; flex-shrink: 0; }
.nav-avatar {
  width: 33px; height: 33px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e07b22);
  color: #fff; font-size: .88rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
.navbar-mascot {
  position: absolute; bottom: -3px; right: -4px;
  font-size: .7rem; line-height: 1; pointer-events: none;
}

/* ── Infos (nom + stats) ─── */
.navbar-user-info { overflow: hidden; min-width: 0; }

.navbar-name-row {
  display: flex; align-items: center; gap: .35rem;
  overflow: hidden;
}
.navbar-username {
  font-size: .84rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.25; flex-shrink: 1;
}
.navbar-title-pill {
  font-size: .55rem; font-weight: 800;
  color: var(--brown-900);
  background: linear-gradient(90deg, #f4c430, #f5a623);
  border-radius: 2rem; padding: .07rem .4rem;
  white-space: nowrap; flex-shrink: 0; line-height: 1.6;
  box-shadow: 0 1px 4px rgba(244,196,48,.3);
}

/* Stats sous le nom */
.navbar-sub-row {
  display: flex; align-items: center; gap: .3rem;
  margin-top: 2px;
}
.navbar-sub-sep    { font-size: .5rem; color: rgba(255,255,255,.18); line-height: 1; }
.navbar-stat-coins { font-size: .64rem; font-weight: 700; color: #f4c430; white-space: nowrap; }
.navbar-stat-gems  { font-size: .64rem; font-weight: 700; color: #c084fc; white-space: nowrap; }
.navbar-level-name { font-size: .58rem; color: rgba(255,255,255,.4); font-weight: 500; white-space: nowrap; }
.navbar-stat-xp    { font-size: .58rem; font-weight: 600; color: #f4c430; }

/* Barre XP fine sous les stats */
.navbar-xp-bar {
  height: 2px; background: rgba(255,255,255,.1);
  border-radius: 2px; margin-top: 3px; overflow: hidden;
  min-width: 60px;
}
.navbar-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f4c430);
  border-radius: 2px; transition: width .5s ease;
}

/* ── Bouton déconnexion ─── */
.navbar-logout {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.3);
  padding: 0 .65rem; height: 100%; min-height: 36px;
  text-decoration: none;
  border-left: 1px solid rgba(255,255,255,.08);
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.navbar-logout:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.07); }

/* ── Mode santé sérieux ─── */
body.health-mode .nav-icon-em,
body.health-mode .brand-icon,
body.health-mode .fab-btn span { filter: grayscale(1) opacity(.6); }
body.health-mode .navbar-brand .brand-text::before { content: ''; }
body.health-mode .event-topbar { display:none; }

/* ── Btn see more ─── */
.btn-see-more { font-size:.78rem; color:var(--accent); font-weight:600; background:none; border:1px dashed rgba(205,99,31,.4); border-radius:.4rem; padding:.2rem .7rem; cursor:pointer; transition:all .15s; }
.btn-see-more:hover { background:rgba(205,99,31,.07); }

/* ══ BURGER MENU CUSTOM ═══════════════════════════════════ */
.navbar-toggler-custom {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: .5rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.navbar-toggler-custom:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); }
.navbar-toggler-custom[aria-expanded="true"] { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.burger-bar {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease, width .22s ease;
}
/* Animation X quand ouvert */
.navbar-toggler-custom[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler-custom[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; width: 0; }
.navbar-toggler-custom[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile : afficher le burger, masquer sur desktop */
@media (max-width: 991px) {
  .navbar-toggler-custom { display: flex; }

  /* Panneau ouvert sur mobile */
  #nav.collapse:not(.show),
  #nav.collapsing { }

  #nav.show {
    position: fixed;
    top: 62px; left: 0; right: 0; bottom: 0;
    background: linear-gradient(170deg, #1a0500 0%, #2a0c04 100%);
    z-index: 1040;
    overflow-y: auto;
    padding: 1rem 1.25rem 2rem;
    display: flex !important;
    flex-direction: column;
    gap: .25rem;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  /* Nav links en mode mobile : grands, faciles à tapper */
  #nav.show .navbar-nav { flex-direction: column !important; width: 100%; margin: 0 !important; }
  #nav.show .nav-link {
    font-size: .95rem !important;
    padding: .75rem 1rem !important;
    border-radius: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
    justify-content: space-between;
  }
  #nav.show .dropdown-toggle::after { margin-left: auto; }
  #nav.show .dropdown-menu {
    position: static !important;
    background: rgba(255,255,255,.06);
    border: none;
    border-radius: .5rem;
    box-shadow: none;
    margin: .25rem 0 .25rem 1rem;
    padding: .25rem .25rem;
    width: auto;
    min-width: 0;
  }
  #nav.show .dropdown-item {
    font-size: .88rem;
    padding: .6rem 1rem;
    border-radius: .4rem;
  }

  /* Zone droite (boutons + profil) en colonne */
  #nav.show .navbar-right-zone {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    gap: .75rem;
  }
  #nav.show .navbar-ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
  }
  #nav.show .navbar-ctas .btn { text-align: center; padding: .65rem 1rem !important; font-size: .9rem !important; }
  #nav.show .navbar-notif-bell { font-size: 1.2rem; padding: .5rem 0; display: flex; align-items: center; gap: .5rem; }
  #nav.show .navbar-notif-bell::after { content: 'Notifications'; font-size: .9rem; color: rgba(255,255,255,.7); }
  /* User card en mode menu ouvert */
  #nav.show .navbar-user-block {
    border-radius: .85rem;
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.18);
    overflow: hidden;
  }
  #nav.show .navbar-user-chip { flex: 1; padding: .75rem 1rem; gap: .75rem; }
  #nav.show .navbar-user-info { display: block !important; }  /* ← FIX : nom visible */
  #nav.show .nav-avatar { width: 42px; height: 42px; font-size: 1.1rem; box-shadow: 0 0 0 2px rgba(255,255,255,.2); }
  #nav.show .navbar-username { font-size: 1rem; font-weight: 800; }
  #nav.show .navbar-sub-row { margin-top: 3px; }
  #nav.show .navbar-stat-coins { font-size: .75rem; }
  #nav.show .navbar-stat-gems  { font-size: .75rem; }
  #nav.show .navbar-xp-bar { min-width: 80px; }
  #nav.show .navbar-logout { padding: 0 1.1rem; min-height: 58px; border-left: 1px solid rgba(255,255,255,.1); }
  #nav.show .navbar-logout { padding: 0 1rem; min-height: 52px; border-radius: 0 .75rem .75rem 0; }
  #nav.show .mt-3 { margin-top: 0 !important; }
}

/* ── Event topbar ─────────────────────────────────────── */
.event-topbar {
  background: linear-gradient(90deg, #b8350a, #cd631f, #e8850a);
  color: #fff;
  font-size: .82rem;
  padding: .45rem 0;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.event-topbar::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    rgba(255,255,255,.04) 10px, rgba(255,255,255,.04) 20px
  );
}
.event-live-badge {
  background: #fff;
  color: #c0300a;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .1em;
  padding: .15rem .45rem;
  border-radius: 3px;
  flex-shrink: 0;
  animation: blink-badge .9s step-end infinite;
}
@keyframes blink-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* Event live indicator */
.navbar-caca .nav-events { position: relative; }
.navbar-caca .nav-events-live { color: #ffd700 !important; font-weight: 700 !important; }
.navbar-caca .nav-events-live:hover { color: #fff !important; }
.event-live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #ff4444;
  border-radius: 50%;
  position: absolute;
  top: 2px; right: -2px;
  animation: pulse-dot 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255,68,68,.6);
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(255,68,68,.6); }
  70%  { box-shadow: 0 0 0 6px rgba(255,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,68,68,0); }
}

.navbar-user-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.08);
  border-radius: 2rem;
  padding: .25rem .75rem;
  font-size: .82rem;
  color: rgba(255,255,255,.85);
}

.navbar-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

/* ── CARDS ────────────────────────────────────────────── */
.card {
  border: 1px solid var(--brown-100);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.card-section {
  border: 1px solid var(--brown-100);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-section-header {
  background: var(--beige-2);
  border-bottom: 1px solid var(--brown-100);
  padding: .65rem 1.25rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-section-body { padding: 1.25rem; }

/* ── BUTTONS ──────────────────────────────────────────── */
.btn-brown {
  background: var(--brown-500);
  color: #fff;
  border: none;
  border-radius: .5rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .15s, transform .1s;
}

.btn-brown:hover {
  background: var(--brown-700);
  color: #fff;
  transform: translateY(-1px);
}

.btn-brown:active { transform: translateY(0); }

.btn-outline-brown {
  color: var(--brown-500);
  border: 1.5px solid var(--brown-300);
  background: transparent;
  border-radius: .5rem;
  font-weight: 600;
  transition: all .15s;
}

.btn-outline-brown:hover {
  background: var(--brown-500);
  color: #fff;
  border-color: var(--brown-500);
}

/* ── FORM CONTROLS ────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--brown-100);
  border-radius: .5rem;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(205,99,31,.18);
}

.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .3rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── BRISTOL SELECTOR ─────────────────────────────────── */
.bristol-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .4rem;
}

.bristol-item input { display: none; }

.bristol-item label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .5rem .25rem;
  border: 1.5px solid var(--brown-100);
  border-radius: .5rem;
  cursor: pointer;
  transition: all .15s;
  font-size: .75rem;
  text-align: center;
  line-height: 1.2;
  min-height: 4rem;
}

.bristol-item label:hover {
  border-color: var(--brown-300);
  background: var(--beige-2);
}

.bristol-item input:checked + label {
  border-color: var(--brown-500);
  background: var(--brown-100);
  color: var(--brown-700);
  font-weight: 700;
}

.bristol-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brown-500);
  margin-bottom: .2rem;
}

/* ── RANGE SLIDERS ────────────────────────────────────── */
.range-group { position: relative; }

.range-group input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  background: var(--brown-100);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  border: none;
  box-shadow: none;
  padding: 0;
}

.range-group input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--brown-500);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .1s;
}

.range-group input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }

.range-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--brown-500);
  color: #fff;
  border-radius: .4rem;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FLASH MESSAGES ───────────────────────────────────── */
.alert {
  border-radius: .6rem;
  font-size: .88rem;
  border: none;
}

.alert-success { background: #d1f7e4; color: #0a5c35; }
.alert-danger   { background: #fde8e8; color: #7b1d1d; }
.alert-info     { background: var(--brown-100); color: var(--purple); }

/* ── MISC ─────────────────────────────────────────────── */
.text-muted { color: var(--muted) !important; }
.text-brown { color: var(--brown-500) !important; }
.bg-brown   { background: var(--brown-500) !important; }

.badge.bg-brown { background: var(--brown-500) !important; }

footer {
  margin-top: 4rem;
  border-top: 1px solid var(--brown-100);
  font-size: .78rem;
  color: var(--muted);
}

/* ── SHOP THEMES ──────────────────────────────────────── */
body.theme-dark {
  --beige: #1a1a1a; --beige-2: #242424; --brown-100: #333;
  --text: #e8e0d8; --muted: #9a8a7a; background: #1a1a1a;
}
body.theme-dark .card, body.theme-dark .card-section { background: #242424; border-color: #333; }
body.theme-dark .card-section-header { background: #2c2c2c; border-color: #333; }
body.theme-dark .navbar-caca { background: #0d0d0d; }

body.theme-nature {
  --beige: #f0f7f0; --beige-2: #e0efde; --brown-100: #b8d4b4;
  --accent: #2d7a2d; --accent-hover: #236023;
  --brown-500: #2d7a2d; --brown-700: #1a5c1a; --brown-900: #0d3d0d;
}
body.theme-ocean {
  --beige: #f0f6fb; --beige-2: #ddeef8; --brown-100: #b8d5ea;
  --accent: #1a6fa8; --accent-hover: #145a8a;
  --brown-500: #1a6fa8; --brown-700: #0d4f7a; --brown-900: #062f4f;
}
body.theme-royal {
  --beige: #faf5ff; --beige-2: #f0e8ff; --brown-100: #d4b8f0;
  --accent: #7c3aed; --accent-hover: #6d28d9;
  --brown-500: #7c3aed; --brown-700: #5b21b6; --brown-900: #3b0764;
}
body.theme-fire {
  --beige: #fff5f0; --beige-2: #ffe8de; --brown-100: #f5c4aa;
  --accent: #dc2626; --accent-hover: #b91c1c;
  --brown-500: #dc2626; --brown-700: #991b1b; --brown-900: #450a0a;
}
body.theme-galaxy {
  --beige: #0f0a1a; --beige-2: #1a1030; --brown-100: #2d1f4a;
  --text: #e0d8f0; --muted: #9080b0; background: #0f0a1a;
  --accent: #a855f7; --accent-hover: #9333ea;
  --brown-500: #a855f7; --brown-700: #7e22ce; --brown-900: #3b0764;
}
body.theme-galaxy .card, body.theme-galaxy .card-section { background: #1a1030; border-color: #2d1f4a; }
body.theme-galaxy .navbar-caca { background: #0a0715; }

body.theme-coffee {
  --beige: #fdf6f0; --beige-2: #f5e9dc; --brown-100: #d4b896;
  --accent: #7b4f2e; --accent-hover: #5c3820;
  --brown-500: #7b4f2e; --brown-700: #5c3820; --brown-900: #2d1a0a;
}
body.theme-candy {
  --beige: #fff0f8; --beige-2: #ffd6ef; --brown-100: #ffb3df;
  --accent: #e91e8c; --accent-hover: #c41577;
  --brown-500: #e91e8c; --brown-700: #9c0f5f; --brown-900: #5c0035;
}
body.theme-forest {
  --beige: #f0f7f2; --beige-2: #d4edd9; --brown-100: #a8d4b0;
  --accent: #2d6a4f; --accent-hover: #1b4332;
  --brown-500: #2d6a4f; --brown-700: #1b4332; --brown-900: #081c15;
}
body.theme-sunset {
  --beige: #fff8f0; --beige-2: #ffe8d0; --brown-100: #f4c49a;
  --accent: #d4570f; --accent-hover: #b34408;
  --brown-500: #d4570f; --brown-700: #8b2e00; --brown-900: #4a1500;
}
body.theme-arctic {
  --beige: #f0f8ff; --beige-2: #dceeff; --brown-100: #b8d8f0;
  --accent: #2980b9; --accent-hover: #1a6699;
  --brown-500: #2980b9; --brown-700: #1a5276; --brown-900: #0a2236;
}
body.theme-sakura {
  --beige: #fff5f9; --beige-2: #ffe0ee; --brown-100: #f4b8d4;
  --accent: #c2185b; --accent-hover: #880e4f;
  --brown-500: #c2185b; --brown-700: #880e4f; --brown-900: #4a0526;
}
body.theme-volcano {
  --beige: #1a0800; --beige-2: #2d1000; --brown-100: #4a1800;
  --text: #ffd0a0; --muted: #c08050; background: #1a0800;
  --accent: #ff6600; --accent-hover: #dd4400;
  --brown-500: #ff6600; --brown-700: #cc3300; --brown-900: #660000;
}
body.theme-volcano .card, body.theme-volcano .card-section { background: #2d1000; border-color: #4a1800; }
body.theme-volcano .navbar-caca { background: #0d0400; }

body.theme-neon {
  --beige: #0a0a0a; --beige-2: #151515; --brown-100: #333;
  --text: #00ffcc; --muted: #00aa88; background: #0a0a0a;
  --accent: #00ffcc; --accent-hover: #00ddaa;
  --brown-500: #00ffcc; --brown-700: #00aa88; --brown-900: #005544;
}
body.theme-neon .card, body.theme-neon .card-section { background: #111; border-color: #00ffcc44; }
body.theme-neon .navbar-caca { background: #050505; border-color: #00ffcc33; }

body.theme-gold, body.theme-premium_gold {
  --beige: #fffbf0; --beige-2: #fff5cc; --brown-100: #f0d060;
  --accent: #b8860b; --accent-hover: #8b6508;
  --brown-500: #b8860b; --brown-700: #8b6508; --brown-900: #4a3500;
}
body.theme-space {
  --beige: #05050f; --beige-2: #0a0a1e; --brown-100: #1a1a3a;
  --text: #c8d8f8; --muted: #6878a8; background: #05050f;
  --accent: #7070ff; --accent-hover: #5555ee;
  --brown-500: #7070ff; --brown-700: #4040cc; --brown-900: #1a1a66;
}
body.theme-space .card, body.theme-space .card-section { background: #0a0a1e; border-color: #1a1a3a; }
body.theme-space .navbar-caca { background: #020208; }

body.theme-midnight {
  --beige: #08080f; --beige-2: #12121e; --brown-100: #1e1e2e;
  --text: #dde4f0; --muted: #6b7280; background: #08080f;
  --accent: #818cf8; --accent-hover: #6366f1;
  --brown-500: #818cf8; --brown-700: #6366f1; --brown-900: #312e81;
}
body.theme-midnight .card, body.theme-midnight .card-section { background: #12121e; border-color: #1e1e2e; }
body.theme-midnight .navbar-caca { background: #04040a; }

body.theme-pastel {
  --beige: #fdf4ff; --beige-2: #fce7ff; --brown-100: #f5d0fe;
  --accent: #c084fc; --accent-hover: #a855f7;
  --brown-500: #c084fc; --brown-700: #a855f7; --brown-900: #7e22ce;
  --text: #4a1772; --muted: #9061c2;
}

body.theme-retro {
  --beige: #1a1a0a; --beige-2: #2a2a10; --brown-100: #3a3a18;
  --text: #d4e84a; --muted: #8a9a20; background: #1a1a0a;
  --accent: #f0e020; --accent-hover: #d0c010;
  --brown-500: #f0e020; --brown-700: #c0a810; --brown-900: #605000;
}
body.theme-retro .card, body.theme-retro .card-section { background: #2a2a10; border-color: #3a3a18; }
body.theme-retro .navbar-caca { background: #0a0a02; }

body.theme-cyberpunk {
  --beige: #0d0015; --beige-2: #1a0028; --brown-100: #2d0048;
  --text: #f0e0ff; --muted: #9060b0; background: #0d0015;
  --accent: #ff00aa; --accent-hover: #cc0088;
  --brown-500: #ff00aa; --brown-700: #cc0088; --brown-900: #660044;
}
body.theme-cyberpunk .card, body.theme-cyberpunk .card-section { background: #1a0028; border-color: #2d0048; }
body.theme-cyberpunk .navbar-caca { background: #06000d; border-color: #ff00aa33; }

/* ── AVATAR BORDERS ───────────────────────────────────── */
.avatar-border-bronze  { box-shadow: 0 0 0 2px #cd7f32; }
.avatar-border-gold    { box-shadow: 0 0 0 2px #ffd700; }
.avatar-border-diamond { box-shadow: 0 0 0 2px #b9f2ff, 0 0 6px #b9f2ff; }
.avatar-border-flame   { box-shadow: 0 0 0 2px #ff6600, 0 0 8px #ff4400; }
.avatar-border-rainbow { box-shadow: 0 0 0 3px transparent; outline: 2px solid; outline-offset: 1px;
                          outline-color: #ff6b6b; animation: rainbow-border 2s linear infinite; }
.avatar-border-royal   { box-shadow: 0 0 0 2px #ffd700, 0 0 0 4px #8b4513; }
.avatar-border-silver  { box-shadow: 0 0 0 2px #c0c0c0; }
.avatar-border-poop    { box-shadow: 0 0 0 2px #8B5E3C; }
.avatar-border-ice     { box-shadow: 0 0 0 2px #a8e4f7, 0 0 8px #7dd3fc; }
.avatar-border-toilet  { box-shadow: 0 0 0 2px #94a3b8, 0 0 0 4px #e2e8f0; }
.avatar-border-neon    { box-shadow: 0 0 0 2px #39ff14, 0 0 10px #39ff14; }
.avatar-border-cosmic  { box-shadow: 0 0 0 2px #818cf8, 0 0 10px #6366f1; animation: cosmic-pulse 3s ease-in-out infinite; }
.avatar-border-skull   { box-shadow: 0 0 0 2px #e2e8f0, 0 0 0 4px #1e293b; }
.avatar-border-pixel   { box-shadow: 0 0 0 3px #818cf8; image-rendering: pixelated; filter: contrast(1.1); }
.avatar-border-blood   { box-shadow: 0 0 0 2px #dc2626, 0 0 8px #991b1b; }
.avatar-border-thunder { box-shadow: 0 0 0 2px #fbbf24, 0 0 10px #f59e0b; animation: thunder-pulse 1.5s ease-in-out infinite; }
.avatar-border-abyss   { box-shadow: 0 0 0 2px #312e81, 0 0 0 4px #0f0a1e, 0 0 12px #6366f144; }
@keyframes thunder-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #fbbf24, 0 0 8px #f59e0b; }
  50%       { box-shadow: 0 0 0 3px #fde68a, 0 0 16px #fbbf24; }
}
/* ── Premium borders ─────────────────────────────────── */
.avatar-border-premium_prestige { box-shadow: 0 0 0 2px #ffd700, 0 0 8px #ffd700, 0 0 16px #f59e0b; animation: prestige-pulse 2s ease-in-out infinite; }
@keyframes prestige-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #ffd700, 0 0 8px #ffd700, 0 0 16px #f59e0b; }
  50%       { box-shadow: 0 0 0 3px #ffe966, 0 0 14px #ffe966, 0 0 26px #f59e0b; }
}
@keyframes cosmic-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #818cf8, 0 0 10px #6366f1; }
  50%       { box-shadow: 0 0 0 2px #c084fc, 0 0 16px #a855f7; }
}
@keyframes rainbow-border {
  0%   { outline-color: #ff6b6b; }
  16%  { outline-color: #ffa500; }
  33%  { outline-color: #ffff00; }
  50%  { outline-color: #00ff00; }
  66%  { outline-color: #0080ff; }
  83%  { outline-color: #8000ff; }
  100% { outline-color: #ff6b6b; }
}

/* ── LANDING PAGE ─────────────────────────────────────── */
.landing-hero { padding: 3rem 0; }
.landing-icon { font-size: 4rem; line-height: 1; margin-bottom: 1rem; }

.step-num {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--brown-500);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

/* ── HOME CONNECTÉ ────────────────────────────────────── */
.home-hero { border-left: 4px solid var(--brown-500); }

.kpi-box {
  background: var(--beige-2);
  border-radius: .6rem;
  padding: .75rem .5rem;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brown-500);
  line-height: 1;
}

.kpi-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-top: .2rem;
}

/* ── BADGE RARITY ─────────────────────────────────────── */
.badge-rarity {
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: .3rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-commun    { background: var(--beige-2); color: var(--muted); }
.badge-rare      { background: rgba(148,190,235,.25); color: #1a5a9a; }
.badge-epique    { background: rgba(205,99,31,.12); color: var(--accent); }
.badge-legendaire{ background: rgba(96,19,6,.1); color: var(--dark-mid); }

/* ── SCORE CIRCLE ─────────────────────────────────────── */
.score-circle {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(var(--brown-500) calc(var(--score) * 1%), var(--brown-100) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-inner {
  width: 70px;
  height: 70px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.score-num  { font-size: 1.4rem; font-weight: 800; color: var(--brown-500); }
.score-max  { font-size: .65rem; color: var(--muted); }

/* ── PROFILE AVATARS ──────────────────────────────────── */
.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--brown-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: var(--brown-900);
  overflow: hidden; flex-shrink: 0;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-md {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brown-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: var(--brown-900);
  overflow: hidden; flex-shrink: 0;
}
.profile-avatar-md img { width: 100%; height: 100%; object-fit: cover; }

/* ── ROADMAP ──────────────────────────────────────────── */
/* Intro block */
.rm-intro {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--beige-1, #fdf8f3);
  border: 1px solid var(--beige-2, #e8ddd0);
  border-radius: 10px; padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.rm-intro-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }
.rm-intro-title { font-size: 1rem; font-weight: 700; color: var(--brown-900, #2c1810); margin-bottom: .3rem; }
.rm-intro-text  { font-size: .8rem; color: var(--muted, #6b7280); margin: 0; line-height: 1.6; }

/* Legend */
.rm-legend {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem;
  margin-bottom: 1.25rem;
}
.rm-leg-item { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--muted); }
.rm-leg-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Phases */
.rm-phase {
  margin-bottom: 1.1rem;
  padding: .75rem .85rem .75rem 1rem;
  border-left: 3px solid var(--beige-2, #e8ddd0);
  border-radius: 0 8px 8px 0;
  background: rgba(255,255,255,.5);
}
.rm-done        { border-left-color:#22c55e; background:rgba(34,197,94,.04); }
.rm-in-progress { border-left-color:#f59e0b; background:rgba(245,158,11,.04); }
.rm-planned     { border-left-color:#94BEEB; background:rgba(148,190,235,.04); }
.rm-future      { border-left-color:#9ca3af; background:rgba(156,163,175,.04); }

.rm-phase-header {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .5rem;
}
.rm-status-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.rm-done .rm-status-dot        { background:#22c55e; }
.rm-in-progress .rm-status-dot { background:#f59e0b; }
.rm-planned .rm-status-dot     { background:#94BEEB; }
.rm-future .rm-status-dot      { background:#9ca3af; }

.rm-version {
  font-size: .92rem; font-weight: 700;
  color: var(--brown-900, #2c1810);
}
.rm-status-label {
  font-size: .68rem; color: var(--muted, #9ca3af);
  margin-left: auto; white-space: nowrap;
}
.rm-list { margin: 0; padding-left: 1.1rem; }
.rm-list li { font-size: .8rem; color: var(--text); margin-bottom: .2rem; line-height: 1.5; }

/* ── FAB (floating action button mobile) ─────────────── */
.fab-btn {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 56px; height: 56px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.55rem; line-height: 1;
  box-shadow: 0 4px 18px rgba(205,99,31,.55);
  text-decoration: none;
  z-index: 1040;
  transition: transform .15s, box-shadow .15s;
}
.fab-btn:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(205,99,31,.65); }
.fab-btn:active { transform: scale(.95); }

/* ── Confetti ─────────────────────────────────────────── */
.confetti-piece {
  position: fixed;
  top: -12px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg) scaleX(1); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg) scaleX(.3); opacity: 0; }
}

/* ── Badge toast ──────────────────────────────────────── */
.badge-toast {
  position: fixed;
  bottom: 5rem; right: 1.5rem;
  background: var(--brown-900);
  color: #fff;
  border: 1.5px solid rgba(244,196,48,.3);
  border-radius: .9rem;
  padding: .75rem 1.1rem;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 2000;
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  max-width: 280px;
}
.badge-toast.show { transform: translateX(0); }
.badge-toast-icon { font-size: 1.6rem; flex-shrink: 0; }
.badge-toast-title { font-size: .7rem; opacity: .6; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1px; }
.badge-toast-name { font-size: .88rem; font-weight: 700; }

/* ── Score colors global ──────────────────────────────── */
.score-green  { color: #22c55e !important; }
.score-orange { color: #f59e0b !important; }
.score-red    { color: #ef4444 !important; }

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer {
  background: var(--brown-900, #1a0a00);
  border-top: 2px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.5);
  font-size: .82rem;
  padding: 1rem 0 0;
}

/* Grille 3 colonnes */
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.2fr;
  gap: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* ── Col gauche - Brand ── */
.footer-col-brand { display: flex; flex-direction: column; gap: .45rem; }

.footer-brand-row { display: flex; align-items: center; gap: .5rem; }
.footer-brand-icon { font-size: 1.3rem; }
.footer-brand-logo { width: 28px; height: 28px; max-width: 28px; max-height: 28px; object-fit: cover; border-radius: 7px; }
.footer-brand-name { font-weight: 900; font-size: 1rem; color: #fff; letter-spacing: .04em; }

.footer-tagline {
  font-size: .76rem;
  color: rgba(255,255,255,.38);
  font-style: italic;
  line-height: 1.5;
}

.footer-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .15rem; }
.footer-badge {
  font-size: .67rem; font-weight: 700;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 2rem;
  padding: .15rem .55rem;
  color: rgba(255,255,255,.55);
}
.footer-badge-ver { color: var(--accent, #CD631F); border-color: rgba(205,99,31,.3); background: rgba(205,99,31,.08); }

/* ── Col centre - Liens ── */
.footer-col-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.footer-link-group { display: flex; flex-direction: column; gap: .38rem; }
.footer-link-group-title {
  font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  color: rgba(255,255,255,.3);
  margin-bottom: .2rem;
}
.footer-link-group a {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .15s;
  line-height: 1.4;
}
.footer-link-group a:hover { color: #fff; }

/* ── Col droite - Stats ── */
.footer-col-stats { display: flex; flex-direction: column; gap: .45rem; }

.footer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}
.footer-stat {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .5rem;
  padding: .35rem .5rem;
  display: flex; flex-direction: column; gap: .05rem;
}
.footer-stat-val {
  font-size: 1rem; font-weight: 900; color: #fff; line-height: 1.1;
}
.footer-stat-lbl { font-size: .65rem; color: rgba(255,255,255,.38); line-height: 1.3; }

.footer-contact-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; padding: .45rem .8rem;
  background: rgba(205,99,31,.18); border: 1px solid rgba(205,99,31,.35);
  border-radius: .45rem; color: var(--accent, #CD631F);
  font-size: .78rem; font-weight: 700;
  text-decoration: none; transition: background .15s;
  margin-top: auto;
}
.footer-contact-btn:hover { background: rgba(205,99,31,.3); color: var(--accent, #CD631F); }

/* ── Ligne basse ── */
/* ── Footer score guide ── */
.footer-score-guide {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .75rem 0 .5rem;
  margin-bottom: .25rem;
}
.fsg-title {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: rgba(255,255,255,.35);
  margin-bottom: .45rem;
}
.fsg-tiers {
  display: flex; flex-wrap: wrap; gap: .35rem .75rem;
}
.fsg-tier {
  display: flex; align-items: center; gap: .3rem;
  font-size: .72rem; color: rgba(255,255,255,.55);
}
.fsg-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.fsg-icon { font-size: .78rem; }
.fsg-name { font-weight: 500; color: rgba(255,255,255,.7); }
.fsg-range { font-size: .65rem; color: rgba(255,255,255,.3); }

.footer-bottom {
  display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap; padding: .5rem 0;
  font-size: .72rem; color: rgba(255,255,255,.25);
}
.footer-bottom a { color: rgba(255,255,255,.35); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }
.footer-bottom-sep { color: rgba(255,255,255,.15); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 1.5rem; }
  .footer-tagline, .footer-badges { margin: 0; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-col-brand { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .footer-col-links { grid-template-columns: 1fr 1fr; }
  .footer-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Modal Règles ───────────────────────────────────── */
.rules-intro {
  background: rgba(205,99,31,.06);
  border-left: 3px solid var(--accent, #CD631F);
  border-radius: 0 .45rem .45rem 0;
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .87rem;
  color: var(--text, #1a0a00);
}
.rules-section {
  margin-bottom: 1.1rem;
  padding: .85rem 1rem;
  background: var(--beige, #faf6f2);
  border: 1px solid var(--beige-2, #ede0d4);
  border-radius: .55rem;
}
.rules-section-title {
  font-weight: 800; font-size: .92rem;
  color: var(--text, #1a0a00);
  margin-bottom: .55rem;
}
.rules-section ul { margin: 0; padding-left: 1.2rem; }
.rules-section ul li { margin-bottom: .3rem; }
.rules-section-consequences { background: rgba(239,68,68,.03); border-color: rgba(239,68,68,.15); }

.rules-table {
  width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .35rem;
}
.rules-table th {
  background: rgba(0,0,0,.04); padding: .45rem .65rem;
  text-align: left; font-weight: 800; border-bottom: 1.5px solid rgba(0,0,0,.08);
}
.rules-table td { padding: .5rem .65rem; border-bottom: 1px solid rgba(0,0,0,.05); vertical-align: top; }
.rules-table tr:last-child td { border-bottom: none; }

.rules-badge {
  display: inline-block; font-size: .68rem; font-weight: 800;
  padding: .2rem .55rem; border-radius: 2rem; white-space: nowrap;
}
.rules-badge-warn     { background: rgba(245,158,11,.15); color: #92400e; }
.rules-badge-ban-temp { background: rgba(99,102,241,.12); color: #3730a3; }
.rules-badge-ban      { background: rgba(239,68,68,.12);  color: #991b1b; }

/* ── MODALES DOCUMENTATION ────────────────────────────── */
.doc-modal .modal-content {
  border: none;
  border-radius: .85rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.doc-modal-header {
  background: var(--brown-900);
  border-bottom: 1px solid var(--brown-700);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.doc-modal-header .modal-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.doc-modal-sub {
  color: rgba(255,255,255,.45);
  font-size: .8rem;
  margin: .2rem 0 0;
}

.doc-modal-body {
  padding: 1.75rem;
  background: var(--beige);
}

.doc-section {
  margin-bottom: 1.5rem;
}

.doc-section:last-child { margin-bottom: 0; }

.doc-section-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brown-500);
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--brown-100);
}

.doc-list {
  padding-left: 1.25rem;
  margin: .5rem 0 0;
  color: var(--text);
  line-height: 1.8;
}

.doc-info-box {
  background: rgba(148,190,235,.1);
  border: 1px solid rgba(148,190,235,.3);
  border-left: 3px solid var(--blue);
  border-radius: .5rem;
  padding: .85rem 1.1rem;
  font-size: .85rem;
  color: var(--text);
  margin-top: 1rem;
}

.doc-tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.doc-tech-badge {
  background: var(--brown-900);
  color: rgba(255,255,255,.85);
  border-radius: .4rem;
  padding: .3rem .75rem;
  font-size: .8rem;
  font-weight: 500;
}

/* Features grid */
.doc-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 576px) { .doc-features-grid { grid-template-columns: 1fr; } }

.doc-feature-card {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .65rem;
  padding: 1rem;
}

.doc-feature-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }

.doc-feature-card strong { display: block; margin-bottom: .25rem; color: var(--text); }

.doc-feature-card p { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* Bristol grid */
.bristol-doc-grid {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: .75rem;
}

.bristol-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .6rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--brown-100);
}

.bristol-doc-item.bristol-good { border-left-color: #22c55e; }
.bristol-doc-item.bristol-ok   { border-left-color: #f59e0b; }
.bristol-doc-item.bristol-bad  { border-left-color: #ef4444; }

.bristol-doc-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brown-500);
  min-width: 1.5rem;
  line-height: 1;
}

.bristol-doc-item strong { display: block; font-size: .9rem; color: var(--text); }
.bristol-doc-item p { font-size: .8rem; color: var(--muted); margin: .2rem 0 0; }

/* Score/XP grid */
.doc-xp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .5rem;
}

@media (max-width: 576px) { .doc-xp-grid { grid-template-columns: 1fr; } }

.doc-xp-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .5rem;
  padding: .5rem .85rem;
  font-size: .83rem;
  color: var(--text);
}

.doc-xp-val {
  font-weight: 700;
  color: var(--brown-500);
  white-space: nowrap;
}

/* Niveaux */
.doc-levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
  margin-top: .5rem;
}

@media (max-width: 576px) { .doc-levels-grid { grid-template-columns: 1fr 1fr; } }

.doc-level-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .6rem;
  padding: .75rem .5rem;
  text-align: center;
  font-size: .83rem;
}

.doc-level-icon { font-size: 1.5rem; }
.doc-level-item strong { color: var(--text); display: block; }
.doc-level-item .text-muted { font-size: .73rem; }

/* Confidentialité path list */
.doc-path-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .5rem;
}

.doc-path-item {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .6rem;
  padding: .85rem 1rem;
}

.doc-path-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.doc-path-item strong { display: block; margin-bottom: .2rem; color: var(--text); }
.doc-path-item code { display: block; font-size: .78rem; background: var(--beige-2); border-radius: .3rem; padding: .2rem .5rem; margin: .25rem 0; color: var(--brown-700); }
.doc-path-item p { font-size: .8rem; color: var(--muted); margin: 0; }

/* ══════════════════════════════════════════════════════════
   ADMIN SHELL - palette slate/indigo, bien distincte du site
   ══════════════════════════════════════════════════════════ */

/* Variables locales admin */
.admin-shell {
  --adm-bg:       #0d1117;   /* quasi-noir */
  --adm-bg2:      #161b22;   /* fond items */
  --adm-border:   rgba(255,255,255,.07);
  --adm-text:     rgba(255,255,255,.55);
  --adm-text-hi:  #fff;
  --adm-accent:   #6366f1;   /* indigo-500 */
  --adm-accent-g: linear-gradient(135deg, #6366f1, #818cf8);
  --adm-sep:      rgba(255,255,255,.1);
  display: flex;
  width: 100%;
  min-height: calc(100vh - 62px);
  background: #f0f2f5;
}

/* ── Sidebar ──────────────────────────────────────────── */
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  flex-shrink: 0;
  background: var(--adm-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
  border-right: 1px solid var(--adm-border);
}
.admin-sidebar::-webkit-scrollbar { width: 3px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* ── Header ───────────────────────────────────────────── */
.admin-sidebar-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.35rem 1.3rem 1.1rem;
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-sidebar-header .adm-logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--adm-accent-g);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.admin-sidebar-header .adm-title {
  font-size: .82rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--adm-text-hi);
  line-height: 1.1;
}
.admin-sidebar-header .adm-subtitle {
  font-size: .62rem; font-weight: 500;
  color: var(--adm-text);
  letter-spacing: .04em;
}
.adm-admin-badge {
  margin-left: auto;
  font-size: .55rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(99,102,241,.25);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 4px;
  padding: .2rem .45rem;
  flex-shrink: 0;
}

/* ── Navigation ───────────────────────────────────────── */
.admin-nav { padding: .6rem 0 1rem; flex: 1; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .52rem 1.1rem .52rem 1.3rem;
  font-size: .84rem;
  color: var(--adm-text);
  text-decoration: none;
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.admin-nav-item:hover {
  color: var(--adm-text-hi);
  background: rgba(255,255,255,.04);
  border-left-color: rgba(255,255,255,.15);
}
.admin-nav-item.active {
  color: var(--adm-text-hi);
  background: rgba(99,102,241,.12);
  border-left-color: var(--adm-accent);
  font-weight: 600;
}
.admin-nav-item.active .nav-icon svg { stroke: var(--adm-accent); filter: drop-shadow(0 0 4px rgba(99,102,241,.5)); }

.admin-nav-back {
  margin-top: .25rem;
  color: rgba(255,255,255,.3) !important;
  font-size: .8rem;
}
.admin-nav-back:hover { color: rgba(255,255,255,.65) !important; background: rgba(255,255,255,.04) !important; border-left-color: transparent !important; }
.admin-nav-back .nav-icon svg { stroke: rgba(255,255,255,.35); }
.admin-nav-back:hover .nav-icon svg { stroke: rgba(255,255,255,.65); }

/* Vision link accent */
.adm-vision-link .nav-icon svg { stroke: #0ea5e9; }
.adm-vision-link { color: #38bdf8 !important; }

/* Premium link accent */
.adm-premium-link .nav-icon svg { stroke: #a855f7; }
.adm-premium-link { color: #c084fc !important; }

/* Pastille alerte nav */
.adm-nav-badge {
  position: absolute; top: 4px; right: 6px;
  background: #ef4444; color: #fff;
  font-size: .55rem; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; border: 1.5px solid var(--adm-bg);
  pointer-events: none;
}

/* ── Séparateurs de section ───────────────────────────── */
.admin-nav-sep {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
  padding: 1rem 1.3rem .3rem;
}
.admin-nav-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--adm-sep);
}

/* ── Icônes SVG monochromes sidebar ─────────────────── */
.nav-icon {
  width: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255,255,255,.45);
  transition: stroke .15s;
}
.admin-nav-item:hover .nav-icon svg { stroke: rgba(255,255,255,.85); }
.admin-nav-item.active .nav-icon svg { stroke: var(--adm-accent); }
/* Logo header */
.adm-logo-icon svg { stroke: rgba(255,255,255,.7); width: 20px; height: 20px; }

/* ── Badge pastille sur la sidebar Contact ──────────── */
.adm-badge-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #ef4444; color: #fff; font-size: .6rem; font-weight: 800;
  border-radius: 2rem; line-height: 1;
}
/* Visible uniquement quand la sidebar est réduite (icônes seulement) */
.adm-badge-collapsed { display: none; }
/* Sidebar réduite (≤1200px) : cacher le badge inline, montrer l'autre */
@media (max-width: 1200px) {
  .adm-badge-pill:not(.adm-badge-collapsed) { display: none; }
  .adm-badge-collapsed { display: inline-flex; margin-left: auto; }
}

/* ── Contenu principal ────────────────────────────────── */
.admin-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem;
  overflow: auto;
}

/* ── PAGE HEADER ──────────────────────────────────────── */
.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.admin-page-sub {
  font-size: .83rem;
  color: var(--muted);
  margin: .15rem 0 0;
}

/* ── ADMIN KPI GRID ───────────────────────────────────── */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
}

/* ── ADMIN RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1200px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── ADMIN TABLET : sidebar icônes seulement ─────────────── */
@media (max-width: 1024px) {
  .admin-sidebar { width: 68px; min-width: 68px; }
  .admin-sidebar .sidebar-label, .admin-nav-sep { display: none; }
  .admin-sidebar-header { justify-content: center; padding: 1.1rem .5rem; }
  .admin-nav-item {
    justify-content: center;
    padding: .78rem 0;
    overflow: visible;
    position: relative;
  }
  /* Tooltip au survol */
  .admin-nav-item:hover::after {
    content: attr(data-label);
    position: absolute;
    left: 74px; top: 50%;
    transform: translateY(-50%);
    background: #1e2030;
    color: #fff;
    font-size: .75rem;
    white-space: nowrap;
    padding: .3rem .75rem;
    border-radius: .4rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
    pointer-events: none;
    z-index: 9999;
    border: 1px solid rgba(99,102,241,.3);
  }
  .admin-content { padding: 1.5rem 1.25rem; }
}

/* ── ADMIN MOBILE : bottom nav bar ───────────────────────── */
@media (max-width: 600px) {
  /* Shell empilé : contenu en haut, nav fixée en bas */
  .admin-shell { flex-direction: column; min-height: 100vh; }

  /* Barre de nav fixée en bas */
  .admin-sidebar {
    position: fixed;
    bottom: 0; left: 0; right: 0; top: auto;
    width: 100%;
    min-width: 0;
    height: 58px;
    min-height: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    z-index: 1000;
    border-top: 1px solid rgba(255,255,255,.12);
    border-right: none;
    box-shadow: 0 -4px 16px rgba(0,0,0,.35);
    flex-shrink: 0;
    align-items: center;
    padding: 0;
  }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .admin-sidebar-header { display: none; }

  .admin-nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: stretch;
  }
  .admin-nav::-webkit-scrollbar { display: none; }
  /* Séparateurs complètement cachés en mode bottom bar */
  .admin-nav-sep { display: none !important; }

  /* Items : icône + label court en colonne */
  .admin-sidebar .sidebar-label { display: block; font-size: .58rem; margin-top: 2px; opacity: .8; }
  .admin-nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: .55rem .8rem;
    border-left: none;
    border-top: 3px solid transparent;
    border-bottom: none;
    flex-shrink: 0;
    overflow: visible;
    white-space: nowrap;
    min-width: 56px;
    font-size: .7rem;
  }
  .nav-icon { width: auto; }
  .nav-icon svg { width: 18px; height: 18px; }
  .admin-nav-item.active {
    border-left: none;
    border-top-color: var(--brown-300);
    background: rgba(255,255,255,.1);
  }
  .admin-nav-item.active .sidebar-label { opacity: 1; color: #fff; }
  .admin-nav-back {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: .55rem .8rem;
    border-left: none;
    border-top: 3px solid transparent;
    flex-shrink: 0;
    font-size: .7rem;
    min-width: 56px;
  }

  /* Contenu : scroll propre avec padding bottom pour la nav fixe */
  .admin-content {
    margin-left: 0;
    padding: 1rem .75rem 1.5rem;
    padding-bottom: 70px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: calc(100vh - 58px);
  }
  .admin-page-title { font-size: 1.1rem; }
  .admin-page-subtitle, .admin-page-sub { font-size: .78rem; }
  .admin-kpi-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .admin-page-header { gap: .5rem; }
  .admin-page-header h1 { font-size: 1.1rem; }

  /* Rows : colonnes → une seule colonne */
  .admin-row { flex-direction: column; gap: .65rem; }
  .admin-row .flex-1,
  .admin-row .flex-2 { flex: none; width: 100%; }

  /* Cards */
  .admin-card { border-radius: .6rem; }
  .admin-card-body { padding: .85rem; }
  .admin-card-header { padding: .7rem .85rem; font-size: .85rem; }

  /* Tables : scroll horizontal */
  .admin-table-wrap,
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { font-size: .78rem; min-width: 480px; }
  .admin-table thead th { padding: .5rem .65rem; }
  .admin-table tbody td { padding: .55rem .65rem; }

  /* KPI cards plus compactes */
  .admin-kpi-card { padding: .75rem .85rem; gap: .6rem; }
  .kpi-icon { font-size: 1.3rem; }
  .kpi-body .kpi-value { font-size: 1.25rem; }
  .kpi-body .kpi-label { font-size: .65rem; }

  /* Log items */
  .admin-list-item { padding: .6rem .85rem; gap: .5rem; }

  /* Boutons admin pleine largeur sur mobile */
  .btn-admin-action { font-size: .85rem; padding: .65rem .85rem; }

  /* Maintenance/backup/erreurs : wrap si 3 cards */
  #maintenance.admin-row { flex-direction: column; }

  /* Backdrop et modal au-dessus de tout sur mobile (sidebar z-index: 100) */
  .modal-backdrop { z-index: 2000 !important; }
  .modal          { z-index: 2001 !important; }
}

/* ── ADMIN TABLET : tables + header sur 768px ────────────── */
@media (max-width: 768px) {
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 600px; }
  .admin-card-header { flex-wrap: wrap; gap: .4rem; }
  .admin-page-title { font-size: 1rem; }
  .admin-page-sub { font-size: .75rem; }
}

/* ── ADMIN TRÈS PETIT ÉCRAN : KPI 2 colonnes ─────────────── */
@media (max-width: 480px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .admin-kpi-val, .kpi-body .kpi-value { font-size: 1.4rem; }
}

.admin-kpi-card {
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .65rem;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  box-shadow: 0 1px 4px rgba(58,39,84,.08);
}

.admin-kpi-card.accent-green  { border-left: 3px solid #22c55e; }
.admin-kpi-card.accent-red    { border-left: 3px solid #ef4444; }
.admin-kpi-card.accent-orange { border-left: 3px solid #f97316; }
.admin-kpi-card.accent-pink   { border-left: 3px solid var(--pink); }
.admin-kpi-card.accent-cyan   { border-left: 3px solid var(--cyan); }
.admin-kpi-card.accent-yellow { border-left: 3px solid var(--yellow); }

.kpi-icon { font-size: 1.6rem; line-height: 1; }

.kpi-body .kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.kpi-body .kpi-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-top: .15rem;
}

/* ── ADMIN ROW ────────────────────────────────────────── */
.admin-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-row .flex-1 { flex: 1; min-width: 0; }
.admin-row .flex-2 { flex: 2; min-width: 0; }

/* ── ADMIN CARD ───────────────────────────────────────── */
.admin-card {
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .65rem;
  box-shadow: 0 1px 4px rgba(62,32,16,.06);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1.1rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--brown-100);
  background: var(--beige-2);
}

.admin-card-body { padding: 1.1rem; }
.admin-card-body.p-0 { padding: 0; }

.admin-link {
  font-size: .78rem;
  color: var(--brown-500);
  text-decoration: none;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* ── ADMIN LIST ITEMS ─────────────────────────────────── */
.admin-list-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.1rem;
  border-bottom: 1px solid var(--brown-100);
  font-size: .87rem;
}

.admin-list-item:last-child { border-bottom: none; }

.admin-avatar-sm {
  width: 2rem;
  height: 2rem;
  background: var(--brown-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  color: var(--brown-900);
  flex-shrink: 0;
}

/* ── ADMIN TABLE ──────────────────────────────────────── */
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.admin-table thead th {
  padding: .65rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--beige-2);
  border-bottom: 1px solid var(--brown-100);
  white-space: nowrap;
}

.admin-table tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #f5f0eb;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #faf7f4; }

/* ── STATUS BADGES ────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 2rem;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.active   { background: #dcfce7; color: #15803d; }
.status-badge.banned   { background: #fee2e2; color: #b91c1c; }
.status-badge.disabled { background: #f3f4f6; color: #6b7280; }

/* ── TABLE BUTTONS ────────────────────────────────────── */
.btn-table {
  padding: .2rem .5rem;
  font-size: .75rem;
  border-radius: .35rem;
  border: 1.5px solid;
  cursor: pointer;
  background: transparent;
  white-space: nowrap;
  transition: all .12s;
}

.btn-table-secondary { border-color: #d1d5db; color: #6b7280; }
.btn-table-secondary:hover { background: #6b7280; color: #fff; }

.btn-table-danger { border-color: #fca5a5; color: #ef4444; }
.btn-table-danger:hover { background: #ef4444; color: #fff; }

.btn-table-warning { border-color: #fcd34d; color: #d97706; }
.btn-table-warning:hover { background: #d97706; color: #fff; }

.btn-table-success { border-color: #86efac; color: #16a34a; }
.btn-table-success:hover { background: #16a34a; color: #fff; }

/* ── FILTER BUTTONS ───────────────────────────────────── */
.btn-filter {
  padding: .3rem .75rem;
  font-size: .8rem;
  border: 1.5px solid var(--brown-100);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all .12s;
  border-radius: 0;
}

.btn-filter:first-child { border-radius: .4rem 0 0 .4rem; }
.btn-filter:last-child  { border-radius: 0 .4rem .4rem 0; }

.btn-filter.active {
  background: var(--brown-500);
  border-color: var(--brown-500);
  color: #fff;
}

/* ── QUICK ACTION BUTTONS ─────────────────────────────── */
.btn-admin-action {
  display: block;
  padding: .6rem 1rem;
  background: var(--beige-2);
  border: 1.5px solid var(--brown-100);
  border-radius: .5rem;
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: all .15s;
}

.btn-admin-action:hover {
  background: var(--brown-100);
  border-color: var(--brown-300);
  color: var(--brown-700);
}

.btn-admin-action.urgent {
  background: rgba(96,19,6,.06);
  border-color: rgba(96,19,6,.2);
  color: var(--dark-mid);
}

/* ── LOG ELEMENTS ─────────────────────────────────────── */
.log-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brown-300);
  flex-shrink: 0;
}

.log-action {
  font-family: monospace;
  font-size: .8rem;
  background: var(--beige-2);
  padding: .1rem .4rem;
  border-radius: .25rem;
  margin: 0 .25rem;
}

.log-code {
  background: var(--beige-2);
  color: var(--brown-500);
  padding: .15rem .4rem;
  border-radius: .3rem;
  font-size: .8rem;
}

/* ── PHOTO GRID ───────────────────────────────────────── */
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.admin-photo-card {
  background: #fff;
  border: 1px solid var(--brown-100);
  border-radius: .65rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(62,32,16,.06);
}

.admin-photo-img {
  height: 180px;
  overflow: hidden;
  background: var(--beige-2);
}

.admin-photo-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.admin-photo-info { padding: .75rem; }

/* ── EMPTY STATE ──────────────────────────────────────── */
.admin-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.admin-empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── HELPERS ──────────────────────────────────────────── */
.fw-600  { font-weight: 600; }
.text-xs { font-size: .75rem; }
.text-sm { font-size: .85rem; }


/* ══════════════════════════════════════════════════════════
   MOBILE GLOBAL - correctifs responsive (≤ 767px)
   ══════════════════════════════════════════════════════════ */

/* ── Fix iOS zoom : tous les inputs/select/textarea ≥ 16px sur mobile ── */
@media (max-width: 767px) {
  input, select, textarea {
    font-size: 1rem !important;
  }

  /* ── Navbar : version compacte hors menu ouvert ── */
  .navbar-user-info { display: none; }   /* caché quand burger fermé */
  .navbar-user-chip { padding: .26rem .45rem .26rem .26rem; }
  .navbar-ctas { gap: .25rem; }
  .btn-shop-nav { padding: .28rem .6rem !important; font-size: .75rem; }
  .btn-new-entry { padding: .28rem .7rem !important; font-size: .78rem; }
  .navbar-notif-bell { padding: .3rem .45rem !important; min-width: 36px; min-height: 36px; }

  /* ── Cibles tactiles : minimum 44px de hauteur ── */
  .entry-action-btn { min-height: 44px; padding: .3rem .55rem; }
  .btn-filter       { min-height: 44px; padding: .4rem .85rem; }
  .btn-see-more     { min-height: 36px; padding: .3rem .8rem; }
  .btn-table        { min-height: 36px; padding: .3rem .65rem; font-size: .8rem; }

  /* ── Home : hero card ── */
  .home-hero-card { padding: 1.1rem 1rem; }
  .hero-left { min-width: 0; }
  .hero-xp-wrap { max-width: 100%; }
  .btn-hero { min-height: 44px; padding: .55rem 1.1rem; font-size: .88rem; }

  /* ── Formulaire de saisie : cartes ── */
  .ne-card-body { padding: .8rem .75rem; }

  /* ── Modale : padding réduit ── */
  .doc-modal-header { padding: .85rem 1rem; }
  .doc-modal-body   { padding: 1rem; }
  .modal-body       { padding: 1rem; }

  /* ── Table règles : scroll horizontal ── */
  .rules-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rules-table { min-width: 480px; }

  /* ── Quick Bristol (modale entrée rapide) ── */
  .quick-bristol-grid { grid-template-columns: repeat(4, 1fr) !important; }

  /* ── Footer : lisibilité ── */
  .footer-link-group-title { font-size: .72rem; }
  .footer-link-group a     { font-size: .8rem; }

  /* ── Landing page (non connecté) ── */
  .lp-section        { padding: 2.5rem 0; }
  .lp-bristol        { padding: 2rem 1rem !important; }
  .lp-social         { padding: 2rem 1rem !important; }
  .lp-hero-title     { font-size: 1.85rem !important; line-height: 1.2; }
  .lp-section-title  { font-size: 1.55rem !important; }
  .lp-cta-title      { font-size: 1.75rem !important; }
  .lp-step-arrow     { display: none; }

  /* ── Shop : hero ── */
  .sh-hero           { flex-direction: column !important; }
  .sh-hero-right     { display: none !important; }
  .sh-hero-left      { padding: 1.25rem 1rem !important; }
  .sh-hero-name      { font-size: 1.3rem !important; }
  .sh-hero-btn       { min-height: 44px; }

  /* ── Shop : currency bar ── */
  .sh-currency-bar   { flex-shrink: 0; gap: .3rem; }

  /* ── Profile edit : hero ── */
  .pe-hero { flex-direction: column !important; gap: 1rem; }
  .pe-tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap !important; }
  .pe-tabs::-webkit-scrollbar { display: none; }
  .pe-tab  { flex-shrink: 0; }
  .pe-row  { grid-template-columns: 1fr !important; }

  /* ── Dashboard stats ── */
  .sd-row-2, .sd-row-3 { grid-template-columns: 1fr !important; }
  .sd-kpi-grid          { grid-template-columns: 1fr 1fr !important; }
}

/* ── Très petits écrans (≤ 400px) ── */
@media (max-width: 400px) {
  .quick-bristol-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .bristol-picker     { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-ctas          { flex-direction: column; }
  .btn-hero           { width: 100%; justify-content: center; }
  .ne-card-body       { padding: .65rem .6rem; }
}
.text-brown { color: var(--brown-500) !important; }

/* ══════════════════════════════════════
   COULEURS DE PSEUDO
══════════════════════════════════════ */
.uc-red     { color: #ef4444 !important; font-weight:800; }
.uc-blue    { color: #3b82f6 !important; font-weight:800; }
.uc-green   { color: #22c55e !important; font-weight:800; }
.uc-purple  { color: #a855f7 !important; font-weight:800; }
.uc-gold    { color: #f59e0b !important; font-weight:800; text-shadow:0 0 8px rgba(245,158,11,.4); }
.uc-pink    { color: #ec4899 !important; font-weight:800; }
.uc-rainbow { font-weight:800; background:linear-gradient(90deg,#ef4444,#f59e0b,#22c55e,#3b82f6,#a855f7); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; animation:rainbow-shift 3s linear infinite; background-size:200%; }
@keyframes rainbow-shift { 0%{background-position:0%} 100%{background-position:200%} }

/* ══════════════════════════════════════
   EFFETS AVATAR
══════════════════════════════════════ */
.ae-glitch { position:relative; animation:glitch-anim 2.5s infinite; }
@keyframes glitch-anim {
  0%,90%,100% { filter:none; transform:none; }
  91%    { filter:hue-rotate(90deg) saturate(2); transform:translateX(-2px) skewX(-3deg); }
  93%    { filter:hue-rotate(180deg) contrast(1.5); transform:translateX(2px) skewX(3deg); }
  95%    { filter:hue-rotate(270deg) saturate(3); transform:translateX(-1px); }
  97%    { filter:none; transform:translateX(1px); }
}
.ae-pixel { image-rendering:pixelated; filter:contrast(1.3) saturate(1.5); border-radius:4px !important; }

/* ══════════════════════════════════════
   FONDS DE CARTE PROFIL
══════════════════════════════════════ */
.pbg-royal  { background:linear-gradient(135deg,#4c1d95 0%,#7c3aed 40%,#ffd700 100%) !important; color:#fff !important; }
.pbg-space  { background:linear-gradient(135deg,#020617 0%,#0f172a 40%,#1e1b4b 70%,#312e81 100%) !important; color:#e2e8f0 !important; }
.pbg-fire   { background:linear-gradient(135deg,#7f1d1d 0%,#dc2626 40%,#f97316 100%) !important; color:#fff !important; }
.pbg-matrix { background:linear-gradient(135deg,#052e16 0%,#166534 40%,#15803d 100%) !important; color:#86efac !important; }
/* Chips lisibles sur fond coloré */
.pbg-royal .profile-chip, .pbg-space .profile-chip,
.pbg-fire .profile-chip,  .pbg-matrix .profile-chip { background:rgba(255,255,255,.15); color:#fff; }
.pbg-royal .text-muted, .pbg-space .text-muted,
.pbg-fire .text-muted,   .pbg-matrix .text-muted { color:rgba(255,255,255,.7) !important; }
/* ══════════════════════════════════════
   MODAL APPLICATION (PWA INSTALL GUIDE)
══════════════════════════════════════ */
#modalApp .modal-header {
  background: var(--brown-gradient, linear-gradient(135deg,#92400e,#b45309));
  color: #fff;
  border-bottom: none;
  border-radius: .75rem .75rem 0 0;
}
#modalApp .modal-header .btn-close { filter: invert(1); }
#modalApp .modal-content { border-radius: .75rem; border: none; overflow: hidden; }

#modalApp .nav-tabs { border-bottom: 2px solid var(--brown-100, #fef3c7); }
#modalApp .nav-tabs .nav-link {
  color: var(--brown-600, #92400e);
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .6rem 1.2rem;
  transition: color .2s, border-color .2s;
}
#modalApp .nav-tabs .nav-link:hover { color: var(--brown-700, #78350f); }
#modalApp .nav-tabs .nav-link.active {
  color: var(--brown-800, #451a03);
  border-bottom-color: var(--brown-500, #b45309);
  background: transparent;
}

/* Steps list */
.app-steps {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin: .5rem 0;
}
.app-step {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.app-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brown-gradient, linear-gradient(135deg,#92400e,#b45309));
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.app-step-body { flex: 1; }
.app-step-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--brown-800, #451a03);
  margin-bottom: .1rem;
}
.app-step-desc {
  font-size: .82rem;
  color: var(--bs-secondary-color, #6c757d);
  line-height: 1.45;
}
.app-step-desc code {
  background: var(--brown-50, #fffbeb);
  border: 1px solid var(--brown-200, #fde68a);
  color: var(--brown-700, #78350f);
  padding: .1em .35em;
  border-radius: .3em;
  font-size: .82em;
}

/* Install notice banner */
.app-install-notice {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: .5rem;
  padding: .65rem .85rem;
  font-size: .82rem;
  color: #713f12;
  margin-top: .25rem;
}
.app-install-notice .notice-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }

/* Notif section inside modal */
.app-notif-section {
  background: var(--brown-50, #fffbeb);
  border: 1px solid var(--brown-200, #fde68a);
  border-radius: .6rem;
  padding: .85rem 1rem;
}
.app-notif-title {
  font-weight: 700;
  font-size: .92rem;
  color: var(--brown-800, #451a03);
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.app-notif-desc {
  font-size: .82rem;
  color: var(--brown-600, #92400e);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════
   J'AI ENVIE – bannière formulaire nouvelle session
══════════════════════════════════════════════════════ */
.ne-urge-banner {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: linear-gradient(90deg, rgba(239,68,68,.1), rgba(239,68,68,.05));
  border: 1.5px solid rgba(239,68,68,.4);
  border-radius: .8rem;
  padding: .7rem 1rem;
  margin-bottom: .75rem;
  animation: urgePulse 2s ease-in-out infinite;
}
@keyframes urgePulse {
  0%,100% { border-color: rgba(239,68,68,.4); }
  50%      { border-color: rgba(239,68,68,.75); box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
}
.ne-urge-icon  { font-size: 1.5rem; flex-shrink: 0; }
.ne-urge-body  { flex: 1; min-width: 0; font-size: .85rem; color: var(--text); }
.ne-urge-body strong { display: block; font-weight: 800; font-size: .9rem; margin-bottom: .1rem; }
.ne-urge-toggle {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 700; color: var(--text);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.ne-urge-toggle input { accent-color: #ef4444; width: 16px; height: 16px; cursor: pointer; }
.ne-urge-reason {
  background: var(--beige);
  border: 1px solid var(--beige-2);
  border-radius: .65rem;
  padding: .75rem .9rem;
  margin-top: -.25rem;
}
