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

:root {
  --primary: #1e293b;       /* Bleu nuit */
  --accent: #d97706;        /* Ambre/Doré */
  --bg: #fdfbf7;            /* Blanc cassé */
  --surface: #ffffff;       /* Blanc pur */
  --text-main: #334155;     
  --text-muted: #64748b;    
  --border: #e2e8f0;
  --radius: 6px;            
  --header-height: 70px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  margin: 0;
  line-height: 1.6;
  font-weight: 300;
  padding-top: var(--header-height);
}

a { text-decoration: none; color: inherit; transition: all 0.2s; }
img { max-width: 100%; display: block; }

/* TYPOGRAPHIE */
h1, h2, h3, .logo {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  line-height: 1.3;
}
h1 { font-size: 2.5rem; margin-bottom: 1.5rem; font-weight: 700; }
h2 { font-size: 1.8rem; margin-top: 3rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 5px; }
h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
p { margin-bottom: 1.5rem; font-size: 1rem; }

/* --- HEADER ROBUSTE --- */
.navbar {
  background: rgba(253, 251, 247, 0.98);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: var(--header-height);
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  backdrop-filter: blur(8px);
}

.navbar-inner {
  max-width: 1200px; /* Plus large pour l'air */
  margin: 0 auto; 
  padding: 0 20px; 
  height: 100%;
  display: flex; 
  align-items: center; /* Centrage vertical strict */
  /* Pas de justify-content: space-between ici pour mieux contrôler */
}

/* 1. LOGO (Gauche) */
.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--primary);
    display: flex; align-items: center; gap: 10px;
    margin-right: 40px; /* Espace forcé avec le menu */
    flex-shrink: 0;
}

/* 2. MENU (Centre-Gauche) */
.nav-links { 
    display: flex; 
    gap: 25px; 
    align-items: center; 
    height: 100%;
}
.nav-links a { 
    font-family: 'Inter', sans-serif; 
    font-size: 0.85rem; /* Un peu plus fin */
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    color: var(--text-muted); 
    display: flex; align-items: center;
    height: 100%;
    border-bottom: 2px solid transparent; /* Pour l'état actif */
}
.nav-links a:hover, .nav-links a.active { 
    color: var(--accent); 
    border-bottom-color: var(--accent);
}

/* 3. UTILISATEUR (Tout à droite) */
.nav-user-desktop { 
    margin-left: auto; /* Pousse tout ce bloc à droite */
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding-left: 20px; 
    border-left: 1px solid var(--border); 
}
.user-avatar { 
    width: 36px; height: 36px; 
    border-radius: 50%; object-fit: cover; 
    border: 1px solid var(--border); 
    transition: transform 0.2s;
}
.user-avatar:hover { transform: scale(1.05); border-color: var(--accent); }

/* MOBILE */
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; margin-left: auto; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background-color: var(--primary); }
.mobile-only { display: none; } 

@media (max-width: 990px) {
  .mobile-toggle { display: flex; }
  .nav-user-desktop { display: none; }
  
  .navbar-inner { justify-content: space-between; } /* Retour au standard sur mobile */
  .logo { margin-right: 0; }

  .nav-links {
      position: absolute; top: var(--header-height); left: 0; width: 100%;
      background: var(--bg); border-bottom: 1px solid var(--border);
      flex-direction: column; height: auto; padding: 0; gap: 0;
      box-shadow: 0 10px 20px rgba(0,0,0,0.05); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { 
      padding: 15px; width: 100%; justify-content: center; border-bottom: 1px solid #f1f5f9; 
  }
  .mobile-only { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; background: #f8fafc; }
}

/* ELEMENTS GENERAUX */
.container { max-width: 960px; margin: 50px auto; padding: 0 20px; min-height: 70vh; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.card:hover, .card-hover:hover { border-color: var(--accent); transform: translateY(-2px); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-top: 30px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 4px; font-weight: 500; font-size: 0.9rem; cursor: pointer; border: 1px solid var(--border); background: white; color: var(--text-main); letter-spacing: 0.03em; gap: 8px; }
.btn:hover { background: #f8fafc; border-color: var(--text-muted); }
.btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 0.8rem; }

.input, textarea, select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; margin-bottom: 15px; background: #fafafa; }
.input:focus { outline: none; border-color: var(--accent); background: white; }
.badge { display: inline-block; background: var(--primary); color: white; padding: 3px 8px; border-radius: 2px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }