/*
  ========================================================================
    _______  _  _                 ____
   |__   __|(_)| |               / ___|
      | |    _ | |__   ____ ___ | |  _
      | |   | || '_ \ |_  // _ \| | |_ |
      | |   | || |_) | / /| (_) | |__| |
      |_|   |_||_.__/ /___|\___/ \____|

    > Page de connexion — Avant l'Oubli
    > Reprend la grammaire visuelle du site (or sur noir, serif, filets).
  ========================================================================
*/
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cinzel+Decorative:wght@700&family=Cinzel:wght@500;700&family=IM+Fell+English:ital@0;1&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg:        #080709;
  --bg2:       #0e0c10;
  --ink:       #f0eae0;
  --muted:     rgba(240,234,224,0.58);
  --line:      rgba(240,234,224,0.10);
  --gold:      #c9a84c;
  --gold2:     #e8c876;
  --gold3:     #f5dfa0;
  --crimson:   #8b1e2f;
  --shadow:    0 24px 64px rgba(0,0,0,0.65);
  --radius:    20px;
  --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* ─── Grain + fond d'ambiance (repris du site) ─── */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 200;
  opacity: .028;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 1400px 800px at 5% 0%,   rgba(201,168,76,0.13)  0%, transparent 55%),
    radial-gradient(ellipse 1000px 600px at 95% 20%,  rgba(139,30,47,0.18)   0%, transparent 50%),
    radial-gradient(ellipse 1200px 900px at 50% 100%, rgba(14,12,16,0.92)    0%, transparent 60%),
    linear-gradient(170deg, #0a0809 0%, #080709 40%, #090a0e 100%);
  background-attachment: fixed;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,.35); border-radius: 3px; }

/* ─── Mise en page : carte centrée ─── */
.auth-shell {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: min(460px, 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(240,234,224,.12);
  background:
    radial-gradient(ellipse 700px 260px at 15% 0%, rgba(201,168,76,.12), transparent 55%),
    radial-gradient(ellipse 500px 260px at 85% 100%, rgba(139,30,47,.15), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  box-shadow: var(--shadow);
  padding: 36px 32px 28px;
  position: relative;
  overflow: hidden;
}

/* Filet doré supérieur, signature du site */
.auth-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.5) 30%, rgba(201,168,76,.5) 70%, transparent);
}

/* ─── En-tête ─── */
.auth-head { text-align: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.seal {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      rgba(201,168,76,.9) 0%,
      rgba(245,223,160,.6) 25%,
      rgba(201,168,76,.5) 50%,
      rgba(139,30,47,.8) 75%,
      rgba(201,168,76,.9) 100%
    );
  border: 1.5px solid rgba(201,168,76,.55);
  box-shadow:
    0 0 0 4px rgba(201,168,76,.08),
    0 8px 24px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.12);
  position: relative;
  overflow: hidden;
}

.seal::after {
  content: '✦';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: rgba(8,7,9,.85);
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

.brand h1 span {
  display: block;
  font-family: 'Crimson Pro', serif;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: .04em;
  color: var(--muted);
  margin-top: 2px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--gold);
  opacity: .6;
}

.auth-head h2 {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 42px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--gold2);
  text-shadow: 0 0 80px rgba(201,168,76,.3), 0 2px 0 rgba(0,0,0,.4);
}

.auth-sub {
  margin: 0 auto 30px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  font-style: italic;
}

/* ─── Formulaire ─── */
.field { margin-bottom: 18px; }

.label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(240,234,224,.65);
  margin: 0 0 8px;
}

.input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(240,234,224,.12);
  background: rgba(255,255,255,.03);
  padding: 12px 14px;
  outline: none;
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 180ms ease, background 180ms ease;
}

.input::placeholder { color: rgba(240,234,224,.3); font-style: italic; }

.input:focus {
  border-color: rgba(201,168,76,.55);
  background: rgba(201,168,76,.04);
}

/* Bouton « Afficher » dans le champ mot de passe */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 92px; }

.reveal {
  position: absolute;
  top: 50%; right: 8px;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(240,234,224,.12);
  background: rgba(8,7,9,.5);
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 180ms ease;
}

.reveal:hover {
  border-color: rgba(201,168,76,.45);
  background: rgba(201,168,76,.08);
  color: var(--gold2);
}

/* ─── Bouton ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(240,234,224,.14);
  background: rgba(255,255,255,.04);
  color: rgba(240,234,224,.88);
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all 180ms ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(201,168,76,.5);
  background: rgba(201,168,76,.09);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
}

.btn:active { transform: translateY(0); }

.btn.gold {
  border-color: rgba(201,168,76,.6);
  background: linear-gradient(135deg, rgba(201,168,76,.22), rgba(201,168,76,.08));
  color: var(--gold3);
}

.btn.gold:hover {
  background: linear-gradient(135deg, rgba(201,168,76,.32), rgba(201,168,76,.14));
  box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 20px rgba(201,168,76,.15);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-submit {
  width: 100%;
  padding: 14px;
  margin-top: 4px;
}

/* ─── Ornement + pied ─── */
.ornament {
  text-align: center;
  margin: 28px 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: rgba(201,168,76,.35);
  letter-spacing: .3em;
  user-select: none;
}

.auth-foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(240,234,224,.45);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: .06em;
}

.auth-foot a { transition: color 180ms ease; }
.auth-foot a:hover { color: var(--gold2); }

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .auth-shell { padding: 24px 16px; }
  .auth-card  { padding: 28px 20px 22px; }
  .auth-head h2 { font-size: 34px; }
  .brand h1 { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
