/* ——— Theme (Light) ——— */
:root {
  --primary: #76a5af;
  --accent: #45818e;
  --bg: #f6f8f9;
  --surface: #ffffff;
  --text: #1e2427;
  --muted: #60727a;
  --border: #d8e0e3;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
}


*{box-sizing:border-box}
html,body{height:100%}
/* --- Modern Light Background --- */
body {
  margin: 0;
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  color: var(--text);
  background:
    radial-gradient(800px circle at 70% 0%, rgba(118,165,175,.25), transparent 70%),
    radial-gradient(600px circle at 10% 100%, rgba(69,129,142,.25), transparent 70%),
    linear-gradient(180deg, #f9fbfc 0%, #f2f6f7 35%, #eef3f4 100%);
  background-attachment: fixed;
  background-size: cover;
}

/* Optionnel : effet de texture douce */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHJlY3Qgd2lkdGg9JzEwJyBoZWlnaHQ9JzEwJyBmaWxsPSdub25lJy8+PGNpcmNsZSBjeD0nMC41JyBjeT0nMC41JyByPScuNScgZmlsbD0nI2Q3ZWRmMycgZmlsbC1vcGFjaXR5PScwLjQnLz48L3N2Zz4=");
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Pour que tout le contenu reste au-dessus */
body > * {
  position: relative;
  z-index: 1;
}

/* ——— Layout ——— */
.section{
  width:min(1100px, 92%);
  margin: clamp(32px, 6vw, 80px) auto;
}
.title{font-size: clamp(28px, 4vw, 42px); margin:0 0 .25em}
.subtitle{font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); margin:0 0 1rem}
.lead{font-size: clamp(15px, 2vw, 18px); color: var(--text); max-width: 70ch}

h2{
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 1rem;
  position: relative;
  color: #1d2a2f;
}
h2::after{
  content:"";
  display:block;
  width:60px; height:3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top:.5rem; border-radius:2px;
}

/* ——— Header ——— */
.site-header{
  position: sticky; top:0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--border);
  display:flex; align-items:center; gap:16px;
  padding: 10px min(5vw, 32px);
}
.brand{display:flex; align-items:center; gap:.6rem; color:var(--text); text-decoration:none}
.brand__logo{
  display:grid; place-items:center; width:30px; height:30px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--primary), var(--accent));
  box-shadow: var(--shadow)
}
.brand__text{font-weight: 700}

.main-nav{margin-left:auto}
.main-nav ul{
  list-style:none; display:flex; gap:18px; padding:0; margin:0;
}
.main-nav a{
  color: var(--muted); text-decoration:none; padding:8px 10px; border-radius:10px;
}
.main-nav a:hover{ color: var(--text); background: #eef4f6 }

.nav-toggle{
  display:none; background:transparent; color:var(--text); border:0; font-size:22px
}

.lang-switch{display:flex; gap:8px}
.lang-btn{
  background: #eef6f8; color: var(--text);
  border:1px solid var(--border); padding:6px 10px; border-radius:10px; cursor:pointer
}
.lang-btn[aria-pressed="true"]{
  background: linear-gradient(180deg, var(--primary), var(--accent));
  color: #041014; border-color: transparent; font-weight: 700;
}

/* ——— Hero ——— */
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  text-align: left;
}

/* New: name above the photo */
.hero__header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 10px;
}

.hero__name {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}

/* Keep the rest intact */
.hero__media {
  display: grid;
  place-items: center;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
  background: #f1f5f7;
}


/* ——— Buttons ——— */
.btn{
  display:inline-block; padding:10px 14px; border-radius: 12px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border:0; color:#041014; text-decoration:none; font-weight:700; box-shadow: var(--shadow);
}
.btn:hover{ transform: translateY(-1px) }
.btn--ghost{
  background: #ffffff; color: var(--text);
  border:1px solid var(--border);
}

/* ——— Cards / Timeline ——— */
.card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:16px; box-shadow: var(--shadow); margin: 18px 0;
}
.card__header{
  display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:.5rem
}
.card h3{ margin:0; font-size: 18px; color:#203036 }
.card h4{ margin:.5rem 0 .25rem; font-size: 15px; color: var(--muted) }
.pill{
  background: #eef6f8; color: var(--text);
  border:1px solid var(--border); border-radius: 999px; padding:6px 10px; font-size:12px;
}

.timeline .item{
  padding:12px 14px; border-left:3px solid var(--accent);
  margin: 0 0 12px 6px; background: var(--surface);
  border:1px solid var(--border); border-left-color: var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.timeline .item h3{ margin:.2rem 0; font-size: 17px; color:#203036 }
.timeline .item .meta{ color: var(--muted); font-size: 14px }

/* ——— Activities ——— */
.badges{
  display:flex; flex-wrap:wrap; gap:10px; list-style:none; padding:0; margin:0
}
.badges li{
  background:#ffffff; border:1px solid var(--border); border-radius:999px;
  padding:8px 12px; color: var(--text)
}

/* ——— Skills ——— */
.skills-grid{
  display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px;
}
.skill-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding:14px; box-shadow: var(--shadow);
}
.skill-card h3{ margin:.2rem 0 .4rem; font-size: 16px; color: #203036 }
.tags{ display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:0 }
.tags li{
  font-size: 13px; color: var(--muted);
  background:#f2f7f9; border:1px solid var(--border); border-radius:999px; padding:6px 10px
}

/* ——— Projects ——— */
.grid{ display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:16px }
.project-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  overflow:hidden; display:flex; flex-direction:column; min-height: 260px; box-shadow: var(--shadow);
}
.project-card .thumb{ aspect-ratio: 16/9; background:#eef4f6; border-bottom:1px solid var(--border) }
.project-card img{ width:100%; height:100%; object-fit:cover; display:block }
.project-card .thumb.placeholder{
  display:grid; place-items:center; color:var(--muted); border:2px dashed #b9d0d6; background:#f7fbfc
}
.project-body{ padding:12px 14px }
.project-body h3{ margin:.2rem 0 .25rem; font-size: 16px; color:#203036 }
.project-body p{ margin:0; color: var(--muted); font-size: 14px }

.muted{ color: var(--muted) }

/* ——— Contact ——— */
.contact-wrap{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}

/* ——— Footer ——— */
.site-footer{
  width:min(1100px, 92%); margin: 40px auto; color: var(--muted);
  border-top:1px solid var(--border); padding-top:12px; text-align:center;
}

/* ——— Responsive ——— */
@media (max-width: 980px){
  .skills-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 880px){
  .hero{ grid-template-columns: 1fr; text-align:center }
  .hero__cta{ justify-content:center }
  .grid{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-wrap{ flex-direction:column; align-items:flex-start }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr }
  .main-nav ul{
    display:none; position:absolute; right:12px; top:56px;
    background: var(--surface); border:1px solid var(--border); border-radius:12px;
    padding:10px; width: 200px; box-shadow: var(--shadow);
  }
  .main-nav ul.open{ display:block }
  .nav-toggle{ display:inline-block }
}

/* ——— Physics ball ——— */
#ball-phys{
  position: fixed;
  left: 0; top: 0;              /* <-- important: ancrage en (0,0) */
  width: 28px; height: 28px;
  border-radius: 999px;
  background: radial-gradient(45% 45% at 30% 30%, var(--primary), var(--accent));
  box-shadow: 0 10px 18px rgba(0,0,0,.18), inset 0 2px 6px rgba(255,255,255,.25);
  border: 1px solid var(--border);
  transform: translate(0, 0);   /* <-- pas de centering initial */
  pointer-events: none;
  z-index: 70;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce){
  #ball-phys{ display:none; }
}