/* ═══════════════════════════════════════════════════
   style.css — Portfolio JB (placeholder)
   Vanilla CSS · polices système · zéro dépendance
   ═══════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────── */
:root {
  /* Thème sombre (par défaut) */
  --bg:        #16161A;
  --bg-elev:   #1E1E24;
  --bg-sunk:   #121216;
  --text:      #ECECEF;   /* ~14:1 sur --bg → AAA */
  --text-soft: #B4B4BE;   /* ~8:1  → AAA */
  --text-mute: #8C8C97;   /* ~5:1  → AA (texte secondaire) */
  --border:    rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);

  /* Accent neutre — change cette seule ligne pour reskinner le site */
  --accent:    #8FA0BF;
  --accent-text: #A7B5CE; /* version texte (contraste renforcé sur fond sombre) */

  --radius:    12px;
  --radius-sm: 8px;
  --max-w:     1080px;
  --gap:       clamp(16px, 3vw, 28px);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

html[data-theme="light"] {
  --bg:        #F4F3F0;   /* blanc cassé chaud — pas éblouissant */
  --bg-elev:   #FBFAF8;
  --bg-sunk:   #ECEAE5;
  --text:      #1A1A1E;
  --text-soft: #44444C;
  --text-mute: #61616A;   /* ~5:1 sur fond clair */
  --border:    rgba(0,0,0,0.12);
  --border-strong: rgba(0,0,0,0.20);

  --accent:      #4A5A78;
  --accent-text: #3C4A64; /* foncé → contraste sur fond clair */
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Focus visible (accessibilité clavier) ──────── */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Lien d'évitement ───────────────────────────── */
.skip-nav {
  position: absolute;
  top: -100%; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .2s var(--ease);
}
.skip-nav:focus { top: 0; }

/* ── Utilitaires ────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}
.mute { color: var(--text-mute); }

/* ── En-tête ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  letter-spacing: .02em;
}
.brand-name { font-size: 15px; }

/* Navigation */
.nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--text-soft);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--bg-elev); }
.nav-link.is-active { color: var(--text); }

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Actions (langue + thème) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch,
.theme-toggle {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.lang-switch:hover,
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }

/* ── Hero ───────────────────────────────────────── */
.hero {
  padding-block: clamp(72px, 14vh, 160px);
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(40px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 24px;
}
.hero-lead {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text-soft);
  max-width: 46ch;
  margin-bottom: 36px;
}

/* Boutons */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform .15s var(--ease), opacity .15s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); }

/* ── Sections ───────────────────────────────────── */
.section { padding-block: clamp(64px, 10vw, 120px); }
.section--alt { background: var(--bg-sunk); }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-label {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.section-intro {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 17px;
}

/* ── Grille de cartes (placeholder) ─────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.card--placeholder {
  border-style: dashed;
  background: transparent;
}
.card-num {
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.card-text { color: var(--text-mute); font-size: 15px; }

/* ── Section prose (2 colonnes) ─────────────────── */
.prose-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.prose p { color: var(--text-soft); margin-bottom: 18px; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.prose-aside {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.aside-title {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.aside-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.aside-list li:last-child { border-bottom: 0; }

/* ── Bloc placeholder ───────────────────────────── */
.placeholder-block {
  display: grid;
  place-items: center;
  min-height: 200px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
}

/* ── Pied de page ───────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
}
.footer-name { font-weight: 600; font-size: 16px; }
.footer-label {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.site-footer a { color: var(--accent-text); }
.site-footer a:hover { text-decoration: underline; }
.footer-block--end { margin-left: auto; text-align: right; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
  .prose-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .nav { margin-left: 0; }
  .nav-list {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-list.is-open { display: flex; }
  .nav-link { padding: 12px; }
  .brand-name { display: none; }
}

/* ── Mouvement réduit ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
