/*
 * ARES SOCIAL V10.1
 * Couche visuelle isolée.
 * Aucun changement API, IA ou mémoire.
 */

.app.mode-rp:not(.rp84-legacy) {
  --as-bg: #09090d;
  --as-surface: #141319;
  --as-surface-2: #1e1b25;
  --as-border: rgba(255,255,255,.09);
  --as-text: #f8f7fb;
  --as-muted: #aaa5b5;
  --as-purple: #a276ff;
  --as-orange: #ff9a54;
}

/* Navigation ordinateur */

.app.mode-rp #ares-rp-v84-nav {
  background: #0b0a0f;
  border-right: 1px solid var(--as-border);
  padding: 29px 16px 20px;
}

.app.mode-rp .rp84-brand {
  padding: 0 12px;
  margin-bottom: 44px;
  font-weight: 800;
  letter-spacing: -.7px;
}

.app.mode-rp .rp84-brand span {
  color: var(--as-purple);
}

.app.mode-rp .rp84-links {
  gap: 6px;
}

.app.mode-rp .rp84-links button {
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 14px 16px;
  transition: background .18s ease, border-color .18s ease;
}

.app.mode-rp .rp84-links button:hover {
  background: #201b2a;
}

.app.mode-rp .rp84-links button[aria-current="page"] {
  background: linear-gradient(110deg,#30213e,#201925);
  border-color: rgba(162,118,255,.24);
  color: #fff;
}

.app.mode-rp .rp84-links button[aria-current="page"] span {
  color: var(--as-purple);
}

/* Espace principal */

.app.mode-rp.rp87-open #rp87-root:not([hidden]) {
  background: var(--as-bg);
  color: var(--as-text);
}

#rp87-root .rp87-top {
  background: rgba(14,13,19,.96);
  border-bottom: 1px solid var(--as-border);
}

#rp87-root #rp87-title {
  font-weight: 800;
  letter-spacing: -.65px;
}

#rp87-root #rp87-body {
  scrollbar-color: #393044 transparent;
}

/* Explorer */

#rp87-root .rp87-explore {
  max-width: 1120px;
  padding-top: 34px;
}

#rp87-root #rp87-search,
#rp87-root #rp87-filter {
  background: #19161f;
  border: 1px solid #38313f;
  border-radius: 15px;
  min-height: 48px;
  transition: border-color .2s;
}

#rp87-root #rp87-search:focus,
#rp87-root #rp87-filter:focus {
  border-color: var(--as-purple);
}

#rp87-root .rp87-grid {
  gap: 15px;
}

#rp87-root .rp87-card-v7 {
  background: linear-gradient(150deg,#201b29,#121016);
  border: 1px solid #37303f;
  border-radius: 20px;
  transition: transform .18s, border-color .18s;
}

#rp87-root .rp87-card-v7:hover {
  transform: translateY(-3px);
  border-color: #8058bd;
}

#rp87-root .rp87-card-v7 .rp87-face {
  border: 2px solid rgba(162,118,255,.7);
  padding: 2px;
}

#rp87-root .rp87-card-v7 strong {
  color: #faf8ff;
}

/* Profils des personnages */

#rp87-root .rp93-profile {
  max-width: 1050px;
  padding-top: 32px;
}

#rp87-root .rp93-profile .rp87-character-head {
  padding: 24px 16px;
  border-bottom: 1px solid var(--as-border);
}

#rp87-root .rp93-profile .rp87-character-head .rp87-face {
  width: 126px;
  height: 126px;
  border: 3px solid var(--as-purple);
  padding: 3px;
  background: #19131f;
}

#rp87-root .rp93-profile h2 {
  font-size: clamp(23px,3vw,31px);
  letter-spacing: -.8px;
}

#rp87-root .rp93-handle {
  color: var(--as-purple);
  font-weight: 600;
}

#rp87-root .rp93-bio {
  color: #d1cbd9;
  line-height: 1.7;
  text-align: center;
}

#rp87-root .rp93-stats {
  gap: clamp(24px,5vw,65px);
  padding: 15px 0;
}

#rp87-root .rp93-stat strong {
  font-size: 23px;
  color: #fff;
}

#rp87-root .rp93-actions {
  gap: 10px;
}

#rp87-root .rp93-actions button {
  min-height: 42px;
  padding: 10px 22px;
  border-radius: 11px;
  font-weight: 700;
}

#rp87-root .rp93-actions .rp87-button {
  background: linear-gradient(115deg,#8746e9,#b36bff);
}

#rp87-root .rp93-follow {
  background: #292332;
  border: 1px solid #53435f;
}

#rp87-root .rp93-heading {
  text-align: left;
  font-size: 19px;
  padding: 0 8px;
}

#rp87-root .rp93-posts {
  gap: 5px;
}

#rp87-root .rp93-tile {
  position: relative;
  border-radius: 3px;
  background: #211b28;
  transition: filter .18s;
}

#rp87-root .rp93-tile:hover {
  filter: brightness(1.16);
}

#rp87-root .rp93-detail {
  max-width: 760px;
}

#rp87-root .rp93-detail-image {
  border-radius: 14px;
}

#rp87-root .rp93-comment {
  background: #201b29;
  border: 1px solid var(--as-border);
  border-radius: 13px;
}

/* Messagerie */

#rp87-root .rp87-inbox-left {
  background: #100e14;
}

#rp87-root .rp87-row {
  transition: background .16s;
}

#rp87-root .rp87-row:hover {
  background: #282131;
}

#rp87-root .rp87-thread-page {
  background: #0d0c11;
}

#rp87-root .rp87-thread-header {
  background: #141119;
  border-bottom: 1px solid var(--as-border);
}

#rp87-root .rp87-bubble {
  border-radius: 19px;
  line-height: 1.7;
}

#rp87-root .rp87-bubble.mine {
  background: linear-gradient(120deg,#713bd2,#9859ed);
  border-bottom-right-radius: 5px;
}

#rp87-root .rp87-bubble.theirs {
  background: #27232f;
  border-bottom-left-radius: 5px;
}

#rp87-root .rp87-composer {
  background: #100e14;
  border-top: 1px solid var(--as-border);
}

#rp87-root .rp87-composer form {
  background: #231e2b;
  border: 1px solid #40344c;
}

/* Accessibilité */

#rp87-root button:focus-visible,
.app.mode-rp .rp84-links button:focus-visible {
  outline: 2px solid var(--as-purple);
  outline-offset: 3px;
}

/* Mobile */

@media (max-width:860px) {

  .app.mode-rp #ares-rp-v84-nav {
    padding: 4px 5px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid #302839;
    border-right: 0;
    background: rgba(12,10,17,.97);
  }

  .app.mode-rp .rp84-links {
    justify-content: space-around;
  }

  .app.mode-rp .rp84-links button {
    min-width: 0;
    padding: 6px 2px;
    border-radius: 10px;
    font-size: 10px;
    gap: 2px;
  }

  .app.mode-rp .rp84-links button span {
    font-size: 23px;
  }

  #rp87-root .rp87-top {
    min-height: 59px;
    padding: 0 15px;
  }

  #rp87-root #rp87-title {
    font-size: 21px;
  }
}

@media (max-width:620px) {

  #rp87-root .rp87-explore {
    padding: 17px 12px 90px;
  }

  #rp87-root .rp87-grid {
    gap: 9px;
  }

  #rp87-root .rp87-card-v7 {
    min-height: 166px;
    border-radius: 15px;
    padding: 14px 7px;
  }

  #rp87-root .rp93-profile {
    padding: 10px 10px 90px;
  }

  #rp87-root .rp93-profile .rp87-character-head {
    padding: 20px 4px;
  }

  #rp87-root .rp93-profile .rp87-character-head .rp87-face {
    width: 98px;
    height: 98px;
  }

  #rp87-root .rp93-stats {
    gap: 23px;
  }

  #rp87-root .rp93-stat strong {
    font-size: 19px;
  }

  #rp87-root .rp93-actions {
    width: 100%;
  }

  #rp87-root .rp93-actions button {
    flex: 1 1 125px;
  }

  #rp87-root .rp93-posts {
    gap: 3px;
  }

  #rp87-root .rp87-thread-header {
    padding: 7px 13px;
  }

  #rp87-root #rp87-thread-messages {
    padding: 16px 12px;
  }

  #rp87-root .rp87-composer {
    padding: 9px 10px 13px;
  }
}

@media (prefers-reduced-motion:reduce) {
  #rp87-root *,
  .app.mode-rp .rp84-links button {
    transition: none !important;
    animation: none !important;
  }
}
