/* ============================================================
   AUTH PAGES — Design moderne Circumflex Foundation
   Classes: auth-screen, auth-card, auth-card-header, etc.
   ============================================================ */

/* --- Fond animé plein écran --- */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background: #f4f9fd;
  overflow: hidden;
  padding: 40px 16px;
}

/* Particules décoratives d'arrière-plan */
.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 620px 480px at 18% 22%, rgba(0,176,240,.16), transparent 64%),
    radial-gradient(ellipse 500px 440px at 82% 78%, rgba(192,96,32,.12), transparent 62%),
    radial-gradient(ellipse 360px 300px at 50% 50%, rgba(0,93,134,.06), transparent 58%);
  animation: authBgPulse 8s ease-in-out infinite alternate;
}

@keyframes authBgPulse {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}

/* Cercles flottants décoratifs */
.auth-screen::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 320px;
  height: 320px;
  border: 38px solid rgba(0,176,240,.08);
  border-radius: 50%;
  top: -90px;
  right: -100px;
  animation: authFloatA 14s ease-in-out infinite;
}
.auth-screen .auth-orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}
.auth-orb--1 {
  width: 200px;
  height: 200px;
  background: rgba(192,96,32,.06);
  bottom: -60px;
  left: -50px;
  animation: authFloatB 18s ease-in-out infinite;
}
.auth-orb--2 {
  width: 140px;
  height: 140px;
  border: 4px solid rgba(0,176,240,.1);
  top: 18%;
  right: 10%;
  animation: authFloatC 22s ease-in-out infinite;
}
.auth-orb--3 {
  width: 90px;
  height: 90px;
  background: rgba(0,93,134,.05);
  bottom: 22%;
  left: 8%;
  animation: authFloatA 16s ease-in-out infinite reverse;
}

@keyframes authFloatA {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(18px, -22px) rotate(3deg); }
  50%      { transform: translate(-10px, -14px) rotate(-2deg); }
  75%      { transform: translate(14px, 16px) rotate(4deg); }
}

@keyframes authFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-20px, 16px) scale(1.08); }
  66%      { transform: translate(16px, -10px) scale(.94); }
}

@keyframes authFloatC {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-24px, -18px) rotate(6deg); }
}

/* --- Carte centrale --- */
.auth-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(216,237,246,.9);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0,93,134,.08),
    0 2px 8px rgba(0,93,134,.04),
    0 0 0 1px rgba(255,255,255,.6) inset;
  padding: 42px 36px;
  animation: authCardIn .6s cubic-bezier(.22, .61, .36, 1) both;
}

.auth-card-wide {
  width: min(720px, 100%);
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- En-tête de la carte --- */
.auth-card-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 16px;
  transition: transform .3s ease;
}
.auth-logo:hover {
  transform: scale(1.06);
}
.auth-logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  padding: 10px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,93,134,.1);
  border: 1px solid rgba(216,237,246,.7);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #e8f8fe, #d0effc);
  color: #005d86;
  border: 1px solid #b9eaff;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.auth-card-header h1 {
  margin: 0 0 8px;
  font-family: "Century Gothic", "Roboto", sans-serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: #172733;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.auth-card-header p {
  margin: 0;
  color: #5c6f7a;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.auth-inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-inline-alert i {
  flex: 0 0 auto;
  margin-top: 2px;
}

.auth-inline-alert-success {
  background: #e8f8fe;
  border: 1px solid #b9eaff;
  color: #005d86;
}

.auth-inline-alert-error {
  background: #fff1ed;
  border: 1px solid #edc8bf;
  color: #8e2c22;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100% - 32px));
  pointer-events: none;
}

.toast-message.alert {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 16px 36px rgba(0,93,134,.18);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-10px);
  animation: toastIn .22s ease forwards;
}

.toast-message.alert-success {
  background: #e8f8fe;
  color: #005d86;
  border: 1px solid #b9eaff;
}

.toast-message.alert-error {
  background: #fff1ed;
  color: #8e2c22;
  border: 1px solid #edc8bf;
}

.toast-message.is-hiding { animation: toastOut .2s ease forwards; }

.toast-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  color: inherit;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.toast-close:hover { background: #ffffff; }

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 640px) {
  .toast-stack {
    left: 16px;
    right: 16px;
    width: auto;
  }
}

/* --- Formulaire --- */
.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form-grid {
  grid-template-columns: 1fr 1fr;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field > span {
  font-size: 13px;
  font-weight: 800;
  color: #21313b;
  letter-spacing: .01em;
}

.auth-field-full {
  grid-column: 1 / -1;
}

/* --- Contrôle de champ (input + icône) --- */
.auth-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 15px;
  background: #f8fcff;
  border: 1.5px solid #d8edf6;
  border-radius: 12px;
  transition: all .25s ease;
}

.auth-control i {
  flex: 0 0 18px;
  color: #0077a8;
  font-size: 15px;
  text-align: center;
  transition: color .25s ease, transform .25s ease;
}

.auth-control input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172733;
  font-size: 15px;
  font-family: "Century Gothic", "Open Sans", sans-serif;
}

.auth-control input::placeholder {
  color: #8aa1ad;
  font-size: 14px;
}

/* Focus state */
.auth-control:focus-within {
  background: #ffffff;
  border-color: #00b0f0;
  box-shadow: 0 0 0 5px rgba(0,176,240,.12);
}
.auth-control:focus-within i {
  color: #00b0f0;
  transform: scale(1.12);
}

/* --- Bouton submit --- */
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #00b0f0, #005d86);
  color: #ffffff;
  font-family: "Century Gothic", "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,93,134,.2);
  transition: all .3s ease;
}

.auth-submit:hover {
  background: linear-gradient(135deg, #005d86, #c06020);
  box-shadow: 0 14px 32px rgba(192,96,32,.26);
  transform: translateY(-2px);
}

.auth-submit:active {
  transform: translateY(0) scale(.98);
  box-shadow: 0 6px 14px rgba(0,93,134,.16);
}

.auth-submit i {
  transition: transform .3s ease;
}
.auth-submit:hover i {
  transform: translateX(4px);
}

/* --- Footer liens --- */
.auth-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(216,237,246,.7);
}

.auth-card-footer.single {
  justify-content: center;
}

.auth-card-footer a {
  color: #0077a8;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  position: relative;
  transition: color .25s ease;
}
.auth-card-footer a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: #c06020;
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .25s ease;
}
.auth-card-footer a:hover {
  color: #c06020;
}
.auth-card-footer a:hover::after {
  transform: scaleX(1);
}

/* --- Responsive --- */
@media (max-width: 760px) {
  .auth-card {
    padding: 32px 22px;
    border-radius: 16px;
  }
  .auth-card-wide {
    width: 100%;
  }
  .auth-form-grid {
    grid-template-columns: 1fr;
  }
  .auth-field-full {
    grid-column: auto;
  }
  .auth-card-header h1 {
    font-size: 26px;
  }
  .auth-logo img {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 20px 10px;
  }
  .auth-card {
    padding: 26px 16px;
  }
  .auth-card-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
