/* Tableau de bord 10nastie : même identité que le site (vert bouteille, mangue, fond vert pâle). */
:root {
  --ink: #14231C; --muted: #3E4F47; --soft: #56655D;
  --green: #0E5A43; --green-dark: #093D2D; --green-tint: #DCEBE2;
  --mango: #F0A320; --mango-tint: #FCE7BF; --mango-ink: #6B4200;
  --ground: #EEF1EC; --line: #DCE3DD; --white: #FFFFFF; --danger: #A1291B; --danger-tint: #F8E1DD;
  --radius: 12px;
  --font: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --display: 'Anybody', 'Public Sans', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--ground); color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: var(--green); } a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--display); font-variation-settings: 'wdth' 110; font-weight: 800; font-size: 30px; letter-spacing: -0.01em; }
h2 { font-size: 19px; font-weight: 700; }
p { margin: 0; }

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink); color: #E2EEE8; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: var(--display); font-variation-settings: 'wdth' 115; font-weight: 800; font-size: 21px; padding: 0 8px 20px; }
.sidebar a.nav { display: flex; align-items: center; justify-content: space-between; color: #C9D6CF; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; min-height: 44px; }
.sidebar a.nav:hover { background: rgba(255,255,255,.06); color: var(--white); }
.sidebar a.nav.active { background: var(--green); color: var(--white); }
.nav-label { display: flex; align-items: center; gap: 10px; }
.sidebar .count { background: var(--mango); color: var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.sidebar .footer { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; }
.sidebar .footer button { background: none; border: 0; color: #C9D6CF; padding: 8px 0; cursor: pointer; font: inherit; text-decoration: underline; }
.main { padding: 32px 40px 64px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.muted { color: var(--muted); } .small { font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--green); color: var(--white); }
.btn:hover { background: var(--green-dark); color: var(--white); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: var(--ink); color: var(--white); }
.btn.mango { background: var(--mango); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }

form.stack, .stack { display: flex; flex-direction: column; gap: 14px; }
label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 1px solid #C9D3CC; border-radius: 10px; padding: 11px 12px; width: 100%; font-weight: 400; }
textarea { min-height: 110px; resize: vertical; }
.hint { font-weight: 400; color: var(--soft); font-size: 13px; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 12px; }
.checklist .tick { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--mango-tint); color: var(--mango-ink); }
.checklist li.done .tick { background: var(--green-tint); color: #0B4A37; }
.checklist li.done .label { color: var(--soft); text-decoration: line-through; }
.checklist .label { flex: 1; font-weight: 600; }
.big-link { text-decoration: none; color: var(--ink); gap: 6px; }
.big-link:hover { border-color: var(--green); color: var(--ink); }
.big-number { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flash { padding: 14px 16px; border-radius: 12px; background: var(--green-tint); color: #0B4A37; font-weight: 500; }
.flash.error { background: var(--danger-tint); color: var(--danger); }
.flash.warn { background: var(--mango-tint); color: var(--mango-ink); }
.secret { font-family: 'JetBrains Mono', ui-monospace, monospace; background: var(--ink); color: #E2EEE8; padding: 12px 14px; border-radius: 10px; word-break: break-all; }

.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .row { display: flex; justify-content: space-between; font-size: 14px; }
.bar { height: 10px; background: #E3EAE5; border-radius: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.bar.warn > span { background: var(--mango); }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 13px; color: var(--soft); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px; border-bottom: 1px solid #EDF1EE; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #E8ECEA; color: var(--muted); }
.chip.ok { background: var(--green-tint); color: #0B4A37; }
.chip.wait { background: var(--mango-tint); color: var(--mango-ink); }
.chip.bad { background: var(--danger-tint); color: var(--danger); }

/* Boîte partagée */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 64px); background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-tools { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 32px; }
.tabs button[aria-pressed=true] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.conv-items { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid #EDF1EE; cursor: pointer; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; }
.conv:hover, .conv[aria-current=true] { background: #F4F8F5; }
.avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--green-tint); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.conv .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conv .top { display: flex; justify-content: space-between; gap: 8px; }
.conv .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .preview { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread { background: var(--mango); color: var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 0 7px; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.thread-head select { width: auto; padding: 8px 10px; }
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: #F7F9F7; }
.bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.in { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--green-tint); border-bottom-right-radius: 4px; }
.bubble .meta { display: block; font-size: 12px; color: var(--soft); margin-top: 4px; }
.bubble img { max-width: 260px; border-radius: 8px; display: block; }
.composer { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; }
.composer .row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 160px; }
.presence { font-size: 13px; font-weight: 600; color: var(--green); padding: 6px 20px; background: var(--green-tint); border-bottom: 1px solid var(--line); }
.presence.typing { color: var(--mango-ink); background: var(--mango-tint); }
.collision { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--mango-tint); color: var(--mango-ink); font-size: 14px; }
.collision .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.spell { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #FBFCFB; max-height: 170px; overflow-y: auto; }
.spell-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spell-item .word { font-weight: 700; text-decoration: underline wavy var(--danger); text-underline-offset: 3px; }
.spell-item .word.grammar { text-decoration-color: #2F7FD1; }
.spell-item .msg { color: var(--muted); }
.spell-item button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 3px 10px; cursor: pointer; min-height: 30px; }
.spell-item button.fix { background: var(--green-tint); border-color: var(--green-tint); color: #0B4A37; font-weight: 600; }
.window-note { font-size: 13px; color: var(--mango-ink); background: var(--mango-tint); padding: 8px 12px; border-radius: 8px; }
.empty { margin: auto; text-align: center; color: var(--muted); padding: 40px; }

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth .panel { width: 100%; max-width: 440px; }


/* Pages de connexion et d'inscription */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth__aside { background: var(--green-tint); padding: 48px clamp(32px, 5vw, 72px); display: flex; flex-direction: column; gap: 48px; }
.auth__brand { display: inline-block; align-self: flex-start; }
.auth__brand img { display: block; height: 40px; width: auto; }
.auth__pitch { margin-block: auto; display: flex; flex-direction: column; gap: 28px; max-width: 440px; }
.auth__pitch h2 { font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 800; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.01em; }
.auth__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; font-size: 16px; color: var(--muted); }
.auth__perks li { position: relative; padding-left: 34px; }
.auth__perks li::before { content: ''; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.auth__perks strong { color: var(--ink); }
.auth__legal { font-size: 13px; color: var(--soft); }
.auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 48px 24px; background: var(--white); }
.auth__card { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 24px; }
.auth__head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth__switch { text-align: center; color: var(--muted); }
.auth__switch a { font-weight: 600; }
.auth__back { font-size: 14px; color: var(--soft); text-decoration: none; }
.auth__back:hover { color: var(--green); text-decoration: underline; }
.badge { display: inline-block; background: var(--mango-tint); color: var(--mango-ink); font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field__error { color: var(--danger); font-size: 13px; font-weight: 500; }
input[aria-invalid=true] { border-color: var(--danger); background: #FFF8F7; }
input:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(14, 90, 67, .18); }
.password { position: relative; }
.password input { padding-right: 92px; }
.password__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--green); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.password__toggle:hover { background: var(--green-tint); }
.check a { font-weight: 600; }
.check input { width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.btn--block { width: 100%; min-height: 50px; font-size: 16px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { padding: 20px 24px; gap: 0; }
  .auth__pitch, .auth__legal { display: none; }
  .auth__brand img { height: 34px; }
  .auth__main { justify-content: flex-start; padding: 28px 20px 40px; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .sidebar .footer { margin: 0; border: 0; }
  .main { padding: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 45vh; }
  .messages { min-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Paiement Mobile Money : choix de l'opérateur (logos) et page d'attente. */
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pay-option { position: relative; display: block; cursor: pointer; }
.pay-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pay-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 110px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); font-weight: 600; font-size: 14px; text-align: center; transition: border-color .15s, box-shadow .15s; }
.pay-option:hover .pay-card { border-color: var(--green); }
.pay-option input:checked + .pay-card { border-color: var(--green); background: var(--green-tint); box-shadow: 0 0 0 3px rgba(14, 90, 67, .15); }
.pay-option input:focus-visible + .pay-card { outline: 3px solid var(--mango); outline-offset: 2px; }
.pay-icon { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; }
.pay-wait { display: flex; align-items: center; gap: 16px; }
