/* NoorQuran — Page compte : split (branding + formulaire), finition premium, skinné aux tokens. */

.serif-title { font-family: Georgia, 'Times New Roman', serif; }

/* ── Split plein écran (surcharge le `main` de home.css) ── */
.auth-split { max-width: none; margin: 0; padding: 0; min-height: 100vh; display: flex; overflow-x: hidden; }

/* ── Colonne gauche : branding (teal du site + profondeur) ── */
.auth-brand {
  display: none; position: relative; overflow: hidden; flex: 1 1 50%;
  color: #fff; padding: clamp(44px, 5vw, 84px); align-items: center; justify-content: center;
  background:
    radial-gradient(135% 120% at 14% 6%, rgba(255, 255, 255, .08), transparent 52%),
    radial-gradient(120% 130% at 96% 104%, rgba(127, 240, 214, .08), transparent 55%),
    linear-gradient(150deg, #0b4a44 0%, #13716a 50%, #1f8d80 100%);
}
@media (min-width: 1024px) { .auth-brand { display: flex; } }

/* Décors subtils (opacité ≤ 8%) : motif géométrique + silhouette de mosquée */
.auth-brand-pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: #fff; opacity: .05; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(125% 95% at 50% 28%, #000 28%, transparent 80%);
  mask-image: radial-gradient(125% 95% at 50% 28%, #000 28%, transparent 80%); }
.auth-brand-mosque { position: absolute; inset-inline: 0; bottom: -1px; margin: 0 auto; width: min(76%, 520px); height: auto; fill: #fff; opacity: .06; z-index: 0; pointer-events: none; }

.auth-brand-inner { position: relative; z-index: 2; max-width: 520px; }
.auth-brand-logo { display: inline-flex; align-items: center; gap: 13px; margin-bottom: 36px; font-size: 2.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.auth-brand-mark { font-size: 2.7rem; line-height: 1; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .22)); }
.auth-brand-title { font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 600; line-height: 1.2; margin: 0 0 20px; letter-spacing: -.01em; }
.auth-brand-sub { font-size: 1.08rem; line-height: 1.65; opacity: .82; font-weight: 300; margin: 0 0 46px; max-width: 460px; }

/* Carte hadith — glassmorphism raffiné */
.auth-quote { position: relative; overflow: hidden; margin: 0; padding: 30px 30px 26px; border-radius: 22px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 10px 34px -14px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .14); }
.auth-quote::before { content: "\201C"; position: absolute; top: -14px; inset-inline-start: 16px; font-family: Georgia, serif; font-size: 4.6rem; line-height: 1; color: rgba(255, 255, 255, .12); pointer-events: none; }
.auth-quote p { position: relative; font-style: italic; font-size: 1.14rem; line-height: 1.66; margin: 0; color: #fff; opacity: .96; }
.auth-quote-rule { display: block; width: 40px; height: 2px; margin: 18px 0 14px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.auth-quote cite { display: block; font-style: normal; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .86); }

/* ── Colonne droite : formulaire ── */
.auth-col { flex: 1 1 50%; display: flex; flex-direction: column; background: var(--bg); padding: clamp(18px, 3vw, 30px) clamp(22px, 4vw, 48px) clamp(24px, 4vw, 40px); }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.auth-controls { display: flex; align-items: center; gap: 10px; }
.auth-brandlink { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; border-radius: 10px; }
.auth-brandlink-mark { font-size: 1.6rem; line-height: 1; }
.auth-brandlink-name { transition: color .18s ease; }
.auth-brandlink:hover .auth-brandlink-name { color: var(--accent); }

.auth-wrap { width: 100%; max-width: 440px; margin: auto; }
.auth-legal { text-align: center; color: var(--text-soft); font-size: .8rem; line-height: 1.6; margin: 24px auto 0; max-width: 400px; }
.auth-legal-link { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; border-radius: 4px; }
.auth-legal-link:hover { color: var(--accent); }
.auth-copy { text-align: center; color: var(--text-soft); font-size: .74rem; margin: 10px 0 0; opacity: .85; }

/* ── Carte ── */
.auth-card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--border) 55%, transparent); border-radius: 22px; padding: clamp(26px, 4vw, 42px); box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 50px -22px rgba(0, 0, 0, .28); }
.auth-card-head { margin-bottom: 26px; }
.auth-card-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.05rem); font-weight: 600; margin: 0 0 7px; color: var(--text); letter-spacing: -.01em; line-height: 1.15; }
.auth-card-head p { margin: 0; color: var(--text-muted); font-weight: 500; line-height: 1.5; }

.auth-form { display: flex; flex-direction: column; gap: 17px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field label { font-size: .82rem; font-weight: 650; color: var(--text-muted); margin-inline-start: 2px; }
.auth-input { width: 100%; box-sizing: border-box; padding: 13px 15px; border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); border-radius: 12px; font: inherit; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.auth-input:hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--border)); }
.auth-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 16%, transparent); }
.auth-input::placeholder { color: var(--text-soft); }

/* Champ avec bouton œil (afficher/masquer) — cible tactile ≥ 40px */
.auth-input-wrap { position: relative; display: flex; }
.auth-input-wrap .auth-input { padding-inline-end: 50px; }
.auth-eye { position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--text-soft); border-radius: 9px; cursor: pointer; transition: color .18s ease, background .18s ease; }
.auth-eye:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.auth-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.auth-remember { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; }
.auth-check { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; color: var(--text-muted); cursor: pointer; }
.auth-check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.auth-link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: none; border-radius: 4px; }
.auth-link:hover { text-decoration: underline; }

.auth-submit { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; padding: 15px; border: 0; background: var(--accent); color: #04211f; font: inherit; font-weight: 750; border-radius: 12px; cursor: pointer; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 62%, transparent); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--accent) 68%, transparent); }
.auth-submit:active { transform: translateY(0) scale(.99); box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--accent) 55%, transparent); }
.auth-submit:disabled { opacity: .7; cursor: progress; transform: none; filter: none; box-shadow: none; }

.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--text-soft); font-size: .72rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; margin: 3px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-google { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 50px; padding: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 650; border-radius: 12px; cursor: pointer; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.auth-google:hover { background: var(--surface-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .3); transform: translateY(-1px); }
.auth-google:active { transform: translateY(0); }
.auth-google svg { width: 20px; height: 20px; flex: 0 0 auto; }

.auth-card-foot { margin-top: 24px; text-align: center; color: var(--text-muted); font-size: .9rem; }
.auth-toggle { margin-inline-start: 6px; font-weight: 750; }

.auth-msg { margin-top: 18px; padding: 12px 14px; border-radius: 12px; font-size: .88rem; line-height: 1.45; display: none; }
.auth-msg.show { display: block; }
.auth-msg.error { background: color-mix(in srgb, #e5484d 13%, var(--surface)); border: 1px solid color-mix(in srgb, #e5484d 42%, var(--border)); color: color-mix(in srgb, #e5484d 58%, var(--text)); }
.auth-msg.success { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border)); color: var(--text); }
.auth-msg .auth-link { color: inherit; font-weight: 750; text-decoration: underline; }

.auth-hide { display: none !important; }

.spin { display: inline-block; width: 17px; height: 17px; border: 2px solid color-mix(in srgb, #04211f 35%, transparent); border-top-color: #04211f; border-radius: 50%; animation: auth-spin .7s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ── Vue connectée ── */
.account-card { text-align: center; }
.account-avatar { width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 16px; background: var(--surface-soft); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 750; color: var(--accent); overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
.account-email { color: var(--text-muted); margin: 0 0 6px; font-size: .92rem; word-break: break-word; }
.account-note { color: var(--text-soft); font-size: .82rem; margin: 0 0 22px; line-height: 1.5; }
.account-actions { display: flex; flex-direction: column; gap: 10px; }
.auth-ghost { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 13px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-weight: 650; border-radius: 12px; cursor: pointer; text-decoration: none; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.auth-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--surface-soft); }

/* ── Accessibilité : focus visible clavier ── */
.auth-submit:focus-visible, .auth-google:focus-visible, .auth-ghost:focus-visible, .auth-eye:focus-visible,
.auth-link:focus-visible, .auth-toggle:focus-visible, .auth-legal-link:focus-visible, .auth-brandlink:focus-visible,
.auth-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Micro-interactions (discrètes, respectent prefers-reduced-motion) ── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes authFadeUp { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
  @keyframes authRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .auth-card { animation: authFadeUp .34s cubic-bezier(.2, .7, .3, 1) both; }
  .auth-brand-inner > * { animation: authRise .34s cubic-bezier(.2, .7, .3, 1) both; }
  .auth-brand-logo { animation-delay: .03s; }
  .auth-brand-title { animation-delay: .09s; }
  .auth-brand-sub { animation-delay: .15s; }
  .auth-quote { animation-delay: .22s; }
}

/* ── RTL : miroir du split ── */
[dir="rtl"] .auth-split { flex-direction: row-reverse; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .auth-col { padding: 14px 16px 24px; }
  .auth-card { padding: 24px 20px; }
  .auth-card-head { margin-bottom: 22px; }
}
