/* ===== VARIABLES ===== */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  --border: rgba(0,0,0,0.06);
  --border-hover: rgba(0,0,0,0.12);
  --accent: #0071e3;
  --positive: #34c759;
  --negative: #ff3b30;
  --neutral: #8e8e93;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --glass: rgba(255,255,255,0.72);
  --glass-blur: saturate(180%) blur(20px);
  --transition: 0.3s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  z-index: 500;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.7; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--text);
  font-weight: 500;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  transition: opacity var(--transition);
}
.hamburger:hover { opacity: 0.6; }

/* Sidebar mobile */
.sidebar {
  display: none;
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid var(--border);
  z-index: 600;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 90px 30px 30px;
}
.sidebar.open { right: 0; }

.sidebar a {
  display: block;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  transition: color var(--transition);
}
.sidebar a:hover { color: var(--accent); }
.sidebar a.active { color: var(--accent); }

.sidebar-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.sidebar-close:hover { background: var(--border-hover); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  z-index: 550;
  transition: opacity var(--transition);
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .sidebar { display: block; }
}

/* ===== BOUTONS ===== */
.btn {
  display: block;
  margin: 8px auto;
  padding: clamp(11px, 2vw, 14px) clamp(25px, 4.5vw, 45px);
  border: none;
  border-radius: var(--radius-pill);
  font-size: clamp(14px, 2.8vw, 16px);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
  width: fit-content;
  font-family: var(--font);
  text-decoration: none;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.98); }

.btn-dark { background: var(--text); color: white; }
.btn-dark:hover { box-shadow: var(--shadow-md); }
.btn-dark:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { box-shadow: 0 4px 16px rgba(0,113,227,0.25); }

.btn-light {
  background: white;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-light:hover { box-shadow: var(--shadow-md); }

/* ===== FOOTER ===== */
.footer-bar {
  width: 100%;
  padding: 15px;
  border-top: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  text-align: center;
}

/* ===== MODALE ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  padding: 30px;
  margin: 60px 0 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  animation: modalIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h2 {
  text-align: center;
  font-size: clamp(18px, 5vw, 24px);
  color: var(--text);
  margin-bottom: 25px;
  font-weight: 600;
}

.modal-card {
  background: var(--bg);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  transition: box-shadow var(--transition);
}
.modal-card:hover { box-shadow: var(--shadow-sm); }

.modal-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-card-position {
  background: var(--text);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.modal-card-name {
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 600;
  color: var(--text);
}

.modal-card-meaning {
  color: var(--text-secondary);
  font-size: clamp(13px, 3vw, 14px);
  line-height: 1.6;
  margin-bottom: 8px;
}

.modal-card-position-text {
  color: var(--text);
  font-size: clamp(13px, 3vw, 14px);
  line-height: 1.6;
  font-style: italic;
}

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 25px 0;
}

.modal-synthesis h3 {
  color: var(--text);
  font-size: clamp(15px, 4vw, 18px);
  margin-bottom: 12px;
  text-align: center;
  font-weight: 600;
}

.modal-synthesis p {
  color: var(--text-secondary);
  font-size: clamp(13px, 3vw, 14px);
  line-height: 1.7;
  text-align: center;
}

.modal-close {
  display: block;
  margin: 25px auto 0;
  padding: 12px 40px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.modal-close:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }

/* ===== UTILITAIRES ===== */
.fade-in {
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger > * {
  animation: fadeIn 0.4s ease backwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 30px 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.cta-section:hover { box-shadow: var(--shadow-md); }

.cta-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.cta-content { flex: 1; }

.cta-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.cta-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 14px;
}

.cta-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--text);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.cta-btn:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

@media (max-width: 500px) {
  .cta-section {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== NAV JS HELPER ===== */
/* Inline JS script to add to each page:
  document.getElementById('hamburgerBtn').addEventListener('click', () => { document.getElementById('sidebar').classList.add('open'); document.getElementById('sidebarOverlay').classList.add('open'); });
  document.getElementById('sidebarClose').addEventListener('click', () => { document.getElementById('sidebar').classList.remove('open'); document.getElementById('sidebarOverlay').classList.remove('open'); });
  document.getElementById('sidebarOverlay').addEventListener('click', () => { document.getElementById('sidebar').classList.remove('open'); document.getElementById('sidebarOverlay').classList.remove('open'); });
  document.addEventListener('keydown', (e) => { if (e.key === 'Escape') { document.getElementById('sidebar').classList.remove('open'); document.getElementById('sidebarOverlay').classList.remove('open'); const modal = document.querySelector('.modal-overlay.active'); if (modal) modal.classList.remove('active'); }});
*/
