/* ============================================================
   shared.css — Styles communs à toutes les pages
   ============================================================ */

:root {
  --bg:         #070b14;
  --surface:    #0d1526;
  --surface-2:  #111d35;
  --border:     rgba(96, 165, 250, 0.12);
  --accent:     #3b82f6;
  --accent-glow:#60a5fa;
  --accent-2:   #06b6d4;
  --text:       #e8edf5;
  --text-muted: #5a6a88;
  --text-dim:   #3d4f6b;
  --success:    #22d3a5;
  --error:      #f87171;
  --radius:     14px;
  --radius-sm:  8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Bricolage Grotesque', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Fond animé */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.glow {
  position: fixed; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0;
  animation: float 12s ease-in-out infinite;
}
.glow-1 { width: 500px; height: 500px; background: rgba(59,130,246,0.07); top: -100px; left: -100px; }
.glow-2 { width: 400px; height: 400px; background: rgba(6,182,212,0.05); bottom: 0; right: 0; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  background: linear-gradient(135deg, #fff, var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.nav-links {
  display: flex; gap: 24px; flex: 1;
}
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-ctas { display: flex; gap: 10px; }

/* Boutons globaux */
.btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  color: #fff; border: none; border-radius: 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(59,130,246,0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost {
  padding: 14px 32px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 1rem; cursor: pointer; text-decoration: none;
  display: inline-block; transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(96,165,250,0.3); }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
  padding: 13px 16px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

/* Alerts */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: 0.9rem; margin-bottom: 16px;
}
.alert-error { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25); color: var(--error); }
.alert-success { background: rgba(34,211,165,0.08); border: 1px solid rgba(34,211,165,0.25); color: var(--success); }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* Responsive nav — menu hamburger */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.nav-burger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text-muted); transition: all 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-burger { display: flex; }
  .nav-ctas-desktop .nav-ctas-guest { display: none; }
  .nav-links {
    display: none;
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(7,11,20,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 8px 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 24px; font-size: 1rem;
    border-bottom: 1px solid rgba(96,165,250,0.06);
  }
  .nav-inner { justify-content: space-between; }
}

/* Nav dropdown items */
.nav-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none;
  font-size: 0.88rem; transition: background 0.15s;
  width: 100%; background: none; border: none; cursor: pointer;
  text-align: left;
}
.nav-dd-item:hover { background: var(--surface-2); }
.nav-dd-logout { color: var(--error); }
.nav-dd-logout:hover { background: rgba(248,113,113,0.08); }
