/* ============================================
   CONNEXION.CSS — Design "Soft Editorial"
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --slate:  #1e2330;
  --cream:  #f5f0e8;
  --sage:   #7a9e87;
  --sage-lt:#c6dace;
  --text:   #2e3447;
  --muted:  #8a91a3;
  --border: #d8d2c8;
  --white:  #ffffff;
  --radius: 14px;
  --shadow: 0 8px 40px rgba(30,35,48,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  background-image:
    radial-gradient(ellipse 60% 60% at 20% 20%, rgba(122,158,135,.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(30,35,48,.06) 0%, transparent 60%);
}

/* ── Card ────────────────────────────────── */
.index {
  width: min(420px, 92vw);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3rem 2.75rem 2.5rem;
  text-align: left;
  animation: fadeUp .45s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Titre */
.index h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--slate);
  margin-bottom: 1.75rem;
  line-height: 1.1;
}

/* Lien s'inscrire */
.index h2 {
  font-size: .875rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  margin-top: -1.2rem;
}
.index h2 a {
  color: var(--sage);
  text-decoration: none;
  font-weight: 600;
}
.index h2 a:hover { text-decoration: underline; }

/* Labels */
.index label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1.2rem;
}

/* Inputs */
.index input[type="text"],
.index input[type="password"],
.index input[type="email"] {
  display: block;
  width: 100%;
  height: auto;
  padding: .7rem 1rem;
  margin-top: .45rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  text-transform: none;
  letter-spacing: 0;
}
.index input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,158,135,.15);
}

/* Bouton submit */
.index button[type="submit"] {
  display: block;
  width: 100%;
  padding: .8rem;
  margin-top: 1.75rem;
  background: var(--slate);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.index button[type="submit"]:hover { background: #2e3447; transform: translateY(-1px); }
.index button[type="submit"]:active { transform: translateY(0); }

/* Lien retour */
.index h4 {
  font-size: .82rem;
  font-weight: 400;
  text-align: center;
  margin-top: 1.2rem;
}
.index h4 a { color: var(--muted); text-decoration: none; }
.index h4 a:hover { color: var(--slate); }

/* Erreur */
.index p[style*="red"] {
  background: #fdf0ef;
  border-left: 3px solid #c0524f;
  color: #9b3a37 !important;
  padding: .6rem .9rem;
  border-radius: 0 6px 6px 0;
  font-size: .85rem;
  margin-bottom: 1rem;
}

/* Navbar (partagée) */
.navbar {
  background: var(--slate);
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.navbar-logo { font-family: 'DM Serif Display', serif; font-size: 1.35rem; color: var(--cream); }
.navbar-links { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
.navbar-links li a {
  color: var(--sage-lt);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: .35rem .75rem;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.navbar-links li a:hover { background: rgba(255,255,255,.08); color: var(--white); }
