:root {
  --brand:#0b2a5a;
  --accent:#ff2e8a;
  --muted:#6b7280;
  --border:#e5e7eb;
  --bg:#f8fafc;
}

* { box-sizing: border-box; }
body {
  margin:0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background:var(--bg);
  color:#111;
}

.container {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 16px;
}

.brand { color:var(--brand); margin-bottom: 16px; }

/* === AUTHENTIFICATION === */
.auth-container {
  max-width: 420px;
  margin: 80px auto;
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.auth-container header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-container h1 {
  margin: 0;
  font-size: 26px;
  color: var(--brand);
}

.auth-container .tabs {
  display: none; /* on masque la nav Connexion / Inscription */
}

.auth-form {
  display: none;
}

.auth-form.visible {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label { display:grid; gap:6px; font-size:14px; }

input, select, textarea {
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:16px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.select-label select { width: 100%; }

.btn {
  border:none;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}

.btn.primary {
  background:var(--accent);
  color:white;
}

.btn.ghost {
  background:transparent;
  border:1px solid var(--border);
}

.small { font-size: 12px; }
.muted { color: var(--muted); }
.error { color:#b91c1c; margin-top:8px; }

/* Champs spéciaux */
.role-fieldset {
  border:none;
  padding:0;
  margin:8px 0 8px;
  display:flex;
  gap:16px;
}
.radio {
  display:flex;
  align-items:center;
  gap:8px;
}

.section {
  margin-top:18px;
  padding-top:12px;
  border-top:1px dashed var(--border);
}

.summary { margin: 12px 0; }
.actions { display:flex; gap:10px; margin-top:12px; }

/* Paiement : bannière + éléments verrouillés */
.billing-banner {
  background: #fff3cd;
  color: #7a5d00;
  border: 1px solid #ffe69c;
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.billing-banner a {
  font-weight: 700;
  text-decoration: underline;
}

.is-locked,
[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: auto;
  cursor: not-allowed !important;
}

/* --- Messagerie --- */
.chat-layout {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 70vh;
  overflow: hidden;
  margin-top: 16px;
}

.chat-sidebar {
  width: 260px;
  background: #f8fafc;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.chat-sidebar h3 {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

#chat-convos {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

#chat-convos li {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

#chat-convos li:hover {
  background: #f1f5f9;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#chat-box {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

#chat-form {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 8px;
}

#chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Messages */
.msg {
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 10px;
  max-width: 75%;
}

.msg.me {
  background: #2563eb;
  color: white;
  margin-left: auto;
}

.msg.other {
  background: #e5e7eb;
  color: #111;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 720px) {
  .chat-layout {
    flex-direction: column;
    height: auto;
  }
  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: 150px;
  }
}

/* Dashboard layout */
.dashboard {
  display: flex;
  min-height: 80vh;
}

.sidebar {
  width: 220px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 20px;
}

.sidebar h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.menu-item:hover {
  background: #f1f5f9;
}

.menu-item.active {
  background: var(--accent);
  color: white;
}

.main-content {
  flex: 1;
  padding: 20px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.subtab {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  cursor: pointer;
}
.subtab.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.subpanel { display: none; }
.subpanel.active { display: block; }

/* === Tableaux Abonnement === */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pricing-table th,
.pricing-table td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.pricing-table thead th {
  background: var(--brand);
  color: white;
  font-size: 16px;
}

.pricing-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.pricing-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--brand);
}

/* Badges ✔️ ❌ */
.badge-yes, .badge-no {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.badge-yes {
  background: #16a34a20;
  color: #16a34a;
}

.badge-no {
  background: #ef444420;
  color: #ef4444;
}

/* === Modal === */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
}
.modal-content h3 { margin-top: 0; }
:root {
  --brand:#0b2a5a;
  --accent:#ff2e8a;
  --muted:#6b7280;
  --border:#e5e7eb;
  --bg:#f8fafc;
}

* { box-sizing: border-box; }
body {
  margin:0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background:var(--bg);
  color:#111;
}

.container {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 16px;
}

.brand { color:var(--brand); margin-bottom: 16px; }

/* === AUTHENTIFICATION === */
.auth-container {
  max-width: 420px;
  margin: 80px auto;
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.auth-container header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-container h1 {
  margin: 0;
  font-size: 26px;
  color: var(--brand);
}

.auth-container .tabs {
  display: none; /* on masque la nav Connexion / Inscription */
}

.auth-form {
  display: none;
}

.auth-form.visible {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label { display:grid; gap:6px; font-size:14px; }

input, select, textarea {
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:16px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.select-label select { width: 100%; }

.btn {
  border:none;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}

.btn.primary {
  background:var(--accent);
  color:white;
}

.btn.ghost {
  background:transparent;
  border:1px solid var(--border);
}

.small { font-size: 12px; }
.muted { color: var(--muted); }
.error { color:#b91c1c; margin-top:8px; }

/* Champs spéciaux */
.role-fieldset {
  border:none;
  padding:0;
  margin:8px 0 8px;
  display:flex;
  gap:16px;
}
.radio {
  display:flex;
  align-items:center;
  gap:8px;
}

.section {
  margin-top:18px;
  padding-top:12px;
  border-top:1px dashed var(--border);
}

.summary { margin: 12px 0; }
.actions { display:flex; gap:10px; margin-top:12px; }

/* Paiement : bannière + éléments verrouillés */
.billing-banner {
  background: #fff3cd;
  color: #7a5d00;
  border: 1px solid #ffe69c;
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.billing-banner a {
  font-weight: 700;
  text-decoration: underline;
}

.is-locked,
[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: auto;
  cursor: not-allowed !important;
}

/* --- Messagerie --- */
.chat-layout {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 70vh;
  overflow: hidden;
  margin-top: 16px;
}

.chat-sidebar {
  width: 260px;
  background: #f8fafc;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.chat-sidebar h3 {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

#chat-convos {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

#chat-convos li {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

#chat-convos li:hover {
  background: #f1f5f9;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#chat-box {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

#chat-form {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 8px;
}

#chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Messages */
.msg {
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 10px;
  max-width: 75%;
}

.msg.me {
  background: #2563eb;
  color: white;
  margin-left: auto;
}

.msg.other {
  background: #e5e7eb;
  color: #111;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 720px) {
  .chat-layout {
    flex-direction: column;
    height: auto;
  }
  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: 150px;
  }
}

/* Dashboard layout */
.dashboard {
  display: flex;
  min-height: 80vh;
}

.sidebar {
  width: 220px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 20px;
}

.sidebar h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.menu-item:hover {
  background: #f1f5f9;
}

.menu-item.active {
  background: var(--accent);
  color: white;
}

.main-content {
  flex: 1;
  padding: 20px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.subtab {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  cursor: pointer;
}
.subtab.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.subpanel { display: none; }
.subpanel.active { display: block; }

/* === Tableaux Abonnement === */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pricing-table th,
.pricing-table td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.pricing-table thead th {
  background: var(--brand);
  color: white;
  font-size: 16px;
}

.pricing-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.pricing-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--brand);
}

/* Badges ✔️ ❌ */
.badge-yes, .badge-no {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.badge-yes {
  background: #16a34a20;
  color: #16a34a;
}

.badge-no {
  background: #ef444420;
  color: #ef4444;
}

/* === Modal === */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
}
.modal-content h3 { margin-top: 0; }

/* ====== AJOUTS LÉGERS (ne touche pas le menu) ====== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.badge {
  background:#e5e7eb;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
}

#calendar {
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:8px;
}
