* { box-sizing: border-box; }
/* Vitrine : cap logo (header) */
img.public-header__logo {
  display: block;
  max-height: 2.5rem; /* 40px */
  max-width: min(10rem, 42vw);
  width: auto;
  object-fit: contain;
  object-position: left center;
}

/* Heros vitrine : fond clair + texte foncé (les utilitaires Tailwind arbitraires peuvent être absents du build) */
.public-hero {
  position: relative;
  overflow: hidden;
  color: #0f172a;
  background: linear-gradient(165deg, #e0f2fe 0%, #f0f9ff 42%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
  scroll-margin-top: 4.5rem; /* ancrage sous le header sticky */
}
/* Contenu du hero (pages produit) : marge haute pour ne pas coller au menu */
.public-hero__inner {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .public-hero__inner {
    padding-top: 3.75rem;
    padding-bottom: 4rem;
  }
}
@media (min-width: 1024px) {
  .public-hero__inner {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }
}
.public-hero__lead {
  color: #475569;
  line-height: 1.625;
}
.public-hero__lead strong {
  color: #0f172a;
}
.public-hero__eyebrow {
  color: #0369a1;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* Domaines : carte « Recherchez un domaine » remontée sur le bas du hero (sous l’illustration) */
.domains-search-overlap {
  position: relative;
  z-index: 10;
  margin-top: -1.75rem;
  padding-top: 0;
  padding-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .domains-search-overlap {
    margin-top: -2.5rem;
    padding-bottom: 1.75rem;
  }
}
@media (min-width: 1024px) {
  .domains-search-overlap {
    margin-top: -3.5rem;
    padding-bottom: 2rem;
  }
}
.domains-search-overlap__card {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.domains-lookup__result { margin-top: 0.75rem; }
.domains-lookup__result[data-tone="ok"] { color: #166534; }
.domains-lookup__result[data-tone="info"] { color: #0369a1; }
.domains-lookup__result[data-tone="error"] { color: #b91c1c; }
.domains-lookup__result[data-tone="pending"] { color: #64748b; }

.op-loading-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.op-loading-modal__box {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  min-width: 250px;
  text-align: center;
}

.op-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 999px;
  margin: 0 auto 10px;
  animation: opSpin .8s linear infinite;
}

@keyframes opSpin { to { transform: rotate(360deg); } }

.op-results {
  margin-top: .65rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  padding: .75rem;
}

.op-hero {
  background: linear-gradient(135deg, #0f3ecf, #2563eb);
  border-radius: 10px;
  color: #fff;
  padding: .75rem .85rem;
  margin-bottom: .65rem;
}

.op-hero__title {
  font-size: 12px;
  font-weight: 700;
  opacity: .92;
}

.op-hero__domain {
  font-size: 1rem;
  font-weight: 800;
  margin-top: .15rem;
}

.op-hero__meta {
  margin-top: .2rem;
  font-size: 12px;
  opacity: .9;
}

.op-primary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .6rem;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .65rem;
}

.op-sub { font-size: 12px; color: #64748b; margin-top: .2rem; }
.op-price { font-weight: 800; color: #0f172a; }

.op-table-wrap { margin-top: .65rem; }
.op-table-title { font-size: 13px; font-weight: 800; color: #0f172a; margin: 0 0 .35rem; }
.op-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.op-table th, .op-table td { border-bottom: 1px solid #e2e8f0; padding: .45rem .4rem; text-align: left; }
.op-table th { color: #475569; font-weight: 700; }
.op-table tr:last-child td { border-bottom: 0; }

.op-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.op-btn--disabled { background: #e2e8f0; border-color: #e2e8f0; color: #64748b; cursor: not-allowed; }

.op-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
}
.op-badge--ok { color: #166534; background: #dcfce7; }
.op-badge--muted { color: #334155; background: #e2e8f0; }

@media (max-width: 780px) {
  .op-primary {
    grid-template-columns: 1fr;
  }
  .op-price {
    margin-top: .2rem;
  }
}
.public-cta-band {
  color: #ffffff;
  background: linear-gradient(90deg, #0284c7 0%, #0d9488 100%);
  border-top: 1px solid rgba(3, 105, 161, 0.35);
}
.public-cta-band .public-cta-band__ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
}
.public-cta-band .public-cta-band__ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-body, body {
  margin: 0;
  font-family: Inter, "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f4f7fb;
  color: #0f172a;
}

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 260px;
  min-width: 240px;
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* — client : style Zazu (fond clair, icônes, accent “actif”) — */
.app-sidebar--zazu {
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
  padding: 16px 0 20px 0;
}
.zazu-sidebar-brand {
  padding: 0 12px 14px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.zazu-sidebar-brand__link {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.zazu-sidebar-brand__logo {
  display: block;
  max-height: 2.25rem;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.zazu-profile {
  padding: 0 16px 16px 16px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 8px;
}
.zazu-profile__row { display: flex; align-items: center; gap: 10px; }
.zazu-avatar {
  width: 40px; height: 40px; border-radius: 9999px; flex-shrink: 0;
  background: #e2e8f0; color: #0f172a; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; letter-spacing: 0.02em;
  border: 1px solid #d1d5db;
}
.zazu-profile__meta { min-width: 0; flex: 1; }
.zazu-profile__name { display: block; font-size: 13px; font-weight: 700; color: #0f172a; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zazu-profile__email { display: block; font-size: 12px; color: #64748b; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zazu-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.zazu-bottom {
  margin-top: auto; padding: 8px 8px 0; border-top: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 2px;
}
.zazu-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0; border-radius: 0 8px 8px 0;
  color: #334155; text-decoration: none; font-size: 14px; font-weight: 600;
  border: 0 solid transparent; border-left: 3px solid transparent; transition: background 0.12s, color 0.12s;
}
.zazu-link:hover { background: rgba(255, 255, 255, 0.7); color: #0f172a; }
.zazu-link--active {
  background: #ffeeec; color: #0f172a; border-left-color: #e85d4c;
  box-shadow: 0 1px 0 rgba(232, 93, 76, 0.08) inset;
}
.zazu-link__icon { display: flex; color: #64748b; flex-shrink: 0; }
.zazu-link--active .zazu-link__icon { color: #c2410c; }
.zazu-link__text { min-width: 0; }
.zazu-link--subtle { font-weight: 500; }
.zazu-link--subtle .zazu-link__icon { color: #94a3b8; }
.zazu-link--admin { border-left: 0; background: rgba(15, 23, 42, 0.04); }
.zazu-link--admin .zazu-link__icon { color: #0f172a; }
.zazu-brand {
  margin: 16px 12px 0; padding-top: 12px; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.04em; color: #0f1e3a; text-transform: lowercase; border-top: 1px solid #e5e7eb;
}

/* — admin : barre sombre (inchangée) — */
.app-sidebar--admin {
  background: linear-gradient(180deg, #051428 0%, #0a1f3d 100%);
  border-right: 1px solid #0b2a4a;
  padding: 20px 14px;
}
.admin-sidebar-brand__link {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.admin-sidebar-brand__logo {
  display: block;
  max-height: 2.4rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
.app-sidebar--admin .admin-sidebar-brand .brand-sub {
  margin: 10px 0 16px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 500;
}
.app-sidebar--admin .brand-title { font-weight: 800; font-size: 0.98rem; margin: 0; color: #e2e8f0; letter-spacing: 0.02em; }
.app-sidebar--admin .brand-sub { margin: 2px 0 16px; color: #7dd3fc; font-size: 12px; font-weight: 500; }
.app-sidebar--admin .nav-link {
  display: block; padding: 10px 12px; border-radius: 6px; margin-bottom: 4px;
  color: #cbd5e1; text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid transparent;
}
.app-sidebar--admin .nav-link:hover { background: rgba(37, 99, 235, 0.15); color: #f8fafc; }
.app-sidebar--admin .nav-link--active, .app-sidebar--admin .nav-link[aria-current="page"] {
  background: rgba(37, 99, 235, 0.28); color: #fff; border-color: rgba(56, 189, 248, 0.35);
}
.app-sidebar--admin a.text-slate-500 { color: #94a3b8 !important; }
.app-sidebar--admin a.text-slate-500:hover { color: #e2e8f0 !important; }
.app-sidebar--admin .border-slate-200 { border-color: rgba(255, 255, 255, 0.1) !important; }
.brand-title { font-weight: 800; font-size: 0.98rem; margin: 0; color: #0f1e3a; letter-spacing: 0.02em; }
.brand-sub { margin: 2px 0 16px; color: #64748b; font-size: 12px; font-weight: 500; }

.app-main { flex: 1; display: flex; flex-direction: column; }
.app-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 0 rgba(6, 22, 47, 0.04);
}
.topbar-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 12px;
}
.topbar-trail {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.app-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(20rem, 48vw);
}
.app-topbar-user__avatar {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  border: 1px solid #d1d5db;
}
.app-topbar-user__meta { min-width: 0; text-align: right; }
.app-topbar-user__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-topbar-user__email {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .app-topbar-user__email { display: none; }
  .app-topbar-user { max-width: none; }
}
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-outline { background: #fff; color: #0f172a; }

.content-wrap { padding: 20px; }
.muted { color: #6b7280; }
.dashboard-header { margin-bottom: 16px; }
.dashboard-title { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; font-weight: 800; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card, .panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(6, 22, 47, 0.04);
}
.badge, .st-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 4px; text-transform: capitalize; }
.st-badge--ok { background: #dcfce7; color: #166534; }
.st-badge--warn { background: #fef9c3; color: #854d0e; }
.st-badge--err { background: #fee2e2; color: #b91c1c; }
.st-badge--neu { background: #e0f2fe; color: #075985; }
.st-btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; background: #2563eb; color: #fff; font-weight: 600; border-radius: 6px; text-decoration: none; border: 0; font-size: 14px; cursor: pointer; }
.st-btn-primary:hover { background: #1d4ed8; }
.st-btn-ghost { display: inline-flex; border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 0.4rem 0.75rem; font-size: 13px; font-weight: 600; text-decoration: none; color: #0f172a; }
.st-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th, .st-table td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.st-table th { background: #f4f7fb; font-weight: 700; }
.st-table tr:last-child td { border-bottom: 0; }
.st-empty { text-align: center; padding: 2.5rem 1.5rem; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fafafa; }
.stat-label { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.stat-value { font-size: 1.25rem; font-weight: 800; margin: 0; }

.dashboard-main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.panel-title { margin: 0 0 8px; font-size: 0.94rem; font-weight: 700; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.task-list { list-style: none; padding: 0; margin: 0; }
.task-list li { border-bottom: 1px solid #eef0f4; padding: 8px 0; font-size: 14px; }
.task-list li:last-child { border-bottom: 0; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-main-grid { grid-template-columns: 1fr; }
}

/* Hébergement / pricing vitrine : couleurs marque (# arbitraires absents du build Tailwind) */
.pricing-billing {
  position: relative;
  z-index: 20;
  background: #f4f7fb;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
  margin-top: 0;
}
.pricing-billing__intro {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: 1.25rem;
}
.pricing-billing__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.pricing-billing__intro p.pricing-billing__hint {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}
.pricing-billing__hint { display: none; }
@media (min-width: 640px) {
  .pricing-billing__hint { display: block; }
}
.pricing-billing__switch {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto 0.5rem;
  padding: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(6, 22, 47, 0.08);
  gap: 4px;
}
.pricing-billing__segment {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
.pricing-billing__segment--active {
  background: #06162f;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.pricing-billing__segment--idle {
  background: #f1f5f9;
  color: #334155;
}
.pricing-billing__save-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0284c7;
  color: #0ea5e9;
  white-space: nowrap;
}
.pricing-billing__segment--active .pricing-billing__save-badge {
  color: #7dd3fc;
}
.pricing-billing__savings {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 1.5rem;
}
.pricing-billing__savings[hidden] {
  display: none !important;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 1px 2px rgba(6, 22, 47, 0.06);
  background: #fff;
  position: relative;
}
@media (min-width: 640px) {
  .pricing-card { padding: 1.75rem 1.75rem; }
}
.pricing-card--starter {
  border-top: 4px solid #38bdf8;
  background: #fff;
}
.pricing-card--moroccan {
  background: #06162f;
  border-color: #0c2744;
  color: #f8fafc;
  box-shadow: 0 8px 24px rgba(6, 22, 47, 0.18);
}
@media (min-width: 768px) {
  .pricing-card--moroccan { transform: scale(1.02); z-index: 1; }
}
.pricing-card--moroccan h2 { color: #fff; }
.pricing-card--moroccan .pricing-card__amount { color: #fff; }
.pricing-card--moroccan .pricing-card__unit { color: #cbd5e1; }
.pricing-card--moroccan .pricing-card__list { color: #e2e8f0; }
.pricing-card--business {
  background: #f4f7fb;
  border-color: #e2e8f0;
}
.pricing-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #06162f;
  margin: 0;
  line-height: 1.3;
}
.pricing-card--moroccan .pricing-card__title { color: #fff; }
.pricing-card__row-price {
  margin-top: 0.75rem;
  line-height: 1.2;
}
.pricing-card__amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.pricing-card__unit {
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 0.25rem;
}
.pricing-card__list {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  flex: 1 1 auto;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #475569;
}
.pricing-card__list li {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}
.pricing-card__list li::before {
  content: none;
}
.pricing-card__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #38bdf8;
  color: #06162f;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}
.pricing-card__spacer-below-badge {
  padding-top: 0.4rem;
}
.pricing-cta {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-top: 1.5rem;
  text-decoration: none;
  transition: background 0.15s ease;
  cursor: pointer;
  font-size: 0.9375rem;
  border: none;
  box-sizing: border-box;
}
.pricing-cta--blue {
  background: #2563eb;
  color: #fff !important;
}
.pricing-cta--blue:hover { background: #1d4ed8; }
.pricing-cta--navy {
  background: #06162f;
  color: #fff !important;
}
.pricing-cta--navy:hover { background: #0a2040; }
.pricing-billing__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
  margin-top: 0.25rem;
  padding-bottom: 1rem;
}
@media (min-width: 768px) {
  .pricing-billing__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pricing-billing__footer-note {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.5rem;
  padding: 0 1rem 2rem;
}
.pricing-billing__footer-note a { color: #2563eb; font-weight: 600; }
.pricing-billing__footer-note a:hover { text-decoration: underline; }

/* ---- Design system client (light Hostinger-inspired) ---- */
.app-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
.app-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
/* Une seule ligne de cartes « utilisation pack » (défilement si besoin) */
.app-pack-usage-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0 0 4px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.app-pack-usage-rail__card {
  flex: 0 0 auto;
  width: 10.4rem;
  min-width: 9.5rem;
  max-width: 11.5rem;
  scroll-snap-align: start;
}
/* Titres (espace .app-main) : échelle plus compacte partout */
.app-main h1 { font-size: 1.125rem !important; line-height: 1.3; }
.app-main h2 { font-size: 0.94rem !important; line-height: 1.35; }
.app-main h3 { font-size: 0.8125rem !important; line-height: 1.35; }
.app-grid {
  display: grid;
  gap: 12px;
}
.app-muted {
  color: #6b7280;
  font-size: 0.92rem;
}
.app-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  text-transform: capitalize;
}
.app-badge--active { background: #dcfce7; color: #166534; border-color: #86efac; }
.app-badge--pending { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.app-badge--error { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.app-badge--neutral { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.app-button-primary,
.app-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 40px;
  line-height: 1.2;
}
.app-button-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.app-button-primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.app-button-secondary { background: #fff; color: #0f172a; border-color: #cbd5e1; }
.app-button-secondary:hover { background: #f8fafc; }
.app-button--sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}
/* Tableau de bord & CTA moyen (hors page dense) */
.app-button--md {
  min-height: 35px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
}
.app-button--block {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}
.app-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.app-progress span {
  display: block;
  height: 8px;
  background: #2563eb;
}
.app-progress--slim {
  height: 4px;
  margin-top: 0.2rem;
}
.app-progress--slim span {
  height: 4px;
}
.app-badge--sm {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}
.app-site-row {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1.3fr .9fr .9fr 1fr;
  gap: 10px;
  align-items: center;
  background: #fff;
}

/* Densité compacte desktop (sans impacter mobile) */
@media (min-width: 1280px) {
  .content-wrap {
    padding: 16px 18px;
  }

  .app-card {
    padding: 16px 18px;
  }

  .app-grid {
    gap: 10px;
  }

  .app-site-row {
    padding: 12px 14px;
    gap: 8px;
  }

  .st-table th,
  .st-table td {
    padding: 0.5rem 0.6rem;
  }
}

/* ---- Tableau de bord : densité “milieu” (ni XL ni micro), pas d’étirement forcé ---- */
body:has(.dashboard-page) .app-topbar {
  padding: 6px 12px;
}
body:has(.dashboard-page) .topbar-title {
  font-size: 0.8125rem;
  font-weight: 700;
}
body:has(.dashboard-page) .app-topbar-user__avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
body:has(.dashboard-page) .app-topbar-user__name {
  font-size: 11.5px;
}
body:has(.dashboard-page) .app-topbar-user__email {
  font-size: 10.5px;
}
body:has(.dashboard-page) .app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body:has(.dashboard-page) .app-main > .content-wrap {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 8px 10px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body:has(.dashboard-page) .app-button--sm {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
}
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  font-size: 12.5px;
}
.dashboard-page__welcome {
  padding: 8px 10px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  margin: 0 !important;
}
.dashboard-page__welcome .dashboard-page__hello {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-all;
}
.dashboard-page__hello-label {
  font-weight: 600;
  color: #64748b;
  margin-right: 0.2rem;
}
.dashboard-page__sub {
  margin: 0.15rem 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}
.dashboard-page__main {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(220px, 0.75fr);
  gap: 0.5rem 0.6rem;
  align-items: start;
  min-width: 0;
}
.dashboard-page__main--site-only {
  grid-template-columns: 1fr;
}
.dashboard-page__col--side {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
.dashboard-page__card {
  padding: 8px 10px !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  border-radius: 8px !important;
}
.dashboard-page__h2 {
  margin: 0 0 0.3rem;
  font-size: 12.5px !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}
.dashboard-page__row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 0.45rem;
  margin-bottom: 0.3rem;
}
.dashboard-page__meta {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}
.app-pack-usage-rail--dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  margin-top: 0.15rem;
  gap: 0.3rem;
  padding: 0;
  align-content: start;
}
/* Hauteur des cartes ~doublée (+100%) pour la grille « Utilisation (domaine) » uniquement */
.app-pack-usage-rail--dashboard .app-pack-usage-rail__card--compact {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 8px 8px 9px !important;
  border-radius: 6px !important;
  border: 1px solid #e8ecf1 !important;
  box-shadow: none !important;
}
.dashboard-usage__label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 9.5px;
  line-height: 1.2;
  color: #64748b;
  font-weight: 600;
}
.dashboard-usage__dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  display: inline-block;
}
.dashboard-usage__val {
  margin: 0.1rem 0 0;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
}
.dashboard-usage__val strong {
  font-weight: 800;
}
.dashboard-usage__warn {
  margin: 0.1rem 0 0;
  font-size: 9.5px;
  line-height: 1.2;
  color: #b91c1c;
  font-weight: 600;
}
.dashboard-usage__hint {
  margin: 0.1rem 0 0;
  font-size: 9.5px;
  line-height: 1.25;
}
.dashboard-usage__pct {
  margin: 0.05rem 0 0;
  font-size: 9px;
  line-height: 1.2;
}
.dashboard-page__cta {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid #f1f5f9;
}
.dashboard-page__task-list {
  margin: 0.2rem 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  padding: 0;
}
.dashboard-page__task-list li {
  padding: 4px 0;
  font-size: 11.5px;
  border-color: #f1f5f9;
}
.dashboard-page__empty {
  margin: 0.2rem 0 0;
  font-size: 11.5px;
}
.dashboard-page__sites {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.2rem;
}
.dashboard-site-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.4rem;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 11.5px;
}
.dashboard-site-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.dashboard-site-row__domain {
  margin: 0 0 0.1rem;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  word-break: break-all;
  color: #0f172a;
}
.dashboard-site-row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.dashboard-site-row__prov {
  grid-column: 1 / -1;
  padding-top: 0.2rem;
}
.dashboard-site-row .prov-line {
  margin: 0.1rem 0 0;
  font-size: 10.5px;
  line-height: 1.3;
}
.dashboard-site-row .prov-bar {
  margin-top: 0.2rem;
}
.dashboard-page__quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  margin-top: 0.25rem;
}
body:has(.dashboard-page) .app-main .app-muted {
  font-size: 10.5px;
}
body:has(.dashboard-page) .btn {
  padding: 4px 9px;
  font-size: 11.5px;
  min-height: 30px;
  border-radius: 7px;
}
body:has(.dashboard-page) .app-badge--sm {
  font-size: 10px;
  padding: 2px 6px;
}
@media (max-width: 1100px) {
  .app-pack-usage-rail--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-page__main {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .app-pack-usage-rail--dashboard {
    grid-template-columns: 1fr;
  }
  .dashboard-page__quick {
    grid-template-columns: 1fr;
  }
}

.zazu-submenu {
  margin: 10px 8px 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.zazu-submenu__title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.zazu-submenu__link {
  display: block;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
}
.zazu-submenu__link:hover { background: #f8fafc; color: #0f172a; }
.zazu-submenu__link.is-active { background: #eff6ff; color: #1d4ed8; }

@media (max-width: 1100px) {
  .app-site-row { grid-template-columns: 1fr; }
}

/* Focus clavier / accessibilité */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.app-button-primary:focus-visible,
.app-button-secondary:focus-visible,
.st-btn-primary:focus-visible,
.st-btn-ghost:focus-visible,
.zazu-link:focus-visible,
.zazu-submenu__link:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.app-badge--pending {
  background: #fed7aa;
  color: #7c2d12;
  border-color: #fb923c;
}
.app-badge--error {
  background: #fecaca;
  color: #7f1d1d;
  border-color: #f87171;
}
.app-badge--active {
  background: #bbf7d0;
  color: #14532d;
  border-color: #4ade80;
}

.st-btn-primary,
.st-btn-ghost,
.btn {
  min-height: 40px;
}

/* ---- Mobile/tablette polish ---- */
@media (max-width: 1024px) {
  .app-shell {
    flex-direction: column;
    min-height: 100dvh;
  }

  .app-sidebar {
    width: 100%;
    min-width: 0;
    min-height: 0;
    position: static;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .app-sidebar--zazu {
    padding: 10px 0 8px;
    background: #ffffff;
  }

  .zazu-sidebar-brand {
    padding: 0 12px 10px;
    margin-bottom: 8px;
  }

  .zazu-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding: 0 10px 8px;
    scrollbar-width: thin;
  }

  .zazu-link {
    white-space: nowrap;
    border-radius: 10px;
    border-left: 0;
    padding: 9px 12px;
    background: #f8fafc;
    min-height: 40px;
  }

  .zazu-link--active {
    background: #eff6ff;
    border-left: 0;
    color: #1d4ed8;
  }

  .zazu-link__icon {
    width: 18px;
    height: 18px;
  }

  .zazu-bottom {
    margin-top: 0;
    border-top: 0;
    padding: 0 10px 6px;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
  }

  .zazu-submenu {
    margin: 0 10px 8px;
  }

  .zazu-submenu__title {
    font-size: 10px;
  }

  .zazu-submenu__link {
    font-size: 12px;
    padding: 8px 9px;
    min-height: 36px;
  }

  .app-topbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .topbar-title {
    font-size: 0.84rem;
    padding-right: 0;
  }

  .topbar-trail {
    width: 100%;
    justify-content: space-between;
  }

  .content-wrap {
    padding: 14px;
  }

  .app-card {
    padding: 16px;
    border-radius: 12px;
  }

  .app-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .st-table-wrap {
    border-radius: 10px;
  }

  .st-table th,
  .st-table td {
    padding: 0.55rem 0.55rem;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .app-topbar-user {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .app-card {
    padding: 14px;
  }

  .app-button-primary,
  .app-button-secondary,
  .st-btn-primary,
  .st-btn-ghost {
    padding: 9px 11px;
    font-size: 12px;
    min-height: 38px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel,
  .stat-card {
    padding: 13px;
  }
}

/* File manager layout (inspiré, version légère Servotis) */
.fm-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  align-items: start;
}
.fm-sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
.fm-sidebar__search {
  margin-bottom: 10px;
}
.fm-menu {
  display: grid;
  gap: 4px;
}
.fm-menu__item {
  display: block;
  text-decoration: none;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
}
.fm-menu__item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.fm-space {
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}
.fm-main {
  min-width: 0;
}

.db-prefixed-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.db-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .fm-shell {
    grid-template-columns: 1fr;
  }
}

/* File manager v2 (plus proche capture demandee) */
.fmv2-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 12px;
  align-items: start;
}

/* Panneau hébergement : une seule colonne (navigation = menu latéral app global uniquement) */
.fmv2-shell--single {
  grid-template-columns: 1fr;
}

.fmv2-sidebar {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
}

.fmv2-search {
  margin-bottom: 10px;
}

.fmv2-user {
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
  padding: 2px 4px;
}

.fmv2-menu {
  display: grid;
  gap: 4px;
}

.fmv2-menu__item {
  text-decoration: none;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.fmv2-menu__item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.fmv2-space {
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}

.fmv2-meter {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.fmv2-meter > span {
  display: block;
  height: 100%;
  background: #2563eb;
}

.fmv2-main {
  min-width: 0;
}

.fmv2-toolbar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fmv2-toolbar__left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.fmv2-toolbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.fmv2-upload {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.fmv2-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 6px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}

.fmv2-action-btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
}

.fmv2-header {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.fmv2-header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.fmv2-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: .9rem;
}

.fmv2-note {
  margin-bottom: 10px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.fmv2-table-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
}

.fmv2-table thead th {
  background: #f8fafc;
}

.fmv2-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fmv2-action-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  background: #fff;
  color: #334155;
}

@media (max-width: 960px) {
  .fmv2-shell {
    grid-template-columns: 1fr;
  }
}

/* Popup chargement (affichage final géré en inline par loading_overlay_boot.js) */
#nav-loading-overlay.is-active,
.nav-loading-overlay.is-active {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-loading-overlay__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
}

.nav-loading-overlay__spinner {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: nav-loading-spin 0.7s linear infinite;
}

.nav-loading-overlay__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

@keyframes nav-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
