    /* ============================================================
       style.css — Feuille de style du portfolio (page d'accueil)
       ------------------------------------------------------------
       Organisée par section de page. Charte graphique :
         - fond sombre (#0a0a0a) + cartes (#111111)
         - accent bleu (--blue #2563eb) + effets de lueur (--blue-glow)
       Les variables globales sont dans :root (en tête de fichier).

       ⚠️ Les règles des sections #skills / #formations / #certifications
       portent sur du HTML RÉGÉNÉRÉ par les scripts generate_site_*.py :
       ne pas modifier la structure HTML, seulement le style ici.
       ============================================================ */

    /* ---------- Reset & variables globales ---------- */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg:        #0a0a0a;
      --bg-card:   #111111;
      --bg-hover:  #1a1a1a;
      --blue:      #2563eb;
      --blue-h:    #3b82f6;
      --blue-dim:  rgba(37,99,235,0.12);
      --blue-glow: rgba(37,99,235,0.35);
      --white:     #ffffff;
      --grey:      #888888;
      --grey-lt:   #aaaaaa;
      --border:    #1f1f1f;
      --border-lt: #2a2a2a;
      --nav-h:     68px;
      --radius:    16px;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--white);
      overflow-x: hidden;
      cursor: none;
    }

    a { text-decoration: none; color: inherit; }
    ul { list-style: none; }
    img { max-width: 100%; display: block; }

    /* ---------- Curseur personnalisé (remplace le curseur natif) ---------- */
    #cursor {
      position: fixed; top: 0; left: 0;
      width: 10px; height: 10px;
      background: var(--blue);
      border-radius: 50%;
      pointer-events: none;
      z-index: 1000001;
      transition: transform 0.15s ease, opacity 0.3s;
      transform: translate(-50%, -50%);
    }
    /* Sur écrans tactiles (mobile/tablette), on supprime le curseur custom
       (le point/anneau parasite en haut à gauche) et on rétablit le curseur natif.
       `hover: none` couvre tous les devices tactiles (iPhone, iPad, Android). */
    @media (hover: none) {
      body { cursor: auto; }
      #cursor { display: none !important; }
      body .btn-primary, body .btn-ghost, body .hamburger, body .btn-cv,
      body .lang-btn, body #lightbox-close,
      body .cert-card[role="button"] { cursor: pointer; }
    }

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

    body::before {
      content: '';
      position: fixed; inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 9997;
      opacity: 0.4;
    }

    /* ---------- Utilitaires & animations d'apparition ---------- */
    .blue { color: var(--blue); }
    .mono { font-family: 'JetBrains Mono', monospace; }
    .section-padding { padding: 110px 100px; }
    @media (max-width: 1024px) { .section-padding { padding: 80px 48px; } }
    @media (max-width: 640px) { .section-padding { padding: 64px 24px; } }

    .fade-in { opacity: 0; transform: translateY(32px); transition: opacity 0.7s ease, transform 0.7s ease; }
    .fade-in.visible { opacity: 1; transform: none; }
    .fade-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s ease, transform 0.7s ease; }
    .fade-left.visible { opacity: 1; transform: none; }
    .fade-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
    .fade-right.visible { opacity: 1; transform: none; }

    .grad-text {
      background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .sec-title .grad-text {
      background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #93c5fd 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .sec-eyebrow {
      display: inline-flex; align-items: center; gap: 10px;
      font-size: 0.9rem; font-weight: 600;
      color: var(--blue); letter-spacing: 0.2em;
      text-transform: uppercase; margin-bottom: 14px;
    }
    .sec-eyebrow::before {
      content: '';
      width: 28px; height: 1.5px;
      background: var(--blue);
    }
    .sec-title {
      font-size: clamp(1.9rem, 3.2vw, 2.8rem);
      font-weight: 800; line-height: 1.1;
      letter-spacing: -0.03em;
      margin-bottom: 16px;
    }
    .sec-desc {
      font-size: 0.95rem; color: var(--grey-lt);
      line-height: 1.8; margin-bottom: 64px;
      max-width: auto;
    }

    /* ---------- Boutons (CTA, ghost) ---------- */
    .btn-primary {
      display: inline-flex; align-items: center; gap: 10px;
      padding: 14px 30px;
      background: var(--blue);
      color: #fff; font-weight: 700; font-size: 0.88rem;
      border-radius: 100px; border: none; cursor: none;
      transition: all 0.25s;
      letter-spacing: 0.01em;
    }
    .btn-primary:hover { background: var(--blue-h); }

    .btn-ghost {
      display: inline-flex; align-items: center; gap: 10px;
      padding: 13px 28px;
      background: transparent;
      color: var(--white); font-weight: 600; font-size: 0.88rem;
      border-radius: 100px;
      border: 1.5px solid var(--border-lt);
      cursor: none; transition: all 0.25s;
    }
    .btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

    /* ---------- Navigation (barre fixe + menu mobile) ---------- */
    nav {
      position: fixed; top: 0; left: 0; right: 0;
      height: var(--nav-h);
      background: rgba(10,10,10,0.8);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 48px;
      z-index: 1000;
      transition: box-shadow 0.3s;
    }
    nav.scrolled { box-shadow: 0 4px 40px rgba(0,0,0,0.5); }

    .nav-brand { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.02em; }
    .nav-brand span { color: var(--blue); }

    .hamburger { display: none; flex-direction: column; gap: 5px; cursor: none; padding: 6px; background: none; border: none; }
    .hamburger span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s; display: block; }
    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav-links { display: flex; gap: 26px; align-items: center; }
    .nav-links a {
      font-size: 0.82rem; font-weight: 500;
      color: var(--grey); transition: color 0.2s;
      position: relative;
      display: inline-flex; align-items: center; gap: 7px;
    }
    .nav-icon { width: 15px; height: 15px; flex-shrink: 0; transition: color 0.2s; }
    .nav-links a::after {
      content: ''; position: absolute; bottom: -4px; left: 0;
      width: 0; height: 1.5px; background: var(--blue);
      transition: width 0.3s;
    }
    .nav-links a:hover, .nav-links a.active { color: var(--white); }
    .nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

    .mobile-menu {
      display: none; position: fixed;
      top: var(--nav-h); left: 0; right: 0;
      background: rgba(10,10,10,0.98);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border);
      padding: 24px 48px; flex-direction: column; gap: 18px;
      z-index: 999;
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a { font-size: 0.95rem; font-weight: 500; color: var(--grey); padding: 8px 0; border-bottom: 1px solid var(--border); transition: color 0.2s; display: inline-flex; align-items: center; gap: 10px; }
    .mobile-menu a:hover { color: var(--blue); }

    /* ---------- Section HERO (accueil) ---------- */
    #hero {
      min-height: 100vh;
      min-height: 100svh; /* iOS Safari : hauteur réelle sans la barre d'adresse */
      padding: calc(var(--nav-h) + 28px) 100px 60px;
      display: flex; align-items: flex-start;
      position: relative; overflow: hidden;
    }

    .hero-orb {
      position: absolute; border-radius: 50%;
      filter: blur(100px); pointer-events: none;
      animation: orbPulse 8s ease-in-out infinite;
    }
    .hero-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%); top: -100px; right: -100px; animation-delay: 0s; }
    .hero-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%); bottom: 0; left: 20%; animation-delay: 3s; }
    .hero-orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%); top: 30%; left: -100px; animation-delay: 5s; }

    @keyframes orbPulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.15); opacity: 0.7; }
    }

    #hero::after {
      content: '';
      position: absolute; inset: 0;
      background-image: linear-gradient(rgba(37,99,235,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,0.04) 1px, transparent 1px);
      background-size: 60px 60px;
      mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
      pointer-events: none;
    }

    #particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

    .hero-content {
      display: flex; align-items: center;
      justify-content: space-between;
      width: 100%; position: relative; z-index: 1;
      gap: 60px;
    }

    .hero-text { max-width: 640px; }

    .hero-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 6px 16px;
      border: 1px solid var(--border-lt);
      border-radius: 100px;
      font-size: 0.72rem; font-weight: 600;
      color: var(--grey-lt); margin-bottom: 28px;
      background: rgba(255,255,255,0.03);
      letter-spacing: 0.05em;
    }
    .hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; animation: blink 2s infinite; }
    @keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

    .hero-heading {
      font-size: clamp(2.8rem, 5.5vw, 4.4rem);
      font-weight: 900; line-height: 1.05;
      letter-spacing: -0.04em;
      margin-bottom: 24px;
    }
    .hero-heading .line2 { display: block; }

    .typing-wrap {
      display: inline-flex; align-items: center; gap: 0;
    }
    #typed-text { color: var(--blue); }
    .cursor-blink {
      display: inline-block; width: 3px; height: 1em;
      background: var(--blue); margin-left: 2px;
      animation: curBlink 1s step-end infinite;
      vertical-align: middle;
    }
    @keyframes curBlink { 0%,100%{opacity:1;} 50%{opacity:0;} }

    .hero-desc {
      font-size: 1rem; color: var(--grey-lt);
      line-height: 1.8; margin-bottom: 40px; max-width: 520px;
    }

    .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 52px; }

    .hero-stats {
      display: flex; gap: 12px; flex-wrap: wrap;
    }
    .stat-item {
      flex: 1; min-width: 0;
      padding: 18px 20px;
      background: rgba(255,255,255,0.025);
      border: 1px solid var(--border);
      border-radius: 14px;
      display: flex; flex-direction: column; gap: 4px;
      transition: border-color 0.25s, background 0.25s, transform 0.25s;
    }
    .stat-item:hover {
      border-color: rgba(37,99,235,0.35);
      background: rgba(37,99,235,0.04);
      transform: translateY(-3px);
    }
    .stat-num {
      font-size: 1.6rem; font-weight: 800;
      letter-spacing: -0.04em; color: var(--white);
      font-variant-numeric: tabular-nums;
    }
    .stat-num span { color: var(--blue); }
    .stat-label { font-size: 0.72rem; color: var(--grey); letter-spacing: 0.05em; }
    .hero-socials { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px; margin-top: 52px; }

    .hero-visual { position: relative; flex-shrink: 0; }

    .hero-avatar-ring {
      width: 360px; height: 360px;
      border-radius: 50%;
      position: relative;
      display: flex; align-items: center; justify-content: center;
      filter: drop-shadow(0 0 48px rgba(37,99,235,0.22)) drop-shadow(0 20px 60px rgba(0,0,0,0.5));
    }
    .hero-avatar-ring::before {
      content: '';
      position: absolute; inset: -4px;
      border-radius: 50%;
      background: conic-gradient(from 0deg, var(--blue) 0%, rgba(96,165,250,0.8) 25%, transparent 40%, var(--blue) 60%, transparent 75%, rgba(96,165,250,0.6) 90%, var(--blue) 100%);
      animation: rotateBorder 6s linear infinite;
    }
    .hero-avatar-ring::after {
      content: '';
      position: absolute; inset: -2px;
      border-radius: 50%;
      background: var(--bg);
    }
    @keyframes rotateBorder { to { transform: rotate(360deg); } }

    .hero-avatar-img {
      width: 100%; height: 100%;
      border-radius: 50%; object-fit: cover;
      object-position: top center;
      position: relative; z-index: 1;
    }

    .tech-chip {
      position: absolute;
      background: rgba(17,17,17,0.9);
      border: 1px solid var(--border-lt);
      border-radius: 12px; padding: 8px 14px;
      font-size: 0.75rem; font-weight: 600;
      display: flex; align-items: center; gap: 8px;
      backdrop-filter: blur(10px);
      animation: floatChip 4s ease-in-out infinite;
      z-index: 2; white-space: nowrap;
      box-shadow: 0 6px 24px rgba(0,0,0,0.45);
      transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), border-color 0.3s, box-shadow 0.3s;
    }
    .tech-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
    .tc-0 { top: 10px; left: -55px; animation-delay: 0s; }
    .tc-1 { top: -40px; left: 130px; animation-delay: 0.5s; }
    .tc-2 { top: 15px; right: -50px; animation-delay: 1s; }
    .tc-3 { top: 135px; right: -75px; animation-delay: 1.5s; }
    .tc-4 { bottom: 30px; right: -45px; animation-delay: 2s; }
    .tc-5 { bottom: -50px; left: 140px; animation-delay: 2.5s; }
    .tc-6 { bottom: 20px; left: -55px; animation-delay: 3s; }
    .tc-7 { top: 140px; left: -65px; animation-delay: 3.5s; }

    @keyframes floatChip {
      0%,100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }
    .tech-chip:hover {
      transform: translateY(-14px) scale(1.06) !important;
      border-color: rgba(37,99,235,0.45);
      box-shadow: 0 12px 40px rgba(37,99,235,0.2);
    }

    /* ---------- Section À PROPOS ---------- */
    #about { background: var(--bg-card); position: relative; overflow: hidden; }

    .about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: center; position: relative; z-index: 1; }

    .about-photo-wrap { position: relative; max-width: 60%; margin-inline: auto; }
    .about-photo-frame {
      position: relative; border-radius: 24px;
      overflow: hidden;
      border: 1px solid var(--border-lt);
      box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(37,99,235,0.06);
    }
    .about-photo-frame img {
      width: 100%; aspect-ratio: 3/4; object-fit: cover;
      filter: grayscale(15%) contrast(1.05);
      display: block;
    }
    .about-photo-frame::before {
      content: ''; position: absolute; inset: 0; z-index: 2;
      background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.35) 100%);
      pointer-events: none;
    }
    .about-photo-frame::after {
      content: '';
      position: absolute; inset: 0;
      background: linear-gradient(180deg, transparent 60%, rgba(10,10,10,0.6) 100%);
    }

    .about-corner {
      position: absolute; bottom: -16px; right: -16px;
      width: 120px; height: 120px;
      border: 2px solid var(--blue);
      border-radius: 16px; opacity: 0.3;
    }

    .about-text .tagline {
      font-size: clamp(1.4rem, 2.3vw, 1.8rem);
      font-weight: 700; line-height: 1.4;
      margin-bottom: 20px; letter-spacing: -0.02em;
      position: relative; padding-left: 18px;
      color: var(--white);
    }
    .about-text .tagline::before {
      content: '';
      position: absolute; left: 0; top: 15%; bottom: 15%;
      width: 3px;
      background: linear-gradient(180deg, var(--blue), rgba(37,99,235,0.2));
      border-radius: 2px;
    }
    .about-bio { color: var(--grey-lt); line-height: 1.9; margin-bottom: 32px; font-size: 1.08rem; }

    .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 32px; }
    .info-item {
      padding: 14px 18px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      position: relative; overflow: hidden;
      transition: border-color 0.25s, box-shadow 0.25s;
    }
    .info-item::before {
      content: ''; position: absolute; left: 0; top: 0; bottom: 0;
      width: 2px;
      background: linear-gradient(180deg, var(--blue), transparent);
      transform: scaleY(0); transform-origin: top; transition: transform 0.35s;
    }
    .info-item:hover::before { transform: scaleY(1); }
    .info-item:hover {
      border-color: rgba(37,99,235,0.3);
      box-shadow: 0 4px 20px rgba(37,99,235,0.06);
    }
    .info-label { font-size: 0.68rem; color: var(--grey); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
    .info-val { font-size: 0.88rem; font-weight: 600; }
    .info-val a { color: var(--white); transition: color 0.2s; }
    .info-val a:hover { color: var(--blue); }

    .about-socials { display: flex; gap: 10px; }
    .soc-btn {
      width: 40px; height: 40px;
      border: 1px solid var(--border-lt);
      border-radius: 10px; display: flex;
      align-items: center; justify-content: center;
      color: var(--grey); transition: all 0.25s;
      position: relative; overflow: hidden;
    }
    .soc-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); transform: translateY(-2px); }
    .soc-btn::after {
      content: ''; position: absolute; inset: 0;
      background: radial-gradient(circle at 50% 50%, rgba(37,99,235,0.2), transparent 70%);
      opacity: 0; transition: opacity 0.25s;
      border-radius: inherit;
    }
    .soc-btn:hover::after { opacity: 1; }
    .soc-btn svg { width: 17px; height: 17px; }

    /* ---------- Section EXPÉRIENCE ---------- */
    #experience { background: var(--bg); position: relative; overflow: hidden; }

    .timeline { position: relative; padding-left: 36px; }
    .timeline::before {
      content: '';
      position: absolute; left: 6px; top: 0; bottom: 0;
      width: 1px;
      background: linear-gradient(180deg, var(--blue) 0%, var(--border) 40%, transparent 100%);
    }

    .tl-item { position: relative; margin-bottom: 48px; }
    .tl-item:last-child { margin-bottom: 0; }

    .tl-dot {
      position: absolute; left: -33px; top: 8px;
      width: 14px; height: 14px; border-radius: 50%;
      background: var(--blue);
      border: 2px solid var(--bg);
      box-shadow: 0 0 0 3px rgba(37,99,235,0.3), 0 0 20px rgba(37,99,235,0.4);
      overflow: visible;
    }
    .tl-dot::after {
      content: '';
      position: absolute;
      inset: -7px;
      border-radius: 50%;
      border: 1.5px solid rgba(37,99,235,0.55);
      animation: pulseDot 2.2s ease-out infinite;
    }
    .tl-item.dim .tl-dot { background: var(--border-lt); box-shadow: 0 0 0 3px var(--border); }
    .tl-item.dim .tl-dot::after { display: none; }
    @keyframes pulseDot {
      0% { transform: scale(0.8); opacity: 0.9; }
      100% { transform: scale(2.4); opacity: 0; }
    }

    .tl-card {
      background: rgba(17,17,17,0.75);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border);
      border-radius: var(--radius); padding: 28px 32px;
      transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    }
    .tl-card:hover {
      border-color: rgba(37,99,235,0.3);
      box-shadow: 0 12px 48px rgba(0,0,0,0.4);
      transform: translateX(4px);
    }

    .tl-header { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
    .tl-role { font-size: 1.05rem; font-weight: 700; }
    .tl-badge {
      font-size: 0.65rem; font-weight: 700;
      padding: 3px 10px; border-radius: 100px;
      background: var(--blue-dim); color: var(--blue);
      border: 1px solid rgba(37,99,235,0.25);
      text-transform: uppercase; letter-spacing: 0.08em;
    }
    .tl-company { font-size: 0.88rem; color: var(--blue); font-weight: 600; margin-bottom: 4px; }
    .tl-period {
      font-size: 0.75rem; color: var(--grey);
      display: flex; align-items: center; gap: 5px;
      margin-bottom: 16px; font-family: 'JetBrains Mono', monospace;
    }
    .tl-list { padding: 0; }
    .tl-list li {
      display: flex; gap: 10px;
      font-size: 0.86rem; color: var(--grey-lt);
      line-height: 1.7; margin-bottom: 6px;
    }
    .tl-list li::before { content: '→'; color: var(--blue); flex-shrink: 0; font-size: 0.8rem; margin-top: 2px; }

    .tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
    .tag {
      font-size: 0.68rem; font-weight: 500;
      padding: 4px 11px;
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      border-radius: 100px; color: var(--grey-lt);
      font-family: 'JetBrains Mono', monospace;
      transition: border-color 0.2s, color 0.2s;
    }
    .tl-card:hover .tag { border-color: rgba(37,99,235,0.2); }

    /* ---------- Section PROJETS ---------- */
    #projects { background: var(--bg-card); position: relative; overflow: hidden; }

    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
      gap: 28px;
      position: relative; z-index: 1;
    }
    .project-card {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 30px 28px;
      display: flex; flex-direction: column;
      transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
      position: relative; overflow: hidden;
    }
    .project-card:hover {
      border-color: rgba(37,99,235,0.3);
      box-shadow: 0 12px 48px rgba(0,0,0,0.4);
      transform: translateY(-4px);
    }
    .project-card::before {
      content: ''; position: absolute; top: 0; left: 0;
      width: 100%; height: 2px;
      background: linear-gradient(90deg, var(--blue), transparent);
      opacity: 0; transition: opacity 0.3s;
    }
    .project-card:hover::before { opacity: 1; }
    .project-tag {
      font-size: 0.62rem; font-weight: 700; color: var(--blue);
      text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px;
    }
    .project-logo {
      width: 52px; height: 52px;
      border-radius: 14px;
      background: rgba(37,99,235,0.08);
      border: 1px solid var(--border-lt);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 18px;
      overflow: hidden;
    }
    .project-logo img { width: 30px; height: 30px; object-fit: contain; }
    .project-link {
      margin-top: 20px;
      display: inline-flex; align-items: center; gap: 8px;
      font-size: 0.82rem; font-weight: 600; color: var(--blue-h);
      width: fit-content;
      transition: color 0.2s, gap 0.2s;
    }
    .project-link svg { width: 15px; height: 15px; transition: transform 0.2s; }
    .project-link:hover { color: var(--white); gap: 12px; }
    .project-link:hover svg { transform: translateX(2px); }
    .project-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
    .project-desc { font-size: 0.88rem; color: var(--grey-lt); line-height: 1.7; }
    .project-card .tag-row { margin-top: auto; padding-top: 18px; }

    /* ---------- Section Ressources (cartes = style Projets) ---------- */
    #resources { background: var(--bg-card); position: relative; overflow: hidden; }
    #resources .sec-desc { margin-bottom: 16px; }
    .resources-intro { max-width: 760px; margin-bottom: 40px; font-size: 0.95rem; line-height: 1.8; color: var(--grey-lt); }
    .resource-card .project-logo img { border-radius: 8px; }

    /* ---------- Sections FORMATIONS & CERTIFICATIONS (régénérées) ---------- */
    #formations { background: var(--bg-card); position: relative; overflow: hidden; }
    #certifications { background: var(--bg); position: relative; overflow: hidden; }
    #certifications .cert-card { background: var(--bg-card); }

    .cert-cat-title {
      font-size: 0.7rem; font-weight: 700;
      color: var(--blue); letter-spacing: 0.2em;
      text-transform: uppercase; margin-bottom: 20px;
      display: flex; align-items: center; gap: 14px;
    }
    .cert-cat-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
    .cert-cat-title:not(:first-child) { margin-top: 48px; }

    .certs-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
      gap: 24px;
      position: relative; z-index: 1;
    }
    .certs-grid--certs {
      grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    }
    .cert-card {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 26px 28px;
      transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
      position: relative; overflow: hidden;
    }
    .cert-card:hover {
      border-color: rgba(37,99,235,0.3);
      box-shadow: 0 12px 48px rgba(0,0,0,0.4);
      transform: translateY(-4px);
    }
    .cert-card::before {
      content: ''; position: absolute; top: 0; left: 0;
      width: 100%; height: 2px;
      background: linear-gradient(90deg, var(--blue), transparent);
      opacity: 0; transition: opacity 0.3s;
    }
    .cert-card:hover::before { opacity: 1; }
    .cert-head {
      display: flex; flex-wrap: wrap; align-items: flex-start;
      justify-content: space-between; gap: 10px; margin-bottom: 8px;
    }
    .cert-title { font-size: 1rem; font-weight: 700; line-height: 1.4; }
    .cert-badge {
      font-size: 0.62rem; font-weight: 700;
      padding: 5px 10px; border-radius: 100px;
      margin-top: 5px;
      margin-bottom: 10px;
      background: var(--blue-dim); color: var(--blue);
      border: 1px solid rgba(37,99,235,0.25);
      text-transform: uppercase; letter-spacing: 0.08em;
      white-space: nowrap;
    }
    .cert-badge.b-cert { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.3); }
    .cert-badge.b-dip { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.3); }
    .cert-badge.b-form { background: rgba(245,158,11,0.12); color: #fbbf24; border-color: rgba(245,158,11,0.3); }
    .cert-badges { display: flex; flex-wrap: wrap; gap: 6px; }
    .cert-school { font-size: 0.88rem; color: var(--blue); font-weight: 600; margin-bottom: 12px; }
    .cert-period {
      font-size: 0.75rem; color: var(--white);
      font-family: 'JetBrains Mono', monospace;
    }
    .cert-view {
      margin-top: 14px;
      display: inline-flex; align-items: center; gap: 8px;
      font-size: 0.8rem; font-weight: 600; color: #3B81F4;
      text-decoration: none;
      transition: color 0.2s, gap 0.2s, text-decoration-color 0.2s;
    }
    .cert-view svg { width: 15px; height: 15px; flex-shrink: 0; }
    .cert-card[data-type="diplome"]:hover .cert-view {
      color: var(--white); gap: 12px;
      text-decoration: underline;
      text-decoration-color: var(--white);
      text-underline-offset: 4px;
    }

    /* ---------- Lightbox (visualisation diplôme) ---------- */
    #lightbox {
      position: fixed; inset: 0;
      z-index: 1000000;
      background: rgba(5,5,5,0.92);
      backdrop-filter: blur(12px);
      display: none;
      align-items: center; justify-content: center;
      padding: 40px;
    }
    #lightbox.open { display: flex; }
    #lightbox img {
      max-width: min(90vw, 900px);
      max-height: 88vh;
      border-radius: 12px;
      box-shadow: 0 32px 80px rgba(0,0,0,0.7);
    }
    #lightbox-close {
      position: absolute; top: 28px; right: 28px;
      width: 46px; height: 46px;
      border-radius: 50%;
      background: var(--bg-card);
      border: 1px solid var(--border-lt);
      color: var(--white);
      font-size: 1.15rem;
      display: flex; align-items: center; justify-content: center;
      cursor: none; transition: all 0.25s;
    }
    #lightbox-close:hover { color: var(--blue); border-color: var(--blue); }

    /* ---------- Section COMPÉTENCES (régénérée) ---------- */
    #skills { background: var(--bg); position: relative; overflow: hidden; }

    .skills-categories {
      display: grid;
      grid-template-columns: 1fr 1fr;
      position: relative; z-index: 1;
      gap: 48px 60px;
    }
    @media (max-width: 768px) {
      .skills-categories { grid-template-columns: 1fr; }
    }
    .skill-cat-title {
      font-size: 0.7rem; font-weight: 700;
      color: var(--blue); letter-spacing: 0.2em;
      text-transform: uppercase; margin-bottom: 20px;
      display: flex; align-items: center; gap: 14px;
    }
    .skill-cat-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(110px, 130px));
      gap: 14px;
      justify-content: start;
    }
    .skill-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px; padding: 20px 14px;
      display: flex; flex-direction: column;
      align-items: center; gap: 10px;
      cursor: default;
      transition: all 0.3s;
      position: relative;
      overflow: hidden;
    }
    .skill-card:hover {
      border-color: var(--blue);
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(37,99,235,0.15);
      background: var(--bg-hover);
    }
    .skill-card::after {
      content: '';
      position: absolute;
      width: 130px; height: 130px;
      background: radial-gradient(circle, rgba(37,99,235,0.22) 0%, transparent 70%);
      border-radius: 50%;
      left: var(--mx, 50%); top: var(--my, 50%);
      transform: translate(-50%, -50%);
      opacity: 0; transition: opacity 0.3s;
      pointer-events: none; z-index: 0;
    }
    .skill-card:hover::after { opacity: 1; }
    .skill-card > * { position: relative; z-index: 1; }
    .skill-icon {
      width: 44px; height: 44px;
      border-radius: 10px;
      background: var(--blue-dim);
      border: 1px solid rgba(37,99,235,0.18);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem;
      overflow: hidden;
      transition: background 0.3s;
    }
    .skill-card:hover .skill-icon { background: rgba(37,99,235,0.16); }
    .skill-icon img { width: 28px; height: 28px; object-fit: contain; }
    .skill-name {
      font-size: 0.72rem; font-weight: 600;
      color: var(--grey-lt); text-align: center;
      line-height: 1.3;
    }
    .skill-card:hover .skill-name { color: var(--white); }

    .skill-card.stagger-fade { opacity: 0; transform: translateY(20px) scale(0.96); transition: opacity 0.5s ease var(--delay, 0ms), transform 0.5s ease var(--delay, 0ms); }
    .skill-card.stagger-fade.visible { opacity: 1; transform: none; }

    /* ---------- Section CONTACT ---------- */
    #contact { background: var(--bg); position: relative; overflow: hidden; border-top: 1px solid rgba(37,99,235,0.3); }
    #contact::before {
      content: '';
      position: absolute; top: -200px; left: 50%;
      transform: translateX(-50%);
      width: 600px; height: 600px;
      background: radial-gradient(circle, rgba(37,99,235,0.07) 0%, transparent 70%);
      pointer-events: none;
    }

    .contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start; }

    .contact-info-block { display: flex; flex-direction: column; gap: 14px; }
    .c-info-card {
      display: flex; align-items: center; gap: 16px;
      padding: 18px 22px;
      background: var(--bg);
      border: 1px solid var(--border); border-radius: 14px;
      transition: all 0.25s;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    #contact .c-info-card { background: var(--bg-card); }
    .c-info-card:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(37,99,235,0.08); }
    .c-info-ico { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; background: var(--blue-dim); border: 1px solid rgba(37,99,235,0.2); display: flex; align-items: center; justify-content: center; color: var(--blue); }
    .c-info-ico svg { width: 17px; height: 17px; }
    .c-info-label { font-size: 0.72rem; color: var(--grey); margin-bottom: 2px; }
    .c-info-val { font-size: 0.88rem; font-weight: 600; }
    .c-info-val a { color: var(--white); transition: color 0.2s; }
    .c-info-val a:hover { color: var(--blue); }
    .c-info-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; font-size: 0.88rem; font-weight: 600; }

    @keyframes spin { to { transform: rotate(360deg); } }

    /* ---------- Footer ---------- */
    footer {
      background: linear-gradient(180deg, var(--bg-card) 0%, #080808 100%);
      border-top: 1px solid var(--border);
      padding: 32px 100px;
      display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
      gap: 16px;
      position: relative;
    }
    .footer-brand { grid-column: 1; grid-row: 1; }
    .footer-socials { grid-column: 3; grid-row: 1; justify-self: end; }
    .footer-legal { grid-column: 2; grid-row: 1; justify-content: center; text-align: center; }
    footer::before {
      content: '';
      position: absolute; top: 0; left: 50%; transform: translateX(-50%);
      width: 40%; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(37,99,235,0.5), transparent);
    }
    .footer-brand { font-size: 0.95rem; font-weight: 700; }
    .footer-brand span { color: var(--blue); }
    .footer-socials { display: flex; gap: 8px; }
    .footer-legal {
      display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
      font-size: 0.78rem; font-family: 'Inter', sans-serif;
    }
    .footer-legal a { color: var(--grey-lt); transition: color 0.2s; }
    .footer-legal a:hover { color: var(--blue-h); }
    .footer-legal a + a::before { content: '|'; color: var(--blue); margin: 0 12px; }

    @media (max-width: 1024px) {
      .about-grid { grid-template-columns: 1fr; gap: 48px; }
      .contact-grid { grid-template-columns: 1fr; gap: 48px; }
      .about-photo-wrap { max-width: 420px; }
      .hero-visual { display: none; }
    }
    @media (max-width: 768px) {
      nav { padding: 0 24px; }
      .nav-links { display: none; }
      .hamburger { display: flex; }
      footer { padding: 28px 24px; grid-template-columns: 1fr; text-align: center; gap: 14px; }
      .footer-brand, .footer-socials, .footer-legal { grid-column: 1; grid-row: auto; }
      .footer-brand { order: 1; } .footer-legal { order: 2; justify-content: center; text-align: center; gap: 6px 0; font-size: 0.74rem; } .footer-socials { order: 4; justify-self: center; }
      .footer-legal a + a::before { margin: 0 10px; }
      #hero { padding: calc(var(--nav-h) + 28px) 24px 50px; }
      .hero-stats { gap: 8px; }
      .hero-stats .stat-num { font-size: 1.2rem; }
      .hero-stats .stat-label { font-size: 0.54rem; }
      .info-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 480px) {
      .hero-heading { font-size: clamp(2.1rem, 9vw, 2.6rem); }
      .hero-desc { font-size: 0.92rem; }
      .hero-actions { gap: 10px; }
      .hero-actions .btn-primary, .hero-actions .btn-ghost { padding: 13px 22px; font-size: 0.82rem; }
      .sec-title { font-size: clamp(1.7rem, 8vw, 2.2rem); }
      .timeline { padding-left: 26px; }
      .tl-dot { left: -24px; }
      .tl-card { padding: 22px 18px; }
      .cert-card, .project-card { padding: 22px 20px; }
      .stat-item { padding: 14px 12px; }
      .c-info-cols { grid-template-columns: 1fr 1fr; }
      footer { padding: 24px 12px; }
      .footer-legal { font-size: 0.7rem; }
      .footer-legal a + a::before { margin: 0 7px; }
    }
    @media (max-width: 360px) {
      .hero-heading { font-size: 1.9rem; }
      .hero-stats { gap: 6px; }
      .hero-stats .stat-num { font-size: 1rem; }
      .nav-brand { font-size: 1rem; }
    }

    /* ---------- Barre de progression (scroll) + préloader ---------- */
    #progress-bar {
      position: fixed; top: 0; left: 0;
      height: 2px; width: 0%;
      background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
      z-index: 100000;
      box-shadow: 0 0 12px rgba(37,99,235,0.7), 0 0 4px rgba(37,99,235,0.5);
      pointer-events: none;
      transition: width 0.08s linear;
    }

    #preloader {
      position: fixed; inset: 0;
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
      z-index: 999999;
      transition: opacity 0.7s ease, visibility 0.7s ease;
    }
    #preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
    .preloader-inner { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
    .preloader-ring {
      position: absolute; inset: 0;
      border: 2px solid transparent;
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: spin 0.9s linear infinite;
    }
    .preloader-ring::before {
      content: ''; position: absolute; inset: 8px;
      border: 2px solid transparent;
      border-top-color: rgba(37,99,235,0.35);
      border-radius: 50%;
      animation: spin 1.6s linear infinite reverse;
    }
    .preloader-text {
      font-size: 1.15rem; font-weight: 900;
      background: linear-gradient(135deg, #2563eb, #60a5fa);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text; letter-spacing: -0.04em;
    }

    nav.scrolled {
      background: rgba(8,8,8,0.96);
      backdrop-filter: blur(28px);
    }

    .sec-eyebrow::after {
      content: '';
      display: inline-block; width: 5px; height: 5px;
      border-radius: 50%; background: var(--blue);
      margin-left: 6px;
      animation: blink 2.2s ease-in-out infinite;
    }

    /* ---------- Spotlight hero + badge (effets avancés) ---------- */
    .hero-spotlight {
      position: absolute; inset: 0; pointer-events: none; z-index: 0;
      background: radial-gradient(520px circle at var(--hx, -400px) var(--hy, -400px), rgba(37,99,235,0.07) 0%, transparent 60%);
    }

    .hero-badge {
      background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(59,130,246,0.03));
      border-color: rgba(37,99,235,0.28);
      overflow: hidden;
    }
    .hero-badge::after {
      content: ''; position: absolute; top: 0; left: -120%;
      width: 80%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(37,99,235,0.12), transparent);
      animation: badgeShine 3.5s ease-in-out infinite;
    }
    @keyframes badgeShine { 0%,50%{left:-120%} 80%,100%{left:140%} }

    .hero-heading { position: relative; }
    .hero-name-line {
      display: inline-block;
      animation: slideUp 0.8s cubic-bezier(0.16,1,0.3,1) both;
    }
    .hero-name-line:nth-child(2) { animation-delay: 0.12s; }
    @keyframes slideUp { from{opacity:0;transform:translateY(40px)} to{opacity:1;transform:none} }

    #about::after {
      content: '';
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(37,99,235,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,0.025) 1px, transparent 1px);
      background-size: 52px 52px;
      pointer-events: none; z-index: 0;
      mask-image: radial-gradient(ellipse 50% 80% at 5% 50%, black 10%, transparent 70%);
    }

    /* ---------- Détails À PROPOS (coins, grille de points, tags) ---------- */
    .about-bracket {
      position: absolute; width: 26px; height: 26px;
      border-color: var(--blue); border-style: solid;
      opacity: 0.5; z-index: 4;
      transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    }
    .about-photo-wrap:hover .about-bracket { opacity: 1; width: 34px; height: 34px; }
    .about-bracket-tl { top: -7px; left: -7px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
    .about-bracket-tr { top: -7px; right: -7px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
    .about-bracket-bl { bottom: -7px; left: -7px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
    .about-bracket-br { bottom: -7px; right: -7px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

    .about-dot-grid {
      position: absolute; top: 20px; left: -32px;
      display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
      opacity: 0.25; pointer-events: none; z-index: 0;
    }
    .about-dot-grid span {
      width: 4px; height: 4px; border-radius: 50%;
      background: var(--blue); display: block;
    }

    .about-skills-row {
      display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
    }
    .about-skill-tag {
      padding: 5px 14px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.7rem; font-weight: 600;
      color: var(--grey);
      background: rgba(255,255,255,0.025);
      font-family: 'JetBrains Mono', monospace;
      transition: all 0.22s;
      cursor: default;
    }
    .about-skill-tag:hover {
      border-color: rgba(37,99,235,0.4);
      color: var(--blue);
      background: var(--blue-dim);
      transform: translateY(-2px);
    }

    /* ---------- Bouton CV + indicateur de scroll du hero ---------- */
    .btn-cv {
      display: inline-flex; align-items: center; gap: 9px;
      padding: 11px 24px;
      background: transparent;
      border: 1.5px solid rgba(37,99,235,0.35);
      border-radius: 100px;
      color: var(--blue); font-weight: 600; font-size: 0.84rem;
      cursor: pointer; transition: all 0.25s;
      letter-spacing: 0.01em; text-decoration: none;
      font-family: inherit;
    }
    .btn-cv:hover {
      background: var(--blue-dim);
      border-color: var(--blue);
      box-shadow: 0 8px 28px rgba(37,99,235,0.18);
    }
    .btn-cv svg { width: 14px; height: 14px; flex-shrink: 0; }

    .hero-scroll-indicator {
      position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%);
      display: flex; flex-direction: column; align-items: center; gap: 9px;
      z-index: 5; animation: fadeInUp 1.2s ease 1.4s both;
    }
    .hero-scroll-mouse {
      width: 22px; height: 36px;
      border: 1.5px solid rgba(255,255,255,0.2);
      border-radius: 11px; position: relative;
    }
    .hero-scroll-mouse::before {
      content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
      width: 3px; height: 6px;
      background: var(--blue); border-radius: 2px;
      animation: scrollBob 1.9s ease-in-out infinite;
    }
    @keyframes scrollBob { 0%,100%{top:7px;opacity:1} 75%{top:17px;opacity:0} }
    @keyframes fadeInUp { from{opacity:0;transform:translateX(-50%) translateY(10px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
    .hero-scroll-label {
      font-size: 0.58rem; letter-spacing: 0.22em;
      color: rgba(255,255,255,0.25);
      font-family: 'JetBrains Mono', monospace;
      text-transform: uppercase;
    }
    @media (max-width: 768px) { .hero-scroll-indicator { display: none; } }
    /* Écran haut au-dessus de 768 px (tablette, téléphone en mode ordinateur) :
       la pleine hauteur laisserait un grand vide sous le contenu. */
    @media (min-width: 769px) and (orientation: portrait) {
      #hero { min-height: auto; padding-bottom: 96px; }
    }

    /* ---------- Sélecteur de langue FR/EN (fixe bas-gauche) ---------- */
    .lang-toggle {
      position: fixed;
      bottom: 96px; left: 32px;
      display: flex; align-items: center;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 50px;
      padding: 5px;
      gap: 4px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.45);
      z-index: 999;
      transition: box-shadow 0.3s, border-color 0.3s;
    }
    .lang-toggle:hover {
      box-shadow: 0 8px 32px var(--blue-glow);
      border-color: rgba(37,99,235,0.35);
    }
    .lang-globe {
      width: 32px; height: 32px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem;
      color: var(--blue-h);
      flex-shrink: 0;
      margin-left: 4px;
    }
    .lang-divider {
      width: 1px; height: 18px;
      background: var(--border);
      flex-shrink: 0;
    }
    .lang-btn {
      padding: 6px 14px;
      font-size: 0.72rem; font-weight: 700;
      letter-spacing: 0.08em;
      background: transparent;
      color: var(--grey-lt);
      border: none; cursor: pointer;
      border-radius: 40px;
      transition: all 0.25s;
      font-family: inherit;
      display: flex; align-items: center; gap: 6px;
    }
    .lang-btn svg { flex-shrink: 0; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
    .lang-btn.active {
      background: var(--blue);
      color: var(--white);
      box-shadow: 0 4px 14px var(--blue-glow);
    }
    .lang-btn:hover:not(.active) {
      color: var(--white);
      background: var(--blue-dim);
    }
    @media (max-width: 640px) {
      .lang-toggle { bottom: 80px; left: 16px; }
    }

    /* Variante intégrée à la barre de navigation (desktop) et au menu mobile.
       Non fixe, sans ombre flottante ; ne concerne pas les autres pages (.lang-toggle seul). */
    .lang-toggle.lang-toggle--inline {
      position: static;
      box-shadow: none;
      padding: 3px;
      gap: 2px;
      z-index: auto;
      flex-shrink: 0;
    }
    .lang-toggle.lang-toggle--inline:hover { box-shadow: none; }
    .lang-toggle.lang-toggle--inline .lang-globe { width: 24px; height: 24px; margin-left: 4px; }
    .lang-toggle.lang-toggle--inline .lang-globe svg { width: 14px; height: 14px; }
    .lang-toggle.lang-toggle--inline .lang-divider { height: 14px; }
    .lang-toggle.lang-toggle--inline .lang-btn { padding: 4px 9px; font-size: 0.66rem; gap: 5px; }
    .lang-toggle.lang-toggle--inline .lang-btn svg { width: 16px; height: 11px; }
    .nav-lang { display: flex; align-items: center; }
    .mobile-menu .lang-toggle.lang-toggle--inline { align-self: flex-start; margin-top: 6px; }
    /* Tablette / petit desktop : 9 liens + sélecteur ne tiennent plus avec gap 26px */
    @media (min-width: 769px) and (max-width: 1360px) {
      nav { padding: 0 40px; }
      .nav-links { gap: 16px; }
      .nav-links a { white-space: nowrap; }
      .nav-links .nav-icon { display: none; }
      .lang-toggle.lang-toggle--inline .lang-btn { padding: 4px 8px; }
    }
    @media (min-width: 769px) and (max-width: 1000px) {
      nav { padding: 0 24px; }
      .nav-links { gap: 8px; }
      .nav-links a { font-size: 0.8rem; }
      .lang-toggle.lang-toggle--inline .lang-globe { display: none; }
      .lang-toggle.lang-toggle--inline .lang-divider { display: none; }
      .lang-toggle.lang-toggle--inline .lang-btn { padding: 4px 6px; }
    }
    @media (min-width: 769px) and (max-width: 860px) {
      #navbar { padding: 0 16px; }
      .nav-links { gap: 4px; }
      .nav-links a { font-size: 0.74rem; }
    }

    /* ---------- Pages légales (mentions, confidentialité, cookies) ---------- */
    .legal-main { padding: calc(var(--nav-h) + 64px) 24px 96px; }
    .legal-wrap { max-width: 820px; margin: 0 auto; }
    .legal-title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 12px; }
    .legal-meta { font-size: 0.8rem; color: var(--grey); font-family: 'JetBrains Mono', monospace; margin-bottom: 48px; }
    .legal-wrap h2 { font-size: 1.15rem; font-weight: 700; margin: 44px 0 14px; color: var(--white); }
    .legal-wrap h3 { font-size: 0.98rem; font-weight: 600; margin: 24px 0 8px; color: var(--grey-lt); }
    .legal-wrap p, .legal-wrap li { font-size: 0.92rem; line-height: 1.8; color: var(--grey-lt); margin-bottom: 12px; }
    .legal-wrap ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
    .legal-wrap ul li { margin-bottom: 6px; }
    .legal-wrap strong { color: var(--white); font-weight: 600; }
    .legal-wrap a { color: var(--blue-h); text-decoration: underline; text-underline-offset: 3px; }
    .legal-wrap a:hover { color: var(--white); }
    .legal-wrap code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; color: var(--white); }
    .legal-table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.85rem; }
    .legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border-lt); color: var(--grey-lt); line-height: 1.6; }
    .legal-table th { color: var(--white); font-weight: 600; }
    .legal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin: 16px 0; }
    /* Champs à compléter : visibles, à remplacer avant publication */
    mark.todo { background: rgba(245,158,11,0.18); color: #fbbf24; padding: 1px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.82em; }
    /* Tableaux légaux : deux colonnes conservées sur mobile (adaptation légère, pas d'empilement) */
    @media (max-width: 640px) {
      .legal-table { font-size: 0.8rem; table-layout: fixed; }
      .legal-table th, .legal-table td { padding: 8px 8px; overflow-wrap: anywhere; word-break: normal; }
      .legal-table th { width: 38%; }
    }

    /* Footer des pages légales (scopé .legal-page uniquement, ne touche pas index.html).
       Mise en page desktop reproduite : grille 1fr auto 1fr, brand à gauche, liens centrés.
       Les liens légaux forment une seule ligne horizontale centrée. */
    .legal-page footer {
      grid-template-columns: 1fr auto 1fr;
      text-align: left;
    }
    .legal-page footer .footer-brand { grid-column: 1; grid-row: 1; order: 0; justify-self: start; }
    /* Espacement symétrique : le séparateur « | » (pseudo-élément de chaque lien suivant)
       porte seul l'espacement horizontal (12px de chaque côté) ; pas de gap horizontal
       en plus, sinon l'écart gauche/droite du séparateur devient inégal. */
    .legal-page footer .footer-legal {
      grid-column: 2; grid-row: 1; order: 0;
      display: flex; flex-wrap: wrap; justify-content: center; justify-self: center;
      gap: 8px 0;
      text-align: center;
    }
    .legal-page footer .footer-legal a { white-space: nowrap; }
    .legal-page .footer-legal a + a::before { content: '|'; color: var(--blue); margin: 0 12px; }
    /* Petits écrans : le brand (≈170px) et les liens (≈290px) ne tiennent pas sur 375px en une ligne
       sans rendre le brand illisible. Brand au-dessus, liens légaux en une ligne centrée dessous. */
    @media (max-width: 768px) {
      .legal-page footer { grid-template-columns: 1fr; text-align: center; gap: 14px; }
      .legal-page footer .footer-brand { grid-column: 1; grid-row: 1; justify-self: center; }
      .legal-page footer .footer-legal { grid-column: 1; grid-row: 2; gap: 6px 0; font-size: 0.74rem; }
      .legal-page .footer-legal a + a::before { margin: 0 10px; }
    }
    @media (max-width: 480px) {
      .legal-page footer { padding: 24px 12px; }
      .legal-page footer .footer-legal { font-size: 0.7rem; gap: 6px 0; }
      .legal-page .footer-legal a + a::before { margin: 0 7px; }
    }

    /* ---------- Page 404 (site/404.html) ---------- */
    .nf-main {
      min-height: calc(100vh - 90px);
      display: flex; align-items: center; justify-content: center;
      padding: calc(var(--nav-h) + 48px) 24px 72px;
    }
    .nf-wrap { width: 100%; max-width: 620px; text-align: center; }
    .nf-code {
      font-size: clamp(5.5rem, 18vw, 9rem); font-weight: 800; line-height: 1;
      letter-spacing: -0.05em; color: var(--blue);
      text-shadow: 0 0 48px var(--blue-glow);
    }
    .nf-title { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 12px; }
    .nf-desc { font-size: 0.95rem; line-height: 1.7; color: var(--grey-lt); margin-top: 10px; }
    .nf-term {
      margin: 36px 0; text-align: left; overflow: hidden;
      background: var(--bg-card); border: 1px solid var(--border-lt); border-radius: var(--radius);
    }
    .nf-term-bar {
      display: flex; align-items: center; gap: 7px;
      padding: 12px 16px; border-bottom: 1px solid var(--border-lt);
    }
    .nf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-lt); }
    .nf-term-title { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; color: var(--grey); }
    .nf-term-body {
      padding: 18px 20px; font-family: 'JetBrains Mono', monospace;
      font-size: 0.84rem; line-height: 1.9; color: var(--grey-lt); overflow-wrap: anywhere;
    }
    .nf-prompt { color: var(--blue-h); }
    .nf-err { color: var(--white); font-weight: 600; }
    .nf-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
    @media (max-width: 480px) {
      .nf-main { padding: calc(var(--nav-h) + 32px) 16px 56px; }
      .nf-term-body { padding: 14px 16px; font-size: 0.78rem; }
      .nf-actions a { width: 100%; justify-content: center; }
    }

    /* ---------- Focus clavier visible ---------- */
    a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
      outline: 2px solid var(--blue-h); outline-offset: 3px;
    }
