/* ==========================================================================
   KITSUN SYSTEM - Pages de compte, espace client et administration
   ========================================================================== */

/* =================== AUTHENTIFICATION =================== */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 40px clamp(32px, 5vw, 72px);
  background: radial-gradient(80% 60% at 30% 40%, rgba(91, 23, 191, 0.45), transparent 70%), rgba(15, 10, 22, 0.42);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-bd);
}
.auth-side::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('../assets/img/brand-dark.webp') center 40% / cover no-repeat; opacity: 0.22; mix-blend-mode: screen; }
.auth-emblem { width: min(320px, 70%); margin: 0 auto; filter: drop-shadow(0 30px 70px rgba(139, 61, 255, 0.55)); animation: auth-float 7s ease-in-out infinite; }
.auth-side h2 { font-size: clamp(28px, 2.6vw, 38px); max-width: 16ch; }
.auth-points { list-style: none; padding: 0; display: grid; gap: 14px; margin-top: 22px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.auth-points i { font-size: 20px; color: var(--violet-300); margin-top: 2px; }
@keyframes auth-float { 50% { translate: 0 -12px; } }

.auth-main { display: flex; flex-direction: column; padding: 32px clamp(20px, 5vw, 72px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-top .brand { visibility: hidden; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.auth-back:hover { color: var(--text); }
.auth-box { width: 100%; max-width: 460px; margin: auto; padding: 48px 0; }
.auth-box h1 { font-size: clamp(30px, 3vw, 40px); }
.auth-box .lead { margin: 12px 0 30px; color: var(--text-2); }
.auth-box .lead a, .auth-link { color: var(--violet-300); font-weight: 700; }
.auth-box .lead a:hover, .auth-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 52px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); font-size: 19px; }
.password-toggle:hover { color: var(--text); background: rgba(205, 175, 255, 0.06); }
.field-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.field-between button { font-size: 13px; font-weight: 700; color: var(--violet-300); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength span { height: 4px; border-radius: 4px; background: rgba(205, 175, 255, 0.1); transition: background 0.3s ease; }
.strength[data-level='1'] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level='2'] span:nth-child(-n+2) { background: var(--warning); }
.strength[data-level='3'] span:nth-child(-n+3) { background: var(--violet-400); }
.strength[data-level='4'] span { background: var(--success); }
.auth-success { text-align: center; display: grid; justify-items: center; gap: 14px; }
.auth-success .big-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; color: #fff; background: var(--violet); box-shadow: var(--shadow-violet); }
.auth-success p { color: var(--text-2); max-width: 40ch; }
.auth-legal { font-size: 13px; color: var(--text-3); text-align: center; }
.auth-legal a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-top .brand { visibility: visible; }
}

/* =================== COQUILLE APPLICATION =================== */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  background: linear-gradient(180deg, rgba(139, 61, 255, 0.16), transparent 40%), rgba(14, 10, 22, 0.5);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-bd);
  box-shadow: var(--glass-hi);
  overflow-y: auto;
}
.sidebar .brand { padding: 4px 8px; }
.side-cta { width: 100%; height: 54px; font-size: 15.5px; border-radius: 16px; justify-content: flex-start; padding: 0 18px; }
.side-cta i { font-size: 20px; }
.side-cta .side-count { margin-left: auto; }
.side-nav { display: grid; gap: 2px; }
.side-label { padding: 14px 12px 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.side-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--text-2); transition: background 0.2s ease, color 0.2s ease; }
.side-link i { font-size: 20px; }
button.side-link { width: 100%; text-align: left; }
.side-link:hover { background: rgba(205, 175, 255, 0.05); color: var(--text); }
.side-link.is-active { background: rgba(139, 61, 255, 0.14); color: var(--text); box-shadow: inset 2px 0 0 var(--violet-400); }
.side-link.is-active i { color: var(--violet-300); }
.side-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--violet); }
.side-cta .side-count { background: rgba(255, 255, 255, 0.22); }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--glass-bd); box-shadow: var(--glass-hi); }
.side-user > div { min-width: 0; flex: 1; }
.side-user strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-700)); }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-brand { background: rgba(139, 61, 255, 0.16); border: 1px solid rgba(139, 61, 255, 0.35); padding: 6px; }
.avatar-brand img { width: 100%; }
.side-logout { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); font-size: 18px; }
.side-logout:hover { color: var(--danger); background: rgba(255, 122, 138, 0.08); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: var(--z-nav); display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px clamp(16px, 3vw, 36px); background: rgba(11, 8, 16, 0.42); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--glass-bd); }
.topbar h1 { font-size: clamp(20px, 2vw, 24px); font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); place-items: center; font-size: 20px; }
.content { width: 100%; max-width: 1280px; padding: clamp(18px, 3vw, 36px); }
.view { animation: view-in 0.45s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }

.sidebar-backdrop { display: none; }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: var(--z-overlay); left: 0; top: 0; bottom: 0; width: 288px; transform: translateX(-102%); transition: transform 0.45s var(--ease); }
  .nav-open .sidebar { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, 0.6); }
  .nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: calc(var(--z-overlay) - 1); background: rgba(6, 3, 10, 0.6); }
  .menu-btn { display: grid; }
}
@media (max-width: 560px) { .topbar-actions .btn-label { display: none; } .topbar-actions .btn { padding: 0 12px; } }

/* =================== BLOCS COMMUNS =================== */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.panel { padding: clamp(18px, 2.4vw, 26px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2, .panel-head h3 { font-size: 17px; font-weight: 600; }
.panel-head a, .panel-head .link { font-size: 14px; font-weight: 700; color: var(--violet-300); display: inline-flex; align-items: center; gap: 4px; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: clamp(22px, 3vw, 34px); margin-bottom: 18px; overflow: hidden; background: radial-gradient(90% 120% at 100% 0%, rgba(139, 61, 255, 0.42), transparent 55%), var(--glass-bg); }
.welcome h2 { font-size: clamp(24px, 2.6vw, 32px); }
.welcome p { color: var(--text-2); margin-top: 8px; max-width: 54ch; }

.stat { padding: 20px 22px; display: grid; gap: 6px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 14px; font-weight: 600; }
.stat-top i { font-size: 20px; color: var(--violet-300); }
.stat strong { font-family: var(--font-display); font-weight: 600; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; }
.stat small { color: var(--text-3); font-size: 13px; }
.stat.is-alert { border-color: var(--glass-bd-strong); background: linear-gradient(160deg, rgba(139, 61, 255, 0.24), transparent 60%), var(--glass-bg); }

/* Liste de projets */
.project-list { display: grid; gap: 12px; }
.project-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-bd); box-shadow: var(--glass-hi); transition: border-color 0.25s ease, transform 0.25s var(--ease), background 0.25s ease; }
a.project-item:hover { border-color: var(--glass-bd-strong); transform: translateY(-1px); background: linear-gradient(90deg, rgba(139, 61, 255, 0.16), rgba(255, 255, 255, 0.05)); }
.project-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--violet-200); background: rgba(139, 61, 255, 0.14); border: 1px solid rgba(139, 61, 255, 0.3); }
.project-info { min-width: 0; display: grid; gap: 8px; }
.project-info .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-info strong { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.project-info small { color: var(--text-3); font-size: 13px; }
.project-progress { display: flex; align-items: center; gap: 12px; }
.project-progress .progress { flex: 1; height: 8px; }
.project-progress span { font-family: var(--font-display); font-weight: 600; font-size: 15px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.project-side { display: flex; align-items: center; gap: 10px; }
.unread-dot { min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--radius-pill); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--violet); }
@media (max-width: 560px) { .project-item { grid-template-columns: auto minmax(0, 1fr); } .project-side { grid-column: 1 / -1; justify-content: space-between; } }

/* États vides et chargement */
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: clamp(32px, 6vw, 64px) 20px; border-radius: var(--radius-card); border: 1px dashed var(--glass-bd); background: rgba(255, 255, 255, 0.03); }
.empty .empty-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; color: var(--violet-300); background: rgba(139, 61, 255, 0.12); border: 1px solid rgba(139, 61, 255, 0.3); }
.empty h3 { font-size: 19px; }
.empty p { color: var(--text-2); max-width: 44ch; }
.empty .btn { margin-top: 8px; }
.skeleton { border-radius: 14px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.04) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.skel-list { display: grid; gap: 12px; }
.skel-list .skeleton { height: 82px; }

/* Tableaux (admin) */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--glass-bd); background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-hi), var(--glass-shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; padding: 14px 18px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); background: rgba(205, 175, 255, 0.03); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.2s ease; }
.table tbody tr.is-link { cursor: pointer; }
.table tbody tr.is-link:hover { background: rgba(139, 61, 255, 0.05); }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.table .cell-main strong { display: block; }
.table .cell-main small { color: var(--text-3); }
.table .mini-progress { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.table .mini-progress .progress { flex: 1; height: 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { min-height: 42px; height: 42px; padding-top: 8px; padding-bottom: 8px; width: auto; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search .input { width: 100%; padding-left: 42px; }
.toolbar .search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 17px; }
.toolbar .select { background-position: calc(100% - 22px) 18px, calc(100% - 16px) 18px; }
.chips-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { height: 38px; padding: 0 14px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 700; color: var(--text-2); border: 1px solid var(--line-2); transition: all 0.2s ease; }
.chip-btn:hover { color: var(--text); }
.chip-btn.is-active { color: #fff; background: var(--violet); border-color: transparent; }

/* Listes simples (activité, demandes) */
.list { display: grid; }
.list-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.list-item > div { flex: 1; min-width: 0; }
.list-item strong { font-size: 14.5px; display: block; }
.list-item p { font-size: 14px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.list-item small { color: var(--text-3); font-size: 12.5px; }
.list-item .actions { display: flex; gap: 8px; flex: none; }

/* =================== VUE PROJET =================== */
.project-view { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.project-aside { display: grid; gap: 18px; position: sticky; top: 94px; }
.progress-card { padding: 24px; display: grid; gap: 16px; background: radial-gradient(100% 80% at 0% 0%, rgba(139, 61, 255, 0.26), transparent 60%), var(--glass-bg); }
.progress-card .big { font-family: var(--font-display); font-weight: 600; font-size: 64px; line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.progress-card .big small { font-size: 0.42em; color: var(--violet-300); margin-left: 3px; }
.progress-card .progress { height: 12px; }
.progress-card .stage { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 14.5px; }
.progress-card .stage i { color: var(--violet-300); font-size: 18px; }
.meta { display: grid; gap: 10px; font-size: 14px; }
.meta div { display: flex; justify-content: space-between; gap: 12px; }
.meta dt { color: var(--text-3); }
.meta dd { margin: 0; font-weight: 600; text-align: right; }
.brief { white-space: pre-wrap; color: var(--text-2); font-size: 14.5px; overflow-wrap: anywhere; }
.timeline-list { list-style: none; padding: 0; display: grid; gap: 0; }
.timeline-list li { position: relative; padding: 0 0 18px 26px; }
.timeline-list li::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: -6px; width: 2px; background: var(--line-2); }
.timeline-list li:last-child::before { display: none; }
.timeline-list li::after { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--violet-400); }
.timeline-list li:first-child::after { background: var(--violet); box-shadow: 0 0 0 4px rgba(139, 61, 255, 0.2); }
.timeline-list .tl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-3); }
.timeline-list .tl-top strong { color: var(--violet-200); font-family: var(--font-display); font-weight: 600; }
.timeline-list p { font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.project-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.project-switch .select { width: auto; min-width: 240px; max-width: 100%; min-height: 42px; height: 42px; padding-top: 8px; padding-bottom: 8px; background-position: calc(100% - 22px) 18px, calc(100% - 16px) 18px; }
/* Écran moyen / mobile : avancement, puis messagerie, puis journal et détails */
@media (max-width: 1100px) {
  .project-view { grid-template-columns: 1fr; }
  .project-aside { display: contents; }
  .project-aside > .progress-card { order: -2; }
  #chatMount { order: -1; }
}

/* Contrôle admin de la progression */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--violet) 0 calc(var(--v, 0) * 1%), rgba(205, 175, 255, 0.1) calc(var(--v, 0) * 1%)); cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--violet); box-shadow: 0 4px 14px rgba(139, 61, 255, 0.6); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--violet); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row .input { width: 92px; text-align: center; font-family: var(--font-display); font-weight: 600; }
.quick-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-steps button { height: 30px; padding: 0 12px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; color: var(--text-2); border: 1px solid var(--line-2); }
.quick-steps button:hover { color: #fff; border-color: var(--violet); }

/* =================== MESSAGERIE =================== */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 76px - 72px - 60px); min-height: 520px; overflow: hidden; padding: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1; min-width: 0; }
.chat-head strong { display: block; font-size: 15px; }
.chat-head small { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.chat-head small .live { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(94, 224, 160, 0.18); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 20px; scroll-behavior: smooth; overscroll-behavior: contain; }
.chat-list { display: grid; gap: 6px; }
.chat-day { justify-self: center; margin: 14px 0 8px; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; color: var(--text-3); background: rgba(205, 175, 255, 0.05); text-transform: capitalize; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: min(78%, 620px); }
.msg.is-new { animation: msg-in 0.35s var(--ease) both; }
.msg.is-mine { justify-self: end; flex-direction: row-reverse; }
.msg .avatar { width: 30px; height: 30px; font-size: 11px; }
.msg.is-grouped .avatar { visibility: hidden; }
.bubble { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-bd); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.msg.is-mine .bubble { border-radius: 18px 18px 6px 18px; background: linear-gradient(160deg, var(--violet), var(--violet-600)); border-color: transparent; color: #fff; }
.bubble a { text-decoration: underline; text-underline-offset: 2px; }
.bubble .time { display: block; margin-top: 4px; font-size: 11px; opacity: 0.6; text-align: right; }
.bubble .who { display: block; font-size: 12px; font-weight: 800; color: var(--violet-300); margin-bottom: 2px; }
.attachment { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.1); color: inherit; text-align: left; width: 100%; }
.attachment:hover { background: rgba(0, 0, 0, 0.32); }
.attachment i { font-size: 24px; flex: none; }
.attachment span { min-width: 0; display: grid; }
.attachment b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment small { font-size: 12px; opacity: 0.75; }
.attachment-img { display: block; margin-top: 6px; max-width: 260px; border-radius: 12px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.chat-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--text-2); padding: 20px; }
.chat-empty div { display: grid; justify-items: center; gap: 10px; max-width: 36ch; }
.chat-empty i { font-size: 38px; color: var(--violet-300); }
.composer { padding: 14px 16px; border-top: 1px solid var(--glass-bd); background: rgba(10, 6, 16, 0.3); }
.composer-row { display: flex; align-items: flex-end; gap: 10px; }
.composer textarea { flex: 1; min-height: 46px; max-height: 180px; resize: none; padding: 12px 16px; border-radius: 16px; line-height: 1.45; }
.composer .attach-btn { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; color: var(--text-2); border: 1px solid var(--line-2); cursor: pointer; transition: all 0.2s ease; }
.composer .attach-btn:hover { color: var(--text); border-color: var(--violet-400); }
.composer .send-btn { flex: none; width: 46px; height: 46px; padding: 0; border-radius: 14px; }
.composer .send-btn i { font-size: 20px; }
.composer-file { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(139, 61, 255, 0.1); border: 1px solid rgba(139, 61, 255, 0.3); font-size: 13.5px; }
.composer-file span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-file button { color: var(--text-2); font-size: 16px; }
.composer-hint { margin-top: 8px; font-size: 12px; color: var(--text-3); }
@media (max-width: 1100px) { .chat { height: 70dvh; } }

/* =================== ABONNEMENT =================== */
.sub-status { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 24px; margin-bottom: 18px; }
.sub-status h2 { font-size: 22px; margin-top: 6px; }
.sub-status p { color: var(--text-2); margin-top: 4px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-tile { position: relative; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.plan-tile.is-highlight { border-color: var(--glass-bd-strong); background: radial-gradient(100% 60% at 50% 0%, rgba(139, 61, 255, 0.3), transparent 70%), var(--glass-bg); }
.plan-tile.is-current { border-color: rgba(94, 224, 160, 0.5); }
.plan-tile.is-wanted { box-shadow: 0 0 0 2px var(--violet-400), var(--shadow-violet); }
.plan-tile .plan-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-tile h3 { font-size: 22px; }
.plan-tile .price { font-family: var(--font-display); font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.plan-tile .price small { font-family: var(--font-body); font-size: 13.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.plan-tile p { color: var(--text-2); font-size: 14.5px; }
.plan-tile ul { list-style: none; padding: 0; display: grid; gap: 10px; margin-bottom: 8px; }
.plan-tile li { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); }
.plan-tile li i { color: var(--violet-300); font-size: 17px; margin-top: 2px; flex: none; }
.plan-tile .btn { margin-top: auto; }
@media (max-width: 1100px) { .plans-grid { grid-template-columns: 1fr; } }

/* Choix du type de projet (modale "Mon projet") */
.type-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice span { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(10, 6, 16, 0.5); font-size: 13.5px; font-weight: 700; color: var(--text-2); text-align: center; cursor: pointer; transition: all 0.2s ease; }
.type-choice span i { font-size: 24px; }
.type-choice span:hover { border-color: var(--line-3); color: var(--text); }
.type-choice input:checked + span { border-color: var(--violet-400); background: rgba(139, 61, 255, 0.14); color: var(--text); box-shadow: 0 0 0 3px rgba(139, 61, 255, 0.18); }
.type-choice input:checked + span i { color: var(--violet-300); }
.type-choice input:focus-visible + span { outline: 2px solid var(--violet-300); outline-offset: 2px; }
@media (max-width: 560px) { .type-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chat-list:has(.chat-empty) { height: 100%; }

/* Divers */
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: 14.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 14px; }
.back-link:hover { color: var(--text); }
.loading-screen { min-height: 60vh; display: grid; place-items: center; }
.loading-screen img { width: 72px; animation: pulse-logo 1.4s ease-in-out infinite; }
@keyframes pulse-logo { 50% { opacity: 0.4; transform: scale(0.94); } }
