/* ===== Base scale (ZOOM GLOBAL) ===== */
html{ font-size: 95%; } /* 100% ≈ 16px */
:root{
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;      /* gray-500 */
  --line: #e5e7eb;       /* gray-200 */
  --accent: #111827;     /* gray-900 */
  --link: #111827;
  --chip: #f3f4f6;       /* gray-100 */
  --shadow: 0 8px 30px rgba(0,0,0,0.06);
  --hover: #2563eb;      /* blue for hover */
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #e5e7eb 0%, #ffffff 100%);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 20px;   /* taille de base du texte */
  line-height: 1.7;
}
img{ max-width: 100%; height: auto; display: block; }

a{
  color: var(--link);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover{ color: var(--hover); }

.container{ max-width: 980px; margin: 0 auto; padding: 0 1.2rem; }

/* ===== Header / Nav ===== */
.header{
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.8);
}
.nav{
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem; padding: 0.25rem 0;
}

.brand{
  display: flex; align-items: center; gap: 0.75rem;
  font-weight: 700; letter-spacing: 0.2px; font-size: 1rem;
}
.brand img{ width: 2.25rem; height: 2.25rem; border-radius: 9999px; box-shadow: var(--shadow); }

/* ===== Menu (desktop par défaut) ===== */
.menu{
  display: flex; gap: 1.125rem; align-items: center; flex-wrap: nowrap;
}
.menu a{
  position: relative;
  padding: 0.375rem 0.125rem;
  font-weight: 500; color: var(--text);
  transition: color .2s ease;
}
/* Active page = barre soulignée */
.menu a.active::after{
  content: ""; position: absolute; left: 0; bottom: -0.375rem;
  width: 100%; height: 0.125rem; background: var(--accent);
}
/* Hover = bleu, pas de soulignement en plus */
.menu a:hover, .menu a:focus-visible{ color: var(--hover); text-decoration: none; }

/* ===== Hero / About ===== */
.hero{
  display: grid; grid-template-columns: 10rem 1fr;
  gap: 1.5rem; padding: 3rem 0 1.5rem;
}
.avatar{
  width: 10rem; height: 10rem; border-radius: 1.25rem; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero h1{ margin: 0 0 0.5rem 0; font-size: 1.9rem; line-height: 1.2; }
.hero p.lead{ margin: 0 0 0.75rem; color: var(--muted); font-size: 1rem; }

.chips{ display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.625rem; }
.chip{
  padding: 0.375rem 0.625rem; background: var(--chip);
  border-radius: 999px; font-size: 0.9rem; border: 1px solid var(--line);
}

/* ===== Sections & Cards ===== */
.section{ padding: 1.125rem 0 2.25rem; }
.section h2{ font-size: 1.25rem; margin: 0 0 0.5rem; font-weight: 600; }

.card{
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  padding: 1rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  background: #fff;
}
.card:hover{ transform: translateY(-0.125rem); box-shadow: var(--shadow); }

.list{ display: grid; gap: 0.625rem; }

.item-title{ font-weight: 600; font-size: 1.15rem; }
.item-meta{ color: var(--muted); font-size: 0.95rem; }
.card p{ font-size: 0.95rem; margin-top: 0.4rem; margin-bottom: 0; }

/* ===== Footer ===== */
.footer{
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.875rem;
}

/* ===== Responsive fin (720px : petits ajustements typographiques) ===== */
@media (max-width: 720px){
  html{ font-size: 100%; }
  .nav{ flex-wrap: wrap; height: auto; gap: 8px; padding: 8px 0; }
  .brand img{ width: 32px; height: 32px; }
  .menu{ flex-wrap: wrap; gap: 10px 12px; }
  .menu a{ padding: 8px 0; }
  .hero{ grid-template-columns: 1fr; padding: 24px 0 12px; gap: 16px; }
  .avatar{ width: 96px; height: 96px; }
  .card{ padding: 14px; }
}

/* === Nettoyage / cohérence === */
html, body { height: 100%; }
body{
  background-color: #e5e7eb; /* fallback gradient */
  background-image: linear-gradient(180deg, #e5e7eb 0%, #ffffff 100%);
  background-repeat: no-repeat; background-attachment: fixed;
  background-size: 100% 100%;
}
.brand { font-size: 1rem; }
.brand span { font-size: 1rem; line-height: 1; }

/* ====== HAMBURGER & MOBILE PANEL — seuil unique 880px ====== */

/* Desktop (>= 881px) : menu horizontal visible, bouton caché */
@media (min-width: 881px){
  .menu-toggle{ display: none !important; }
  .nav{ position: static !important; }
  .header .menu{
    display: flex !important; position: static !important;
    box-shadow: none !important; background: transparent !important; border: 0 !important;
    flex-direction: row !important; gap: 1.125rem !important; padding: 0 !important;
  }
  .header .menu a.active::after{ display: block !important; }
}

/* Mobile/Tablet (<= 880px) */
@media (max-width: 880px){
  .nav{ position: relative; }

  /* Bouton hamburger (3 barres identiques) */
  .menu-toggle{
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; padding: .5rem; background: transparent; border: none; cursor: pointer; line-height: 0;
    width: 34px; height: 34px;
  }
  .menu-toggle .bar{
    width: 24px; height: 3px; background: var(--text);
    border-radius: 2px; margin: 0; box-shadow: none;
    transition: transform .18s ease, opacity .18s ease; transform-origin: 50% 50%;
  }

  /* Panneau mobile (fermé par défaut) */
  .header .menu{
    display: none; position: absolute; left: 0; right: 0; top: 4rem;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; gap: 0; padding: .5rem 1.2rem; z-index: 25;
  }
  .header .menu.open{ display: flex; }
  .header .menu a{ width: 100%; padding: .75rem 0; }

  /* Cache l’underscore actif en mobile */
  .header .menu a.active::after{ content: none; display: none; }

  /* Animation hamburger -> X */
  .menu-toggle.is-open .bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
  .menu-toggle.is-open .bar:nth-child(2){ opacity: 0; transform: scaleX(0.5); }
  .menu-toggle.is-open .bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

  @media (prefers-reduced-motion: reduce){
    .menu-toggle .bar{ transition: none; }
  }
}

/* ===== Composants additionnels ===== */

/* Lien dans .lead = gris pâle, devient bleu au survol */
.lead a:link, .lead a:visited{ color: var(--muted); }
.lead a:hover, .lead a:focus-visible{ color: var(--hover); }

/* Bouton "remonter en haut" */
.to-top{
  position: fixed; right: 1rem; bottom: 1rem;
  width: 42px; height: 42px; border-radius: 9999px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease; z-index: 40;
}
.to-top:hover{ color: var(--hover); transform: translateY(0); }
.to-top.show{ opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top svg{ width: 18px; height: 18px; }
@media (max-width: 880px){ .to-top{ right: .75rem; bottom: .75rem; width: 40px; height: 40px; } }

/* Cartes cliquables (accessibilité) */
.card.is-clickable { cursor: pointer; }
.card.is-clickable:focus{
  outline: 2px solid var(--hover);
  outline-offset: 3px;
  border-radius: 0.875rem; /* même rayon que .card */
}
