/* ----------
   Thème & base
----------- */
:root {
  --bg: 250 250 252;
  --text: 17 24 39;
  --muted: 107 114 128;
  --surface: 255 255 255;
  --border: 229 231 235;
  --accent: 37 99 235;         /* Bleu moderne */
  --accent-2: 59 130 246;      /* Bleu secondaire */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: 10 12 16;
    --text: 229 231 235;
    --muted: 148 163 184;
    --surface: 17 24 39;
    --border: 38 50 70;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  background: rgb(var(--bg));
  color: rgb(var(--text));
}

img, svg, video { display: block; max-width: 100%; }

/* ----------
   Layout
----------- */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 5vw, 6rem);
  scroll-margin-top: 5rem; /* pour header sticky */
}

.section--alt {
  background: linear-gradient(180deg, rgba(var(--accent), .04), transparent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(var(--surface), .8);
  border-bottom: 1px solid rgb(var(--border));
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: conic-gradient(from 180deg at 50% 50%, rgb(var(--accent)) 0%, rgb(var(--accent-2)) 25%, rgb(var(--accent)) 50%, rgb(var(--accent-2)) 75%, rgb(var(--accent)) 100%);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.nav ul {
  display: flex;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: inline-block;
  text-decoration: none;
  color: rgb(var(--text));
  padding: .5rem .8rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover, .nav a:focus-visible {
  border-color: rgb(var(--border));
  background: rgba(var(--accent), .06);
  outline: none;
}

/* ----------
   Hero
----------- */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  color: rgb(var(--muted));
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  margin: 0 0 .75rem;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1rem, 1vw + .9rem, 1.15rem);
  color: rgb(var(--muted));
  margin: 0 0 1.2rem;
}

.accent { 
  background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-2)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1rem 0 1.2rem; }

.btn {
  --btn-bg: 255 255 255;
  --btn-text: var(--text);
  display: inline-block;
  padding: .75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--border));
  background: rgb(var(--btn-bg));
  color: rgb(var(--btn-text));
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 0 rgba(0,0,0,.04);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-text: 255 255 255;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .25);
}

.skills { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.chip {
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--border));
  background: rgba(var(--accent), .06);
  font-size: .9rem;
}

.avatar {
  width: clamp(160px, 28vw, 240px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  color: white;
  text-shadow: 0 6px 22px rgba(0,0,0,.35);
  background: conic-gradient(from 220deg at 50% 50%, rgb(var(--accent)) 0%, rgb(var(--accent-2)) 40%, rgb(var(--accent)) 100%);
  box-shadow: var(--shadow);
}

/* ----------
   Vidéo
----------- */
.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ----------
   Cartes Projets
----------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

.card {
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgb(var(--border));
  background: rgb(var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: 160px auto;
}
.card-media {
  background:
    linear-gradient(120deg, rgba(var(--accent), .18), rgba(var(--accent-2), .18)),
    repeating-linear-gradient(45deg, rgba(0,0,0,.04) 0 8px, rgba(255,255,255,.04) 8px 16px);
}
.card-body { padding: 1rem; }
.card h3 { margin: 0 0 .25rem; }
.card p { margin: 0 0 .5rem; color: rgb(var(--muted)); }
.link { text-decoration: none; font-weight: 600; color: rgb(var(--accent)); }
.link:hover { text-decoration: underline; }

/* ----------
   Pied de page
----------- */
.site-footer {
  border-top: 1px solid rgb(var(--border));
  padding-block: 2rem;
  background: rgba(var(--surface), .6);
}
.site-footer p { margin: 0; color: rgb(var(--muted)); }

/* ----------
   Accessibilité
----------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .5rem .75rem;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: 8px;
  z-index: 999;
}
