/* ==========================================
   ValRhôn'Énergie — Login & Register Pages CSS
   Page connexion/inscription premium
   ========================================== */

/* Auth section — full viewport premium background */
.vre-auth {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0b2230, #06141d);
  padding: 100px 0;
}

.vre-auth-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1433086966358-54859d0ed716?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat;
  opacity: 0.15;
  filter: blur(2px);
}

.vre-auth::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,20,29,0.5) 0%, rgba(6,20,29,0.7) 100%);
}

.vre-auth-inner {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 0 24px;
}

/* Logo */
.vre-auth-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 48px;
  transition: opacity .3s;
}

.vre-auth-logo:hover {
  opacity: .85;
}

.vre-auth-logo .logo-img {
  height: 42px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.vre-auth-logo .logo-fallback {
  display: flex;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 25px;
  letter-spacing: -0.02em;
  align-items: baseline;
  color: #fff;
}

.vre-auth-logo .logo-fallback .v { color: #26B07A; }
.vre-auth-logo .logo-fallback .a { color: #F39200; }
.vre-auth-logo .logo-fallback .r { color: #E63027; }
.vre-auth-logo .logo-fallback .h { color: #5C6B72; }
.vre-auth-logo .logo-fallback .o { color: #0E9BD6; }
.vre-auth-logo .logo-fallback .n { color: #8CC63F; }
.vre-auth-logo .logo-fallback .en {
  font-family: "Hanken Grotesk";
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-left: 7px;
  font-weight: 600;
  align-self: center;
}

/* Head */
.vre-auth-head {
  margin-bottom: 42px;
}

.vre-auth-head h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 350;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.vre-auth-head h1 em {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: #bfe7f8;
}

.vre-auth-sub {
  font-size: 15px;
  color: rgba(212,227,234,0.8);
  font-weight: 300;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Auth card — form container */
.vre-auth-card {
  background: rgba(250,248,243,0.95);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 48px 40px;
  text-align: left;
  box-shadow: 0 40px 90px -45px rgba(7,28,40,0.45);
  margin-bottom: 32px;
}

@media (max-width: 640px) {
  .vre-auth-card {
    padding: 36px 24px;
    border-radius: 16px;
  }
}

/* Wide card for register */
.vre-auth-card--wide {
  max-width: 560px;
  width: 100%;
}

.vre-auth-card--center {
  text-align: center;
}

/* ==========================================
   BOOTSTRAP / PRESTASHOP FORM OVERRIDES
   ========================================== */

/* Form group margin */
.vre-auth-card .form-group,
.vre-auth-card .mb-3 {
  margin-bottom: 22px !important;
}

/* Labels — override Bootstrap .form-label */
.vre-auth-card label.form-label,
.vre-auth-card .form-label {
  display: block !important;
  font-family: "Hanken Grotesk", sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--slate) !important;
  margin-bottom: 10px !important;
}

.vre-auth-card label.form-label.required::after,
.vre-auth-card .form-label.required::after {
  content: " *";
  color: var(--red);
}

/* Inputs — override Bootstrap .form-control */
.vre-auth-card .form-control,
.vre-auth-card input.form-control {
  display: block !important;
  width: 100% !important;
  padding: 14px 18px !important;
  font-family: "Hanken Grotesk", sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
  background: var(--white) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
  outline: none !important;
  box-shadow: none !important;
  height: auto !important;
}

.vre-auth-card .form-control:focus,
.vre-auth-card input.form-control:focus {
  border-color: var(--eau) !important;
  box-shadow: 0 0 0 3px rgba(14,155,214,0.15) !important;
  background: var(--white) !important;
  color: var(--ink) !important;
}

.vre-auth-card .form-control::placeholder {
  color: var(--slate) !important;
  opacity: 0.5 !important;
}

/* Help text / form-text */
.vre-auth-card .form-text {
  display: block;
  font-size: 12px;
  color: var(--slate);
  margin-top: 6px;
  opacity: 0.8;
}

/* ==========================================
   RADIO BUTTONS (Gender — M. / Mme)
   ========================================== */

.vre-auth-card .form-check-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  gap: 6px;
}

.vre-auth-card .form-check-inline input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--eau-deep);
  cursor: pointer;
}

.vre-auth-card .form-check-inline label {
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

/* ==========================================
   CHECKBOXES (Newsletter, Privacy, GDPR)
   ========================================== */

.vre-auth-card .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.vre-auth-card .form-check + .form-check {
  margin-top: 12px;
}

.vre-auth-card .form-check-input {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  accent-color: var(--eau-deep);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.vre-auth-card .form-check-label {
  font-size: 13.5px;
  color: var(--slate);
  cursor: pointer;
  line-height: 1.5;
  margin: 0;
}

.vre-auth-card .form-check-label em,
.vre-auth-card .form-check-label br + em {
  display: block;
  font-style: italic;
  font-size: 12px;
  color: var(--slate);
  opacity: 0.7;
  margin-top: 4px;
}

/* ==========================================
   PASSWORD FIELD
   ========================================== */

.vre-auth-card .password-field {
  display: flex;
  gap: 0;
}

.vre-auth-card .password-field .form-control {
  border-radius: 12px 0 0 12px !important;
  border-right: none !important;
}

.vre-auth-card .password-field button {
  border: 1px solid var(--line) !important;
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
  background: var(--white) !important;
  color: var(--slate) !important;
  padding: 0 !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-size: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  min-width: 48px !important;
  height: auto !important;
  margin: 0 !important;
  box-shadow: none !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.vre-auth-card .password-field button:hover {
  background: var(--mist) !important;
  color: var(--eau-deep) !important;
}

/* Hide broken Material Icons, replace with SVG eye */
.vre-auth-card .password-field button i.material-icons,
.vre-auth-card .password-field button i {
  display: none !important;
}

/* SVG eye OPEN (password hidden → can reveal) */
.vre-auth-card .password-field button::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235C6B72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* SVG eye CLOSED (password visible → can hide) */
.vre-auth-card .password-field button[aria-label="Hide password"]::before,
.vre-auth-card .password-field button[aria-label="Masquer le mot de passe"]::before,
.vre-auth-card .password-field button[data-text-hide="Hide password"][aria-label="Hide password"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235C6B72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

/* Password strength UI */
.vre-auth-card .progress-container {
  margin-top: 12px;
}

.vre-auth-card .progress {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.vre-auth-card .progress-bar {
  background: var(--eau);
  transition: width 0.3s;
}

.vre-auth-card .password-requirements {
  font-size: 12px;
  color: var(--slate);
  margin-top: 10px;
}

.vre-auth-card .password-requirements__icon {
  font-size: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Password messages */
.vre-auth-card .password-invalid-message {
  color: var(--red);
  font-size: 13px;
  margin-top: 8px;
}

.vre-auth-card .password-valid-message {
  color: var(--teal);
  font-size: 13px;
  margin-top: 8px;
}

/* ==========================================
   SUBMIT BUTTON — override Bootstrap .btn .btn-primary
   ========================================== */

.vre-auth-card button[type="submit"],
.vre-auth-card .btn-primary[type="submit"],
.vre-auth-card .form-control-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 16px 30px !important;
  font-family: "Hanken Grotesk", sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: var(--ink) !important;
  border: 1px solid transparent !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  transition: 0.4s cubic-bezier(0.2,0.8,0.2,1) !important;
  margin-top: 8px !important;
  box-shadow: none !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

.vre-auth-card button[type="submit"]:hover,
.vre-auth-card .btn-primary[type="submit"]:hover,
.vre-auth-card .form-control-submit:hover {
  background: var(--eau-deep) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 22px 44px -20px rgba(10,111,160,0.7) !important;
  color: #fff !important;
}

/* Footer button wrapper on register */
.vre-auth-card .buttons-wrapper {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.vre-auth-card .buttons-wrapper--end {
  justify-content: flex-end;
}

/* Make submit btn full width inside register form */
.vre-auth-card .register-form .buttons-wrapper button {
  width: 100% !important;
}

/* ==========================================
   FORGOT PASSWORD
   ========================================== */

.vre-auth-card .forgot-password {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--slate);
  transition: color .25s;
}

.vre-auth-card .forgot-password:hover {
  color: var(--eau-deep);
}

.vre-auth-card .forgot-password a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color .25s;
}

.vre-auth-card .forgot-password a:hover {
  border-color: var(--eau-deep);
}

/* ==========================================
   ALERTS / ERRORS
   ========================================== */

.vre-auth-card .alert {
  border-radius: 12px !important;
  padding: 16px 18px !important;
  font-size: 14px !important;
  margin-bottom: 20px !important;
  border: 1px solid transparent !important;
}

.vre-auth-card .alert-danger {
  background: rgba(230,48,39,0.08) !important;
  color: var(--red) !important;
  border-color: rgba(230,48,39,0.2) !important;
}

.vre-auth-card .alert-success {
  background: rgba(38,176,122,0.1) !important;
  color: #176847 !important;
  border-color: rgba(38,176,122,0.22) !important;
}

.vre-auth-card .alert-warning {
  background: rgba(243,146,0,0.08) !important;
  color: var(--amber) !important;
  border-color: rgba(243,146,0,0.2) !important;
}

/* ==========================================
   LINKS BELOW CARD
   ========================================== */

.vre-auth-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: rgba(212,227,234,0.7);
  font-size: 14px;
}

.vre-auth-alt a:not(.btn) {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 2px;
  transition: border-color .3s;
  font-weight: 600;
}

.vre-auth-alt a:not(.btn):hover {
  border-color: #fff;
}

.vre-auth-alt .btn-ghost-d {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  padding: 14px 28px;
}
.vre-auth-alt .btn-ghost-d:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

/* Back link */
.vre-auth-back {
  margin-top: 8px;
}

.vre-auth-back .btn-ghost-d {
  color: rgba(212,227,234,0.7);
  border-color: rgba(255,255,255,0.2);
  padding: 12px 24px;
  font-size: 12px;
}

.vre-auth-back .btn-ghost-d:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
}

/* ==========================================
   PASSWORD RECOVERY
   ========================================== */

.vre-auth-password .vre-auth-card-intro {
  margin: 0 0 26px;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.7;
}

.vre-auth-password .vre-auth-email-pill {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 10px 14px;
  border: 1px solid rgba(14,155,214,0.18);
  border-radius: 999px;
  background: rgba(14,155,214,0.08);
  color: var(--eau-deep);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.vre-auth-password .vre-auth-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(14,155,214,0.14), rgba(38,176,122,0.14));
  color: var(--eau-deep);
}

.vre-auth-password .vre-auth-status-icon svg {
  width: 30px;
  height: 30px;
}

.vre-auth-password .alert ul {
  padding-left: 18px;
}

.vre-auth-password .vre-auth-card--center .alert ul {
  display: inline-block;
  text-align: left;
}
