:root {
  --bg: #fdf6ee; --surface: #fff8f0; --text: #1a1410; --muted: #8a7a6a; --border: #e8d9c8;
  --coral: #ff6b4a; --mint: #3ecba0; --sky: #4ab8f0; --sun: #f7c948; --lavender: #b57bee; --peach: #ffaa72;
  --fd: 'Fraunces', serif; --fb: 'Plus Jakarta Sans', sans-serif;
}
body.dark { --bg: #141210; --surface: #1e1b18; --text: #f0e8df; --muted: #8a7a6a; --border: #2e2820; }
body.dark nav { background: rgba(20,18,16,0.92) !important; }
body.dark .mobile-menu { background: var(--surface); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--fb); font-weight: 300; line-height: 1.7; min-height: 100vh; cursor: none; }
a, button, input, select, label, [onclick] { pointer-events: auto !important; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 3px; }

.dark-toggle { width: 36px; height: 36px; border-radius: 50%; background: none; border: 1.5px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--muted); transition: border-color 0.2s, transform 0.3s; margin-left: 0.75rem; }
.dark-toggle:hover { border-color: var(--coral); transform: rotate(20deg); }

.ripple { position: fixed; border-radius: 50%; pointer-events: none; z-index: 9996; background: radial-gradient(circle, rgba(255,107,74,0.25) 0%, transparent 70%); transform: translate(-50%,-50%) scale(0); animation: rippleAnim 0.7s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
@keyframes rippleAnim { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }

.lang-switcher { display: flex; align-items: center; gap: 0; background: var(--bg); border: 1.5px solid var(--border); border-radius: 100px; overflow: hidden; }
.lang-btn { padding: 0.3rem 0.85rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; border: none; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; border-radius: 100px; }
.lang-btn.active { background: var(--coral); color: #fff; }
.lang-btn:hover:not(.active) { color: var(--coral); }
.mobile-lang-switcher { display: flex; gap: 0; background: var(--bg); border: 1.5px solid var(--border); border-radius: 100px; overflow: hidden; }
.mobile-lang-btn { padding: 0.5rem 1.5rem; font-size: 1rem; font-weight: 500; border: none; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; border-radius: 100px; }
.mobile-lang-btn.active { background: var(--coral); color: #fff; }

nav { position: fixed; top: 0; width: 100%; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 4rem; backdrop-filter: blur(12px); background: rgba(253,246,238,0.88); border-bottom: 1px solid var(--border); transition: box-shadow 0.3s; }
nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.nav-logo { font-family: var(--fd); font-size: 1.3rem; font-style: italic; color: var(--coral); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.82rem; font-weight: 500; color: var(--muted); text-decoration: none; position: relative; padding-bottom: 2px; transition: color 0.2s; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--coral); border-radius: 1px; transition: width 0.25s; }
.nav-links a:hover, .nav-links a.active { color: var(--coral); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu { display: none; position: fixed; inset: 0; background: var(--surface); flex-direction: column; align-items: center; justify-content: center; gap: 2rem; z-index: 99; }
.mobile-menu.open { display: flex; }
.mobile-menu { gap: 1.2rem; padding: 4rem 1.5rem 2rem; justify-content: flex-start; overflow-y: auto; }
.mobile-menu a { font-family: var(--fd); font-size: 1.6rem; font-style: italic; color: var(--text); text-decoration: none; transition: color 0.2s; }
.mobile-menu a:hover { color: var(--coral); }
.close-menu { position: absolute; top: 1.5rem; right: 2.5rem; background: none; border: none; cursor: pointer; color: var(--muted); font-size: 2.5rem; line-height: 1; }

.cursor { width: 12px; height: 12px; background: var(--coral); border-radius: 50%; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999999; transform: translate(-50%,-50%); mix-blend-mode: multiply; }
.trail-dot { position: fixed; pointer-events: none; z-index: 9997; border-radius: 50%; background: var(--coral); transform: translate(-50%,-50%); }
.cursor-ring { width: 24px; height: 24px; border: 1.5px solid rgba(255,107,74,0.4); border-radius: 50%; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999998; transform: translate(-50%,-50%) scale(0); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s; opacity: 0; }
.cursor-ring.visible { transform: translate(-50%,-50%) scale(1); opacity: 1; }
.cursor-label { position: fixed; pointer-events: none; z-index: 9997; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; padding: 0.28rem 0.65rem; border-radius: 100px; transform: translate(-50%, calc(-50% - 24px)) scale(0); transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s; opacity: 0; white-space: nowrap; top: 0; left: 0; }
.cursor-label.visible { transform: translate(-50%, calc(-50% - 24px)) scale(1); opacity: 1; }

.page-curtain { position: fixed; inset: 0; z-index: 99999; pointer-events: none; background: var(--coral); transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s cubic-bezier(0.76,0,0.24,1); }
.page-curtain.show { transform: scaleY(1); }

#particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.55; }

body.is-entering { overflow: hidden; }
body.is-entering::before { content: ''; position: fixed; inset: 0; background: var(--coral); z-index: 99999; transform-origin: top; animation: coverDown 0.5s cubic-bezier(0.76,0,0.24,1) forwards; }
@keyframes coverDown { 0% { transform: scaleY(1); } 100% { transform: scaleY(0); } }

footer { border-top: 1px solid var(--border); padding: 1.5rem 4rem; display: flex; justify-content: space-between; align-items: center; background: var(--surface); }
footer span { font-size: 0.78rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  #particle-canvas { display: none; }
}

@media (max-width: 680px) {
  nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .lang-switcher { display: none; }
  .hamburger { display: flex; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; padding: 1rem 1.5rem; }
  body { cursor: auto !important; }
  .cursor, .cursor-ring, .trail-dot, .cursor-label { display: none !important; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .parcours-grid { grid-template-columns: 1fr; }
}

/* Très petits écrans (iPhone SE, vieux Android) */
@media (max-width: 380px) {
  nav { padding: 1rem 1rem; }
  footer { font-size: 0.72rem; padding: 1rem; }
  main, section { padding-left: 1rem !important; padding-right: 1rem !important; }
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem) !important; }
  .hero-tag { font-size: 0.7rem; padding: 0.3rem 0.8rem; }
  #pwaInstallBtn { font-size: 0.78rem; padding: 0.55rem 0.95rem; bottom: 0.8rem; right: 0.8rem; }
}
