:root {
  --bg:#0b1220;
  --text:#e5eefb;
  --muted:#94a3b8;
  --card:#0f172a;
  --card-border:#1e293b;
  --blue:#2563eb;
  --green:#10b981;
  --purple:#8b5cf6;
  --orange:#f59e0b;
}

body {
  background: var(--bg);
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.hint {
  color: var(--muted);
}

/* mode compact des champs */
.compact .form-control,
.compact .form-select {
  padding: .48rem .65rem;
  font-size: .95rem;
  line-height: 1.25;
}
.compact .input-group-text {
  padding: .45rem .65rem;
  font-size: .95rem;
}
.compact .btn {
  padding: .5rem .95rem;
}
.compact .row.g-3 {
  --bs-gutter-x: .75rem;
  --bs-gutter-y: .75rem;
}

/* pills de section */
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .8rem;
}

.pill-blue {
  background: rgba(37,99,235,.12);
  color: #93c5fd;
  border: 1px solid rgba(37,99,235,.28);
}
.pill-green {
  background: rgba(16,185,129,.08);
  color: #a7f3d0;
  border: 1px solid rgba(16,185,129,.22);
}
.pill-purple {
  background: rgba(139,92,246,.08);
  color: #ddd6fe;
  border: 1px solid rgba(139,92,246,.22);
}
.pill-orange {
  background: rgba(245,158,11,.08);
  color: #fed7aa;
  border: 1px solid rgba(245,158,11,.22);
}

/* input-group couleurs */
.ig-blue .input-group-text {
  background: rgba(37,99,235,.14);
  border-color: rgba(37,99,235,.4);
  color: #93c5fd;
}
.ig-green .input-group-text {
  background: rgba(16,185,129,.08);
  border-color: rgba(16,185,129,.22);
  color: #86efac;
}
.ig-purple.input-group .input-group-text,
.ig-purple .input-group-text {
  background: rgba(139,92,246,.08);
  border-color: rgba(139,92,246,.22);
  color: #c4b5fd;
}
.ig-orange .input-group-text {
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.22);
  color: #fed7aa;
}

/* base champs */
.input-group-text {
  background: #0b1220;
  border-color: var(--card-border);
  color: #93a4bd;
}
.form-control,
.form-select {
  background: #0b1220;
  border-color: var(--card-border);
  color: var(--text);
}
.form-control::placeholder {
  color: #64748b;
}

.progress {
  background: #0b1220;
}

/* badge marque */
.brand-badge {
  background: linear-gradient(90deg,#0ea5e9,#6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* champs requis visuels */
.req-badge {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .45rem;
  border-radius: .5rem;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(37,99,235,.18);
  color: #93c5fd;
  border: 1px solid rgba(37,99,235,.35);
}
.required .form-control,
.required .form-select {
  border-color: rgba(37,99,235,.5);
}

/* champs optionnels un peu atténués */
.optional .form-label {
  color: #9aa7bd;
}
.optional .input-group-text {
  opacity: .85;
}

/* grille 3 colonnes desktop */
@media (min-width: 992px){
  .grid-3 > [class^="col-"] {
    flex: 0 0 auto;
    width: 33.3333%;
  }
}

/* bandeau info / pas forcément utilisé partout */
.info-banner {
  background: rgba(37,99,235,.08);
  border: 1px dashed rgba(37,99,235,.35);
  color: #bfdbfe;
  border-radius: 12px;
}

/* ligne séparatrice de section (remplace style="border-color:...") */
.sep-line {
  border-bottom: 1px solid rgba(148,163,184,.2);
  flex-grow: 1;
}

/* barre de force du mot de passe fine (remplace style="height:5px") */
.progress-thin {
  height: 5px;
}

/* largeur initiale 0% pour la barre de force (remplace style="width:0%") */
.pw-strength {
  width: 0;
}

/* Honeypot caché sans inline style (anti bot) */
/* Empêche le champ honeypot d'être visible/interactif */
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
}

/* Petit badge marque */
.brand-badge {
  font-size: .9rem;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.03em;
}

/* Pastilles de section (Compte / Contact / ...) */
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 999px;
  padding: .35rem .6rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill-blue {
  background-color: rgba(37,99,235,.12);
  border-color: rgba(37,99,235,.4);
  color: #93c5fd;
}

.pill-green {
  background-color: rgba(16,185,129,.12);
  border-color: rgba(16,185,129,.4);
  color: #6ee7b7;
}

.pill-purple {
  background-color: rgba(168,85,247,.12);
  border-color: rgba(168,85,247,.4);
  color: #d8b4fe;
}

.pill-orange {
  background-color: rgba(251,146,60,.12);
  border-color: rgba(251,146,60,.4);
  color: #fdba74;
}

/* Ligne séparatrice après le badge */
.sep-line {
  flex: 1 1 auto;
  border-top: 1px solid rgba(255,255,255,.12);
  height: 0;
  min-width: 1rem;
}

/* Badge "Obligatoire" */
.req-badge {
  display: inline-block;
  font-size: .7rem;
  line-height: 1.2;
  font-weight: 500;
  color: #fff;
  background-color: #dc2626;
  border-radius: .4rem;
  padding: .15rem .4rem;
  vertical-align: middle;
}

/* Groupes d'input colorés (juste un feedback visuel léger) */
.ig-blue .input-group-text {
  background-color: rgba(37,99,235,.12);
  color: #93c5fd;
  border-color: rgba(37,99,235,.4);
}
.ig-blue .form-control,
.ig-blue .form-select {
  border-color: rgba(37,99,235,.4);
  color: #f8fafc;
  background-color: #0f172a;
}
.ig-blue .form-control:focus,
.ig-blue .form-select:focus {
  border-color: rgba(99,102,241,1);
  box-shadow: 0 0 0 .15rem rgba(99,102,241,.3);
  outline: 0;
  color: #fff;
  background-color: #0f172a;
}

.ig-green .input-group-text {
  background-color: rgba(16,185,129,.12);
  color: #6ee7b7;
  border-color: rgba(16,185,129,.4);
}
.ig-green .form-control {
  border-color: rgba(16,185,129,.4);
  color: #f8fafc;
  background-color: #0f172a;
}
.ig-green .form-control:focus {
  border-color: rgba(16,185,129,1);
  box-shadow: 0 0 0 .15rem rgba(16,185,129,.3);
  outline: 0;
  color: #fff;
  background-color: #0f172a;
}

.ig-purple .input-group-text {
  background-color: rgba(168,85,247,.12);
  color: #d8b4fe;
  border-color: rgba(168,85,247,.4);
}
.ig-purple .form-control,
.ig-purple .form-select {
  border-color: rgba(168,85,247,.4);
  color: #f8fafc;
  background-color: #0f172a;
}
.ig-purple .form-control:focus,
.ig-purple .form-select:focus {
  border-color: rgba(168,85,247,1);
  box-shadow: 0 0 0 .15rem rgba(168,85,247,.3);
  outline: 0;
  color: #fff;
  background-color: #0f172a;
}

.ig-orange .input-group-text {
  background-color: rgba(251,146,60,.12);
  color: #fdba74;
  border-color: rgba(251,146,60,.4);
}
.ig-orange .form-control,
.ig-orange .form-select,
.ig-orange textarea.form-control {
  border-color: rgba(251,146,60,.4);
  color: #f8fafc;
  background-color: #0f172a;
}
.ig-orange .form-control:focus,
.ig-orange .form-select:focus,
.ig-orange textarea.form-control:focus {
  border-color: rgba(251,146,60,1);
  box-shadow: 0 0 0 .15rem rgba(251,146,60,.3);
  outline: 0;
  color: #fff;
  background-color: #0f172a;
}

/* Disposition responsive légère */
.grid-3 {}

/* Barre de force du mot de passe */
.progress-thin {
  height: 4px;
}
.progress-thin .progress-bar {
  transition: width .2s linear;
}

/* Largeur prédéfinie (pour éviter d'injecter du style inline bloqué par CSP) */
.pw-0   { width: 0%; }
.pw-20  { width: 20%; }
.pw-40  { width: 40%; }
.pw-60  { width: 60%; }
.pw-80  { width: 80%; }
.pw-100 { width: 100%; }

/* Couleurs de force */
.pw-weak {
  background-color: #dc2626 !important; /* rouge */
}
.pw-mid {
  background-color: #facc15 !important; /* jaune */
  color: #000;
}
.pw-strong {
  background-color: #16a34a !important; /* vert */
}

/* -------- MODAL CONDITIONS -------- */

.terms-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;           /* masqué par défaut */
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10000;
}

.terms-modal-overlay.is-visible {
  display: flex;           /* affiché quand ouvert */
}

.terms-modal-card {
  background-color: #1e253a;
  color: #e2e8f0;
  border-radius: 1rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.8);
  border: 1px solid #334155;
}

.terms-modal-header {
  padding: 1.25rem 1.25rem 0 1.25rem;
}

.terms-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.terms-modal-body {
  padding: 1rem 1.25rem;
  font-size: .8rem;
  line-height: 1.5;
  color: #cbd5e1;
  overflow-y: auto;
}

.terms-modal-body section + section {
  margin-top: 1rem;
}

.terms-modal-body strong {
  color: #fff;
  font-weight: 600;
  font-size: .8rem;
  display: block;
  margin-bottom: .4rem;
  line-height: 1.4;
}

.final-block {
  background-color: #0f172a;
  border: 1px solid #475569;
  border-radius: .6rem;
  padding: .75rem .75rem;
  font-size: .75rem;
  line-height: 1.4;
  color: #cbd5e1;
  margin-top: 1rem;
}

.final-block strong {
  color: #fff;
  font-weight: 600;
  margin-bottom: .4rem;
  display: block;
  font-size: .75rem;
}

.terms-modal-footer {
  padding: 1rem 1.25rem 1.25rem 1.25rem;
  border-top: 1px solid #334155;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* bouton success custom : on laisse bootstrap gérer .btn-success etc. */
/* rien à ajouter ici car bootstrap.bundle.css couvre déjà les .btn */

/* Accessibilité focus visible sur les liens du texte légal */
.terms-modal-body a,
.terms-modal-footer button {
  outline: 0;
}
.terms-modal-body a:focus-visible,
.terms-modal-footer button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}
