/* Reset basique */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Urbanist', sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  overflow-x: hidden;

  /* Pour garder le footer en bas */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
  line-height: 1.6;
}


.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  width: 40px;
  height: 60px;
  margin-right: 10px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #7f0000;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
  color: #7f0000;
}

/* Bouton panier dans nav */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  color: #7f0000;
  text-decoration: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 2px solid transparent;
}

.cart-btn:hover,
.cart-btn:focus {
  background-color: #7f0000;
  color: white;
  outline: none;
  border-color: #7f0000;
}

.cart-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  display: block;
}

/* Badge nombre d'articles */
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e60023;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}
/* Container du formulaire */
.container {
  flex-grow: 1; /* Important pour pousser le footer en bas */
  background: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  width: 350px;
  max-width: 90vw;
  margin: 3rem auto; /* espace au-dessus */
}

/* Titre des formulaires */
.form-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #7f0000;
  font-weight: 800;
  font-size: 2rem;
}

/* Formulaires */
form {
  display: none;
  flex-direction: column;
}

form.active {
  display: flex;
}

label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #444;
}

input {
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
  border: 1.8px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus {
  border-color: #7f0000;
  outline: none;
}

/* Boutons */
.btn {
  background-color: #7f0000;
  color: white;
  padding: 0.9rem 0;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #660000;
}

/* Texte bascule connexion/inscription */
.switch-msg {
  text-align: center;
  margin-top: 1rem;
  color: #555;
  font-size: 0.9rem;
}

.switch-msg a {
  color: #7f0000;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.switch-msg a:hover {
  color: #660000;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #f0f0f0;
  font-size: 0.9rem;
  color: #888;
}

/* Liens dans le footer */
.footer-links {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #7f0000;
  text-decoration: none;
  margin: 0 0.4rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #660000;
}


/* ===== PATCH ALIGNEMENT LOGO + MENU ===== */

/* 1) Logo bien centré verticalement (évite l'alignement sur la baseline) */
.logo {
  display: block;                    /* <-- clé pour l'alignement */
  width: 40px;
  height: 60px;
  object-fit: contain;
}

/* 2) Laisser index.css gérer le header (on annule ce que login.css imposait) */
header {
  justify-content: initial;          /* index.css gère l'alignement avec gap + .header-actions */
  gap: 1rem;
}

/* 3) En mobile, ne PAS passer le header en colonne (laisse le hamburger d'index.css faire le job) */
@media (max-width: 820px) {
  header { 
    flex-direction: row !important;  /* annule le bloc "header en colonne" de login.css */
    align-items: center;
    padding: .35rem .6rem;           /* cohérent avec index.css */
  }

}
/* Optionnel : petit écart entre le logo et "FripWeb" si besoin */
.logo-container { gap: .5rem; }

