/* LTE Client Portal - Design System
   Couleurs Azimut : #337cea (bleu vif), #112b45 (navy), #122a44 (navy-darker), #2e4158 (navy moyen)
   Font : Poppins
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #337cea;
  --color-primary-dark: #2563d6;
  --color-primary-light: #e8f0fe;
  --color-navy: #112b45;
  --color-navy-darker: #122a44;
  --color-navy-mid: #2e4158;
  --color-text: #112b45;
  --color-text-secondary: #2e4158;
  --color-text-muted: #6b7a8c;
  --color-bg: #f5f7fa;
  --color-card: #ffffff;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef3c7;
  --color-error: #dc2626;
  --color-error-bg: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(17, 43, 69, 0.05);
  --shadow-md: 0 4px 12px rgba(17, 43, 69, 0.08);
  --shadow-lg: 0 8px 24px rgba(17, 43, 69, 0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

html, body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }
.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* === HEADER === */
.header {
  background: var(--color-navy-darker);
  color: white;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.brand {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-loueton { color: white; }
.brand-electro { color: var(--color-primary); }
.header-tag {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* === BOTTOM NAV (mobile-first) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--color-border);
  padding: 8px 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 12px rgba(17, 43, 69, 0.05);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.bottom-nav-item {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: color 0.15s;
}
.bottom-nav-item.active { color: var(--color-primary); }
.bottom-nav-item:hover { color: var(--color-primary); text-decoration: none; }
.bottom-nav-icon { font-size: 22px; line-height: 1; }

.main {
  padding: 20px 0 90px;
  min-height: calc(100vh - 60px);
}

/* === CARDS === */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card-hero {
  background: linear-gradient(135deg, #337cea 0%, #1a4172 100%);
  color: white;
  padding: 24px 22px;
}
.card-hero h2 { color: white !important; }

/* === TYPOGRAPHY === */
.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

/* === FORMS === */
.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: white;
  color: var(--color-navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(51, 124, 234, 0.15);
}
.field-textarea { min-height: 100px; resize: vertical; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 6px 18px rgba(51, 124, 234, 0.35); }
.btn-secondary { background: white; color: var(--color-navy); border: 2px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary); }
.btn-danger { background: var(--color-error); color: white; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: #92400e; }
.badge-info { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-neutral { background: var(--color-border-light); color: var(--color-text-secondary); }

/* === LISTS === */
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.list-item:last-child { border-bottom: none; }
.list-item-content { flex: 1; min-width: 0; }
.list-item-title {
  font-weight: 600;
  color: var(--color-navy);
  font-size: 15px;
  margin-bottom: 2px;
}
.list-item-meta {
  font-size: 13px;
  color: var(--color-text-muted);
}
.list-item-amount {
  font-weight: 700;
  color: var(--color-navy);
  font-size: 16px;
}

/* === KEY-VALUE === */
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}
.kv-row:last-child { border-bottom: none; }
.kv-label { color: var(--color-text-muted); }
.kv-value { color: var(--color-navy); font-weight: 600; text-align: right; }

/* === ALERTS === */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.alert-success { background: var(--color-success-bg); color: #065f46; border-left: 4px solid var(--color-success); }
.alert-warning { background: var(--color-warning-bg); color: #92400e; border-left: 4px solid var(--color-warning); }
.alert-error { background: var(--color-error-bg); color: #991b1b; border-left: 4px solid var(--color-error); }
.alert-info { background: var(--color-primary-light); color: var(--color-primary-dark); border-left: 4px solid var(--color-primary); }

/* === LOADING === */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { text-align: center; padding: 40px 20px; }
.loading-state p { margin-top: 14px; color: var(--color-text-muted); }

/* === LOGIN SPECIFIC === */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-icon {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  margin: 0 auto 18px;
  box-shadow: 0 12px 32px rgba(17, 43, 69, 0.18);
}
.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* === HERO === */
.greeting {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}
.greeting-name {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

/* === STAT === */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
}
.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: white;
}

/* === RADIO PILLS (urgence support, etc.) === */
.radio-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radio-pill {
  cursor: pointer;
  position: relative;
}
.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.radio-pill-label {
  display: inline-block;
  padding: 10px 18px;
  background: white;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all 0.15s;
}
.radio-pill input[type="radio"]:checked + .radio-pill-label {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr; }
  .login-card { padding: 28px 22px; }
}
