/* =========================================================
   ICAPS — Page de connexion
   Dépend de : app.css
   ========================================================= */


/* =========================================================
   Page
   ========================================================= */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    minmax(430px, 0.95fr)
    minmax(520px, 1.05fr);
}


/* =========================================================
   Panneau gauche
   ========================================================= */

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 13% 88%,
      rgba(201, 30, 95, 0.11),
      transparent 26%
    ),
    radial-gradient(
      circle at 92% 9%,
      rgba(214, 107, 44, 0.12),
      transparent 23%
    ),
    linear-gradient(
      145deg,
      #f4f8f1 0%,
      #edf5e9 48%,
      #e5f0de 100%
    );
}


/* Grille décorative */

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;

  opacity: 0.42;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.42) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.42) 1px,
      transparent 1px
    );

  background-size: 42px 42px;

  mask-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.9),
      transparent 72%
    );
}


/* Contenu */

.brand-panel__inner {
  position: relative;
  z-index: 2;

  min-height: 100vh;
  max-width: 720px;

  padding: clamp(40px, 6vw, 82px);

  display: flex;
  flex-direction: column;
}


/* Logo */

.brand {
  width: fit-content;
}

.brand__logo {
  display: block;
  width: 168px;
  height: auto;
}


/* Texte principal */

.brand-copy {
  margin: auto 0;
  max-width: 590px;
  padding: 82px 0 54px;
}

.eyebrow,
.form-header__overline {
  margin: 0 0 16px;

  color: var(--color-icaps-700);

  font-size: 0.8rem;
  font-weight: var(--font-weight-bold);

  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-copy h1 {
  max-width: 620px;
  margin: 0;

  font-size: clamp(2.45rem, 4.5vw, 4.7rem);
  font-weight: var(--font-weight-heavy);

  line-height: 0.99;
  letter-spacing: -0.045em;
}

.brand-copy h1::after {
  content: "";
  display: block;

  width: 86px;
  height: 6px;

  margin-top: 30px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      var(--color-cndaps-pink),
      var(--color-cndaps-orange)
    );
}

.brand-copy__text {
  max-width: 535px;
  margin: 28px 0 0;

  color: #525952;

  font-size: 1.08rem;
  line-height: 1.7;
}


/* Bas du panneau */

.brand-panel__footer {
  display: flex;
  align-items: center;
  gap: 12px;

  color: #5c665b;

  font-size: 0.86rem;
}

.brand-panel__footer p {
  margin: 0;
}

.brand-panel__dot {
  width: 8px;
  height: 8px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: var(--color-icaps-600);

  box-shadow:
    0 0 0 6px rgba(105, 170, 63, 0.12);
}


/* =========================================================
   Vague CNDAPS
   ========================================================= */

.brand-panel__wave {
  position: absolute;

  width: 750px;
  max-width: none;
  height: auto;

  right: -160px;
  bottom: -70px;

  filter: brightness(0) invert(1);
  opacity: 0.30;

  z-index: 0;

  pointer-events: none;
  user-select: none;
}


/* =========================================================
   Panneau connexion
   ========================================================= */

.form-panel {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 52px clamp(30px, 6vw, 92px);

  background: var(--color-surface);
}

.form-shell {
  width: min(100%, 500px);
}

.mobile-brand {
  display: none;
}


/* =========================================================
   En-tête connexion
   ========================================================= */

.form-header {
  margin-bottom: 38px;
}

.form-header h2 {
  margin: 0;

  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: var(--font-weight-heavy);

  line-height: 1.1;
  letter-spacing: -0.025em;
}

.form-header p:last-child {
  margin: 13px 0 0;

  color: var(--color-muted);

  font-size: 1rem;
  line-height: 1.55;
}


/* =========================================================
   Formulaire
   ========================================================= */

.login-form {
  display: grid;
  gap: 21px;
}

.field {
  display: grid;
  gap: 9px;
}

.field label,
.check-row {
  font-size: 0.92rem;
  font-weight: var(--font-weight-bold);
}

.field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;

  gap: 18px;
}

.text-link {
  color: var(--color-icaps-700);

  font-size: 0.82rem;
  font-weight: var(--font-weight-bold);

  text-decoration: none;
}

.text-link:hover,
.form-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* Champs spécifiques à la connexion
   À terme, on pourra remplacer par .form-control dans le Blade. */

.field input {
  width: 100%;
  height: 56px;

  padding: 0 16px;

  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);

  background: #ffffff;
  color: var(--color-ink);

  font-size: 1rem;

  outline: none;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.field input::placeholder {
  color: #a1a7a3;
  font-weight: var(--font-weight-light);
}

.field input:hover {
  border-color: #bcc8bc;
}

.field input:focus {
  border-color: var(--color-icaps-600);
  box-shadow: 0 0 0 4px rgba(105, 170, 63, 0.13);
}


/* Checkbox */

.check-row {
  width: fit-content;

  display: flex;
  align-items: center;

  gap: 10px;

  color: #505651;

  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;

  accent-color: var(--color-icaps-600);
}


/* =========================================================
   Bouton principal de connexion
   ========================================================= */

.primary-button {
  width: 100%;
  height: 58px;

  margin-top: 4px;

  border: 0;
  border-radius: var(--radius-md);

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 12px;

  background: var(--color-icaps-600);
  color: #ffffff;

  font-size: 1rem;
  font-weight: var(--font-weight-bold);

  cursor: pointer;

  box-shadow:
    0 12px 25px rgba(79, 140, 47, 0.18);

  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.primary-button svg {
  width: 20px;
  height: 20px;

  fill: none;

  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition: transform var(--transition-fast);
}

.primary-button:hover {
  background: var(--color-icaps-700);

  box-shadow:
    0 15px 28px rgba(79, 140, 47, 0.25);

  transform: translateY(-1px);
}

.primary-button:hover svg {
  transform: translateX(3px);
}

.primary-button:focus-visible,
.text-link:focus-visible,
.form-footer a:focus-visible {
  outline: 3px solid rgba(105, 170, 63, 0.28);
  outline-offset: 4px;
}


/* =========================================================
   Bloc aide
   ========================================================= */

.support-card {
  margin-top: 34px;
  padding: 17px 18px;

  display: flex;
  align-items: flex-start;

  gap: 13px;

  border: 1px solid #e4eadf;
  border-radius: var(--radius-md);

  background: #f8fbf6;
}

.support-card__icon {
  width: 31px;
  height: 31px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--color-icaps-100);
  color: var(--color-icaps-700);

  font-size: 0.9rem;
  font-weight: var(--font-weight-heavy);
}

.support-card strong {
  display: block;

  margin-top: 1px;

  font-size: 0.92rem;
  font-weight: var(--font-weight-bold);
}

.support-card p {
  margin: 4px 0 0;

  color: var(--color-muted);

  font-size: 0.82rem;
  line-height: 1.5;
}


/* =========================================================
   Footer
   ========================================================= */

.form-footer {
  margin-top: 42px;

  display: flex;
  flex-wrap: wrap;

  gap: 11px 19px;

  color: #8a908c;

  font-size: 0.75rem;
}

.form-footer a {
  text-decoration: none;
}


/* =========================================================
   Responsive — tablette
   ========================================================= */

@media (max-width: 980px) {
  .login-page {
    grid-template-columns:
      minmax(360px, 0.82fr)
      1.18fr;
  }

  .brand-panel__inner {
    padding: 42px;
  }

  .brand-copy h1 {
    font-size: clamp(2.35rem, 5vw, 3.7rem);
  }
}


/* =========================================================
   Responsive — mobile
   ========================================================= */

@media (max-width: 760px) {
  .login-page {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100vh;

    padding: 36px 22px;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(105, 170, 63, 0.08),
        transparent 30%
      ),
      #ffffff;
  }

  .form-shell {
    width: min(100%, 520px);
  }

  .mobile-brand {
    display: block;
    margin-bottom: 54px;
  }

  .mobile-brand img {
    width: 142px;
    height: auto;
  }

  .form-header {
    margin-bottom: 32px;
  }
}


/* =========================================================
   Responsive — petit mobile
   ========================================================= */

@media (max-width: 430px) {
  .form-panel {
    padding-inline: 18px;
  }

  .field__label-row {
    gap: 10px;
  }

  .text-link {
    font-size: 0.77rem;
  }
}
