/* ================================================================ */
/* app.css — Design system Hosting Manager · Lafias Agency          */
/* Typographie : Plus Jakarta Sans (titres/labels) + Inter (données)*/
/* Icônes : Lucide (MIT) via CDN                                    */
/* ================================================================ */

/* ---- Tokens ---------------------------------------------------- */
:root {
  --hm-bg:           #F7F8FA;
  --hm-surface:      #FFFFFF;
  --hm-text:         #1B2430;
  --hm-muted:        #6B7280;
  --hm-border:       #E5E7EB;
  --hm-border-light: #F3F4F6;
  --hm-accent:       #1F5F5B;
  --hm-accent-dim:   rgba(31, 95, 91, 0.1);
  --hm-accent-soft:  rgba(31, 95, 91, 0.3);
  /* Rouge — badges alerte/critique et cadres stats UNIQUEMENT */
  --hm-rouge:         #B91C1C;
  --hm-rouge-dim:     rgba(185, 28, 28, 0.08);
  /* Teal — expire + liserés + icônes section */
  --hm-alerte:        #B91C1C;               /* rouge — alerte 11-60j       */
  --hm-alerte-dim:    rgba(185, 28, 28, 0.08);
  --hm-alerte-soft:   rgba(185, 28, 28, 0.14);
  --hm-critique:      #B91C1C;               /* rouge — critique ≤10j       */
  --hm-critique-dim:  rgba(185, 28, 28, 0.08);
  --hm-expire:        #1F5F5B;               /* teal plein — expiré         */
  --hm-expire-dim:    rgba(31, 95, 91, 0.14);
  --hm-shadow-xs:    0 2px 6px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  --hm-shadow-sm:    0 4px 12px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.05);
  --hm-sidebar-w:    248px;
  --hm-radius:       12px;
  --hm-radius-sm:    8px;
}

/* ---- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--hm-text);
  background: var(--hm-bg);
  -webkit-font-smoothing: antialiased;
}

/* ================================================================ */
/* Layout                                                           */
/* ================================================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ================================================================ */
/* Sidebar                                                          */
/* ================================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--hm-sidebar-w);
  height: 100vh;
  background: var(--hm-text);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 40;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--hm-accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 16px; height: 16px; color: #fff; }

.logo-name {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.logo-agency {
  font-family: Inter, ui-sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 1px;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
}

.nav-group-label {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.28);
  padding: 10px 10px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 7px;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  margin-bottom: 1px;
  cursor: pointer;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
}

.nav-item.active {
  background: rgba(31, 95, 91, 0.3);
  color: #fff;
}
.nav-item.active svg { color: #74C5C1; }

.nav-item.soon {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.nav-badge-soon {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 600;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Séparateur sidebar */
.sidebar-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 6px 10px;
}

/* User + déconnexion */
.sidebar-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 7px;
  margin-bottom: 2px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hm-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.25;
}
.user-email {
  font-family: Inter, ui-sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.32);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  width: 100%;
  border-radius: 7px;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.13s, color 0.13s;
}
.sidebar-logout svg { width: 14px; height: 14px; }
.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
}

/* ================================================================ */
/* Contenu principal                                                */
/* ================================================================ */

.main-content {
  margin-left: var(--hm-sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  /* Dot-grid CSS — motif de points subtil, couleur de marque */
  background-color: #ECF1F7;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(31,95,91,0.13) 1.5px, transparent 0);
  background-size: 26px 26px;
}

.page-header {
  height: 58px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hm-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-title {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hm-text);
}

.page-meta {
  font-family: Inter, ui-sans-serif;
  font-size: 0.8rem;
  color: var(--hm-muted);
}

.last-sync-badge {
  font-family: Inter, ui-sans-serif;
  font-size: 0.72rem;
  color: var(--hm-muted);
  background: var(--hm-accent-dim);
  border: 1px solid rgba(31, 95, 91, 0.15);
  border-radius: 9999px;
  padding: 3px 10px;
  transition: opacity 0.3s;
}
.last-sync-badge:empty { display: none; }

.page-body {
  padding: 28px 32px;
  flex: 1;
  max-width: 1280px;
  width: 100%;
}

/* ================================================================ */
/* Cartes métriques                                                 */
/* ================================================================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--hm-shadow-xs);
}

.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-icon svg { width: 20px; height: 20px; }

.metric-icon-neutral  { background: var(--hm-accent-dim);  color: var(--hm-accent); }
.metric-icon-alerte   { background: var(--hm-rouge-dim);   color: var(--hm-rouge);  }
.metric-icon-critique { background: var(--hm-rouge);       color: #fff;             }

.metric-info { min-width: 0; }

.metric-value {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--hm-text);
  line-height: 1;
  margin-bottom: 4px;
}
.metric-value-alerte   { color: var(--hm-rouge); }
.metric-value-critique { color: var(--hm-rouge); }

.metric-label {
  font-family: Inter, ui-sans-serif;
  font-size: 0.8rem;
  color: var(--hm-muted);
  white-space: nowrap;
}

/* ================================================================ */
/* En-têtes de section                                              */
/* ================================================================ */

.section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.section-head svg { flex-shrink: 0; }

.section-title {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hm-text);
}

/* ================================================================ */
/* Section "À surveiller" — lignes                                  */
/* ================================================================ */

.alert-list-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  overflow: hidden;
  box-shadow: var(--hm-shadow-xs);
  margin-bottom: 28px;
}

.alert-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hm-border-light);
  cursor: pointer;
  outline: none;
  transition: background 0.12s;
}
.alert-row:last-child  { border-bottom: none; }
.alert-row:hover,
.alert-row:focus { background: #FAFAFA; }

.alert-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-row-icon svg { width: 17px; height: 17px; }

.row-is-alerte   .alert-row-icon { background: var(--hm-alerte-dim);   color: var(--hm-alerte);   }
.row-is-critique .alert-row-icon { background: var(--hm-critique-dim); color: var(--hm-critique); }
.row-is-expire   .alert-row-icon { background: var(--hm-accent);       color: #fff;               }

.alert-row-body { flex: 1; min-width: 0; }

.alert-row-domain {
  display: block;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alert-row-client {
  display: block;
  font-family: Inter, ui-sans-serif;
  font-size: 0.775rem;
  color: var(--hm-muted);
  margin-top: 2px;
}

.alert-row-status { flex-shrink: 0; }

.alert-row-caret { color: var(--hm-muted); flex-shrink: 0; }
.alert-row-caret svg { width: 16px; height: 16px; }

/* ================================================================ */
/* Badges                                                           */
/* ================================================================ */

/* Badges d'expiration */
.badge-expire,
.badge-critique,
.badge-alerte {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  white-space: nowrap;
}

/* Expiré : teal plein + blanc */
.badge-expire   { background: var(--hm-accent);     color: #fff;             }
/* ≤10j : rouge plein + blanc — très urgent */
.badge-critique { background: var(--hm-rouge);      color: #fff;             }
/* 11-60j : rouge doux + rouge — en veille */
.badge-alerte   { background: var(--hm-rouge-dim);  color: var(--hm-rouge);  }

/* Actif : texte discret, aucun fond coloré */
.badge-actif {
  display: inline-flex;
  align-items: center;
  font-size: 0.775rem;
  font-weight: 500;
  font-family: Inter, ui-sans-serif;
  color: var(--hm-muted);
  white-space: nowrap;
}

/* Seul "Secondaire" a un badge — "Principal" est implicite */
.badge-secondaire {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.63rem;
  font-weight: 600;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  margin-left: 7px;
  vertical-align: middle;
  background: #F3F4F6;
  color: #6B7280;
}

.badge-count-alerte,
.badge-count-neutral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
}
.badge-count-alerte  { background: var(--hm-rouge);  color: #fff;             }
.badge-count-neutral { background: #E5E7EB;           color: var(--hm-muted); }

/* ================================================================ */
/* Tableau principal                                                */
/* ================================================================ */

.table-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  overflow: hidden;
  box-shadow: var(--hm-shadow-xs);
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hm-border);
}

.table-title {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hm-text);
}

table { width: 100%; border-collapse: collapse; }

.th-row { background: #FAFBFC; border-bottom: 1px solid var(--hm-border); }

.th-cell {
  padding: 11px 16px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  color: var(--hm-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-align: left;
}
.th-cell:first-child { padding-left: 20px; }
.th-cell:last-child  { padding-right: 20px; text-align: center; }
.th-right            { text-align: right; }

.domain-row {
  border-bottom: 1px solid var(--hm-border-light);
  cursor: pointer;
  outline: none;
  transition: background 0.1s;
}
.domain-row:last-child { border-bottom: none; }
.domain-row:hover,
.domain-row:focus { background: #F5F7FA; }

.domain-row td {
  padding: 14px 16px;
  vertical-align: middle;
  font-family: Inter, ui-sans-serif;
  font-size: 0.875rem;
  color: var(--hm-text);
}
.domain-row td:first-child { padding-left: 20px; }
.domain-row td:last-child  { padding-right: 20px; }

/* Liseré coloré à gauche — intensité proportionnelle à l'urgence */
.row-alerte   { box-shadow: inset 3px 0 0 rgba(31, 95, 91, 0.35); }
.row-critique { box-shadow: inset 3px 0 0 rgba(31, 95, 91, 0.70); }
.row-expire   { box-shadow: inset 3px 0 0 var(--hm-accent);       }
.row-alerte  td:first-child,
.row-critique td:first-child,
.row-expire   td:first-child { padding-left: 17px; }

.domain-name {
  font-weight: 500;
  color: var(--hm-text);
  font-family: Inter, ui-sans-serif;
}

.td-client {
  color: var(--hm-muted);
  font-size: 0.8375rem;
}

.date-text {
  color: var(--hm-muted);
  font-size: 0.8125rem;
}

.td-pack {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--hm-text);
}

.td-action { text-align: center; }

.td-empty {
  padding: 60px 16px;
  text-align: center;
  color: var(--hm-muted);
  font-size: 0.875rem;
}

.btn-facture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--hm-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-facture:hover {
  background: var(--hm-accent-dim);
  border-color: rgba(31, 95, 91, 0.2);
  color: var(--hm-accent);
}

/* ================================================================ */
/* Icônes utilitaires                                               */
/* ================================================================ */
.icon-xs { width: 13px; height: 13px; }
.icon-sm { width: 15px; height: 15px; }
.icon-md { width: 18px; height: 18px; }

/* ================================================================ */
/* Panneau facture — slide-over                                     */
/* ================================================================ */

.invoice-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 440px;
  background: var(--hm-surface);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.12);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.invoice-panel.panel-open { transform: translateX(0); }

.invoice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--hm-border);
  flex-shrink: 0;
  background: var(--hm-surface);
}

.invoice-eyebrow {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--hm-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.invoice-domain-name {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--hm-text);
  letter-spacing: -0.01em;
}

.btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--hm-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
  margin-top: -2px;
}
.btn-close:hover { background: #F3F4F6; color: var(--hm-text); }

.invoice-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.invoice-meta { margin-bottom: 28px; }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--hm-border-light);
  font-size: 0.875rem;
  gap: 16px;
}
.meta-row:last-child { border-bottom: none; }

.meta-row dt {
  color: var(--hm-muted);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-weight: 500;
  flex-shrink: 0;
}
.meta-row dd {
  color: var(--hm-text);
  font-family: Inter, ui-sans-serif;
  font-weight: 500;
  text-align: right;
}

.meta-alerte  dt, .meta-alerte  dd { color: var(--hm-alerte);   }
.meta-critique dt, .meta-critique dd { color: var(--hm-critique); }

.breakdown-title {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--hm-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.breakdown-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--hm-border-light);
  font-size: 0.875rem;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--hm-muted);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-weight: 500;
}
.breakdown-label svg { color: var(--hm-muted); }

.breakdown-value {
  font-family: Inter, ui-sans-serif;
  font-weight: 600;
  color: var(--hm-text);
  font-variant-numeric: tabular-nums;
}

.breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  margin-top: 16px;
  background: var(--hm-accent-dim);
  border-radius: 10px;
  border: 1px solid rgba(31, 95, 91, 0.18);
}

.total-label {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-weight: 700;
  color: var(--hm-accent);
  font-size: 0.875rem;
}
.total-value {
  font-family: Inter, ui-sans-serif;
  font-weight: 700;
  color: var(--hm-accent);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

/* ================================================================ */
/* État vide — tous les domaines à jour                             */
/* ================================================================ */

.empty-alerte {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  color: #059669;
  font-size: 0.875rem;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-weight: 500;
  margin-bottom: 28px;
}
.empty-alerte svg { width: 18px; height: 18px; flex-shrink: 0; color: #059669; }

/* ================================================================ */
/* Page de connexion — split layout                                 */
/* ================================================================ */

.login-layout {
  display: flex;
  min-height: 100vh;
}

/* Panneau gauche — marque */
.login-brand {
  width: 400px;
  min-width: 400px;
  background: var(--hm-text);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 40px;
}

.login-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--hm-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-brand-icon svg { width: 18px; height: 18px; color: #fff; }

.login-brand-name {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}
.login-brand-org {
  font-family: Inter, ui-sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.32);
  margin-top: 2px;
}

.login-brand-headline {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.login-brand-desc {
  font-family: Inter, ui-sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.65;
  margin-bottom: 36px;
}

.login-features {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
}
.login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Inter, ui-sans-serif;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 11px;
}
.login-features li svg {
  width: 15px;
  height: 15px;
  color: #74C5C1;
  flex-shrink: 0;
}

.login-brand-footer {
  margin-top: 40px;
  font-family: Inter, ui-sans-serif;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.2);
}

/* Panneau droit — formulaire */
.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--hm-bg);
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
}

.login-form-title {
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hm-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.login-form-sub {
  font-family: Inter, ui-sans-serif;
  font-size: 0.875rem;
  color: var(--hm-muted);
  margin-bottom: 32px;
}

.form-field { margin-bottom: 18px; }

.form-label {
  display: block;
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hm-text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--hm-border);
  border-radius: var(--hm-radius-sm);
  background: var(--hm-surface);
  font-family: Inter, ui-sans-serif;
  font-size: 0.875rem;
  color: var(--hm-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.form-input::placeholder { color: #9CA3AF; }
.form-input:focus {
  border-color: var(--hm-accent);
  box-shadow: 0 0 0 3px rgba(31, 95, 91, 0.12);
}

.form-input-wrap { position: relative; }

.form-input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hm-muted);
  padding: 0;
  display: flex;
  transition: color 0.12s;
}
.form-input-toggle:hover { color: var(--hm-text); }
.form-input-toggle svg { width: 16px; height: 16px; }
.form-input-padded { padding-right: 42px; }

.btn-submit {
  width: 100%;
  padding: 11px 16px;
  background: var(--hm-accent);
  color: #fff;
  border: none;
  border-radius: var(--hm-radius-sm);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 10px;
}
.btn-submit:hover  { background: #1a4f4b; }
.btn-submit:active { background: #164240; }

.login-note {
  margin-top: 20px;
  text-align: center;
  font-family: Inter, ui-sans-serif;
  font-size: 0.775rem;
  color: var(--hm-muted);
}

/* Messages d'alerte sur la page login (erreurs Breeze) */
.form-alert-error {
  background: rgba(185, 28, 28, 0.07);
  border: 1px solid rgba(185, 28, 28, 0.2);
  color: var(--hm-rouge);
  border-radius: var(--hm-radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  font-family: Inter, ui-sans-serif;
  margin-bottom: 18px;
}
.form-alert-info {
  background: var(--hm-accent-dim);
  border: 1px solid rgba(31, 95, 91, 0.2);
  color: var(--hm-accent);
  border-radius: var(--hm-radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  font-family: Inter, ui-sans-serif;
  margin-bottom: 18px;
}

/* ================================================================ */
/* Responsive                                                       */
/* ================================================================ */

@media (max-width: 900px) {
  .login-brand { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .page-body { padding: 20px 16px; }
  .page-header { padding: 0 16px; }
  .metrics-grid { grid-template-columns: 1fr; }
}

/* ================================================================ */
/* Panneau — boutons d'action (en bas du panneau facture)          */
/* ================================================================ */

.invoice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hm-border);
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--hm-accent);
  color: #fff;
  border: none;
  border-radius: var(--hm-radius-sm);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-action:hover  { background: #1a4f4b; }
.btn-action:active { background: #164240; }
.btn-action:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-action-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--hm-accent);
  border: 1.5px solid rgba(31, 95, 91, 0.35);
  border-radius: var(--hm-radius-sm);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-action-outline:hover { background: var(--hm-accent-dim); border-color: var(--hm-accent); }
.btn-action-outline:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-action-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: transparent;
  color: var(--hm-rouge);
  border: 1.5px solid rgba(185, 28, 28, 0.3);
  border-radius: var(--hm-radius-sm);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  margin-left: auto;
}
.btn-action-danger:hover { background: var(--hm-rouge-dim); border-color: var(--hm-rouge); }
.btn-action-danger:disabled { opacity: 0.55; cursor: not-allowed; }

/* ================================================================ */
/* Panneau — formulaires CRUD                                       */
/* ================================================================ */

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  margin-bottom: 16px;
}

/* Réutilise .form-label et .form-input existants (login) */
/* Ajout du select */
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--hm-border);
  border-radius: var(--hm-radius-sm);
  background: var(--hm-surface);
  font-family: Inter, ui-sans-serif;
  font-size: 0.875rem;
  color: var(--hm-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  cursor: pointer;
}
.form-select:focus {
  border-color: var(--hm-accent);
  box-shadow: 0 0 0 3px rgba(31, 95, 91, 0.12);
}

.form-error {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(185, 28, 28, 0.07);
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: var(--hm-radius-sm);
  color: var(--hm-rouge);
  font-size: 0.8rem;
  font-family: Inter, ui-sans-serif;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.form-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--hm-accent-dim);
  border: 1px solid rgba(31, 95, 91, 0.15);
  border-radius: var(--hm-radius-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-family: Inter, ui-sans-serif;
  color: var(--hm-muted);
}
.form-info-row strong {
  color: var(--hm-text);
  font-weight: 600;
}

/* ================================================================ */
/* Bouton Ajouter dans l'en-tête du tableau                        */
/* ================================================================ */

.btn-add-domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--hm-accent);
  color: #fff;
  border: none;
  border-radius: var(--hm-radius-sm);
  font-family: "Plus Jakarta Sans", ui-sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s;
}
.btn-add-domain svg { width: 14px; height: 14px; }
.btn-add-domain:hover { background: #1a4f4b; }

/* ── Bloc Email Pro dans le panneau admin ─────────────────────── */
.email-pro-panel {
  margin: 0 0 16px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 14px 16px;
}
.email-pro-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: #1D4ED8; margin-bottom: 10px;
}
.email-pro-title svg { width: 13px; height: 13px; }
.ep-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #BFDBFE;
  font-size: 12px;
}
.ep-row:last-of-type { border-bottom: none; }
.ep-label { color: #3B82F6; }
.ep-value { font-weight: 600; color: #1B2430; text-align: right; }
/* ── Dropdown partager ───────────────────────────────────────── */
.share-wrap { position: relative; }
.share-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  min-width: 186px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  padding: 5px 0;
  overflow: hidden;
}
.share-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 13px;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
  white-space: nowrap;
}
.share-item:hover { background: #F9FAFB; color: #111827; }
.share-item-wa { color: #15803D; }
.share-item-wa:hover { background: #F0FDF4; color: #166534; }
.share-item-wa svg { flex-shrink: 0; }

.ep-prix      { color: #1D4ED8; font-weight: 700; }
.ep-prix-renew { color: #B45309; font-weight: 700; }
.badge-renew {
  display: inline-block; background: #FEF3C7; color: #92400E;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 9999px; margin-left: 4px;
}
.ep-warn {
  margin-top: 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 3px solid #D97706;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px; color: #78350F; line-height: 1.6;
}
.badge-off {
  display: inline-block; background: #FEE2E2; color: #991B1B;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 9999px;
}
.badge-plein {
  display: inline-block; background: #FEE2E2; color: #B91C1C;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 9999px; margin-left: 4px;
}

/* ── Badge "inclus" dans le détail du pack ────────────────────── */
.badge-inclus {
  display: inline-block;
  background: #D1FAE5;
  color: #065F46;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

/* ── Section coûts Hostinger (vue admin) ──────────────────────── */
.hostinger-costs {
  margin: 0 0 20px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 14px 16px;
}
.hostinger-costs-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #166534;
  margin-bottom: 10px;
}
.hostinger-costs-grid { display: flex; flex-direction: column; gap: 6px; }
.hc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.hc-label { color: #4B7A5E; }
.hc-value { font-weight: 600; color: #14532D; }
.hc-email { display: flex; align-items: center; gap: 4px; color: #0369A1; }
.hc-marge  { padding-top: 6px; border-top: 1px dashed #BBF7D0; margin-top: 2px; }
.hc-marge .hc-label { font-weight: 600; }
.hc-marge .hc-value { color: #166534; }

/* ================================================================ */
/* Utilitaires                                                      */
/* ================================================================ */
.ml-2 { margin-left: 6px; }
.hidden { display: none !important; }
