html {
  font-size: 15px;
}

body {
  margin: 0;
  background: #f5eefa;
  font-family: 'Inter', sans-serif;
}

.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;
}

#content.login-split {
  --lp-pink: #ec3a82;
  --lp-orange: #ff7a21;
  --grad-accent: linear-gradient(90deg, #f7a23b, #f6c453);
  --grad-btn: linear-gradient(95deg, #e6565d 0%, #ad5fb3 100%);

  position: relative;
  display: grid;
  grid-template-columns: minmax(28rem, 42%) 1fr;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background-size: cover;
}

.login-panel {
  position: relative;
  z-index: 2;
  display: flex;
  overflow: hidden;
}

.login-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 40rem;
  margin: auto;
  padding: 3.2rem 3.733rem;
  box-sizing: border-box;
}

/* Emplacement volontairement vide jusqu'à l'ajout du logo APOR. */
.login-logo {
  width: 100%;
  height: clamp(5rem, 7vw, 8rem);
  margin-bottom: 1.4rem;
    background: url("../images/ignition/logo.png") no-repeat center center;
    background-size: contain;
}

.login-title {
  margin: 0;
  color: #20014f;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.login-title span {
  display: block;
  font-size: 0.6em;
}

.login-tagline {
  margin: .667rem 0 0;
  color: transparent;
  background: var(--grad-accent);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(1.7rem, 2vw, 1.933rem);
  font-weight: 500;
}

.login-lead {
  margin: 2rem 0 2.2rem;
  color: #340e5d;
  font-size: clamp(1rem, 0.8vw, 1.2rem);
  line-height: 1.6;
}

.login-error {
  margin-bottom: 1.2rem;
  padding: .733rem .933rem;
  border: 1px solid rgba(236, 58, 130, .4);
  border-radius: .8rem;
  color: #ffd7e6;
  background: rgba(236, 58, 130, .14);
  font-size: .9rem;
}

#ignition-login-fields {
  width: 100%;
}

.login-input {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: .933rem;
  max-width: 26rem;
}

#content.login-split .login-input input {
  width: 100%;
  height: 3.733rem;
  margin: 0;
  padding: 0 1.067rem 0 4rem;
  box-sizing: border-box;
  border: 0;
  border-radius: 1rem;
  outline: none;
  color: #b162a4;
  background: #ffffffb6;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: background .15s ease, box-shadow .15s ease;
}

#content.login-split .login-input input::placeholder {
  color: #b162a4;
}

#content.login-split .login-input input:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
}

#content.login-split .login-input input:autofill,
#content.login-split .login-input input:-webkit-autofill,
#content.login-split .login-input input:-webkit-autofill:hover,
#content.login-split .login-input input:-webkit-autofill:focus,
#content.login-split .login-input input:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #b162a4;
  caret-color: #b162a4;
}

.login-input-icon {
  position: absolute;
  left: .667rem;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.533rem;
  height: 2.533rem;
  color: #b162a4;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

#content.login-split .password-field input {
  padding-right: 3.467rem;
}

#content.login-split .password-field input[type='password']::-ms-reveal,
#content.login-split .password-field input[type='password']::-ms-clear {
  display: none;
}

#content.login-split .password-toggle {
  position: absolute;
  right: .667rem;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  color: #b162a4;
  opacity: 0.8;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

#content.login-split .password-toggle:hover,
#content.login-split .password-toggle:focus {
  opacity: 1;
}

#content.login-split .password-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2.8rem;
  margin-top: 3.333rem;
}

.login-btn {
  height: 3.467rem;
  min-width: 13.8rem;
  padding: 0 2.267rem;
  border: 0;
  border-radius: 2rem;
  color: #fff;
  background: var(--grad-btn);
  cursor: pointer;
  font: inherit;
  font-size: clamp(14px, 1.3vw, 1.133rem);
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.login-btn:hover,
.login-btn:focus {
  box-shadow: 0 8px 32px rgba(236, 58, 130, .25);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.login-forgot {
  color: var(--lp-orange);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.login-forgot:hover,
.login-forgot:focus {
  color: var(--lp-pink);
}

.login-url {
  margin-top: auto;
  padding-top: 2.167rem;
  color: rgba(210, 200, 235, .5);
  font-size: .833rem;
  text-decoration: none;
}

.login-url:hover {
  color: rgba(210, 200, 235, .8);
}

#content.login-split footer {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 1rem;
}

#logo-departement {
    width: clamp(5rem, 30vw, 10rem);
    height: 3rem;
    background: url(../images/ignition/logo-71.png) no-repeat left top;
    background-size: contain;
}

#logo-fse {
    width: clamp(5rem, 30vw, 11.6rem);
    height: 2.5rem;
    background: url(../images/ignition/logo-fse.png) no-repeat right top;
    background-size: contain;
}

.login-visual {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  margin-left: -6vw;
}

.login-hero {
  position: absolute;
  top: 6%;
  right: 0;
  z-index: 1;
  width: 100%;
  height: 97%;
  object-fit: contain;
  object-position: bottom center;
}

.login-ava {
  position: absolute;
  z-index: 2;
  border: 4px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  object-fit: cover;
}

.login-ava-1 {
  top: 7%;
  left: 6.5%;
  width: 5vw;
  height: 5vw;
}

.login-ava-2 {
  bottom: 12%;
  left: 9%;
  width: 5vw;
  height: 5vw;
}

.login-ava-3 {
  right: 9%;
  bottom: 15.7%;
  width: 6.4vw;
  height: 6.4vw;
}

/* Modale existante de récupération du mot de passe. */
#modalRecupId {
  width: 40rem;
  max-width: calc(100% - 2rem);
  padding: 1rem 0 2rem;
  border-radius: 1rem;
  outline: none !important;
}

#modalRecupId .modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  text-align: center;
}

#modalRecupId .modal-content h5 {
  color: #201111;
  font-size: 1.2rem;
  font-weight: bold;
}

#modalRecupId .modal-content p {
  margin: 1rem 0 0;
  color: #201111;
  font-size: 1rem;
}

#modalRecupId .modal-content p br {
  display: block !important;
}

#modalRecupId .modal-content p strong {
  font-weight: bold;
}

#modalRecupId .modal-content p .spams {
  font-size: .9rem;
  font-style: italic;
}

#modalRecupId .modal-content form {
  width: 30rem;
  max-width: calc(100% - 2rem);
}

#modalRecupId .modal-content input {
  width: calc(100% - 4rem);
  height: 40px;
  padding: 0 2rem;
  border: 1px solid #f0f0f0;
  border-radius: 15px;
  color: #464c58;
  background-color: #e9e9e9;
  font-size: 13.2px;
  line-height: 40px;
  outline: none;
}

#modalRecupId .modal-content input::placeholder {
  color: #555353;
  text-align: center;
}

#resetPasswordMessage {
  min-height: 2rem;
}

.reset-success {
  color: #28a745;
}

.reset-error {
  color: #dc3545;
}

#modalRecupId .button_form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 2rem;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #6e4192;
  cursor: pointer;
}

#modalRecupId .button_form:hover {
  background: #a64fcf;
}

.modal {
  top: 50% !important;
  transform: translateY(-50%) scaleX(0) scaleY(0) !important;
}

.modal.open {
  transform: translateY(-50%) scaleX(1) scaleY(1) !important;
}

@media (min-width: 1921px) {
  html {
    font-size: 17px;
  }
}

@media (max-width: 980px) {
  #content.login-split {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel-inner {
    max-width: 31.2rem;
    padding: 2.667rem 1.867rem;
  }
}

@media (max-width: 520px) {
  .login-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .login-logo {
    height: 4.5rem;
  }
}

/* LMS: the outer Form1 and its submission handler remain owned by the manager. */
#Form1 { margin: 0; }
#modalRecupId iframe { border: 0; width: 100%; height: 370px; }
#modalRecupId { padding: 0; }
#content.login-split .login-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
