/* === Style Café Malin - Page Inscription === */
:root{
  --bg: #F8F1E8;
  --surface: #ffffff;
  --ink: #2B2B2B;
  --muted:#6B6B6B;
  --accent:#A36A4F;
  --accent-ink:#fff;
  --shadow-md: 0 12px 30px rgba(0,0,0,.12);
}

*{box-sizing:border-box}

body {
  background: url('../img/uf.png') no-repeat center/cover;
  background-color: #fff1e6;
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  color: #3c3f42;
}

/* ====== CONTAINER ====== */
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ====== NAVIGATION ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,241,232,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.nav-container {
  width: min(1200px, 92%);
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo / marque */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-left: -620px;}
.brand-logo { height: 60px; }

/* Liens nav */
.nav-links { display: flex; align-items: center; gap: 18px; margin-right: -610px; }
.nav-link, .btn-login {
  position: relative;
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 500;
  opacity: .9;
}
.nav-link::after, .btn-login::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px; height: 2px;
  background: #A36A4F;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.nav-link:hover, .btn-login:hover { opacity: 1; }
.nav-link:hover::after, .btn-login:hover::after { transform: scaleX(1); }

/* texte animé au centre */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}

.nav-center span {
  display: inline-block;
  opacity: 0;
  transform: translateX(100%);
  animation: slide-in 1s ease forwards;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slide-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-100%); }
}


/* ===== CONTENU ===== */
.login-container {
  max-width: 520px;
  margin: 80px auto;
  background: rgba(255,255,255,.65);
  padding: 30px 25px;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.login-container h1 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 32px;
}

form label {
  display: block;
  margin-top: 18px;
  font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form input[type="password"] {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  transition: border 0.3s, background-color 0.3s;
}

form input:focus,
form input:valid {
  border-color: #b2794c;
  background-color: #fcefe6;
  outline: none;
}

.password-field { position: relative; }
.toggle-password {
  position: absolute;
  right: 12px; top: 53%;
  transform: translateY(-50%);
  cursor: pointer; color: #aaa;
}

/* Force du mot de passe */
.password-strength-container {
  background-color: #f0e0d6;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0 10px;
  display: none;
}
#password-strength-bar { height: 100%; width: 0%; transition: width 0.3s; }
.password-strength-text { font-size: 13px; margin-bottom: 10px; display: none; color: #b2794c; }

.password-rules { margin: 0; padding: 5px 0 20px 0; list-style: none; }
.password-rules p { font-size: 13px; color: #703e23; margin: 6px 0; display: flex; align-items: center; }
.password-rules p::before { content: "★"; margin-right: 6px; color: #b2794c; font-size: 12px; }

/* Messages */
.erreur, .success {
  border: 1px solid #d8a39d;
  background-color: #fff2f0;
  color: #b23b3b;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}
.success { background-color: #eaf8f0; color: #3c763d; border-color: #3c763d; }

/* Bouton submit */
button[type="submit"] {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: rgba(255,255,255,.5);
  font-weight: 600;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 25px;
  width: 100%;
  font-size: 16px;
  transition: background-color 0.3s ease, transform .06s ease;
}
button[type="submit"]:hover { background: #ebba8c; }
button[type="submit"]:active{ transform: scale(.99); }

/* Footer */
.footer {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2b2b2b;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,241,232,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

/* ===== Responsive ===== */

/* Tablettes */
@media (max-width: 900px) {
  .brand-logo { height: 52px; }
  .nav-center { font-size: 16px; }
  .login-container { width: 90%; padding: 20px; }
}

/* Mobiles */
@media (max-width: 768px) {
  .brand { margin-left: 0; }
  .nav-links { margin-right: 0; gap: 10px; }
  .brand-logo { height: 44px; }
  .login-container { margin: 60px 15px 30px; padding: 18px; }
  .login-container h1 { font-size: 24px; }
  form label, form input, button[type="submit"] { font-size: 14px; }
}

/* Très petits écrans (ex: 320px) */
@media (max-width: 400px) {
  .login-container { margin: 40px 10px 20px; padding: 15px; }
  .login-container h1 { font-size: 20px; }
  button[type="submit"] { font-size: 13px; padding: 12px; }
}


/* Masquer footer et message navbar sur mobile */
@media (max-width: 768px) {
  .nav-center {
    display: none; /* cache le message animé au milieu */
  }
}
