/* modern.css – Styles modernes pour l'espace membre */

/* Variables globales */
:root {
  --primary-color: #9e1c39;
  --accent-color: #e0920e;
  --bg-glass: rgba(255, 255, 255, 0.25);
  --border-glass: rgba(255, 255, 255, 0.4);
  --shadow-glass: rgba(31, 38, 135, 0.37);
  --blur-glass: 16px;
  --radius: 12px;
  --transition: 0.3s ease;
  --font-family: 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-glass: rgba(0, 0, 0, 0.45);
    --border-glass: rgba(255, 255, 255, 0.2);
    --shadow-glass: rgba(0, 0, 0, 0.45);
  }
}

/* Reset et centrage global */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-family);

  display: flex;
  justify-content: center;
  align-items: center;
}

/* Conteneur principal centré */
.container {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Section connexion, inscription, mot de passe oublié */
#connexion,
#inscription,
#forgot,
.auth-tabs {
  max-width: 400px;
  min-height: 411px;
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur-glass)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(180%);
  box-shadow: 0 8px 32px 0 var(--shadow-glass);
  padding: 2rem;
  box-sizing: border-box;
}

/* Titres */
.title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-align: center;
}

/* Alerts positioning */
.error-msg,
.success-msg,
.warning-msg,
.info-msg {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: calc(100% - 40px);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.4;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.error-msg {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.success-msg {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.warning-msg {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.info-msg {
  background: #cce5ff;
  color: #004085;
  border: 1px solid #b8daff;
}

/* Formulaires */
.group-form {
  width: 100%;
  margin-bottom: 1rem;
}
.group-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}
.group-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(158,28,57,0.2);
}

/* Boutons */
.btn-link {
  display: block;
  width: 100%;
  padding: 0.75rem;
  text-align: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), transform 0.2s;
  text-decoration: none;
}
.btn-link:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}
.btn-link:active {
  transform: translateY(0);
}

/* Lien mot de passe oublié */
.forgot-link {
  display: block;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}
.forgot-link:hover {
  color: var(--accent-color);
}

/* Tabs d'authentification */
.auth-tabs {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.tab-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  cursor: pointer;
  background: transparent;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  transition: border-color var(--transition);
}
.tab.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.tab-content.active {
  display: block;
}

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

/* Responsive */
@media (max-width: 480px) {
  .container {
    max-width: 100%;
    padding: 1rem;
  }
  #connexion,
  #inscription,
  #forgot,
  .auth-tabs {
    padding: 1.5rem;
  }
}

    .btn{
      padding:.95rem 1.25rem; border-radius:14px; border:0; cursor:pointer;
      font-weight:800; font-size:1rem;
      background: var(--rougelhc); color: var(--btn-text);
      box-shadow: 0 10px 20px rgba(158,28,57,.35), inset 0 -2px 0 rgba(0,0,0,.25);
      transition: transform .06s ease, filter .15s ease;
    }
    .btn:hover{ filter:brightness(1.08) }
    .btn:active{ transform: translateY(1px) }
    .btn-ghost{
      background: #ffffff12; color: var(--text);
      border:1px solid #ffffff22; font-weight:700;
    }