/* Modèle C "Sidebar" : profil fixe à gauche, contenu à droite, étiquettes en police à chasse fixe.
   Les couleurs et polices réelles sont injectées par build.py (palette de site.yml). */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #0f172a;
  --muted: #4b5567;
  --line: #dfe2e8;
  --accent: #1e293b;
  --accent-rgb: 30, 41, 59;
  --on-accent: #ffffff;
  --accent2: #0e7490;
  --accent2-rgb: 14, 116, 144;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.05), 0 8px 24px rgba(20, 20, 30, 0.07);
  --shadow-lift: 0 2px 4px rgba(20, 20, 30, 0.05), 0 16px 36px rgba(20, 20, 30, 0.11);
  --font-heading: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --font-mono: ui-monospace, Consolas, monospace;
  --sidebar-w: 330px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--font-body); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent2); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 0.9em; }
ul, ol { padding-left: 1.2em; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Mise en page à deux colonnes */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { border-right: 1px solid var(--line); background: var(--surface); }
.sidebar-inner { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 40px 32px 28px; display: flex; flex-direction: column; }
.side-photo { width: 112px; height: 112px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 20px; }
.side-name { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.02em; }
.side-name a { color: var(--text); text-decoration: none; }
.side-role { color: var(--muted); margin: 0 0 10px; font-size: 0.98rem; }
.side-location { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; margin: 0; }
.side-nav { margin: 32px 0 24px; }
.side-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); transition: color 0.15s ease; }
.side-nav a:hover { color: var(--text); background: var(--surface-2); }
.side-nav a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.side-nav a[aria-current="true"] .nav-num { color: var(--accent2); }
.side-actions { margin-top: auto; display: grid; gap: 14px; }
.side-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-link { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.icon-link:hover { border-color: var(--accent2); color: var(--accent2); }
.theme-toggle-side { margin-left: auto; }

.content { min-width: 0; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; max-width: 1120px; padding: 0 64px; margin-inline: auto; }

.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline-flex; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-dark { display: inline-flex; }
  :root:not([data-theme="light"]) .when-light { display: none; }
}

/* Boutons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent; transition: background-color 0.15s ease, border-color 0.15s ease; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--accent2)); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }

/* Introduction */
.intro { padding: 96px 0 64px; border-bottom: 1px solid var(--line); }
.kicker { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent2); margin-bottom: 14px; }
.kicker::before { content: "> "; }
.intro-title { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.intro-pitch { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.55; max-width: 38em; margin-top: 22px; color: var(--muted); }
.intro-pitch strong { color: var(--text); }
.intro-pitch p:last-child { margin: 0; }

/* Sections */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-head { margin-bottom: 28px; }
.section-label { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent2); margin: 0 0 6px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 700; }
.prose { max-width: 68ch; }
.prose > :last-child { margin-bottom: 0; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--accent2); }
.prose h2 { font-size: 1.4rem; margin: 1.5em 0 0.6em; }
.prose h3 { font-size: 1.15rem; margin: 1.3em 0 0.5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; }
.prose code { font-family: var(--font-mono); background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; font-size: 0.88em; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: 10px; overflow-x: auto; }
.prose img { border-radius: 10px; margin: 1em 0; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--accent2); color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.tags li { font-family: var(--font-mono); font-size: 0.78rem; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }

/* Lignes (expériences, formation) */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-top: 1px dashed var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row-side { display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; color: var(--muted); padding-top: 3px; }
.type-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent2); text-transform: lowercase; }
.type-label::before { content: "#"; }
.exp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.exp-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--surface-2); flex: none; }
.exp-initials { display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: var(--accent2); }
.row-main h3 { font-size: 1.15rem; }
.exp-org { margin: 3px 0 0; font-weight: 500; }

/* Projets : liste horizontale */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; font-family: var(--font-mono); }
.filter { font: inherit; font-size: 0.85rem; min-height: 38px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.filter:hover { color: var(--text); border-color: var(--accent2); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter[aria-pressed="true"]::before { content: "\2713  "; }
.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.project-item { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.project-item.no-thumb { grid-template-columns: 1fr; }
.project-item:hover { border-color: rgba(var(--accent2-rgb), 0.55); box-shadow: var(--shadow); }
.project-item[hidden] { display: none; }
.project-thumb { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-body { display: flex; flex-direction: column; min-width: 0; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.cat { padding: 2px 8px; border-radius: 5px; border: 1px solid currentColor; }
.cat-academic { color: var(--accent2); }
.cat-personal { color: var(--accent); }
.star { color: var(--accent2); }
.project-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.project-body h3 a { color: var(--text); text-decoration: none; }
.project-body h3 a:hover { color: var(--accent2); }
.project-summary { color: var(--muted); font-size: 0.95rem; margin: 0; }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: auto; padding-top: 14px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-right: auto; }
.link-more:hover { text-decoration: underline; }
.link-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.86rem; color: var(--muted); text-decoration: none; min-height: 32px; }
.link-chip:hover { color: var(--accent2); }

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px 36px; }
.skill-group h3 { font-size: 0.85rem; font-weight: 500; color: var(--accent2); text-transform: lowercase; margin-bottom: 10px; }
.skill-group h3::before { content: "// "; color: var(--muted); }
.skill-meter { list-style: none; padding: 0; margin: 0; }
.skill-meter li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.meter { font-size: 0.8rem; letter-spacing: 2px; color: var(--accent2); }
.meter .off { color: var(--line); }
.skill-group .tags { margin-top: 0; }

/* Contact */
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.contact-title { font-family: var(--font-heading); font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; margin: 0 0 8px; letter-spacing: -0.02em; }

/* Page projet */
.project-page { padding: 48px 0 64px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-bottom: 26px; }
.project-page h1 { font-size: clamp(2rem, 4.6vw, 2.8rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.lead { font-size: 1.12rem; color: var(--muted); }
.project-hero { margin: 30px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 24px 56px; border-top: 1px solid var(--line); font-size: 0.88rem; max-width: 1120px; width: 100%; margin-inline: auto; padding-inline: 64px; }
.footer p { margin: 0; }

/* Barre mobile (cachée sur grand écran) */
.mobile-bar { display: none; }

@media (max-width: 980px) {
  :root { --sidebar-w: 280px; }
  main { padding: 0 36px; }
  .footer { padding: 24px 36px; }
  .project-item { grid-template-columns: 1fr; }
  .project-thumb { aspect-ratio: 16 / 9; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 110px; }
  .layout { grid-template-columns: 1fr; }
  .mobile-bar { display: block; position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mobile-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 4px; }
  .mobile-brand { font-family: var(--font-heading); font-weight: 700; color: var(--text); text-decoration: none; }
  .mobile-bar .theme-toggle { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
  .mobile-nav { overflow-x: auto; scrollbar-width: none; padding: 0 16px 8px; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
  .mobile-nav a { display: block; white-space: nowrap; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
  .mobile-nav a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-inner { position: static; height: auto; padding: 20px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; align-items: center; }
  .side-nav, .theme-toggle-side, .side-name, .side-role { display: none; }
  .side-photo { width: 76px; height: 76px; margin: 0; grid-row: 1 / span 2; }
  .side-location { grid-column: 2; grid-row: 1; align-self: end; }
  .side-actions { display: contents; }
  .side-icons { grid-column: 2; grid-row: 2; align-self: start; }
  .side-actions .btn { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  main { padding: 0 16px; }
  .footer { padding: 22px 16px; }
  .intro { padding: 48px 0 44px; }
  .section { padding: 48px 0; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row-side { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .project-item { padding: 14px; }
  .contact-box { padding: 22px 18px; }
  .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .mobile-bar, .filters, .skip-link { display: none; }
  .layout { display: block; }
}

/* availability badge */
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: #166534; background: rgba(22, 163, 74, 0.1); border: 1px solid rgba(22, 163, 74, 0.25); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
:root[data-theme="dark"] .status { color: #86efac; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status { color: #86efac; } }
.intro .status { margin: 18px 0 0; }
.intro .status + .intro-pitch { margin-top: 18px; }

/* === shine layer === */
/* Soft coloured halos behind the page, like a light source above the content */
body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(var(--accent2-rgb), 0.16), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(var(--accent2-rgb), 0.12), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
.sidebar { background: linear-gradient(180deg, rgba(var(--accent2-rgb), 0.07), transparent 45%), var(--surface); }
/* Hero: a glowing corner */
.intro { position: relative; isolation: isolate; }
.intro::before {
  content: ""; position: absolute; inset: -40px -10% auto auto; width: 520px; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--accent2-rgb), 0.22), rgba(var(--accent2-rgb), 0.10) 55%, transparent);
  filter: blur(8px);
}
/* Photo: luminous ring */
.side-photo img, .side-photo { box-shadow: 0 0 0 1px rgba(var(--accent2-rgb), 0.25), 0 18px 50px -12px rgba(var(--accent2-rgb), 0.45) !important; }
/* Cards: lift, accent border and a light sheen that sweeps across on hover */
.project-item, .contact-box { position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.project-item:hover, .contact-box:hover, .project-item:focus-within, .contact-box:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-lift), 0 12px 40px -18px rgba(var(--accent2-rgb), 0.55); border-color: rgba(var(--accent2-rgb), 0.45); }
.project-item::after, .contact-box::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.28) 45%, rgba(255,255,255,0.08) 60%, transparent);
  transform: skewX(-18deg); opacity: 0;
}
.project-item:hover::after, .contact-box:hover::after { animation: sheen .9s ease forwards; }
@keyframes sheen { from { left: -60%; opacity: 1; } to { left: 130%; opacity: 1; } }
.project-thumb { overflow: hidden; }
.project-thumb img { transition: transform .45s ease; }
.project-item:hover .project-thumb img, .contact-box:hover .project-thumb img { transform: scale(1.05); }
/* Primary button: glow and the same sheen */
.btn-primary { position: relative; overflow: hidden; box-shadow: 0 8px 22px -8px rgba(var(--accent2-rgb), 0.65); transition: transform .2s ease, box-shadow .2s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -8px rgba(var(--accent2-rgb), 0.75); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 50%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-18deg);
}
.btn-primary:hover::after { animation: sheen .8s ease forwards; }
/* Headline name: subtle gradient ink */
h1.shine-text { background: linear-gradient(100deg, var(--text) 15%, rgb(var(--accent2-rgb)) 62%, rgb(var(--accent2-rgb)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; padding-bottom: .06em; width: fit-content; max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .project-item:hover::after, .contact-box:hover::after, .btn-primary:hover::after { animation: none; }
  .project-item:hover, .contact-box:hover, .project-item:focus-within, .contact-box:focus-within, .btn-primary:hover { transform: none; }
  .project-item:hover .project-thumb img, .contact-box:hover .project-thumb img { transform: none; }
}

/* === frame layer (framed shell + gradient panels) === */
/* Page: a deeper tone around a framed shell, like a desk under a sheet of paper */
:root { --page: color-mix(in srgb, var(--bg) 90%, var(--text) 10%); --panel-a: var(--surface); --panel-b: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
:root[data-theme="dark"] { --page: color-mix(in srgb, var(--bg) 55%, #000); --panel-b: color-mix(in srgb, var(--surface) 45%, var(--bg)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page: color-mix(in srgb, var(--bg) 55%, #000); --panel-b: color-mix(in srgb, var(--surface) 45%, var(--bg)); } }
body {
  background:
    radial-gradient(1000px 600px at 8% -10%, rgba(var(--accent2-rgb), 0.14), transparent 60%),
    radial-gradient(800px 520px at 100% 0%, rgba(var(--accent2-rgb), 0.10), transparent 62%),
    var(--page);
  background-attachment: fixed;
}
.layout {
  width: min(100% - 32px, 1400px); margin: 16px auto; border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, rgb(var(--accent2-rgb)) 20%);
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--accent2-rgb), 0.10), transparent 30%),
    linear-gradient(130deg, color-mix(in srgb, var(--surface) 90%, rgb(var(--accent2-rgb)) 10%), var(--bg) 55%);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* Panels: vertical gradient with a coloured glow in the top-left corner */
.project-item, .contact-box {
  background:
    radial-gradient(circle at top left, rgba(var(--accent2-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, var(--panel-a), var(--panel-b));
  border-color: color-mix(in srgb, var(--line) 85%, rgb(var(--accent2-rgb)) 15%);
}
.layout { min-height: calc(100vh - 32px); overflow: clip; }
.sidebar { border-radius: 28px 0 0 28px; background: radial-gradient(circle at top left, rgba(var(--accent2-rgb), 0.16), transparent 40%), linear-gradient(180deg, var(--panel-a), var(--panel-b)); }
.sidebar-inner { top: 16px; height: calc(100vh - 32px); }
@media (max-width: 760px) { .layout { min-height: 0; overflow: visible; } .sidebar { border-radius: 0; } }
@media (max-width: 760px) {
  .layout { width: 100%; margin: 0; border-radius: 0; border: 0; box-shadow: none; }
}

/* === polish layer (panels for skills, education, contact) === */
.section-head h2 { position: relative; padding-bottom: 12px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, rgb(var(--accent2-rgb)), rgba(var(--accent2-rgb), 0.6), transparent); }
.skill-group {
  background: radial-gradient(circle at top left, rgba(var(--accent2-rgb), 0.12), transparent 45%), linear-gradient(180deg, var(--panel-a), var(--panel-b));
  border: 1px solid color-mix(in srgb, var(--line) 85%, rgb(var(--accent2-rgb)) 15%); border-radius: 18px;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; padding: 18px 20px; }
.skill-group:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift), 0 12px 36px -18px rgba(var(--accent2-rgb), .5); border-color: rgba(var(--accent2-rgb), .45); }
.skills { gap: 18px; }
.contact-box { background: radial-gradient(600px 300px at 50% 0%, rgba(var(--accent2-rgb), 0.2), transparent 70%), linear-gradient(180deg, var(--panel-a), var(--panel-b)); box-shadow: var(--shadow-lift); }
@media (prefers-reduced-motion: reduce) { .skill-group:hover { transform: none; } }

/* keep decorative glows from widening the page on phones */
html, body { overflow-x: clip; }


/* Menu hamburger sur téléphone */
.menu-toggle { display: none; }
.menu-toggle .when-open { display: none; }
.menu-toggle[aria-expanded="true"] .when-open { display: inline-flex; }
.menu-toggle[aria-expanded="true"] .when-closed { display: none; }
@media (max-width: 760px) {
  .menu-toggle { display: grid; place-items: center; flex: none; width: 42px; height: 42px; margin-left: auto; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
  .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
  .mobile-nav { display: none; order: 5; flex-basis: 100%; width: 100% !important; margin: 0 !important; padding: 4px 0 12px !important; overflow: visible !important; }
  .mobile-nav.is-open { display: block; animation: menu-in .2s ease; }
  .mobile-nav ul { flex-direction: column; gap: 2px; }
  .mobile-nav a { display: block; padding: 12px 14px; border-radius: 10px; font-size: 1rem; white-space: normal; }
  .mobile-nav a::after { display: none; }
  .mobile-bar-row { flex-wrap: wrap; }
  .mobile-bar-row .theme-toggle { margin-left: 0; }
  .mobile-brand { flex: 1 1 auto; min-width: 0; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mobile-nav.is-open { animation: none; } }
