@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #05090f;
  --bg-soft: #09111b;
  --surface: rgba(15, 27, 40, .72);
  --surface-strong: #101d2b;
  --line: rgba(255, 255, 255, .09);
  --text: #f4f8fb;
  --muted: #9aabba;
  --cyan: #35dcff;
  --mint: #40ffc7;
  --violet: #8b7cff;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
  --pointer-x: 50%;
  --pointer-y: 20%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, sans-serif; line-height: 1.6; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none; background: radial-gradient(650px circle at var(--pointer-x) var(--pointer-y), rgba(53,220,255,.09), transparent 52%); }
body::after { content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
body.nav-open, body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.container { width: min(1360px, calc(100% - 28px)); margin-inline: auto; }
section { position: relative; padding: 110px max(20px, 5vw); }
h1, h2, h3, h4 { margin-top: 0; font-family: 'Space Grotesk', sans-serif; line-height: 1.08; }
h2 { font-size: clamp(2.3rem, 5vw, 4.4rem); letter-spacing: -.055em; }
h2 span, .big-title span { color: transparent; background: linear-gradient(100deg, var(--cyan), var(--mint), var(--violet), var(--cyan)); background-size: 220% auto; background-clip: text; -webkit-background-clip: text; animation: gradientShift 7s linear infinite; }
.section-kicker { margin: 0 0 12px; color: var(--cyan); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

/* Navigation */
header { position: fixed; inset: 0 0 auto; z-index: 1000; padding: 14px 20px; transition: .3s ease; }
header.scrolled { padding-top: 8px; }
.main-nav { width: min(1380px, 100%); height: 68px; margin: auto; padding: 0 12px 0 24px; display: flex; align-items: center; gap: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(5, 12, 20, .72); backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 14px 45px rgba(0,0,0,.22); }
.nav-brand { display: flex; align-items: center; gap: 18px; margin-right: auto; }
.logo h1 { margin: 0; font-size: 1rem; letter-spacing: -.02em; white-space: nowrap; }
.logo h1::before { display: none; }
.language-picker { position: relative; z-index: 1400; flex: 0 0 auto; }
.language-current { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.045); cursor: pointer; transition: .2s; }
.language-current:hover, .language-current:focus-visible { border-color: rgba(53,220,255,.45); box-shadow: 0 0 0 3px rgba(53,220,255,.1); }
.language-current-flag, .language-menu img { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; }
.language-menu { position: absolute; top: calc(100% + 10px); left: 0; min-width: 168px; display: none; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5,12,20,.98); box-shadow: var(--shadow); }
.language-picker.is-open .language-menu { display: grid; gap: 3px; animation: menuReveal .2s ease; }
.language-menu button { width: 100%; padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 9px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.language-menu button:hover, .language-menu button:focus-visible { background: rgba(53,220,255,.1); }
.google-translate-host { position: fixed; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
body > .skiptranslate, .goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: flex; align-items: center; min-height: 42px; padding: 0 13px; border-radius: 12px; color: var(--muted); font-size: .83rem; font-weight: 600; transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.07); }
.menu-toggle { display: none; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 12px; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }

/* Hero */
#home { min-height: 100svh; padding-top: 150px; display: grid; align-items: center; overflow: hidden; }
#home::before { content: ''; position: absolute; width: 600px; height: 600px; top: -150px; right: -120px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(139,124,255,.17), transparent 65%); filter: blur(5px); animation: orbDrift 10s ease-in-out infinite; }
.home-modern-layout { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(45px, 8vw, 110px); }
.home-modern-layout .text { max-width: 720px; }
.big-title { margin: 0 0 22px; font-size: clamp(3rem, 7vw, 6.6rem); letter-spacing: -.075em; }
.subtitle { display: inline-flex; margin: 0 0 22px; padding: 8px 13px; border: 1px solid rgba(53,220,255,.18); border-radius: 999px; color: #c8f6ff; background: rgba(53,220,255,.07); font: 600 .82rem Inter, sans-serif; }
.description { max-width: 660px; margin: 0 0 30px; color: var(--muted); font-size: 1.03rem; }
.buttons-col { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-primary, .btn-secondary { min-height: 50px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 700; font-size: .9rem; transition: transform .25s, box-shadow .25s, border-color .25s; }
.btn-primary { color: #031116; background: linear-gradient(100deg, var(--cyan), var(--mint)); box-shadow: 0 12px 34px rgba(53,220,255,.2); }
.btn-secondary { border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(53,220,255,.2); border-color: rgba(53,220,255,.35); }
.social-icons { display: flex; gap: 10px; margin-top: 24px; }
.social-icons a, .footer-socials a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.035); transition: .25s; }
.social-icons a:hover, .footer-socials a:hover { color: var(--cyan); border-color: rgba(53,220,255,.4); transform: translateY(-4px); }
.profile-container { position: relative; width: min(390px, 34vw); aspect-ratio: 1; justify-self: center; }
.profile-container::before, .profile-container::after { content: ''; position: absolute; border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%; }
.profile-container::before { inset: -18px; border: 1px solid rgba(53,220,255,.28); animation: spinBlob 16s linear infinite; }
.profile-container::after { inset: -45px; z-index: -1; background: conic-gradient(from 120deg, rgba(53,220,255,.28), rgba(139,124,255,.2), rgba(64,255,199,.18), rgba(53,220,255,.28)); filter: blur(40px); animation: pulseGlow 5s ease-in-out infinite; }
.profile-image { width: 100%; height: 100%; object-fit: cover; border: 1px solid rgba(255,255,255,.12); border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%; filter: saturate(.92); animation: profileFloat 6s ease-in-out infinite; }
.bubbles-container { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bubble { position: absolute; bottom: -80px; border-radius: 50%; animation: bubbleRise linear forwards; }

/* About */
.about-section { background: linear-gradient(180deg, transparent, rgba(9,17,27,.8), transparent); }
.about-title { width: min(1360px, 100%); margin-inline: auto; text-align: center; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 45px; }
.about-left, .about-right { padding: clamp(25px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(18,32,47,.8), rgba(8,17,27,.7)); box-shadow: var(--shadow); }
.about-left h3, .about-right h3 { margin-bottom: 24px; font-size: 1.35rem; }
.about-left p { margin: 0; color: var(--muted); }
.education-entry { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.education-entry:last-child { border-bottom: 0; }
.education-logo { width: 44px; height: 44px; padding: 5px; object-fit: contain; border-radius: 12px; background: #fff; }
.education-entry h4 { margin: 0 0 4px; font-size: 1rem; }
.education-entry p { margin: 1px 0; color: var(--muted); font-size: .78rem; }

/* Skills */
#Competences > h2 { text-align: center; }
.competences-container { width: min(1360px, 100%); margin: 45px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.competence-group { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(12px); }
.competence-group h3 { margin-bottom: 20px; color: #d9e6ee; font-size: 1rem; }
.DevLog, .DevWeb, .Outils { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.competence { min-height: 92px; padding: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 16px; background: rgba(255,255,255,.035); transition: .25s ease; }
.competence:hover { transform: translateY(-5px); border-color: rgba(53,220,255,.25); background: rgba(53,220,255,.07); }
.competence img { width: 34px; height: 34px; object-fit: contain; }
.competence p { margin: 0; color: #c5d2dc; font-size: .76rem; font-weight: 600; }

/* Ventures */
.realisations-section { background: radial-gradient(circle at 90% 10%, rgba(53,220,255,.08), transparent 30%); }
.realisations-heading { max-width: 780px; margin: 0 auto 42px; text-align: center; }
.realisations-heading h2 { margin-bottom: 18px; }
.realisations-heading > p:last-child { color: var(--muted); }
.automation-banner { width: min(1360px, 100%); margin: 0 auto 20px; padding: 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 1px solid rgba(64,255,199,.22); border-radius: var(--radius); background: linear-gradient(110deg, rgba(64,255,199,.1), rgba(53,220,255,.04)); box-shadow: inset 0 1px rgba(255,255,255,.06); }
.automation-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: var(--mint); background: rgba(64,255,199,.1); font-size: 1.2rem; }
.automation-banner strong { font-family: 'Space Grotesk'; }
.automation-banner p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.status-pill { padding: 8px 12px; border-radius: 999px; color: var(--mint); background: rgba(64,255,199,.08); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.status-pill i { margin-right: 5px; font-size: .45rem; animation: statusPulse 1.7s infinite; }
.ventures-grid { width: min(1360px, 100%); margin: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.venture-card { position: relative; min-height: 540px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17,31,45,.9), rgba(7,15,24,.9)); transition: .35s cubic-bezier(.2,.8,.2,1); }
.venture-card::after { content: ''; position: absolute; width: 180px; height: 180px; top: -80px; right: -80px; border-radius: 50%; background: var(--cyan); filter: blur(90px); opacity: 0; transition: .35s; }
.venture-card:hover { transform: translateY(-8px); border-color: rgba(53,220,255,.32); box-shadow: var(--shadow); }
.venture-card:hover::after { opacity: .16; }
.venture-card.featured { border-color: rgba(139,124,255,.35); }
.venture-preview { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); background: #03070b; }
.venture-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .35s ease; }
.venture-preview > span { position: absolute; right: 14px; bottom: 14px; padding: 8px 11px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #fff; background: rgba(3,8,13,.78); backdrop-filter: blur(12px); font-size: .7rem; font-weight: 700; opacity: 0; transform: translateY(7px); transition: .3s; }
.venture-preview:hover img { transform: scale(1.045); filter: brightness(.78); }
.venture-preview:hover > span, .venture-preview.is-development > span { opacity: 1; transform: none; }
.venture-preview.is-development > span { color: #d8d2ff; }
.venture-content { padding: 26px 28px 28px; }
.venture-icon { width: 50px; height: 50px; margin-bottom: 25px; display: grid; place-items: center; border-radius: 15px; color: var(--cyan); background: rgba(53,220,255,.09); }
.venture-type { color: var(--cyan); font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.venture-card h3 { margin: 8px 0 10px; font-size: 1.8rem; }
.venture-card p { margin: 0 0 23px; color: var(--muted); }
.venture-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.venture-tags span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; color: #bfccd5; background: rgba(255,255,255,.035); font-size: .67rem; }
.venture-link { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-size: .78rem; font-weight: 700; transition: gap .2s, color .2s; }
.venture-link + .venture-link { margin-left: 18px; }
.venture-link.case-study { color: var(--text); }
.venture-link:hover { gap: 12px; color: var(--mint); }
.venture-link.disabled { color: #788894; cursor: default; }
.in-progress { color: var(--mint); }

/* Technical projects */
#MesProjets { padding-top: 100px; background: linear-gradient(180deg, rgba(9,17,27,.7), transparent); }
#MesProjets > .section-kicker, .title-MesProjets, .sous-titre-projet, .projets-container { width: min(1360px, 100%); margin-left: auto; margin-right: auto; }
.title-MesProjets { margin-bottom: 50px; }
.sous-titre-projet { margin-top: 50px; margin-bottom: 18px; color: #dbe6ed; font-size: 1rem; }
.sous-titre-projet::before { content: ''; display: inline-block; width: 24px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--cyan); }
.projets-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.projet { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-strong); cursor: pointer; transition: .3s ease; }
.projet:hover { transform: translateY(-7px); border-color: rgba(53,220,255,.3); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.projet img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .55s ease; }
.projet:hover img { transform: scale(1.055); }
.projet-info { padding: 18px; }
.projet-info h3 { margin: 0 0 6px; font-size: 1rem; }
.projet-info p { margin: 0; color: var(--muted); font-size: .76rem; }

/* Project modal */
.overlay { position: fixed; inset: 0; z-index: 1990; visibility: hidden; opacity: 0; background: rgba(1,5,10,.76); backdrop-filter: blur(16px); transition: .3s; }
.overlay.show { visibility: visible; opacity: 1; }
.mini-page { position: fixed; inset: 50% auto auto 50%; z-index: 2000; width: min(1000px, calc(100% - 30px)); max-height: min(720px, calc(100svh - 30px)); display: none; grid-template-columns: 1.12fr .88fr; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 26px; background: #0b1621; box-shadow: 0 35px 100px rgba(0,0,0,.65); opacity: 0; transform: translate(-50%,-47%) scale(.94); transition: .3s; }
.mini-page.show { display: grid !important; opacity: 1; transform: translate(-50%,-50%) scale(1); }
.mini-page.closing { opacity: 0; transform: translate(-50%,-48%) scale(.96); }
.carre1 { position: relative; min-height: 430px; display: grid; place-items: center; background: #03070b; }
#popup-image { width: 100%; height: 100%; max-height: 680px; object-fit: contain; }
.arrow, .modal-close { position: absolute; z-index: 5; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: #fff; background: rgba(5,12,20,.76); backdrop-filter: blur(12px); cursor: pointer; }
.arrow { top: 50%; transform: translateY(-50%); }
.arrow.prev { left: 12px; } .arrow.next { right: 12px; }
.modal-close { top: 14px; right: 14px; font-size: 1.35rem; }
.carre2 { padding: 38px 30px; overflow-y: auto; }
.carre2-title { margin-bottom: 18px; font-size: 1.45rem; }
.carre2-info ul { margin: 0 0 28px; padding: 0; list-style: none; }
.carre2-info li { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.carre2-info strong { color: #dce7ee; }
.carre2-description { color: var(--muted); font-size: .86rem; }

/* Footer */
footer { padding: 34px 20px 16px; border-top: 1px solid var(--line); background: #03070b; }
.footer-container { width: min(1360px, 100%); margin: auto; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; }
.footer-logo h2 { margin: 0; font-size: 1rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--muted); font-size: .78rem; }
.footer-nav a:hover { color: var(--cyan); }
.footer-socials { display: flex; gap: 8px; }
.footer-bottom { width: min(1360px, 100%); margin: 18px auto 0; padding-top: 13px; border-top: 1px solid var(--line); color: #62717d; text-align: center; font-size: .68rem; }

@keyframes gradientShift { to { background-position: 220% center; } }
@keyframes profileFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spinBlob { to { transform: rotate(360deg); } }
@keyframes pulseGlow { 50% { transform: scale(1.08); opacity: .65; } }
@keyframes orbDrift { 50% { transform: translate(-60px, 80px) scale(1.12); } }
@keyframes statusPulse { 50% { opacity: .25; } }
@keyframes bubbleRise { to { transform: translateY(-115vh) translateX(var(--drift-x)); opacity: 0; } }
@keyframes menuReveal { from { opacity: 0; transform: translateY(-7px); } }

@media (max-width: 980px) {
  .menu-toggle { display: grid; order: -1; }
  .main-nav { padding-inline: 10px 14px; }
  .nav-brand { width: auto; min-width: 0; flex: 1; justify-content: space-between; }
  .language-menu { left: auto; right: 0; width: min(168px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
  .nav-links { position: fixed; inset: 92px 20px auto; max-height: calc(100svh - 110px); padding: 14px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 20px; background: rgba(5,12,20,.96); backdrop-filter: blur(24px); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-14px); transition: .25s; }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { min-height: 48px; padding-inline: 16px; justify-content: center; }
  .home-modern-layout { grid-template-columns: 1fr .7fr; gap: 35px; }
  .competences-container { grid-template-columns: 1fr 1fr; }
  .competence-group:last-child { grid-column: 1/-1; }
  .projets-container { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: 1fr auto; }
  .footer-nav { grid-column: 1/-1; grid-row: 2; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 82px; }
  section { padding: 82px 18px; }
  header { padding: 8px; }
  .main-nav { height: 62px; gap: 10px; border-radius: 18px; }
  .nav-brand { width: auto; min-width: 0; flex: 1; gap: 8px; }
  .logo h1 { font-size: .82rem; }
  .language-picker { margin-left: auto; flex-shrink: 0; }
  .language-menu { left: auto; right: 0; width: min(168px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
  .nav-links { inset: 78px 8px auto; }
  #home { min-height: auto; padding-top: 125px; padding-bottom: 85px; }
  .home-modern-layout { display: flex; flex-direction: column-reverse; text-align: center; }
  .profile-container { width: min(225px, 58vw); }
  .big-title { max-width: 100%; font-size: clamp(2.25rem, 10vw, 3rem); overflow-wrap: anywhere; }
  .big-title span { display: block; }
  .subtitle { font-size: .72rem; }
  .description { font-size: .91rem; }
  .buttons-col, .social-icons { justify-content: center; }
  .buttons-col a { width: 100%; }
  .about-grid, .competences-container, .ventures-grid, .projets-container { grid-template-columns: 1fr; }
  .competence-group:last-child { grid-column: auto; }
  .about-left, .about-right { padding: 24px; }
  .automation-banner { grid-template-columns: auto 1fr; padding: 17px; }
  .status-pill { grid-column: 1/-1; justify-self: start; }
  .venture-card { min-height: auto; padding: 0; }
  .venture-content { padding: 22px; }
  .venture-preview > span { opacity: 1; transform: none; }
  .venture-link + .venture-link { margin-left: 0; margin-top: 12px; display: flex; }
  .mini-page, .mini-page.show { grid-template-columns: 1fr; overflow-y: auto; }
  .carre1 { min-height: 260px; }
  .carre2 { overflow: visible; padding: 25px 20px; }
  .footer-container { grid-template-columns: 1fr; text-align: center; }
  .footer-socials, .footer-nav ul { justify-content: center; }
  .footer-nav { grid-column: auto; grid-row: auto; }
}

@media (max-width: 390px) {
  .logo h1 { font-size: .72rem; }
  .flag { width: 22px; }
  h2 { font-size: 2.15rem; }
  .automation-icon { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bubbles-container { display: none; }
}
