:root {
  --space: #05070f;
  --space-2: #0d1226;
  --ink: #e9ecf5;
  --muted: #9aa3b8;
  --accent: #f6a623;
  --line: rgba(255,255,255,.16);
  --font: 'Poppins', sans-serif;
  --shift-content: 105px;
  --content-left: max(0px, calc((100% - 1100px) / 2 - var(--shift-content)));
  --navbar-h: 111px; /* hauteur de la navbar : valeur de secours, mise à jour automatiquement par le JS */
}
@media (max-width: 900px) {
  :root { --navbar-h: 68px; }
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: radial-gradient(ellipse at 50% 0%, var(--space-2) 0%, var(--space) 60%) fixed;
  color: var(--ink);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%; /* empêche les navigateurs mobiles de regonfler les tailles de texte */
}
body { min-height: 100vh; background: transparent; line-height: 1.6; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ===== Zones de sélection =====
   Par défaut rien n'est sélectionnable : un double-clic dans le vide
   (à côté du texte) ne sélectionne plus rien.
   Seules les "cases" de texte ci-dessous restent sélectionnables,
   et elles épousent leur contenu (fit-content) pour ne pas déborder dans le vide. */
   
body {
  -webkit-user-select: none;
  user-select: none;
}
.hero-text,
.block h2,
.intro,
.card,
.gh-head,
.repo,
.repos-status,
.gh-btn,
.empty,
.site-footer span {
  -webkit-user-select: text;
  user-select: text;
}
.block h2 { width: fit-content; }

main a { color: var(--accent); text-decoration: none; }
main a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }

.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 4rem;
  max-width: 1100px; margin: 0 auto 0 var(--content-left); padding: 7rem 2rem 6rem;
}
/* Le hero occupe tout l'écran sous la navbar : la section "Who am I ?" n'est plus visible dès l'arrivée sur la page.
   (--navbar-h = hauteur de la navbar ; 100svh = hauteur réellement visible sur téléphone) */
.hero {
  min-height: calc(100vh - var(--navbar-h));
  min-height: calc(100svh - var(--navbar-h));
}
.hero-text { max-width: 750px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.lead { margin-top: 1.5rem; font-size: 1.1rem; color: var(--muted); max-width: 50ch; }
main .btn {
  display: inline-block; margin-top: 2rem; padding: .8rem 1.6rem;
  border: 2px solid var(--accent); border-radius: 999px;
  color: var(--accent); font-weight: 600; transition: background .25s, color .25s;
}
main .btn:hover { background: var(--accent); color: #111; text-decoration: none; }

.hero-img { margin: 0; text-align: center; flex-shrink: 0; }
.hero-img img {
  width: min(340px, 70vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 6px solid rgba(246,166,35,.25);
}
.hero-img figcaption { margin-top: .6rem; font-size: .85rem; color: var(--muted); }

.block { max-width: 1100px; margin: 0 auto 0 var(--content-left); padding: 4rem 2rem; scroll-margin-top: 90px; }
/* "Who am I ?" occupe au moins un écran : "Little things" commence donc plus bas, sous le bas de l'écran,
   et ne se voit pas tant qu'on est sur la partie "Who am I ?" (avec un clic dans la navbar ou en scrollant). */
#about { min-height: 100vh; min-height: 75svh; }
#projets { scroll-margin-top: 0px; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 1.2rem; }
.intro { max-width: 60ch; color: var(--muted); text-align: justify; }
.cards { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 2.5rem; }
.card { border-left: 3px solid var(--accent); padding-left: 1.2rem; }
.card h3 { font-size: 1.25rem; font-weight: 600; }
.card p { color: var(--muted); }
/* Les titres des cartes sont des liens : on les garde en blanc (la barre à gauche reste orange) */
.card h3 a { color: inherit; }

/* ===== Section GitHub ("Little things") ===== */
.gh-head { display: flex; align-items: center; gap: 1.1rem; width: fit-content; max-width: 100%; }
.gh-icon { width: 46px; height: 46px; flex-shrink: 0; filter: invert(1); } /* icône GitHub en blanc */
.gh-head h3 { font-size: 1.25rem; font-weight: 600; }
.gh-head p { color: var(--muted); }

.repos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.2rem; max-width: 1000px; margin-top: 1.8rem;
}
.repos-status { color: var(--muted); width: fit-content; grid-column: 1 / -1; }

main a.repo {
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1.2rem 1.35rem; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.03); color: var(--ink);
  transition: border-color .25s, background .25s, transform .25s;
}
.repo-name { font-size: 1.1rem; font-weight: 600; }
.repo-desc { flex: 1; color: var(--muted); font-size: .95rem; }
.repo-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: .3rem; color: var(--muted); font-size: .85rem; }
.repo-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.lang-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--accent); }
@media (hover: hover) {
  main a.repo:hover { border-color: var(--accent); background: rgba(255,255,255,.055); transform: translateY(-3px); text-decoration: none; }
}

main .gh-btn { display: inline-flex; align-items: center; gap: .6rem; }
.gh-btn img { /* icône en orange (même couleur que le texte du bouton), noire au survol */
  width: 20px; height: 20px;
  filter: brightness(0) saturate(100%) invert(67%) sepia(78%) saturate(1500%) hue-rotate(354deg) brightness(100%) contrast(95%);
  transition: filter .25s;
}
main .gh-btn:hover img { filter: none; }

.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 2.5rem 2rem; max-width: 640px; }
.empty .muted { color: var(--muted); margin-top: .4rem; }

.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  max-width: 1300px; margin: 3rem auto 0 var(--content-left); padding: 1.5rem 2rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}

@media (max-width: 800px) {
  .hero { flex-direction: column-reverse; justify-content: center; text-align: center; padding-top: 4rem; gap: 2.5rem; }
  .lead { margin-inline: auto;  }
}
