﻿/* =========================
   Reset léger
========================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--nf-bg);
  color: var(--nf-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* =========================
   Racine app
========================= */
#app {
  min-height: 100vh;
}

/* =========================
   Layout global
========================= */
.nf-screen {
  min-height: 100vh;
  padding: 20px 16px 100px;
}

.nf-container {
  width: 100%;
  max-width: var(--nf-max-width-mobile);
  margin: 0 auto;
}

/* =========================
   Utilitaires texte
========================= */
.nf-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 8px;
  color: var(--nf-text);
}

.nf-subtitle {
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: center;
  color: var(--nf-text-muted);
  margin-bottom: 0;
}

.nf-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--nf-text);
  margin-bottom: 14px;
}

.nf-muted {
  color: var(--nf-text-muted);
}

/* =========================
   Carte générale
========================= */
.nf-card {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-lg);
  box-shadow: var(--nf-shadow-md);
}

.nf-card-soft {
  background: var(--nf-primary-extra-soft);
  border: 1px solid var(--nf-border-soft);
  border-radius: var(--nf-radius-lg);
}

/* =========================
   Boutons
========================= */
.nf-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: var(--nf-primary);
  color: var(--nf-text-white);
  font-weight: 700;
  transition: var(--nf-transition-fast);
}

.nf-btn-primary:hover {
  background: var(--nf-primary-dark);
  color: var(--nf-text-white);
}

.nf-btn-primary:active {
  transform: translateY(1px);
}

.nf-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  color: var(--nf-primary);
  font-weight: 600;
  transition: var(--nf-transition-fast);
}

.nf-btn-outline:hover {
  background: var(--nf-primary-soft);
}

/* =========================
   Champs formulaire
========================= */
.nf-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--nf-text-soft);
  margin-bottom: 8px;
}

.nf-input {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  color: var(--nf-text);
  padding-left: 14px;
  padding-right: 14px;
  box-shadow: none;
}

.nf-input:focus {
  border-color: var(--nf-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}

/* =========================
   Logo
========================= */
.nf-logo-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--nf-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--nf-surface);
  box-shadow: var(--nf-shadow-lg);
}

.nf-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nf-logo-wrap-sm {
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--nf-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--nf-surface);
  box-shadow: var(--nf-shadow-md);
}

.nf-logo-wrap-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   Splash screen
========================= */
.nf-splash {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, #e8f2ff 0%, #f8fbff 45%, #ffffff 100%);
}

.nf-splash-inner {
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: nfFadeUp 0.9s ease;
}

.nf-loader {
  width: 54px;
  height: 54px;
  margin: 24px auto 0;
  border-radius: 50%;
  border: 4px solid #d9e9ff;
  border-top-color: var(--nf-primary);
  animation: nfSpin 1s linear infinite;
}

/* =========================
   Login
========================= */
.nf-login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-login-card {
  width: 100%;
  padding: 24px;
}

.nf-login-top {
  margin-bottom: 22px;
}

/* =========================
   Dashboard
========================= */
.nf-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.nf-dashboard-user small {
  display: block;
  color: var(--nf-text-muted);
  margin-bottom: 2px;
}

.nf-dashboard-user h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--nf-text);
}

.nf-stats-row .nf-card {
  padding: 14px 10px;
  text-align: center;
}

.nf-stat-label {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  margin-bottom: 4px;
}

.nf-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nf-text);
}

.nf-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.nf-action-card {
  min-height: 128px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--nf-transition-fast);
}

.nf-action-card:hover {
  transform: translateY(-2px);
}

.nf-action-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nf-text);
}

.nf-action-text {
  font-size: 0.9rem;
  color: var(--nf-text-muted);
  line-height: 1.4;
}

/* =========================
   Bottom navigation
========================= */
.nf-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--nf-border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  border-radius: 0;
}

.nf-bottom-nav .nav-link {
  color: var(--nf-text-muted);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  padding: 10px 4px;
  border-radius: 12px;
  transition: var(--nf-transition-fast);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-bottom-nav .nav-link.active {
  color: var(--nf-primary);
  font-weight: 700;
  background: var(--nf-primary-soft);
}

/* =========================
   Blocs placeholder
========================= */
.nf-placeholder-box {
  padding: 22px;
}

.nf-placeholder-text {
  margin: 0;
  color: var(--nf-text-muted);
  line-height: 1.5;
}


/* =========================
   Boutons icône
========================= */
.nf-icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  border-radius: 12px;
  box-shadow: var(--nf-shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nf-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--nf-transition-fast);
}

.nf-icon-btn:hover {
  background: var(--nf-primary-soft);
}

/* =========================
   Toggle mot de passe
========================= */
.nf-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--nf-text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

/* =========================
   Icône dashboard
========================= */
.nf-action-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

/* =========================
   Liste simple
========================= */
.nf-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

/* =========================
   Plans
========================= */
.nf-plan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nf-plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.nf-plan-name {
  font-weight: 700;
  color: var(--nf-text);
  margin-bottom: 4px;
}

.nf-plan-meta {
  font-size: 0.9rem;
  color: var(--nf-text-muted);
}

.nf-plan-price {
  font-weight: 700;
  color: var(--nf-primary);
}


/* =========================
   Code client généré
========================= */
.nf-generated-code-box {
  min-height: 88px;
  border: 2px dashed var(--nf-primary);
  background: var(--nf-primary-extra-soft);
  color: var(--nf-primary-dark);
  border-radius: var(--nf-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 4px;
  font-family: "Consolas", "Courier New", monospace;
  box-shadow: var(--nf-shadow-sm);
}

.nf-code-message {
  font-size: 0.92rem;
}

.nf-code-message-success {
  color: var(--nf-success);
}

.nf-code-message-error {
  color: var(--nf-danger);
}

/* =========================
   Animations
========================= */
@keyframes nfSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes nfFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Alertes formulaire
========================= */
.nf-alert {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--nf-radius-md);
  font-size: 0.95rem;
  font-weight: 500;
}

.nf-alert-error {
  display: block;
  background: var(--nf-danger-soft);
  color: var(--nf-danger);
  border: 1px solid rgba(220, 53, 69, 0.15);
}

.nf-alert-success {
  display: block;
  background: var(--nf-success-soft);
  color: var(--nf-success);
  border: 1px solid rgba(25, 135, 84, 0.15);
}


/* CLIENTS */

/* =========================
   Icônes inline
========================= */
.nf-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-weight: 700;
}

.nf-inline-icon-success {
  color: var(--nf-success);
}

.nf-inline-icon-error {
  color: var(--nf-danger);
}

/* =========================
   Modal succès client
========================= */
.nf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.nf-modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--nf-surface);
  border-radius: var(--nf-radius-lg);
  box-shadow: var(--nf-shadow-lg);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--nf-border);
}

.nf-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.nf-modal-icon-success {
  background: var(--nf-success-soft);
  color: var(--nf-success);
}

.nf-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--nf-text);
}

.nf-modal-text {
  color: var(--nf-text-muted);
  margin-bottom: 0;
}

.nf-modal-details {
  text-align: left;
  background: var(--nf-primary-extra-soft);
  border: 1px solid var(--nf-border-soft);
  border-radius: var(--nf-radius-md);
  padding: 14px;
  line-height: 1.7;
}


/* =========================
   Infos client vente
========================= */
.nf-sale-client-grid {
  display: grid;
  gap: 14px;
}

.nf-sale-info-label {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  margin-bottom: 4px;
}

.nf-sale-info-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nf-text);
  word-break: break-word;
}

/* =========================
   Plan sélectionné
========================= */
.nf-plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: var(--nf-transition-fast);
}

.nf-plan-card:hover {
  transform: translateY(-1px);
}

.nf-plan-card-selected {
  border: 2px solid var(--nf-primary);
  background: var(--nf-primary-extra-soft);
  box-shadow: var(--nf-shadow-md);
}

.nf-modal-icon-warning {
  background: var(--nf-warning-soft);
  color: #9a6700;
}

/* =========================
   Historique amélioré
========================= */
.nf-history-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nf-history-summary-card {
  padding: 14px;
}

.nf-history-summary-card-wide {
  grid-column: 1 / -1;
}

.nf-history-summary-total {
  margin-top: 6px;
  color: var(--nf-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.nf-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nf-filter-tab {
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  color: var(--nf-text-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--nf-transition-fast);
}

.nf-filter-tab.active {
  background: var(--nf-primary-soft);
  color: var(--nf-primary);
  border-color: var(--nf-primary);
}

.nf-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nf-history-item {
  padding: 14px;
}

.nf-history-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.nf-history-name {
  font-weight: 700;
  color: var(--nf-text);
}

.nf-history-meta {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  margin-top: 2px;
}

.nf-history-price {
  font-weight: 700;
  color: var(--nf-primary);
  white-space: nowrap;
}

.nf-history-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.nf-history-plan {
  color: var(--nf-text);
}

.nf-history-date {
  color: var(--nf-text-muted);
  text-align: right;
}

.nf-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nf-history-page-info {
  font-size: 0.92rem;
  color: var(--nf-text-muted);
  font-weight: 600;
}

/* clients suite */

.nf-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: var(--nf-danger);
  color: #fff;
  font-weight: 700;
  transition: var(--nf-transition-fast);
}

.nf-btn-danger:hover {
  opacity: 0.95;
  color: #030303;
  border-radius: 14px;
  background: #fff;
  border: solid 1px red;

}

.nf-modal-icon-danger {
  background: var(--nf-danger-soft);
  color: var(--nf-danger);
}

.nf-dashboard-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nf-dashboard-stat-card {
  padding: 14px;
}

.nf-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.nf-status-badge-success {
  background: var(--nf-success-soft);
  color: var(--nf-success);
}

.nf-status-badge-danger {
  background: var(--nf-danger-soft);
  color: var(--nf-danger);
}

.nf-settings-info-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nf-border-soft);
}

.nf-settings-info-line:last-child {
  border-bottom: none;
}

.nf-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1900;
}

.nf-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 86vw;
  height: 100vh;
  background: var(--nf-surface);
  border-left: 1px solid var(--nf-border);
  box-shadow: var(--nf-shadow-lg);
  z-index: 2001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.nf-drawer-open {
  right: 0;
}

.nf-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--nf-border);
}

.nf-drawer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--nf-text);
}

.nf-drawer-subtitle {
  font-size: 0.88rem;
  color: var(--nf-text-muted);
  margin-top: 2px;
}

.nf-drawer-content {
  padding: 16px;
  overflow-y: auto;
}

.nf-powered-by {
  color: var(--nf-text-muted);
  font-size: 0.95rem;
}

.nf-modal-icon-warning {
  background: var(--nf-warning-soft);
  color: #9a6700;
}

