/* Kalisterre — Espace candidat v0.2.0
 * Presentation only. Scoped to WordPress pages tagged ksec-ur by the plugin.
 * URM keeps complete control of inputs, form validation and navigation.
 */
body.ksec-ur {
  --ksec-forest: #194c40;
  --ksec-forest-deep: #103d34;
  --ksec-forest-hover: #286b59;
  --ksec-forest-bright: #397b68;
  --ksec-ink: #183d34;
  --ksec-muted: #60786e;
  --ksec-border: #d9e7df;
  --ksec-soft: #f4f8f5;
  --ksec-soft-alt: #eaf3ed;
  --ksec-shadow: 0 22px 65px rgba(19, 65, 52, .10), 0 4px 14px rgba(19, 65, 52, .04);
  --ksec-error: #9d3039;
}
/* A targeted layout layer: never apply these rules to the WordPress header/footer. */
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) {
  color: var(--ksec-ink);
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) * {
  box-sizing: border-box;
}
/* Login and registration form shells. More visible than previous version. */
body.ksec-ur-login :is(.user-registration, #user-registration, .ur-frontend-form),
body.ksec-ur-register :is(.user-registration, #user-registration, .ur-frontend-form) {
  background: #fff !important;
  border: 1px solid var(--ksec-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--ksec-shadow) !important;
  padding: clamp(24px, 3.6vw, 52px) !important;
  margin-inline: auto;
}
body.ksec-ur-login :is(.user-registration, #user-registration, .ur-frontend-form) { max-width: 650px; }
body.ksec-ur-register :is(.user-registration, #user-registration, .ur-frontend-form) { max-width: 1010px; }
/* Do not double-wrap nested URM containers as separate cards. */
body.ksec-ur-login .ur-frontend-form :is(.user-registration, #user-registration),
body.ksec-ur-register .ur-frontend-form :is(.user-registration, #user-registration),
body.ksec-ur-login #user-registration .ur-frontend-form,
body.ksec-ur-register #user-registration .ur-frontend-form {
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: transparent !important;
}
/* Form typography and spacing */
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) :is(label, .ur-label) {
  color: var(--ksec-ink) !important;
  font-weight: 650 !important;
  letter-spacing: -.01em;
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) :is(.ur-form-row, .ur-form-grid) { row-gap: 12px; }
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="url"], select, textarea) {
  background: #fcfefd !important;
  border: 1px solid #cbded2 !important;
  border-radius: 12px !important;
  color: #183d34 !important;
  box-shadow: none !important;
  padding: 12px 15px !important;
  min-height: 51px;
  max-width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="url"], select, textarea):focus {
  outline: none !important;
  background: #fff !important;
  border-color: var(--ksec-forest-bright) !important;
  box-shadow: 0 0 0 4px rgba(50, 121, 96, .15) !important;
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(input, textarea)::placeholder { color: #83978d !important; opacity: 1; }
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(input, textarea):disabled { background: #f3f6f4 !important; color: #64776f !important; }
/* Explicit button targets override blue inline/theme URM defaults. No generic .button on unrelated widgets. */
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(.ur-submit-button, .user-registration-Button, .user-registration-submit-Button, button[type="submit"], input[type="submit"], .ur-button-container button),
body.ksec-ur-account :is(.user-registration-MyAccount-content, .ur-frontend-form)
:is(.button, .user-registration-Button, .ur-submit-button, button[type="submit"], input[type="submit"]) {
  background: var(--ksec-forest) !important;
  background-color: var(--ksec-forest) !important;
  border: 1px solid var(--ksec-forest) !important;
  color: #fff !important;
  border-radius: 12px !important;
  min-height: 48px;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  letter-spacing: .005em;
  box-shadow: 0 7px 16px rgba(25,76,64,.16) !important;
  text-decoration: none !important;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(.ur-submit-button, .user-registration-Button, .user-registration-submit-Button, button[type="submit"], input[type="submit"], .ur-button-container button):not(:disabled):hover,
body.ksec-ur-account :is(.user-registration-MyAccount-content, .ur-frontend-form)
:is(.button, .user-registration-Button, .ur-submit-button, button[type="submit"], input[type="submit"]):not(:disabled):hover {
  background: var(--ksec-forest-hover) !important;
  background-color: var(--ksec-forest-hover) !important;
  border-color: var(--ksec-forest-hover) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(25,76,64,.18) !important;
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form)
:is(button, input[type="submit"]):disabled,
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) .ur-submit-button:disabled {
  opacity: .58 !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
/* Preserve secondary actions (profile header) as outline instead of filled buttons. */
body.ksec-ur-account .user-registration-profile-header-nav :is(a,button):not(.user-registration-Button):not(.button-primary) {
  border-radius: 11px !important;
  color: var(--ksec-forest) !important;
  background: #f7fbf8 !important;
  border: 1px solid #cfded4 !important;
  padding: 10px 15px;
  font-weight: 650;
  box-shadow: none !important;
}
body.ksec-ur-account .user-registration-profile-header-nav :is(a,button):hover {
  background: var(--ksec-soft-alt) !important;
  color: var(--ksec-forest-deep) !important;
}
/* URM-owned links — no blue. */
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) a,
body.ksec-ur-account .user-registration-MyAccount-navigation a {
  color: var(--ksec-forest-bright) !important;
  text-underline-offset: 3px;
}
body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) a:hover,
body.ksec-ur-account .user-registration-MyAccount-navigation a:hover {
  color: var(--ksec-forest-deep) !important;
}
/* Account: visible two-column editorial design. Preserve the URM DOM and responsive layout. */
body.ksec-ur-account :is(.user-registration-MyAccount, #user-registration.user-registration-MyAccount, .user-registration.user-registration-MyAccount) {
  border: 1px solid var(--ksec-border) !important;
  border-radius: 26px !important;
  background: #fff !important;
  box-shadow: var(--ksec-shadow) !important;
  overflow: hidden;
}
body.ksec-ur-account :is(.user-registration-MyAccount-navigation--wrapper, .user-registration-MyAccount-navigation) {
  background: linear-gradient(155deg,#eff7f1 0%, #e7f2eb 100%) !important;
  border-color: var(--ksec-border) !important;
  box-shadow: none !important;
}
body.ksec-ur-account .user-registration-MyAccount-navigation--wrapper {
  border-radius: 20px !important;
  padding: 16px !important;
}
body.ksec-ur-account .user-registration-MyAccount-navigation--wrapper .user-registration-MyAccount-navigation {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
body.ksec-ur-account .user-registration-MyAccount-navigation li {
  background: transparent !important;
  border: 0 !important;
  margin: 5px 0 !important;
}
body.ksec-ur-account .user-registration-MyAccount-navigation a {
  display: block;
  background: transparent !important;
  padding: 13px 16px !important;
  font-weight: 650;
  border-radius: 11px !important;
  border-left: 3px solid transparent !important;
  transition: background-color .16s ease, color .16s ease;
}
body.ksec-ur-account .user-registration-MyAccount-navigation a:hover {
  background: #fff !important;
}
body.ksec-ur-account .user-registration-MyAccount-navigation :is(.is-active,.is-active a,.user-registration-MyAccount-navigation-link.is-active,.user-registration-MyAccount-navigation-link.is-active a),
body.ksec-ur-account .user-registration-MyAccount-navigation .is-active a {
  background: #fff !important;
  color: var(--ksec-forest) !important;
  border-left-color: var(--ksec-forest) !important;
  box-shadow: 0 3px 10px rgba(16,61,52,.06) !important;
}
body.ksec-ur-account .user-registration-MyAccount-content {
  background: #fff !important;
  border: 0 !important;
  border-radius: 18px !important;
  padding: clamp(20px,3.1vw,44px) !important;
  box-shadow: none !important;
}
body.ksec-ur-account :is(.user-registration-profile-header-nav h3,.user-registration-MyAccount-content h2,.user-registration-MyAccount-content h3) {
  color: var(--ksec-forest-deep) !important;
  font-weight: 750 !important;
  letter-spacing: -.025em;
}
body.ksec-ur-account .user-registration-profile-header-nav {
  border-bottom-color: var(--ksec-border) !important;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
body.ksec-ur-account .user-registration-MyAccount-content :is(.ur-form-row,.ur-form-grid) {
  row-gap: 18px;
}
body.ksec-ur-account .user-registration-MyAccount-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
body.ksec-ur-account .user-registration-MyAccount-content :is(textarea,select) {
  border: 1px solid #cbddd2 !important;
  background: #fafcfb !important;
  color: var(--ksec-ink) !important;
  border-radius: 12px !important;
  min-height: 48px;
  padding: 11px 14px !important;
  box-shadow: none !important;
}
body.ksec-ur-account .user-registration-MyAccount-content input:focus,
body.ksec-ur-account .user-registration-MyAccount-content :is(textarea,select):focus {
  border-color: var(--ksec-forest-bright) !important;
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(50,121,96,.14) !important;
}
body.ksec-ur-account .user-registration-MyAccount-content label {
  color: var(--ksec-ink) !important;
  font-weight: 650 !important;
}
body.ksec-ur-account .user-registration-MyAccount-content :is(.description,.ur-field-description,.ur-description) {
  color: var(--ksec-muted) !important;
  line-height: 1.65;
}
/* Status/error UX; never suppress messages. */
body.ksec-ur :is(.user-registration-error,.user-registration-error-message,.ur-error,.ur-message,.user-registration-message) {
  border-radius: 12px !important;
  padding: 12px 16px !important;
}
body.ksec-ur :is(.user-registration-error,.user-registration-error-message,.ur-error) {
  border-color: #e9b9bf !important;
  background-color: #fff5f5 !important;
  color: var(--ksec-error) !important;
}
@media(max-width: 840px) {
  body.ksec-ur-account .user-registration-MyAccount-content { padding: 22px !important; }
}
@media(max-width: 640px) {
  body.ksec-ur-login :is(.user-registration,#user-registration,.ur-frontend-form),
  body.ksec-ur-register :is(.user-registration,#user-registration,.ur-frontend-form) {
    border-radius: 17px !important;
    padding: 20px !important;
  }
  body.ksec-ur-account :is(.user-registration-MyAccount,.user-registration.user-registration-MyAccount) {
    border-radius: 17px !important;
  }
  body.ksec-ur-account .user-registration-MyAccount-navigation--wrapper { padding: 12px !important; }
  body.ksec-ur-account .user-registration-MyAccount-content { padding: 18px !important; }
}
@media(prefers-reduced-motion: reduce) {
  body.ksec-ur :is(.user-registration, #user-registration, .ur-frontend-form) * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* v0.2.1 — URM forgot-password and reset-password views.
 * The old v0.2.0 stylesheet intentionally loaded only on three pages;
 * the dedicated recovery pages are now opt-in via body.ksec-ur-recovery.
 * Do not affect Astra outer container, page title, header or footer.
 */
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .user-registration-LostPassword, .user-registration-ResetPassword, .ur-lost-password-form, .ur-reset-password-form) {
  color: var(--ksec-ink);
  background: #fff !important;
  border: 1px solid var(--ksec-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--ksec-shadow) !important;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(25px, 3.2vw, 54px) !important;
  box-sizing: border-box;
}
/* Prevent nested URM wrappers from appearing as multiple cards. */
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form)
:is(.user-registration, #user-registration, .ur-frontend-form, .user-registration-LostPassword, .user-registration-ResetPassword, .ur-lost-password-form, .ur-reset-password-form) {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  max-width: none;
  padding: 0 !important;
  border-radius: 0 !important;
}
/* A narrow fallback for form markup generated directly by URM with no shared wrapper.
 * Only the dedicated recovery page can receive these rules. */
body.ksec-ur-recovery .entry-content :is(.lost-password-form, .reset-password-form, form.ur-lost-password, form.ur-reset-password) {
  box-sizing: border-box;
  max-width: 640px;
  margin-inline: auto;
  color: var(--ksec-ink);
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content)
:is(h1, h2, h3) {
  color: var(--ksec-forest-deep) !important;
  letter-spacing: -.025em;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content)
:is(label, .ur-label) {
  color: var(--ksec-ink) !important;
  font-weight: 650 !important;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content)
:is(input[type="text"], input[type="email"], input[type="password"]) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  background: #fcfefd !important;
  color: var(--ksec-ink) !important;
  border: 1px solid #cbded2 !important;
  border-radius: 12px !important;
  padding: 12px 15px !important;
  box-shadow: none !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content)
:is(input[type="text"], input[type="email"], input[type="password"]):focus {
  outline: none !important;
  border-color: var(--ksec-forest-bright) !important;
  box-shadow: 0 0 0 4px rgba(50,121,96,.14) !important;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content)
:is(button[type="submit"], input[type="submit"], .user-registration-Button, .ur-submit-button, .button-primary) {
  background: var(--ksec-forest) !important;
  background-color: var(--ksec-forest) !important;
  border: 1px solid var(--ksec-forest) !important;
  border-radius: 12px !important;
  color: #fff !important;
  min-height: 50px;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  box-shadow: 0 7px 16px rgba(25,76,64,.16) !important;
  text-decoration: none !important;
  transition: background-color .16s ease, box-shadow .16s ease;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content)
:is(button[type="submit"], input[type="submit"], .user-registration-Button, .ur-submit-button, .button-primary):hover {
  background: var(--ksec-forest-hover) !important;
  background-color: var(--ksec-forest-hover) !important;
  border-color: var(--ksec-forest-hover) !important;
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(25,76,64,.18) !important;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content) a {
  color: var(--ksec-forest-bright) !important;
}
body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .entry-content) a:hover {
  color: var(--ksec-forest-deep) !important;
}
body.ksec-ur-recovery :is(.user-registration-error, .user-registration-message, .ur-error, .ur-message) {
  border-radius: 12px !important;
}
@media (max-width: 640px) {
  body.ksec-ur-recovery :is(.user-registration, #user-registration, .ur-frontend-form, .user-registration-LostPassword, .user-registration-ResetPassword) {
    padding: 20px !important;
    border-radius: 17px !important;
  }
}
