/* ============================================================
   J.art & Camping-Car — Premium IA centerpiece
   Palette : noir profond / ivoire / doré champagne
   Identité : route nocturne, étoile polaire, sobre & immersif
   ============================================================ */

:root {
  --p-ink: #0A0A0A;
  --p-ink-2: #15140F;
  --p-ink-3: #1F1D17;
  --p-gold: #B89568;
  --p-gold-bright: #D4B98C;
  --p-gold-faint: rgba(184, 149, 104, 0.18);
  --p-ivory: #FAF8F4;
  --p-ivory-soft: #F4EFE3;
  --p-line: #E5DCC8;
  --p-line-dark: rgba(184, 149, 104, 0.22);
}

/* Page background — voile subtil + halo doré très discret en haut */
body.page-dashboard {
  background:
    radial-gradient(900px 500px at 50% -200px, rgba(184, 149, 104, 0.10), transparent 70%),
    var(--p-ivory);
}

/* Le grand grid 3 colonnes — plus respirant */
.dash-3col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 8px;
}
@media (min-width: 980px) {
  .dash-3col {
    grid-template-columns: 280px 1fr 320px;
    gap: 26px;
    align-items: start;
  }
}

/* ============================================================
   CENTERPIECE IA — la pièce maîtresse
============================================================ */
.ia-stage {
  position: relative;
  background:
    radial-gradient(540px 280px at 50% -10%, rgba(184, 149, 104, 0.22), transparent 70%),
    linear-gradient(180deg, #0F0E0A 0%, #15140F 60%, #1A1813 100%);
  color: var(--p-ivory);
  border-radius: 24px;
  padding: 56px 36px 44px;
  text-align: center;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(10, 10, 10, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(184, 149, 104, 0.18);
  margin-bottom: 22px;
}

/* Lignes fines décoratives */
.ia-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, transparent 49.5%, rgba(184, 149, 104, 0.04) 50%, transparent 50.5%),
    radial-gradient(2px 2px at 12% 28%, rgba(184, 149, 104, 0.5), transparent 60%),
    radial-gradient(2px 2px at 88% 70%, rgba(184, 149, 104, 0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 80%, rgba(184, 149, 104, 0.25), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 22%, rgba(184, 149, 104, 0.35), transparent 60%);
  pointer-events: none;
  opacity: 0.7;
}

/* Étoile polaire / boussole — visuel SVG abstrait camping-car */
.ia-orb {
  position: relative;
  width: 92px; height: 92px;
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
}
.ia-orb::before {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(184, 149, 104, 0.35), transparent 70%);
  filter: blur(6px);
  animation: ia-pulse 4.5s ease-in-out infinite;
}
.ia-orb::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(184, 149, 104, 0.40);
  box-shadow: inset 0 0 14px rgba(184, 149, 104, 0.25);
}
.ia-orb svg { position: relative; width: 100%; height: 100%; }

@keyframes ia-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.ia-stage h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--p-ivory);
  margin: 0 0 14px;
}
.ia-stage h1 em { color: var(--p-gold-bright); font-style: italic; font-weight: 400; }
@media (min-width: 700px) { .ia-stage h1 { font-size: 44px; } }

.ia-stage .ia-lede {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(250, 248, 244, 0.78);
  max-width: 540px;
  margin: 0 auto 28px;
}

/* Champ message premium */
.ia-form {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: rgba(250, 248, 244, 0.05);
  border: 1px solid rgba(184, 149, 104, 0.30);
  border-radius: 50px;
  padding: 6px 6px 6px 22px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ia-form:focus-within {
  border-color: rgba(184, 149, 104, 0.65);
  box-shadow: 0 0 0 4px rgba(184, 149, 104, 0.15);
  background: rgba(250, 248, 244, 0.08);
}
.ia-form input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--p-ivory);
  font: inherit;
  font-size: 15px;
  padding: 12px 8px;
  outline: none;
}
.ia-form input::placeholder { color: rgba(250, 248, 244, 0.42); }
.ia-form button {
  background: linear-gradient(135deg, var(--p-gold) 0%, var(--p-gold-bright) 100%);
  color: var(--p-ink);
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(184, 149, 104, 0.35);
}
.ia-form button:hover { box-shadow: 0 6px 18px rgba(184, 149, 104, 0.50); }
.ia-form button:active { transform: scale(0.96); }

/* Réponse IA — bulle */
.ia-reply {
  max-width: 540px;
  margin: 18px auto 0;
  padding: 14px 20px;
  background: rgba(250, 248, 244, 0.06);
  border: 1px solid rgba(184, 149, 104, 0.20);
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(250, 248, 244, 0.92);
  text-align: left;
  display: none;
}
.ia-reply.is-visible { display: block; }
.ia-reply a { color: var(--p-gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.ia-reply a:hover { color: var(--p-ivory); }

/* Raccourcis sous le champ */
.ia-chips {
  margin: 22px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 620px;
}
.ia-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: rgba(250, 248, 244, 0.85);
  background: rgba(250, 248, 244, 0.04);
  border: 1px solid rgba(184, 149, 104, 0.25);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.18s;
}
.ia-chip:hover {
  color: var(--p-ivory);
  background: rgba(184, 149, 104, 0.12);
  border-color: rgba(184, 149, 104, 0.45);
}

.ia-disclaimer {
  margin: 24px 0 0;
  font-size: 11.5px;
  color: rgba(250, 248, 244, 0.42);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
   PANNEAUX LATÉRAUX (gauche aide IA / droite cercles)
============================================================ */
.p-panel {
  background: var(--p-ivory);
  border: 1px solid var(--p-line);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 2px 14px rgba(10, 10, 10, 0.03);
}

.p-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--p-line-soft, #EFEAE0);
}
.p-panel-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--p-ink) 0%, var(--p-ink-2) 100%);
  color: var(--p-gold-bright);
  flex-shrink: 0;
}
.p-panel-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 0;
  line-height: 1.1;
  color: var(--p-ink);
}
.p-panel-head .sub {
  font-size: 12px;
  color: #6B6357;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Liste aides IA (gauche) */
.p-actions {
  list-style: none;
  margin: 0;
  padding: 0;
}
.p-actions li + li { margin-top: 4px; }
.p-actions a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--p-ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, transform 0.06s;
  text-decoration: none;
}
.p-actions a:hover {
  background: var(--p-ivory-soft);
  color: var(--p-ink);
}
.p-actions a:hover .p-arrow { transform: translateX(3px); color: var(--p-gold-bright); }
.p-actions .p-icon {
  width: 28px; height: 28px;
  flex-shrink: 0;
  background: rgba(184, 149, 104, 0.10);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--p-gold-bright);
  font-size: 14px;
}
.p-actions .p-lbl { flex: 1; }
.p-actions .p-arrow {
  color: rgba(10, 10, 10, 0.30);
  transition: transform 0.15s, color 0.15s;
}

/* Discussions privées (droite) */
.p-circles { display: flex; flex-direction: column; gap: 10px; }
.p-circle-card {
  display: block;
  padding: 14px;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--p-ivory) 0%, var(--p-ivory-soft) 100%);
  text-decoration: none;
  color: var(--p-ink);
  transition: border-color 0.18s, transform 0.06s, box-shadow 0.18s;
}
.p-circle-card:hover {
  border-color: var(--p-gold);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.06);
}
.p-circle-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.p-circle-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--p-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.p-circle-name::before {
  content: '◆';
  color: var(--p-gold);
  font-size: 9px;
}
.p-circle-when {
  font-size: 11.5px;
  color: rgba(10, 10, 10, 0.45);
  white-space: nowrap;
}
.p-circle-msg {
  font-size: 13px;
  color: rgba(10, 10, 10, 0.65);
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.p-circle-author { font-weight: 600; color: var(--p-ink); }

.p-circle-empty {
  text-align: center;
  padding: 28px 10px;
  color: rgba(10, 10, 10, 0.55);
  font-size: 13.5px;
  line-height: 1.6;
}
.p-circle-empty .p-empty-mark {
  font-size: 28px;
  color: var(--p-gold);
  display: block;
  margin-bottom: 8px;
}
.p-circle-empty a {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--p-ink);
  border-bottom: 1px solid var(--p-gold);
  padding-bottom: 2px;
}

.p-notice {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--p-ivory-soft);
  border-left: 2px solid var(--p-gold);
  border-radius: 6px;
  font-size: 11.5px;
  color: rgba(10, 10, 10, 0.65);
  line-height: 1.5;
}

.p-cta-all {
  display: block;
  margin-top: 14px;
  text-align: center;
  padding: 10px;
  border: 1px dashed var(--p-line);
  border-radius: 10px;
  font-size: 12.5px;
  color: rgba(10, 10, 10, 0.65);
  text-decoration: none;
  transition: all 0.18s;
}
.p-cta-all:hover {
  border-color: var(--p-gold);
  color: var(--p-ink);
  background: var(--p-ivory-soft);
}

/* ============================================================
   ACTIVITÉ RÉCENTE — sous la centerpiece
============================================================ */
.p-activity {
  margin-top: 22px;
  background: var(--p-ivory);
  border: 1px solid var(--p-line);
  border-radius: 18px;
  padding: 20px 22px;
}
.p-activity-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.p-activity-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 0;
  color: var(--p-ink);
}
.p-activity-head a {
  font-size: 12.5px;
  color: rgba(10, 10, 10, 0.55);
}
.p-activity-head a:hover { color: var(--p-gold-bright); }

.p-act-row {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--p-line-soft, #EFEAE0);
  color: var(--p-ink);
  text-decoration: none;
  transition: background 0.15s;
  border-radius: 6px;
  margin: 0 -8px;
  padding: 12px 8px;
}
.p-act-row:last-child { border-bottom: 0; }
.p-act-row:hover { background: var(--p-ivory-soft); }
.p-act-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--p-ink);
  color: var(--p-gold-bright);
  font-size: 13px;
  flex-shrink: 0;
}
.p-act-body { flex: 1; min-width: 0; }
.p-act-title { font-weight: 600; font-size: 14px; }
.p-act-loc { font-size: 12px; color: rgba(10, 10, 10, 0.55); }
.p-act-meta { text-align: right; font-size: 11.5px; color: rgba(10, 10, 10, 0.55); }

.p-empty-block {
  text-align: center;
  padding: 36px 20px;
  color: rgba(10, 10, 10, 0.55);
}
.p-empty-block .glyph {
  font-size: 32px;
  color: var(--p-gold);
  margin-bottom: 10px;
}
.p-empty-block a {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  border: 1px solid var(--p-gold);
  border-radius: 100px;
  font-size: 13px;
  color: var(--p-ink);
  text-decoration: none;
  transition: all 0.2s;
}
.p-empty-block a:hover {
  background: var(--p-ink);
  color: var(--p-ivory);
  border-color: var(--p-ink);
}

/* ============================================================
   CHAT DRAWER — slide-in à droite, pousse le contenu
============================================================ */
.ai-chat-drawer {
  position: fixed;
  top: 76px;          /* sous le header */
  right: 0;
  bottom: 0;
  width: 400px;
  background: #FAF7F0;
  border-left: 1px solid rgba(201, 164, 92, 0.35);
  box-shadow: -8px 0 32px rgba(10, 10, 10, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 40;
  visibility: hidden;
}
.ai-chat-drawer.is-open { transform: translateX(0); visibility: visible; }

/* Le drawer se pose dans la marge droite — ne pousse PAS le contenu sur desktop.
   Le .container reste centré (max-width 1240px) donc il y a déjà de la marge. */

.acd-head {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201, 164, 92, 0.20);
  display: flex; align-items: center; gap: 12px;
  background: #FFFFFF;
}
.acd-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #050505 0%, #14130F 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #D6B56D;
}
.acd-mark svg { width: 18px; height: 18px; }
.acd-title {
  flex: 1;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0;
  color: #1A1A1A;
}
.acd-title .sub { display: block; font-family: var(--font-body, Inter); font-size: 11px; color: #8A8275; font-style: italic; margin-top: 1px; }
.acd-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(201, 164, 92, 0.35);
  background: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #4A4A4A;
  transition: all 0.15s;
}
.acd-close:hover { background: #C9A45C; color: #FFFFFF; border-color: #C9A45C; }

.acd-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acd-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
}
.acd-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #050505 0%, #14130F 100%);
  color: #FAF7F0;
  border-bottom-right-radius: 4px;
}
.acd-msg.bot {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid rgba(201, 164, 92, 0.30);
  color: #1A1A1A;
  border-bottom-left-radius: 4px;
}
.acd-msg.bot a { color: #A8843E; text-decoration: underline; }
.acd-msg.bot.is-typing { opacity: 0.6; font-style: italic; }
.acd-msg .who {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 4px;
  opacity: 0.65;
}

.acd-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(201, 164, 92, 0.20);
  background: #FFFFFF;
}
.acd-input-row {
  display: flex;
  gap: 6px;
  background: #FAF7F0;
  border: 1px solid rgba(201, 164, 92, 0.35);
  border-radius: 100px;
  padding: 4px 4px 4px 16px;
  align-items: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.acd-input-row:focus-within {
  border-color: #C9A45C;
  box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.15);
}
.acd-input-row input {
  flex: 1; border: 0; background: transparent;
  font: inherit; font-size: 13.5px; padding: 10px 4px; outline: none;
}
.acd-input-row button {
  background: linear-gradient(135deg, #C9A45C 0%, #D6B56D 100%);
  color: #050505; width: 36px; height: 36px;
  border: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.acd-input-row svg { width: 16px; height: 16px; }
.acd-disclaimer { font-size: 10.5px; color: #8A8275; text-align: center; margin: 8px 0 0; letter-spacing: 0.04em; }

/* Responsive : mobile prend toute la largeur */
@media (max-width: 880px) {
  .ai-chat-drawer { width: 100%; top: auto; bottom: 0; height: 78vh; transform: translateY(100%); border-left: 0; border-top: 1px solid rgba(201,164,92,0.35); border-radius: 18px 18px 0 0; }
  .ai-chat-drawer.is-open { transform: translateY(0); }
  body.chat-open .container,
  body.chat-open .site-footer { padding-right: 0; padding-bottom: 78vh; }
}

/* ============================================================
   Refinements globaux discrets — appliqués partout
============================================================ */

/* Halo doré subtil derrière les pages membre */
body.page-moments,
body.page-moment,
body.page-create,
body.page-profile,
body.page-circle,
body.page-confiance,
body.page-passeport {
  background:
    radial-gradient(700px 380px at 50% -180px, rgba(184, 149, 104, 0.07), transparent 70%),
    var(--p-ivory);
}

/* Titres de page : touche serif premium */
.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--p-ink);
  margin-top: 8px;
}

/* Cards : ombre douce et bord ivoire (sans casser les rules existantes) */
.card {
  border: 1px solid var(--p-line);
}

/* Topbar : touche gold-bright sur les liens actifs (override existing) */
.topbar .nav-main a.active::after {
  background: linear-gradient(90deg, transparent, var(--p-gold-bright), transparent);
  height: 1.5px;
}

/* Boutons principaux : refonte premium */
.btn.btn-primary {
  background: linear-gradient(135deg, var(--p-ink) 0%, var(--p-ink-3) 100%);
  color: var(--p-ivory);
  border: 1px solid var(--p-gold);
  border-radius: 100px;
  padding: 12px 26px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.12);
  transition: all 0.18s;
}
.btn.btn-primary:hover {
  background: linear-gradient(135deg, var(--p-ink-2) 0%, var(--p-ink) 100%);
  border-color: var(--p-gold-bright);
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.20);
  transform: translateY(-1px);
}

/* Flash messages : design premium */
.flash {
  border-radius: 12px;
  border-left: 3px solid var(--p-gold);
  background: var(--p-ivory);
  padding: 12px 18px;
  font-size: 14px;
  color: var(--p-ink);
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.04);
}
.flash.flash-error    { border-left-color: var(--danger); }
.flash.flash-success  { border-left-color: var(--success); }
.flash.flash-info     { border-left-color: var(--p-gold); }

/* ============================================================
   Footer/disclaimer + ordre responsive
============================================================ */
@media (max-width: 979px) {
  .dash-3col { grid-template-columns: 1fr; }
  .dash-3col > .ia-stage,
  .dash-3col > .dash-center { order: 1; }
  .dash-3col > .left-panel  { order: 2; }
  .dash-3col > .right-panel { order: 3; }
  .ia-stage { padding: 40px 22px 32px; }
  .ia-stage h1 { font-size: 28px; }
}
