[hidden] { display: none !important; }

/* =========================================================
   VocaMail — styles de l'espace client (complète styles.css)
   ========================================================= */
.muted { color: var(--ink-soft); }
.hint { font-size: .875rem; color: var(--ink-soft); margin: 6px 0 0; }
.center { text-align: center; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.panel h2 { font-size: 1.2rem; }

/* Champs de formulaire communs */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.app-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.app-page select, .app-page textarea,
.auth-page input:not([type="checkbox"]):not([type="radio"]), .auth-page select {
  width: 100%; padding: 11px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid #cbd5e1; border-radius: var(--radius-sm);
}
.app-page textarea { resize: vertical; }
.app-page input:focus, .app-page select:focus, .app-page textarea:focus,
.auth-page input:focus, .auth-page select:focus { border-color: var(--brand); outline: 3px solid rgba(15, 118, 110, .2); outline-offset: 0; }
[aria-invalid="true"] { border-color: #b91c1c !important; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-top: 16px; }
.inline-fields .field { margin-bottom: 0; }
.seats-field input { max-width: 120px; }
fieldset { border: 0; padding: 0; margin: 0 0 28px; }
legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; padding: 0; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.checkbox input, .switch input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.switch { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin: 4px 0 18px; cursor: pointer; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 92px !important; }
.pwd-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--bg-alt); color: var(--ink-soft); font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.form-status { margin: 14px 0 0; font-weight: 600; font-size: .95rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: #b91c1c; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--brand); text-decoration: underline; cursor: pointer; margin-top: 10px; }
.link-btn.danger { color: #b91c1c; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--brand-light); color: var(--brand-dark); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

/* =========================================================
   Pages d'authentification
   ========================================================= */
.auth-page { background: var(--bg-alt); min-height: 100vh; }
.auth-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 20px; padding-bottom: 20px; }
.auth-header p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.signup-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; padding-bottom: 64px; }
.signup-grid h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; }
.summary { position: sticky; top: 24px; margin-top: 92px; }
.summary-plan { font-weight: 700; color: var(--brand); margin: 0; }
.summary-price { font-size: 2rem; font-weight: 800; margin: 0; }
.summary-price small { font-size: .85rem; font-weight: 500; color: var(--ink-soft); }
.summary-today { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 16px 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 5px 0 5px 26px; position: relative; font-size: .95rem; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.login-wrap { max-width: 460px; padding-top: 32px; padding-bottom: 64px; }
.login-wrap h1 { font-size: 1.6rem; margin-bottom: 20px; }

/* Choix de formule */
.plan-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-option { position: relative; cursor: pointer; }
.plan-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan-option-body { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.plan-option-body strong { font-size: 1.1rem; }
.plan-option-price { font-weight: 700; color: var(--brand); }
.plan-option-body small { color: var(--ink-soft); font-size: .82rem; line-height: 1.4; }
.plan-option input:checked + .plan-option-body { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); background: #f0fdfa; }
.plan-option input:focus-visible + .plan-option-body { outline: 3px solid var(--accent); outline-offset: 2px; }
.billing-toggle.compact { margin: 0; }
.billing-toggle.compact .toggle-option { padding: 8px 16px; }

/* =========================================================
   Espace client
   ========================================================= */
.app-page { background: var(--bg-alt); }
.app-header { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.app-user { display: flex; align-items: center; gap: 14px; }
.app-user-name { font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.app-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; }
.app-nav { position: sticky; top: 64px; align-self: start; display: flex; flex-direction: column; gap: 4px; padding: 28px 16px; }
.app-nav a { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .97rem; }
.app-nav a:hover { background: #fff; color: var(--ink); }
.app-nav a[aria-current="page"] { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.app-main { padding: 28px 24px 80px; min-width: 0; }
#vue:focus { outline: none; }
.loading { color: var(--ink-soft); }
.view-head { margin-bottom: 24px; }
.view-head h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }

/* Bannières */
.banner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.banner p { margin: 0; }
.banner-info { background: #ecfeff; border: 1px solid #a5f3fc; }
.banner-warn { background: #fffbeb; border: 1px solid #fcd34d; }
.banner-danger { background: #fef2f2; border: 1px solid #fca5a5; }
.demo-note { font-size: .85rem; color: #92400e; background: #fef3c7; padding: 8px 14px; border-radius: 8px; margin-bottom: 20px; }

/* Progression */
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.progress.is-warn span { background: var(--accent); }
.progress-label { font-size: .85rem; color: var(--ink-soft); margin: 6px 0 0; }

/* Étapes d'installation */
.setup-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.setup-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.setup-step h2 { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; }
.setup-step .num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--line); font-size: .9rem; font-weight: 800; color: var(--ink-soft); }
.setup-step.is-current { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.setup-step.is-current .num { background: var(--brand); border-color: var(--brand); color: #fff; }
.setup-step.is-done .num { background: var(--brand-light); border-color: var(--brand-light); color: var(--brand-dark); font-size: 0; }
.setup-step.is-done .num::after { content: '✓'; font-size: .95rem; }
.success-line { font-size: 1rem; margin: 0 0 4px; }
.example { margin: 0 0 12px; padding: 14px 18px; background: #dcf8c6; border-radius: 12px; font-style: italic; }

.provider-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.provider-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.provider-btn:hover, .provider-btn.is-selected { border-color: var(--brand); background: #f0fdfa; }
.prov-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #fff; font-weight: 800; }
.prov-icon.g { background: #ea4335; }
.prov-icon.ms { background: #0078d4; }
.prov-icon.smtp { background: var(--ink-soft); }
.sub-form { margin-top: 18px; padding: 20px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.inline-details { margin: 12px 0 0; }
.inline-details summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: .92rem; }
.inline-details[open] summary { margin-bottom: 12px; }

.wa-activate { display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.wa-activate p { margin-bottom: 10px; }
.code-display { display: inline-block; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: .12em; background: var(--bg-alt); border: 2px dashed var(--brand); border-radius: 10px; padding: 8px 18px; color: var(--brand-dark); }
.qr { margin: 0; text-align: center; flex: none; }
.qr img { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.qr figcaption { font-size: .78rem; color: var(--ink-soft); max-width: 150px; margin-top: 6px; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--whatsapp); margin-right: 6px; animation: pulse 1.4s ease-in-out infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: .25; } }

/* Utilisateurs */
.member-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.member-head > div:nth-child(2) { flex: 1; min-width: 180px; }
.member-head h2 { margin: 0; font-size: 1.1rem; }
.member-head p { margin: 0; font-size: .9rem; }
.avatar-sm { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); font-weight: 800; }
.upsell { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: #f0fdfa; border-color: #99f6e4; }
.upsell p { margin: 0; flex: 1; min-width: 240px; }

.status-pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.status-pill.ok { background: #dcfce7; color: #166534; }
.status-pill.info { background: #e0f2fe; color: #075985; }
.status-pill.warn { background: #fef3c7; color: #92400e; }
.status-pill.danger { background: #fee2e2; color: #991b1b; }

/* Abonnement */
.current-plan { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px 32px; }
.current-plan h2 { font-size: 1.6rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.current-plan p { margin-bottom: 6px; }
.cp-price { font-size: 1.4rem; font-weight: 800; }
.cp-price small { font-size: .85rem; font-weight: 500; color: var(--ink-soft); }
.usage-count { font-size: 1.1rem; }
.usage-count strong { font-size: 1.8rem; }
.cp-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; }
.cp-actions .link-btn { margin: 0 0 0 auto; }
.chooser-total { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.chooser-total > div { display: flex; flex-direction: column; }
.chooser-total strong { font-size: 1.5rem; }
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.table td:nth-child(3) { white-space: normal; min-width: 200px; }
.table .actions { text-align: right; }
.danger-zone { border-color: #fecaca; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; max-width: calc(100% - 32px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #b91c1c; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .signup-grid { grid-template-columns: 1fr; }
  .summary { position: static; margin-top: 0; order: -1; }
  .app-layout { grid-template-columns: minmax(0, 1fr); }
  .app-nav { position: sticky; top: 64px; z-index: 20; flex-direction: row; overflow-x: auto; padding: 10px 16px; background: var(--bg-alt); border-bottom: 1px solid var(--line); gap: 6px; }
  .app-nav a { white-space: nowrap; padding: 9px 12px; font-size: .9rem; }
  .current-plan { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .plan-picker, .provider-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .wa-activate { flex-direction: column; align-items: flex-start; }
  .panel, .setup-step { padding: 20px 16px; }
  .app-main { padding: 20px 16px 64px; }
  .app-header { padding: 0 16px; }
  .app-user-name { display: none; }
  .cp-actions .link-btn { margin-left: 0; }
  .code-display { font-size: 1.3rem; }
}

/* Aide & support */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }
.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ticket-row:hover { background: var(--bg-alt); }
.ticket-row .muted { grid-column: 1; font-size: .85rem; }
.ticket-row .status-pill { grid-row: 1 / span 2; grid-column: 2; }
.ticket-subject { font-weight: 600; }
.ticket-row.is-unread .ticket-subject { font-weight: 800; }
.dot-unread { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; margin-right: 8px; vertical-align: middle; }
.status-pill.neutral { background: var(--line); color: var(--ink-soft); }
.help-links { margin: 0; padding-left: 20px; }
.help-links li { margin: 6px 0; }
.back-link { font-weight: 600; text-decoration: none; }
.thread { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.msg-out { align-self: flex-end; background: #ecfdf5; border-color: #a7f3d0; }
.msg-in { align-self: flex-start; }
.msg-meta { font-size: .82rem; color: var(--ink-soft); margin: 0 0 6px; }
.msg-body { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 720px) { .msg { max-width: 100%; } .ticket-row { grid-template-columns: 1fr; } .ticket-row .status-pill { grid-row: auto; grid-column: 1; justify-self: start; } }

/* E-mails envoyés */
.mail-head { display: grid; grid-template-columns: 120px 1fr; gap: 6px 16px; margin: 0 0 20px; font-size: .93rem; }
.mail-head dt { color: var(--ink-soft); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { border-top: 1px solid var(--line); padding-top: 18px; line-height: 1.65; overflow-wrap: anywhere; }
@media (max-width: 720px) { .mail-head { grid-template-columns: 1fr; } .mail-head dd { margin-bottom: 6px; } }

.pack-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pack-form select { width: auto !important; min-width: 230px; max-width: 100%; }

.app-nav .app-legal { margin: 18px 14px 0; font-size: .78rem; color: var(--ink-soft); line-height: 1.8; }
.app-nav .app-legal a { display: inline; padding: 0; color: var(--ink-soft); font-weight: 500; text-decoration: underline; box-shadow: none; background: none; }
@media (max-width: 960px) { .app-nav .app-legal { display: none; } }
