/* ==========================================================================
   Écrans de connexion RPN Prélèvement (association + administration)
   Carte « verre dépoli » sur fond marine/orange — même palette que l'application.
   Autonome (sans Bootstrap) : léger, lisible, entièrement responsive.
   ========================================================================== */
:root {
  --gl-navy-950: #081624;
  --gl-navy-900: #0f2438;
  --gl-navy-800: #16324a;
  --gl-orange: #f2792a;
  --gl-orange-soft: #ffd3b4;
  --gl-text: #ffffff;
  --gl-text-soft: rgba(255, 255, 255, 0.86);
  --gl-line: rgba(255, 255, 255, 0.55);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

.gp-login {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gl-text);
  background: var(--gl-navy-950);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fond ---------- */
.gp-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 10% 6%, rgba(242, 121, 42, 0.30), transparent 60%),
    radial-gradient(900px 640px at 94% 20%, rgba(32, 98, 150, 0.55), transparent 62%),
    radial-gradient(1000px 800px at 72% 104%, rgba(242, 121, 42, 0.20), transparent 60%),
    linear-gradient(160deg, #081624 0%, #0f2438 46%, #16324a 100%);
}
.gp-bg::after {                       /* fines rayures verticales, comme sur le modèle */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 7px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.gp-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: gp-float 18s ease-in-out infinite alternate;
}
.gp-blob.b1 { width: 380px; height: 380px; background: #f2792a; left: -120px; top: 55%; opacity: 0.34; }
.gp-blob.b2 { width: 460px; height: 460px; background: #2a6fa8; right: -160px; top: -120px; opacity: 0.35; animation-delay: -6s; }
.gp-blob.b3 { width: 300px; height: 300px; background: #ff9a4d; right: 12%; bottom: -120px; opacity: 0.22; animation-delay: -11s; }
@keyframes gp-float { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(30px, -26px, 0) scale(1.08); } }

/* ---------- Boutons d'angle (toujours visibles, y compris sur mobile) ---------- */
.gp-corner {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  min-width: 46px;
  padding: 0 16px 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.gp-corner:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.gp-corner:active { transform: scale(0.97); }
.gp-corner-left { left: max(14px, env(safe-area-inset-left)); }
.gp-corner-right { right: max(14px, env(safe-area-inset-right)); }
.gp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--gl-orange);
  color: var(--gl-navy-900);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.gp-ad {
  width: 46px;
  padding: 0;
  justify-content: center;
  background: var(--gl-orange);
  border-color: transparent;
  color: var(--gl-navy-900);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.gp-ad:hover { background: #ff9a4d; color: var(--gl-navy-900); }
.gp-corner svg { width: 20px; height: 20px; margin-left: 6px; }
.gp-corner-back { padding: 0 18px 0 12px; gap: 6px; }
.gp-corner-back svg { margin: 0; }

/* ---------- Scène + carte de verre ---------- */
.gp-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 86px 16px 32px;
}
.gp-glass {
  position: relative;
  width: 100%;
  max-width: 410px;
  padding: 40px 34px 30px;
  border-radius: 36px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04)),
    rgba(8, 22, 36, 0.42);                 /* socle sombre : garantit un texte blanc très lisible */
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gp-glass { background: rgba(15, 36, 56, 0.92); }
}
.gp-glass.is-wide { max-width: 660px; }

.gp-avatar-ring {
  width: 104px;
  height: 104px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 0 0 6px rgba(255, 255, 255, 0.04);
}
.gp-avatar-ring svg { width: 54px; height: 54px; }
.gp-avatar-ring.is-small { width: 76px; height: 76px; }
.gp-avatar-ring.is-small svg { width: 38px; height: 38px; }

.gp-tag {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gl-orange-soft);
  margin-bottom: 4px;
}
.gp-title { margin: 0; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.gp-sub { margin: 6px 0 4px; text-align: center; font-size: 15px; color: var(--gl-text-soft); }

/* ---------- Champs : icône + ligne, étiquette flottante ---------- */
.gp-field { position: relative; margin: 22px 0 2px; }
.gp-field-icon {
  position: absolute;
  left: 2px;
  top: 27px;
  width: 22px;
  height: 22px;
  color: #fff;
  pointer-events: none;
  transition: color 0.2s;
}
.gp-field-icon svg { width: 100%; height: 100%; display: block; }
.gp-field input,
.gp-field select,
.gp-field textarea {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 22px 44px 8px 38px;
  margin: 0;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--gl-line);
  border-radius: 0;
  color: #fff;
  font: inherit;
  font-size: 16px;                 /* 16px : pas de zoom automatique sur iOS */
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gp-field textarea { min-height: 96px; resize: vertical; padding-top: 28px; }
.gp-field label {
  position: absolute;
  left: 38px;
  right: 44px;
  top: 17px;
  font-size: 16px;
  color: var(--gl-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transform-origin: left top;
  transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
}
.gp-field input:focus ~ label,
.gp-field input:not(:placeholder-shown) ~ label,
.gp-field textarea:focus ~ label,
.gp-field textarea:not(:placeholder-shown) ~ label,
.gp-field.is-select label {
  top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gl-orange-soft);
}
.gp-field input:focus,
.gp-field select:focus,
.gp-field textarea:focus { border-bottom-color: var(--gl-orange); box-shadow: 0 1px 0 0 var(--gl-orange); }
.gp-field:focus-within .gp-field-icon { color: var(--gl-orange-soft); }
.gp-field.is-error input, .gp-field.is-error select, .gp-field.is-error textarea { border-bottom-color: #ff9b9b; }
.gp-field input::placeholder, .gp-field textarea::placeholder { color: transparent; }

.gp-field.is-select::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 30px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  pointer-events: none;
}
.gp-field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-top: 24px; }
.gp-field select option { color: #0f2438; background: #fff; }

/* Remplissage automatique du navigateur : garder le fond transparent et le texte blanc */
.gp-field input:-webkit-autofill,
.gp-field input:-webkit-autofill:hover,
.gp-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  transition: background-color 600000s 0s, color 600000s 0s;
}

.gp-eye {
  position: absolute;
  right: 0;
  top: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}
.gp-eye:hover { background: rgba(255, 255, 255, 0.12); }
.gp-eye svg { width: 22px; height: 22px; }
.gp-eye .off { display: none; }
.gp-eye.is-on .on { display: none; }
.gp-eye.is-on .off { display: block; }

.gp-hint { margin: 6px 0 0 38px; font-size: 13px; color: var(--gl-text-soft); }
.gp-err { margin: 6px 0 0 38px; font-size: 13.5px; font-weight: 600; color: #ffc2c2; }

/* ---------- Ligne « se souvenir » / liens ---------- */
.gp-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; }
.gp-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14.5px; color: var(--gl-text-soft); cursor: pointer; }
.gp-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--gl-orange); cursor: pointer; flex-shrink: 0; }
.gp-link { color: var(--gl-orange-soft); font-size: 14.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 211, 180, 0.5); display: inline-flex; align-items: center; min-height: 44px; }
.gp-link:hover { color: #fff; text-decoration-color: #fff; }

/* ---------- Bouton principal ---------- */
.gp-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  padding: 0 20px;
  border: 0;
  border-radius: 20px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gl-navy-900);
  background: linear-gradient(135deg, #f2792a, #ffa45f);
  box-shadow: 0 12px 28px rgba(242, 121, 42, 0.38);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.gp-submit:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 16px 34px rgba(242, 121, 42, 0.45); color: var(--gl-navy-900); }
.gp-submit:active { transform: translateY(0) scale(0.99); }
.gp-submit.is-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.35); }
.gp-submit.is-ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

.gp-alt { margin: 22px 0 0; text-align: center; font-size: 14.5px; color: var(--gl-text-soft); }
.gp-alt a { color: var(--gl-orange-soft); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 6px 2px; }
.gp-alt a:hover { color: #fff; }
.gp-foot { margin: 20px 8px 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.78); max-width: 410px; }

/* ---------- Messages ---------- */
.gp-alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 82, 82, 0.20);
  border: 1px solid rgba(255, 150, 150, 0.55);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
}
.gp-alert p { margin: 0; }
.gp-alert.is-ok { background: rgba(46, 204, 130, 0.20); border-color: rgba(120, 230, 180, 0.55); }
.gp-alert.is-info { background: rgba(120, 180, 255, 0.20); border-color: rgba(160, 205, 255, 0.55); }

/* ---------- Formulaire d'inscription (grille) ---------- */
.gp-sec { margin: 28px 0 0; font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gl-orange-soft); display: flex; align-items: center; gap: 12px; }
.gp-sec::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.28); }
.gp-sec small { font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--gl-text-soft); font-size: 13px; }
.gp-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
.gp-span2 { grid-column: 1 / -1; }
@media (max-width: 620px) { .gp-grid { grid-template-columns: 1fr; } }
.gp-center-text { text-align: center; }
.gp-lead { margin: 14px 0 0; text-align: center; color: var(--gl-text-soft); font-size: 15px; }

/* ---------- Adaptation aux petits écrans ---------- */
@media (max-width: 480px) {
  .gp-stage { padding: 78px 12px 24px; }
  .gp-glass { padding: 30px 22px 24px; border-radius: 30px; }
  .gp-avatar-ring { width: 88px; height: 88px; margin-bottom: 14px; }
  .gp-avatar-ring svg { width: 44px; height: 44px; }
  .gp-title { font-size: 23px; }
}
@media (max-width: 380px) {
  .gp-corner .gp-brand-text { display: none; }
  .gp-corner:not(.gp-ad):not(.gp-corner-back) { padding-right: 8px; }
  .gp-glass { padding: 26px 18px 22px; }
}
@media (max-height: 640px) and (orientation: landscape) {
  .gp-stage { padding-top: 70px; justify-content: flex-start; }
  .gp-avatar-ring { width: 64px; height: 64px; margin-bottom: 8px; }
  .gp-avatar-ring svg { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .gp-blob { animation: none; } * { transition: none !important; } }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }
.gp-field input:focus-visible, .gp-field select:focus-visible, .gp-field textarea:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }


/* ---------- Logo et photo de profil ---------- */
.gp-badge.has-img { background: transparent; }
.gp-badge .gp-logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.gp-corner-right > .gp-badge.has-img { width: 36px; height: 36px; }

.gp-avatar-ring { position: relative; }
.gp-avatar-ring.is-upload { cursor: pointer; overflow: visible; transition: transform 0.15s, box-shadow 0.15s; }
.gp-avatar-ring.is-upload:hover { transform: scale(1.04); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(242, 121, 42, 0.55); }
.gp-avatar-ring.is-upload > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.gp-avatar-ring.is-upload.has-photo .gp-photo-default { visibility: hidden; }
.gp-photo-cam {
  position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gl-orange); color: var(--gl-navy-900); display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(15, 36, 56, 0.9);
}
.gp-photo-cam svg { width: 16px; height: 16px; margin: 0; }
.gp-photo-caption { text-align: center; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, 0.85); margin: -6px 0 14px; }
.gp-photo-caption small { font-weight: 400; opacity: 0.8; }
input.gp-photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
