:root {
  --blue-france: #000091;
  --blue-france-hover: #1212ff;
  --red-marianne: #e1000f;
  --text-dark: #1e1e1e;
  --text-muted: #555555;
  --bg-page: #f5f5fe;
  --bg-card: #ffffff;
  --border-color: #d0d0d0;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-stack);
  -webkit-tap-highlight-color: transparent;
}

html, body {
  touch-action: pan-y;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-page);
  color: var(--text-dark);
}

body {
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* EN-TÊTE */
.header-gouv {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  max-width: 820px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.brand-bar {
  width: 4px;
  height: 56px;
  background: linear-gradient(to bottom, var(--blue-france) 33%, #ffffff 33%, #ffffff 66%, var(--red-marianne) 66%);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  margin-right: 4px;
}

.brand-logo {
  height: 56px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
  margin-right: 10px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-dark);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-login-header {
  background: transparent;
  border: 1px solid var(--blue-france);
  color: var(--blue-france);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-login-header:hover {
  background: var(--blue-france);
  color: #ffffff;
}

.burger-btn {
  background: none;
  border: none;
  width: 26px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.burger-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--blue-france);
  border-radius: 2px;
}

/* BANDEAU PERMANENCE */
.notice-bar {
  background-color: #e8edff;
  border-bottom: 1px solid #c2dbff;
  padding: 10px 16px;
  font-size: 12px;
  color: #0b2568;
}

.notice-content {
  max-width: 820px;
  margin: 0 auto;
}

/* MENU DÉROULANT */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  z-index: 210;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  transition: right 0.25s ease;
}

.sidebar.active {
  right: 0;
}

.sidebar-overlay.active {
  display: block;
}

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

.sidebar-header h3 {
  font-size: 15px;
  color: var(--blue-france);
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.sidebar-links {
  list-style: none;
  padding: 12px 0;
}

.sidebar-links li a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-links li.separator {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

/* CONTENU PRINCIPAL */
.main-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px;
}

.hero-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--blue-france);
  padding: 24px 20px;
  border-radius: 4px;
}

.badge-tag {
  display: inline-block;
  background: #eef1f9;
  color: var(--blue-france);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  margin-bottom: 12px;
  border-radius: 2px;
}

.hero-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* TARIFS */
.pricing-box {
  background: #fafbff;
  border: 1px dashed var(--blue-france);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.pricing-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--red-marianne);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pricing-box h3 {
  font-size: 15px;
  color: var(--blue-france);
  margin-bottom: 8px;
}

.pricing-box p {
  font-size: 13px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.payment-methods {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

/* BOUTONS */
.btn-primary {
  background: var(--blue-france);
  color: #ffffff;
  border: none;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.btn-secondary {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.flex-row {
  display: flex;
  gap: 10px;
}

.flex-row button {
  flex: 1;
}

/* TUNNEL DE DÉPÔT */
.form-container-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px 18px;
  border-radius: 4px;
}

.steps-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-color);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-indicator.active {
  background: var(--blue-france);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  max-width: 40px;
}

.form-step h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-instruction {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* TÉLÉVERSEMENT */
.upload-zone {
  border: 2px dashed var(--border-color);
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-page);
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.upload-zone.ready {
  border-color: #1b8a36;
  background: #ebfbee;
}

.upload-text strong {
  display: block;
  font-size: 13px;
  color: var(--blue-france);
}

.upload-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.identity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.highlighted-box {
  background: var(--bg-page);
  padding: 16px;
  border-left: 4px solid var(--blue-france);
  margin-bottom: 20px;
}

/* CHAMPS DE FORMULAIRE (16px anti-zoom) */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px !important;
  color: var(--text-dark);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

/* CARTE SUIVI MES DEMANDES */
.demandes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.demande-card {
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.demande-card:active {
  transform: scale(0.98);
}

.demande-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.demande-id {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* GRIS : EN ATTENTE */
.status-attente {
  background-color: #f0f0f0;
  color: #6c757d;
  border: 1px solid #d0d0d0;
}

/* BLEU : PRIS EN CHARGE */
.status-charge {
  background-color: #e8edff;
  color: #000091;
  border: 1px solid #b8ccff;
}

/* VERT : VALIDÉ */
.status-valide {
  background-color: #ebfbee;
  color: #1b8a36;
  border: 1px solid #a3e6b1;
}

.demande-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* MODALES */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  border-top: 4px solid var(--blue-france);
  position: relative;
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-card h2 {
  font-size: 17px;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* AVERTISSEMENT MOT DE PASSE STRICT */
.password-warning {
  background-color: #fff9e6;
  border: 1px solid #ffe180;
  border-left: 4px solid #f59e0b;
  color: #854d0e;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 4px;
  margin-bottom: 16px;
}

.auth-toggle {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
}

.auth-toggle a {
  color: var(--blue-france);
  font-weight: 700;
  text-decoration: none;
}