/* ========================
   Variables
======================== */
:root{
  --bg:#0b0d10; --card:#11151b; --text:#e9eef5; --muted:#a8b3c4; --accent:#4f8cff; --line:#1b2330;
  --nav-h:64px;

  /* + Améliorations couleur/effets */
  --accent-strong:#427ef0;
  --grad-accent: linear-gradient(135deg, #5aa0ff 0%, #8ab6ff 50%, #a8c5ff 100%);
  --glow: 0 10px 32px rgba(90,160,255,.25);
}

/* ========================
   Reset & base
======================== */
*{box-sizing:border-box}
html,body{margin:0;padding:0;overflow-x:hidden}
html{ -webkit-text-size-adjust:100% }
body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg); color:var(--text); line-height:1.6;
}
img,video{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:24px;width:100%}

/* ========================
   Hero
======================== */
.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:center;padding-top:32px;min-width:0}
.hero__text h1{font-size:44px;margin:0 0 8px}
.hero__text h1 span{color:var(--accent)}
.tagline{color:var(--muted);margin:0 0 16px}
.cta{display:flex;gap:12px;flex-wrap:wrap}

/* Boutons (améliorations) */
.btn{
  display:inline-block;background:var(--accent-strong);color:#fff;
  padding:10px 16px;border-radius:12px;font-weight:600;
  transition:transform .15s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
  box-shadow:none;
}
.btn:hover{ transform:translateY(-1px); box-shadow:var(--glow); }
.btn:active{ transform:translateY(0); box-shadow:none; }
.btn--ghost{background:transparent;border:1px solid var(--accent-strong);color:var(--accent-strong);}
.btn--ghost:hover{ background:rgba(66,126,240,.1); }

/* Lien soulignement animé (hors .btn) */
a:not(.btn){
  position:relative;
}
a:not(.btn)::after{
  content:""; position:absolute; left:10%; right:10%; bottom:2px; height:2px;
  background:var(--grad-accent); transform:scaleX(0); transform-origin:center;
  transition:transform .25s ease;
}
a:not(.btn):hover::after{ transform:scaleX(1); }

/* Photo hover subtil */
.hero__photo img{
  width:180px;height:180px;object-fit:cover;object-position:40% 50%;
  border-radius:50%;border:3px solid var(--accent);background:#0f1217;
  transition:box-shadow .25s ease, transform .15s ease;
}
.hero__photo img:hover{
  box-shadow:0 0 0 3px rgba(90,160,255,.25), 0 18px 50px rgba(90,160,255,.15);
  transform:translateY(-1px);
}

/* ========================
   Cards & grids
======================== */
.card{
  background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;margin:18px 0;
  transition:transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 40px rgba(0,0,0,.35);
  border-color:#243247;
}
.grid{display:grid;gap:16px;min-width:0}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
@media (max-width:900px){
  .hero{grid-template-columns:1fr}
  .grid-2,.grid-3{grid-template-columns:1fr}
}
.list{margin:0;padding-left:18px}
.chips{display:flex;gap:8px;flex-wrap:wrap;list-style:none;padding:0;margin:10px 0 0}
.chips li{
  padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:#0e131a;color:var(--muted);font-size:13px;
  transition:transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.chips li:hover{ transform:translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.25); border-color:#2a3a52; }

.project{padding:12px;border:1px dashed var(--line);border-radius:12px}
.timeline{display:grid;gap:14px;min-width:0}
.timeline__item{display:grid;grid-template-columns:120px 1fr;gap:14px}
.timeline__date{color:var(--muted)}
.footer{text-align:center;color:var(--muted)}

/* ========================
   NAV
======================== */
.topnav{
  position:sticky; top:0; height:var(--nav-h);
  background:rgba(11,13,16,0.7); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  z-index:9999; isolation:isolate;
}
.topnav__inner{
  max-width:1100px; margin:0 auto; height:100%;
  display:flex; align-items:center; justify-content:space-between; padding:0 24px;
  position:relative;
}
.topnav .brand{
  font-weight:800;
  background:var(--grad-accent);
  -webkit-background-clip:text; background-clip:text;
  color:transparent; opacity:.95; transition:opacity .2s ease;
}
.topnav .brand:hover{ opacity:1; }

/* Menu (desktop) */
.menu{
  display:flex; align-items:center; gap:14px; list-style:none; margin:0; padding:0;
  z-index:2;
}
.topnav .menu a{color:var(--text);padding:8px 10px;border-radius:10px;font-weight:600}
.topnav .menu a:hover{background:#0f1217;border:1px solid var(--line)}
.topnav .menu a.is-active{border:1px solid var(--line);background:#0f1217}

/* Bouton nav */
.btn--xs{padding:6px 10px;font-size:14px}

/* Burger (caché en desktop) */
.burger{
  display:none; border:0; outline:0; background:transparent; padding:0; box-shadow:none;
  position:relative; z-index:3; cursor:pointer; touch-action:manipulation;
}
.burger span{display:block;width:20px;height:2px;background:var(--text);margin:3px 0}

/* Ancres si besoin */
section[id]{scroll-margin-top:calc(var(--nav-h) + 12px)}

/* ========================
   Mobile
======================== */
@media (max-width:820px){
  .topnav__inner{padding:0 16px}

  .burger{
    display:flex; align-items:center; justify-content:center;
    width:40px; height:36px; border:1px solid var(--line); border-radius:10px;
    transition:transform .15s ease, box-shadow .25s ease, border-color .2s ease;
  }
  .burger:hover{ box-shadow:var(--glow); }
  .burger:active{ transform:scale(.98); }

  /* Menu mobile : attaché à la nav (absolute) pour rester au-dessus du contenu */
  .menu{
    position:absolute; top:var(--nav-h); left:0; right:0;
    background:rgba(11,13,16,0.98); border-top:1px solid var(--line);
    display:none; flex-direction:column; gap:10px; padding:16px;
    pointer-events:none; overflow:auto; -webkit-overflow-scrolling:touch;
    box-shadow:0 12px 30px rgba(0,0,0,.35);
  }
  .menu.open{ display:flex; pointer-events:auto; }
}

/* Affinage mobile étroit */
@media (max-width:760px){
  .topnav .menu a{padding:8px;font-size:14px}
}

/* ========================
   Utilitaires
======================== */
body.no-scroll{ overflow:hidden; }

/* Scrollbar discrète (Chrome/Edge) */
*::-webkit-scrollbar{ width:10px; height:10px; }
*::-webkit-scrollbar-thumb{
  background:#263245; border-radius:10px; border:2px solid transparent; background-clip:content-box;
}
*::-webkit-scrollbar-thumb:hover{ background:#2f4060; }

/* Respect des préférences d’accessibilité */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}

/* ===== Vidéo CV ===== */
.cvvideo{ padding: 28px 16px 10px; }
.cvvideo__title{ margin: 0 0 12px; font-size: clamp(22px, 2.6vw, 28px); }

.cvvideo__player{
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.cvvideo__el{
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;    /* garde un cadre propre pendant le chargement */
  background: #0d1117;
}

/* Variante YouTube/Vimeo */
.cvvideo__embed{ position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden;
  border:1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.25); background: var(--card);
}
.cvvideo__embed iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

.cvvideo__actions{
  display:flex; gap:12px; flex-wrap:wrap; justify-content:center;
  margin-top:14px;
}
/* ==== Animations stats ==== */
.reveal-stats .stat{
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .6s;
  will-change: transform, opacity;
}
.reveal-stats .stat:nth-child(2){ transition-delay: .08s; }
.reveal-stats .stat:nth-child(3){ transition-delay: .16s; }

.reveal-stats.is-in .stat{
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stat__number{
  display:inline-block;
  font-size: clamp(26px,4.6vw,40px);
  font-weight: 800;
  letter-spacing:.2px;
  color: var(--accent);
  text-shadow: 0 6px 22px rgba(0,0,0,.25);
  position: relative;
}
.stat__number::after{
  content:"";
  position:absolute; left:50%; bottom:-6px; width:42%; height:2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.reveal-stats.is-in .stat .stat__number::after{
  transform: translateX(-50%) scaleX(1);
}

/* Réduit/neutralise les animations si l’utilisateur le demande */
@media (prefers-reduced-motion: reduce){
  .reveal-stats .stat,
  .stat__number::after{
    transition: none !important;
  }
}

/* ===== Barre sociale flottante ===== */
.social-bar{
  position: fixed;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  /* surtout PAS pointer-events:none ici, ça bloque les clics */
}

/* Les ancres SONT les boutons */
.social-bar .social-btn{
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #0f141b;
  color: var(--accent, #5aa0ff);
  border: 1px solid var(--line, #1b2330);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  position: relative;
  overflow: hidden;
  transition: color .2s ease, transform .15s ease;
  text-decoration: none;
}

.social-bar .icon{ width: 20px; height: 20px; display:block; }

/* Effet hover (fond inchangé pour éviter “grosse tache” bleue) */
.social-bar .social-btn:hover{
  color:#fff;
  transform: translateY(-1px);
}

/* Barre bleue fine, centrée et stable */
.social-bar .social-btn::after{
  content:"";
  position:absolute;
  bottom:6px;
  left:14px; right:14px;           /* largeur fixe centrée */
  height:2px;
  background:var(--accent, #5aa0ff);
  border-radius:999px;
  opacity:0;
  transition:opacity .2s ease;
}
.social-bar .social-btn:hover::after,
.social-bar .social-btn:focus-visible::after{ opacity:1; }

/* Mobile : bas-droite, en ligne */
@media (max-width: 780px){
  .social-bar{
    top:auto; left:auto; right:12px; bottom:12px;
    transform:none;
    flex-direction:row; gap:10px;
  }
}