/* Styles communs aux pages d'authentification */

/* Logo Vurto en tête de carte auth */
.logo-container {
  display: inline-block;
}
.logo-image {
  height: 50px;
  width: auto;
}

/* Bouton Google OAuth */
.google-btn {
  border: 1px solid #dadce0 !important;
  background-color: var(--ds-bg-primary, #fff) !important;
  border-radius: var(--ds-radius-md, 8px) !important;
  transition: all 0.2s ease;
}
.google-btn:hover {
  box-shadow: 0 1px 2px 0 rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15) !important;
  background-color: #f8f9fa !important;
  border-color: #dadce0 !important;
}
.google-btn:active {
  background-color: #f1f3f4 !important;
}

/* Sélecteur de langue en haut à droite */
.language-selector-top {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* Background image des pages auth */
body {
  background-image: url('../../media/auth/bg10.jpeg');
}
[data-bs-theme="dark"] body {
  background-image: url('../../media/auth/bg10-dark.jpeg');
}

/* =========================================================================
   Thème 2027 (docs/refonte-2027/README.md) des pages posées par AuthFormShell :
   ivoire, encre forêt, abricot pour les actions, Satoshi. Les jetons Metronic sont
   redéfinis sur le body pour couvrir les modales SweetAlert et le menu de langue.
   ========================================================================= */
body.auth27-body {
  --auth-bg: #f7f6ef;
  --auth-ink: #28483f;
  --auth-muted: #5b6d66;
  --auth-primary: #f6bd84;
  --auth-primary-hover: #eeae70;
  --auth-primary-ink: #8a5530;
  --auth-border: #e3e5dc;
  --auth-hairline: #d5dad2;
  --auth-input: #bac6ba;
  --auth-danger: #a13d35;
  --auth-danger-soft: #fae7e1;
  --auth-success: #2f6b3a;
  --auth-success-soft: #e4efe1;
  --auth-warning: #8a4f22;
  --auth-warning-soft: #fbe8d8;
  --auth-ease: cubic-bezier(.16, 1, .3, 1);

  --bs-body-bg: var(--auth-bg);
  --bs-body-color: var(--auth-ink);
  --bs-body-font-family: 'Satoshi', system-ui, sans-serif;
  --bs-font-sans-serif: 'Satoshi', system-ui, sans-serif;
  --bs-primary: var(--auth-primary);
  --bs-primary-active: var(--auth-primary-hover);
  --bs-primary-inverse: var(--auth-ink);
  --bs-primary-light: #fbe8d8;
  --bs-text-primary: var(--auth-primary-ink);
  --bs-link-color: var(--auth-primary-ink);
  --bs-link-hover-color: var(--auth-ink);
  --bs-success: #2f6b3a;
  --bs-text-gray-900: var(--auth-ink);
  --bs-text-gray-800: var(--auth-ink);
  --bs-text-gray-700: var(--auth-ink);
  --bs-text-gray-600: var(--auth-muted);
  --bs-text-gray-500: var(--auth-muted);
  color-scheme: light;
  min-height: 100vh;
  background: var(--auth-bg) !important;
  color: var(--auth-ink);
  font-family: 'Satoshi', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.auth27-body ::selection { background: #f9dcc0; color: var(--auth-ink); }

/* ---- Mise en page ---- */
.auth27 { min-height: 100vh; display: grid; }
.auth27-main {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 88px 20px 48px;
  min-width: 0;
}
.auth27-sheet {
  width: 100%; max-width: 480px;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 26px;
  padding: 40px;
  animation: auth27-rise 600ms var(--auth-ease) both;
}
.auth27--split .auth27-sheet { max-width: 400px; background: none; border: 0; border-radius: 0; padding: 0; }

/* Panneau de marque : la seule surface dégradée de l'écran. */
.auth27-panel { display: none; }
@media (min-width: 1024px) {
  .auth27--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; }
  .auth27--split .auth27-main { padding: 72px 32px; }
  .auth27-panel {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: flex-end;
    min-height: calc(100vh - 32px);
    padding: 56px;
    border-radius: 30px;
    background:
      radial-gradient(110% 90% at 0% 0%, #dce8da 0%, rgb(220 232 218 / 0) 60%),
      radial-gradient(70% 70% at 95% 5%, #dde7ee 0%, rgb(221 231 238 / 0) 60%),
      #f3f1e8;
  }
}
/* La lumière s'allume une fois au chargement, puis reste stable. */
.auth27-panel-glow {
  position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(70% 62% at 72% 40%, #fbd9b5 0%, rgb(249 220 192 / .55) 42%, rgb(249 220 192 / 0) 72%);
  animation: auth27-light 1400ms var(--auth-ease) 150ms both;
}
.auth27-panel-bolt {
  position: absolute; top: 9%; right: 12%;
  height: min(52%, 420px); width: auto;
  --logo-bolt: var(--auth-primary);
}
.auth27-panel-line {
  max-width: 13em; margin: 0;
  font-size: clamp(32px, 3.2vw, 46px); line-height: 1.12; font-weight: 500;
  letter-spacing: -.02em; text-wrap: balance;
  color: var(--auth-ink);
}
@keyframes auth27-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes auth27-light { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .auth27-sheet, .auth27-panel-glow { animation: none; }
}

/* ---- Sélecteur de langue ---- */
.auth27 .language-selector-top { top: 24px; right: 24px; }
.auth27 .language-selector-top .btn.btn-light-primary {
  height: 36px; padding: 0 12px !important;
  background: #fff !important; color: var(--auth-ink) !important;
  border: 1px solid var(--auth-hairline) !important; border-radius: 999px !important;
  font-weight: 500;
}
.auth27 .language-selector-top .btn.btn-light-primary i { color: var(--auth-muted) !important; }
.auth27 .language-selector-top .btn.btn-light-primary .fw-bold { font-weight: 500 !important; }
.auth27 .language-selector-top .btn.btn-light-primary:hover { background: #eef0ea !important; }
.auth27 .language-selector-top .menu-sub-dropdown { border: 1px solid var(--auth-border); border-radius: 12px; box-shadow: 0 8px 24px rgb(40 72 63 / .10); }
.auth27 .language-selector-top .menu-link { color: var(--auth-ink) !important; border-radius: 8px; }
.auth27 .language-selector-top .menu-link:hover, .auth27 .language-selector-top .menu-link.active { background: #e3ece0 !important; color: var(--auth-ink) !important; }
.auth27 .language-selector-top .menu-link i { color: var(--auth-ink) !important; }

/* ---- Logo et titres ---- */
.auth27 .logo-image { height: 34px; width: auto; max-width: 100%; }
.auth27--split .auth27-sheet .text-center { text-align: left !important; }
.auth27 h1 { font-size: 30px; line-height: 1.2; font-weight: 600 !important; letter-spacing: -.01em; color: var(--auth-ink) !important; text-wrap: balance; }

/* ---- Champs ---- */
.auth27 .form-control, .auth27 .form-select {
  min-height: 48px; padding: 12px 14px;
  background-color: #fff !important; color: var(--auth-ink);
  border: 1px solid var(--auth-input); border-radius: 12px;
  font-size: 15px; font-weight: 400;
  transition: border-color 220ms var(--auth-ease), box-shadow 220ms var(--auth-ease);
}
.auth27 .form-control::placeholder { color: var(--auth-muted); font-weight: 400; }
.auth27 .form-control:hover { border-color: #93a597; }
.auth27 .form-control:focus, .auth27 .form-select:focus { outline: 0; border-color: var(--auth-primary-ink); box-shadow: 0 0 0 3px rgb(246 189 132 / .35); }
.auth27 .fv-plugins-bootstrap5-row-invalid .form-control { border-color: var(--auth-danger); }
.auth27 .fv-plugins-bootstrap5-row-invalid .form-control:focus { border-color: var(--auth-danger); box-shadow: 0 0 0 3px rgb(161 61 53 / .15); }
.auth27 .invalid-feedback, .auth27 .fv-help-block, .auth27 .fv-plugins-message-container .text-danger { color: var(--auth-danger) !important; font-size: 13px; font-weight: 400; }
.auth27 .fv-plugins-message-container--enabled:not(:empty) { display: block; margin-top: 6px; }

/* ---- Boutons et liens ---- */
.auth27-body .btn.btn-primary {
  min-height: 48px;
  background-color: var(--auth-primary) !important; border: 0 !important; border-radius: 12px;
  color: var(--auth-ink) !important; font-size: 15px; font-weight: 500;
  transition: background-color 220ms var(--auth-ease);
}
.auth27-body .btn.btn-primary:hover:not(:disabled) { background-color: var(--auth-primary-hover) !important; }
.auth27-body .btn.btn-primary:disabled { opacity: .7; }
.auth27-body .btn.btn-primary .indicator-label, .auth27-body .btn.btn-primary .indicator-progress { color: var(--auth-ink); }
.auth27 .btn.btn-success { min-height: 48px; background-color: #fff !important; color: var(--auth-ink) !important; border: 1px solid var(--auth-hairline) !important; border-radius: 12px; font-size: 15px; font-weight: 500; }
.auth27 .btn.btn-success:hover { background-color: #eef0ea !important; }
.auth27 .google-btn {
  min-height: 48px;
  border: 1px solid var(--auth-hairline) !important; border-radius: 12px !important;
  box-shadow: none !important;
}
.auth27 .google-btn:hover { background-color: #eef0ea !important; box-shadow: none !important; border-color: var(--auth-hairline) !important; }
.auth27 .google-btn:active { background-color: #e3ece0 !important; }
.auth27 .google-btn span { color: var(--auth-ink) !important; font-weight: 500 !important; font-size: 15px !important; }
.auth27 a.link-primary { color: var(--auth-primary-ink) !important; text-decoration: underline !important; text-decoration-color: rgb(138 85 48 / .35) !important; text-underline-offset: 3px; }
.auth27 a.link-primary:hover { color: var(--auth-ink) !important; text-decoration-color: currentColor !important; }
.auth27 a:focus-visible, .auth27 button:focus-visible { outline: 2px solid var(--auth-primary-ink); outline-offset: 2px; }
.auth27 .separator { border-color: var(--auth-border) !important; }

/* ---- Messages ---- */
.auth27 .alert { border: 0; border-radius: 12px; font-size: 14px; line-height: 1.45; padding: 12px 14px !important; }
.auth27 .alert-danger { background: var(--auth-danger-soft); color: var(--auth-danger); }
.auth27 .alert-success { background: var(--auth-success-soft); color: var(--auth-success); }
.auth27 .alert-warning { background: var(--auth-warning-soft); color: var(--auth-warning); }
.auth27 .alert-info { background: #e6eef3; color: #34566b; }

/* ---- Connexion : structure propre au formulaire ---- */
.auth27-logo { display: block; margin-bottom: 40px; line-height: 0; }
.auth27-title { margin: 0 0 28px; }
.auth27-field { margin-bottom: 18px; }
.auth27-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.auth27-label { font-size: 14px; font-weight: 500; color: var(--auth-ink); }
.auth27-field--password { position: relative; }
.auth27-forgot { position: absolute; top: 0; right: 0; font-size: 14px; }
.auth27-submit { display: block; width: 100%; margin-top: 8px; }
.auth27-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--auth-muted); font-size: 13px; }
.auth27-or::before, .auth27-or::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }
.auth27-switch { margin: 28px 0 0; font-size: 14px; color: var(--auth-muted); text-align: center; }
.auth27-switch a { font-weight: 500; }

@media (max-width: 480px) {
  .auth27-sheet { padding: 28px 20px; border-radius: 20px; }
  .auth27--split .auth27-sheet { padding: 0; }
  .auth27 .language-selector-top { top: 16px; right: 16px; }
}
