/* =========================
   THEME VARIABLES
========================= */
:root{
  --bg: #0b0c10;

  --panel: rgba(255,255,255,.06);
  --card: rgba(255,255,255,.05);

  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.04);

  --text: #e8eaf0;
  --muted: #a6adbb;
  --line: rgba(255,255,255,.10);

  --accent: #7c5cff;
  --accent2: #2ee59d;

  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --ring: 0 0 0 4px rgba(124,92,255,.22);

  /* Bleu hover projets */
  --blue: rgba(0, 140, 255, .35);
  --blue2: rgba(0, 140, 255, .12);
}

[data-theme="light"]{
  --bg: #f6f7fb;

  --panel: rgba(15, 23, 42, .06);
  --card: rgba(15, 23, 42, .05);

  --glass: rgba(15, 23, 42, .06);
  --glass2: rgba(15, 23, 42, .04);

  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, .12);

  --shadow: 0 18px 40px rgba(2, 6, 23, .12);
  --ring: 0 0 0 4px rgba(124,92,255,.18);

  --blue: rgba(0, 140, 255, .22);
  --blue2: rgba(0, 140, 255, .10);
}

/* =========================
   BASE
========================= */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 600px at 25% 0%, rgba(124,92,255,.18), transparent 55%),
    radial-gradient(900px 500px at 85% 30%, rgba(46,229,157,.14), transparent 60%),
    var(--bg);
  color:var(--text);
}
a{ color:inherit; text-decoration:none; }

.section{
  max-width:1120px;
  margin:0 auto;
  padding: 90px 18px;
  scroll-margin-top: 90px;
}
.section:first-of-type{ padding-top:70px; }

h1{ font-size:56px; line-height:1.03; margin:10px 0 14px; }
h2{ font-size:32px; margin:0 0 10px; }
.subtitle{ color:var(--muted); margin:0 0 22px; }
.kicker{ color:var(--muted); margin:0; }

.card{
  background: linear-gradient(180deg, var(--panel), var(--card));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}

/* =========================
   TOPBAR
========================= */
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(10px);
}
.brand{ font-weight:900; letter-spacing:.6px; }

.nav{
  display:flex; gap:8px;
  color:var(--muted);
  align-items:center;
}
.nav a{
  padding:10px 12px;
  border-radius:12px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover{
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  color:var(--text);
}

.topbar-actions{ display:flex; gap:8px; align-items:center; }

.icon-btn{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
}
.icon-btn:hover{
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--panel) 100%, transparent);
}
.icon-btn:focus{ outline:none; box-shadow: var(--ring); }
.icon-btn.active{
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 0 0 4px rgba(124,92,255,.18);
}

.burger{
  display:none;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}

/* =========================
   HERO (si tu l'utilises)
========================= */
.hero{ padding-top:40px; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  align-items:stretch;
}
.lead{ color:var(--muted); font-size:18px; max-width:60ch; }
.actions{ display:flex; gap:12px; margin-top:18px; flex-wrap:wrap; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ transform: translateY(-1px); background: color-mix(in srgb, var(--panel) 100%, transparent); }
.btn.primary{
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: linear-gradient(180deg, rgba(124,92,255,.30), rgba(124,92,255,.14));
}

/* =========================
   ABOUT STACK (ton style screen)
========================= */
.about-logo{
  width:140px;
  height:140px;
  border-radius:20px;
  object-fit:cover;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  display:block;
  margin-bottom:18px;
}
.stack{ display:flex; flex-direction:column; gap:14px; }

.big-row{
  padding:18px;
  display:flex;
  align-items:center;
  gap:14px;
  min-height:86px;
}
.row-icon{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  font-size:18px;
}
.row-text{ display:flex; flex-direction:column; gap:6px; }
.row-label{ color:var(--muted); font-size:14px; }
.row-value{ font-weight:800; font-size:18px; }

.about-text p{ margin:0; line-height:1.65; }
.sep{
  border:0;
  border-top:1px solid var(--line);
  margin:16px 0;
}
.about-text blockquote{ margin:0; color:var(--muted); font-style:italic; }

/* =========================
   GRIDS
========================= */
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; }
.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }

/* =========================
   SKILLS
========================= */
.skill{ display:grid; grid-template-columns: 1fr auto; gap:8px; margin:12px 0; }
.skill-name{ display:flex; align-items:center; gap:10px; font-weight:600; }
.skill-name i{ font-size:20px; }
.pct{ color:var(--muted); }
.bar{
  grid-column: 1 / -1;
  height:10px;
  border-radius:999px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border:1px solid var(--line);
  overflow:hidden;
}
.bar > div{
  height:100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius:999px;
}

/* =========================
   REVIEWS
========================= */
.reviews-list{ display:grid; gap:12px; }
.review{ display:flex; flex-direction:column; gap:10px; }
.review-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.review-name{ font-weight:800; }
.review-date{ color:var(--muted); font-size:12px; }
.stars{ display:flex; gap:4px; font-size:16px; user-select:none; }
.star{ opacity:.35; }
.star.on{ opacity:1; }
.review-msg{ color:var(--muted); line-height:1.6; margin:0; }

.review-form h3{ margin:0 0 12px; }
.form-row{ display:grid; gap:10px; }
input, textarea{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  color:var(--text);
  outline:none;
}
textarea{ min-height:120px; resize:vertical; }
input:focus, textarea:focus{ box-shadow: var(--ring); }

.star-picker{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.star-btn{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  transition: transform .1s ease;
}
.star-btn:hover{ transform: translateY(-1px); }
.star-btn.active{
  box-shadow: var(--ring);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

/* =========================
   PROJECTS (avec badge bleu + hover glow)
========================= */
.projects-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  margin-bottom:22px;
}

/* ✅ Badge "X projets en ligne" -> bleu */
.projects-pill{
  position:relative;
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, rgba(0,140,255,.45) 60%, var(--line));
  background: linear-gradient(180deg, rgba(0,140,255,.14), rgba(124,92,255,.08));
  color: var(--text);
  font-weight:800;
  overflow:hidden;
}
.projects-pill::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(400px 160px at 50% 0%, rgba(0,140,255,.35), transparent 60%);
  opacity:.9;
  pointer-events:none;
}

.projects-underline{
  width:120px;
  height:5px;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity:.9;
}

.projects-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
}

/* ✅ Carte projet unique (pas de doublons) */
.project-card{
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  text-decoration:none;
  border:1px solid var(--line);
  border-radius:22px;
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  transition: transform .25s ease, background .25s ease;
  isolation:isolate;
}

/* halo bleu */
.project-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:24px;
  background: radial-gradient(600px 200px at 50% 0%, var(--blue), transparent 60%);
  opacity:0;
  transition: opacity .3s ease;
  z-index:-1;
}

/* glow border */
.project-card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:22px;
  border:1px solid transparent;
  background: linear-gradient(135deg, rgba(0,140,255,.55), rgba(124,92,255,.55));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding:1px;
  opacity:0;
  transition: opacity .3s ease;
}

.project-card:hover{
  transform: translateY(-6px);
  background: linear-gradient(180deg, var(--blue2), rgba(124,92,255,0.05));
}
.project-card:hover::before{ opacity:1; }
.project-card:hover::after{ opacity:1; }

.project-thumb{
  height:210px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border-bottom:1px solid var(--line);
}
.project-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.project-body{ padding:16px; }
.project-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.project-top h3{ margin:0; font-size:20px; }

.project-ext{
  width:34px;
  height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  color: var(--muted);
  font-weight:900;
}

.project-desc{
  margin:10px 0 14px;
  color: var(--muted);
  line-height:1.55;
}

.project-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.project-tags span{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}

.projects-hint{
  margin-top:16px;
  color: var(--muted);
  text-align:center;
}

/* =========================
   FOOTER
========================= */
.footer{
  border-top:1px solid var(--line);
  padding:26px 18px;
  color:var(--muted);
  text-align:center;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 980px){
  h1{ font-size:44px; }
  .hero-grid{ grid-template-columns:1fr; }
  .grid-3{ grid-template-columns:1fr; }
  .grid-2{ grid-template-columns:1fr; }

  .projects-grid{ grid-template-columns:1fr; }
  .project-thumb{ height:180px; }

  .nav{ display:none; }
  .burger{ display:inline-flex; }

  .topbar.open .nav{
    display:flex; flex-direction:column;
    position:absolute; left:12px; right:12px; top:62px;
    gap:6px;
    padding:12px;
    border-radius:18px;
    border:1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
  }
}

@media (max-width: 700px){
  .about-logo{ width:120px; height:120px; }
  .row-value{ font-size:17px; }
}
