/* ══════════════════════════════════════════════════════════════════════
   INSCRIPTION — split-screen glassmorphism
   Chargé uniquement sur /inscription/
   ══════════════════════════════════════════════════════════════════════ */

/* ── Reset Astra ─────────────────────────────────────────────────────── */
#content,
.site-content {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.ast-container,
#primary {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.ast-article-single,
.entry-content {
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ── Page & fond ─────────────────────────────────────────────────────── */
.insc-page {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(160deg, #1a2e1a 0%, #2d4a2d 40%, #1e3a2e 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Orbes de lumière ─────────────────────────────────────────────── */
.insc-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}
.insc-orb--1 {
  width: 520px;
  height: 520px;
  background: rgba(125, 191, 120, 0.18);
  top: -120px;
  left: -140px;
}
.insc-orb--2 {
  width: 380px;
  height: 380px;
  background: rgba(61, 107, 56, 0.20);
  bottom: 60px;
  right: -80px;
}
.insc-orb--3 {
  width: 260px;
  height: 260px;
  background: rgba(125, 191, 120, 0.12);
  top: 50%;
  left: 38%;
  transform: translateY(-50%);
}

/* ── Split-screen ────────────────────────────────────────────────────── */
.insc-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: calc(100vh - 130px); /* 130px = footer wave height */
}

/* ── Colonne gauche ──────────────────────────────────────────────────── */
.insc-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 130px 3.5rem 3rem 4rem;
  animation: inscFadeUp 0.6s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Logo block ──────────────────────────────────────────────────────── */
.insc-logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.insc-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.insc-logo-text {
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
}

/* ── Tag pill ────────────────────────────────────────────────────────── */
.insc-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(125, 191, 120, 0.14);
  border: 1px solid rgba(125, 191, 120, 0.30);
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.80);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  width: max-content;
}
.insc-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dbf78;
  flex-shrink: 0;
  animation: inscPulse 2s ease-in-out infinite;
}

/* ── Titre ───────────────────────────────────────────────────────────── */
.insc-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 2.9rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
}
.insc-title-accent {
  color: #7dbf78;
  display: inline-block;
}

/* ── Description ─────────────────────────────────────────────────────── */
.insc-desc {
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.7;
  margin: 0 0 2.5rem;
  max-width: 400px;
}

/* ── Features ────────────────────────────────────────────────────────── */
.insc-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.insc-feature {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}
.insc-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(125, 191, 120, 0.12);
  border: 1px solid rgba(125, 191, 120, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.insc-feature-icon svg {
  width: 17px;
  height: 17px;
  stroke: rgba(125, 191, 120, 0.90);
}

/* ── Colonne droite ──────────────────────────────────────────────────── */
.insc-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 4rem 3rem 2.5rem;
  animation: inscFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Card glassmorphism ──────────────────────────────────────────────── */
.insc-card {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow:
    0 20px 60px rgba(10, 20, 10, 0.45),
    0 4px 16px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ── Alert ───────────────────────────────────────────────────────────── */
.insc-alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.insc-alert[hidden] { display: none !important; }
.insc-alert--error {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.32);
  color: #ffc5c5;
}
.insc-alert--success {
  background: rgba(125, 191, 120, 0.12);
  border: 1px solid rgba(125, 191, 120, 0.32);
  color: #d4f5d2;
}
.insc-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* Shake animation de la card sur erreur */
.insc-card.shake { animation: inscShake 0.38s ease; }

/* ── Champs ──────────────────────────────────────────────────────────── */
.insc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}
.insc-field {
  margin-bottom: 1.05rem;
}
.insc-label {
  display: block;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.50);
  margin-bottom: 0.38rem;
}
.insc-required {
  color: rgba(125, 191, 120, 0.70);
  font-weight: 400;
  margin-left: 0.15em;
}

/* ── Input ───────────────────────────────────────────────────────────── */
/* Anti-Astra : sélecteur parent + !important obligatoire */
.insc-page .insc-input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff !important;
  caret-color: #fff !important;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.insc-page .insc-input::placeholder {
  color: rgba(255, 255, 255, 0.25) !important;
}
.insc-page .insc-input:focus {
  border-color: rgba(125, 191, 120, 0.60);
  background: rgba(125, 191, 120, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(125, 191, 120, 0.12);
}
.insc-page .insc-input.is-error {
  border-color: rgba(224, 82, 82, 0.60) !important;
}
.insc-page .insc-input.is-valid {
  border-color: rgba(125, 191, 120, 0.55) !important;
}

/* ── Input wrap (suffix/eye) ─────────────────────────────────────────── */
.insc-input-wrap { position: relative; }
.insc-input-wrap .insc-input { padding-right: 2.6rem; }

.insc-input-suffix {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.insc-input-suffix svg {
  width: 15px;
  height: 15px;
  stroke: rgba(255, 255, 255, 0.25);
  display: block;
}

/* ── Toggle show/hide password ───────────────────────────────────────── */
/* Anti-Astra : force color sur button */
.insc-page .insc-eye-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.35) !important;
  caret-color: rgba(255, 255, 255, 0.35) !important;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.2s;
}
.insc-page .insc-eye-btn:hover {
  color: rgba(255, 255, 255, 0.75) !important;
}
.insc-page .insc-eye-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
.insc-eye-btn svg { width: 15px; height: 15px; display: block; flex-shrink: 0; }

/* ── Erreur inline ───────────────────────────────────────────────────── */
.insc-field-err {
  display: block;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.72rem;
  color: #ffb3b3;
  margin-top: 0.28rem;
  min-height: 1em;
  line-height: 1.4;
}

/* ── Strength meter ──────────────────────────────────────────────────── */
.insc-strength {
  margin-top: 0.6rem;
}
.insc-strength-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 0.3rem;
}
.insc-strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.10);
  transition: background 0.25s ease;
}
.insc-strength-seg.s-weak    { background: #e05252; }
.insc-strength-seg.s-fair    { background: #e09f3e; }
.insc-strength-seg.s-strong  { background: #7dbf78; }
.insc-strength-seg.s-vstrong { background: #4fa84a; }

.insc-strength-label {
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.70rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.40);
  display: block;
}

/* ── Séparateur RGPD ─────────────────────────────────────────────────── */
.insc-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}
.insc-sep::before,
.insc-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
}
.insc-sep span {
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}

/* ── Checkbox RGPD ───────────────────────────────────────────────────── */
.insc-rgpd-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.60);
}

/* Anti-Astra: inputs[type=checkbox] ont besoin du même traitement */
.insc-page .insc-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08) !important;
  cursor: pointer;
  color: var(--clr-text, #2c4a28) !important;
  caret-color: var(--clr-text, #2c4a28) !important;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  position: relative;
}
.insc-page .insc-checkbox:checked {
  background: #7dbf78 !important;
  border-color: #7dbf78;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7l3.5 3.5L12 4' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 70% !important;
}
.insc-page .insc-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 191, 120, 0.24);
  border-color: rgba(125, 191, 120, 0.60);
}
.insc-page .insc-checkbox.is-error {
  border-color: rgba(224, 82, 82, 0.65) !important;
}

.insc-checkbox-custom { display: none; } /* remplacé par .insc-checkbox native styled */

.insc-rgpd-text a {
  color: rgba(125, 191, 120, 0.90);
  text-decoration: none;
  transition: color 0.2s;
}
.insc-rgpd-text a:hover {
  color: #a3d9a0;
  text-decoration: underline;
}

/* ── Bouton submit ───────────────────────────────────────────────────── */
/* Anti-Astra : sélecteur parent + !important obligatoire */
.insc-page .insc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  margin-top: 1.25rem;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  background: linear-gradient(135deg, #7dbf78, #3d6b38) !important;
  color: #fff !important;
  caret-color: #fff !important;
  border: none !important;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(61, 107, 56, 0.38);
  letter-spacing: 0.01em;
}
.insc-page .insc-btn:hover:not(:disabled):not(.is-loading) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(61, 107, 56, 0.48) !important;
}
.insc-page .insc-btn:active:not(:disabled):not(.is-loading) {
  transform: translateY(0);
}
.insc-page .insc-btn:disabled,
.insc-page .insc-btn.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}
.insc-btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.insc-btn-text { pointer-events: none; }
.insc-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  animation: inscSpin 0.75s linear infinite;
}
.insc-page .insc-btn.is-loading .insc-btn-spinner { display: block; }
.insc-page .insc-btn.is-loading .insc-btn-icon,
.insc-page .insc-btn.is-loading .insc-btn-text { display: none; }

/* ── Lien connexion ──────────────────────────────────────────────────── */
.insc-switch {
  margin: 1.1rem 0 0;
  text-align: center;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 0.835rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.6;
}
.insc-switch-link {
  color: rgba(125, 191, 120, 0.90) !important;
  font-weight: 500;
  text-decoration: none;
  margin-left: 0.25em;
  transition: color 0.2s;
}
.insc-switch-link:hover {
  color: #a3d9a0 !important;
  text-decoration: underline;
}

/* ── Bannière succès sur page /connexion/ ───────────────────────────── */
.insc-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(125, 191, 120, 0.10);
  border: 1px solid rgba(125, 191, 120, 0.30);
  border-left: 3px solid #7dbf78;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #2c6c27;
  animation: inscFadeUp 0.4s ease both;
}
.insc-success-banner svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  stroke: #3d8c36;
}

/* Lien "Pas encore membre ?" sur /connexion/ */
.connexion-switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: #7a8a78;
  line-height: 1.5;
}
.connexion-switch a {
  color: #3d6b38;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.connexion-switch a:hover {
  color: #2a5226;
  text-decoration: underline;
}

/* ── Responsive — tablette (≤ 900px) ────────────────────────────────── */
@media (max-width: 900px) {
  .insc-main {
    grid-template-columns: 1fr 1.6fr;
  }
  .insc-left {
    padding: 120px 1.75rem 2.5rem 2.25rem;
  }
  .insc-right {
    padding: 110px 2.25rem 2.5rem 1.5rem;
  }
  .insc-title { font-size: 1.85rem; }
  .insc-desc  { display: none; }
}

/* ── Responsive — mobile (≤ 480px) ─────────────────────────────────── */
@media (max-width: 480px) {
  .insc-main {
    display: block;
  }
  .insc-left {
    display: none;
  }
  .insc-right {
    padding: 90px 1rem 2rem;
  }
  .insc-card {
    max-width: 100%;
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
  }
  .insc-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ── Responsive — ≤ 768px ────────────────────────────────────────────── */
@media (max-width: 768px) and (min-width: 481px) {
  .insc-main {
    grid-template-columns: 1fr 1.8fr;
  }
  .insc-left {
    padding: 115px 1.5rem 2rem 2rem;
  }
  .insc-features { display: none; }
  .insc-right {
    padding: 115px 2rem 2rem 1.25rem;
  }
}

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes inscFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes inscSpin {
  to { transform: rotate(360deg); }
}
@keyframes inscPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
@keyframes inscShake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-6px); }
  40%, 80%  { transform: translateX(6px); }
}

/* ── Réduction de mouvement ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .insc-left,
  .insc-card,
  .insc-success-banner {
    animation: none;
  }
  .insc-tag-dot {
    animation: none;
  }
  .insc-btn-spinner {
    animation: none;
  }
}
