/*
Theme Name: Léon Lin
Theme URI: https://leon-lin.com/
Author: Léon Lin
Author URI: https://leon-lin.com/
Description: Thème custom personnel pour Léon Lin, stratège média & marketing digital 360. Sidebar verticale, hero plein format, design éditorial. Cohérent avec la maquette Phase 2.
Version: 0.2.1
Requires at least: 6.0
Requires PHP: 8.0
License: All Rights Reserved
License URI: https://leon-lin.com/
Text Domain: leon-lin
Tags: custom, editorial, personal
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #f5f1e8;
  --bg-elevated: #fbf8f1;
  --ink: #0a0a08;
  --ink-soft: #5a574e;
  --ink-faint: #8a8579;
  --rule: #d8d2c1;
  --rule-soft: #e6e1d2;
  --accent: #1f3a2c;
  --accent-warm: #c5582a;
  --surface: #ffffff;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --sidebar-w: 240px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* =========================================================
   Reset minimal
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");

  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) { body { grid-template-columns: 200px 1fr; } }
@media (max-width: 560px) { body { grid-template-columns: 140px 1fr; } }

.skip-link {
  position: absolute; top: -40px; left: 0;
  padding: 0.5rem 1rem; background: var(--accent); color: var(--bg);
  z-index: 999;
}
.skip-link:focus { top: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }

/* =========================================================
   Typographie
   ========================================================= */
.meta {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}
.meta--accent { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-display); font-weight: 400;
  line-height: 1.02; letter-spacing: -0.015em; color: var(--ink);
}
h1 { font-size: clamp(3rem, 9vw, 8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.85rem); line-height: 1.15; }
em { font-style: italic; }
.em-serif { font-style: italic; color: var(--accent); }

p { max-width: 60ch; }
.lede {
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
  line-height: 1.5; color: var(--ink); max-width: 40em;
}

/* =========================================================
   Sidebar, Navigation verticale
   ========================================================= */
.sidebar {
  position: sticky; top: 0;
  height: 100vh; padding: 2rem 1.75rem 2rem 2rem;
  border-right: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 92%, white 8%);
  display: flex; flex-direction: column;
  z-index: 50;
}
.sidebar__logo {
  display: flex; align-items: baseline; gap: 0.55rem;
  font-family: var(--font-display); font-size: 1.5rem;
}
.sidebar__logo .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  transform: translateY(-3px);
}
.sidebar__logo em { font-style: italic; }

.sidebar__section { margin-top: 3rem; }
.sidebar__label {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.12em; color: var(--ink-faint);
  text-transform: uppercase; margin-bottom: 0.8rem; display: block;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar__nav a {
  position: relative; padding: 0.45rem 0 0.45rem 1.1rem;
  font-family: var(--font-display); font-size: 1.15rem;
  color: var(--ink);
  transition: padding-left 0.25s var(--ease), color 0.2s var(--ease);
}
.sidebar__nav a::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 0; height: 1px; background: var(--accent);
  transform: translateY(-50%);
  transition: width 0.28s var(--ease);
}
.sidebar__nav a:hover { padding-left: 1.4rem; color: var(--accent); }
.sidebar__nav a:hover::before { width: 0.8rem; }
.sidebar__nav a.current-menu-item,
.sidebar__nav a[aria-current="page"] {
  color: var(--accent); padding-left: 1.4rem;
}
.sidebar__nav a.current-menu-item::before,
.sidebar__nav a[aria-current="page"]::before { width: 0.8rem; background: var(--accent); }

.sidebar__spacer { flex: 1; }

.sidebar__lang {
  display: inline-flex; align-items: center; gap: 0.4rem;
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
.sidebar__lang [aria-current="true"] { color: var(--accent); font-weight: 500; }
.sidebar__lang span { color: var(--ink-faint); }

.sidebar__social {
  margin-top: 1rem; display: flex; gap: 0.8rem;
  font-family: var(--font-mono); font-size: 0.74rem;
}
.sidebar__social a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sidebar__social a:hover { color: var(--accent); border-color: var(--accent); }

/* Sidebar : adaptations responsive (reste verticale partout) */
@media (max-width: 900px) {
  .sidebar { padding: 1.5rem 1.1rem 1.5rem 1.3rem; }
  .sidebar__logo { font-size: 1.3rem; }
  .sidebar__section { margin-top: 2rem; }
  .sidebar__nav a { font-size: 1rem; padding: 0.4rem 0 0.4rem 1rem; }
}
@media (max-width: 560px) {
  .sidebar { padding: 1.1rem 0.6rem 1.1rem 0.8rem; }
  .sidebar__logo { font-size: 1.05rem; gap: 0.4rem; }
  .sidebar__logo .dot { width: 5px; height: 5px; }
  .sidebar__section { margin-top: 1.4rem; }
  .sidebar__label { display: none; }
  .sidebar__nav a { font-size: 0.88rem; padding: 0.35rem 0 0.35rem 0.7rem; }
  .sidebar__nav a:hover,
  .sidebar__nav a.current-menu-item,
  .sidebar__nav a[aria-current="page"] { padding-left: 0.85rem; }
  .sidebar__nav a:hover::before,
  .sidebar__nav a.current-menu-item::before,
  .sidebar__nav a[aria-current="page"]::before { width: 0.5rem; }
  .sidebar__lang {
    font-size: 0.68rem; padding: 0.22rem 0.5rem; gap: 0.25rem;
    align-self: stretch; justify-content: center;
  }
  .sidebar__social {
    font-size: 0.66rem; gap: 0.45rem;
    flex-direction: column; align-items: flex-start;
  }
}

main { min-width: 0; }

/* =========================================================
   Boutons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body); font-weight: 500; font-size: 0.95rem;
  padding: 0.95rem 1.5rem; border-radius: 999px; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn--primary {
  background: var(--accent); color: var(--bg-elevated);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 12px 28px -16px rgba(31,58,44,0.55);
}
.btn--primary:hover { background: var(--ink); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn--ghost:hover { border-color: var(--ink); background: var(--bg-elevated); }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translate(2px, -2px); }

/* =========================================================
   Hero, plein format
   ========================================================= */
.hero--full {
  padding: clamp(4rem, 10vh, 7rem) 0 var(--space-5);
  min-height: 85vh;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.hero__eyebrow {
  display: flex; align-items: center; gap: 0.85rem; margin-bottom: 2rem;
}
.hero__eyebrow .bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  max-width: 14ch;
  font-size: clamp(3.25rem, 11vw, 9rem);
  line-height: 0.95; letter-spacing: -0.025em;
}
.hero__lede { margin-top: 2rem; max-width: 38em; }
.hero__ctas { margin-top: 2.5rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero__band {
  margin-top: var(--space-5);
  border-top: 1px solid var(--rule); padding-top: 1.2rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.hero__band > div { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; }
.hero__band > div span:first-child {
  display: block; color: var(--ink-faint); text-transform: uppercase;
  font-size: 0.7rem; margin-bottom: 0.3rem;
}
@media (max-width: 720px) {
  .hero__band { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 1rem; }
  .hero h1 { font-size: clamp(2.75rem, 14vw, 5rem); }
}

/* =========================================================
   Sections génériques
   ========================================================= */
section.block { padding: var(--space-6) 0; border-top: 1px solid var(--rule); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-4); margin-bottom: var(--space-4); align-items: end;
}
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; gap: 1rem; } }
.section-head__num { display: flex; align-items: baseline; gap: 0.8rem; }
.section-head__num em {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.1rem; color: var(--accent);
}
.section-head h2 .lighter { color: var(--ink-soft); }

/* =========================================================
   Bio (avec portrait)
   ========================================================= */
.bio {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: var(--space-5); align-items: start;
}
.bio__text p + p { margin-top: 1rem; }
.bio__visual { display: flex; flex-direction: column; gap: 1.5rem; }
.portrait {
  position: relative; aspect-ratio: 4/5; width: 100%;
  background: var(--accent); border-radius: 4px; overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(10,10,8,0.4);
}
.portrait::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.15 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    radial-gradient(circle at 60% 35%, color-mix(in srgb, var(--accent) 70%, white 30%), var(--accent) 75%);
}
.portrait__tag {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--bg);
}
.portrait__tag span:last-child { opacity: 0.6; }
.bio__meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); }
.bio__meta dl {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.2rem;
}
.bio__meta dt {
  color: var(--ink-faint); text-transform: uppercase;
  font-size: 0.7rem; letter-spacing: 0.08em;
}
.bio__meta dd { color: var(--ink); }
@media (max-width: 820px) { .bio { grid-template-columns: 1fr; gap: 2rem; } }

/* =========================================================
   Piliers
   ========================================================= */
.pillars {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
@media (max-width: 720px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--bg-elevated); padding: 2rem 1.75rem;
  position: relative; transition: background 0.25s var(--ease);
}
.pillar:hover { background: var(--surface); }
.pillar__num {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase;
}
.pillar h3 { margin-top: 0.6rem; }
.pillar h3 em { color: var(--accent); font-style: italic; }
.pillar p { margin-top: 0.9rem; color: var(--ink-soft); font-size: 0.97rem; }
.pillar__tools { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pillar__tools li {
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.25rem 0.6rem; border: 1px solid var(--rule);
  border-radius: 999px; color: var(--ink-soft);
}
.pillar--impact { background: var(--accent); color: var(--bg-elevated); }
.pillar--impact:hover { background: var(--ink); }
.pillar--impact h3, .pillar--impact .pillar__num { color: var(--bg-elevated); }
.pillar--impact p { color: color-mix(in srgb, var(--bg-elevated) 80%, transparent); }
.pillar--impact h3 em { color: var(--accent-warm); }
.pillar--impact .pillar__tools li {
  color: var(--bg-elevated);
  border-color: color-mix(in srgb, var(--bg-elevated) 30%, transparent);
}

/* =========================================================
   Cas (résumés sur la home)
   ========================================================= */
.cases { display: grid; gap: 0; }
.case {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-4); padding: 2.2rem 0;
  border-top: 1px solid var(--rule); align-items: start;
  transition: padding-left 0.3s var(--ease);
}
.case:hover { padding-left: 0.6rem; }
.case:last-of-type { border-bottom: 1px solid var(--rule); }
@media (max-width: 820px) { .case { grid-template-columns: 1fr; gap: 1rem; } }
.case__head { display: flex; flex-direction: column; gap: 0.5rem; }
.case__client { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.1; }
.case__meta {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em;
}
.case__body p { font-size: 0.97rem; color: var(--ink); }
.case__body .deltas { margin-top: 1rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.case__body .deltas li { font-family: var(--font-mono); font-size: 0.78rem; }
.case__body .deltas strong {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.2rem; color: var(--accent);
  font-weight: 400; margin-right: 0.35rem;
}
.case__link a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.3rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.case__link a:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   Marques (bandeau)
   ========================================================= */
.brands {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0;
  border: 1px solid var(--rule); border-right: 0; border-bottom: 0;
}
.brands li {
  flex: 1 1 calc(100% / 6); min-width: 130px;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1.5rem 1.2rem;
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -0.01em;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; text-align: center;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.brands li:hover { color: var(--ink); background: var(--bg-elevated); }
.brands em { font-style: italic; }

/* =========================================================
   CTA final (fond noir)
   ========================================================= */
.final-cta {
  padding: var(--space-6) 0;
  background: var(--ink); color: var(--bg-elevated);
  position: relative; overflow: hidden;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
}
.final-cta__inner {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-5); align-items: end;
}
.final-cta h2 { color: var(--bg-elevated); }
.final-cta h2 em { color: var(--accent-warm); font-style: italic; }
.final-cta p { color: color-mix(in srgb, var(--bg-elevated) 70%, transparent); margin-top: 1.2rem; max-width: 38em; }
.final-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; }
.final-cta .btn--primary { background: var(--bg-elevated); color: var(--ink); }
.final-cta .btn--primary:hover { background: var(--accent-warm); color: var(--bg-elevated); }
.final-cta__alt {
  font-family: var(--font-mono); font-size: 0.82rem;
  color: color-mix(in srgb, var(--bg-elevated) 65%, transparent);
}
.final-cta__alt a {
  color: var(--bg-elevated);
  border-bottom: 1px solid color-mix(in srgb, var(--bg-elevated) 30%, transparent);
  padding-bottom: 1px;
}
.final-cta__alt a:hover { border-color: var(--accent-warm); color: var(--accent-warm); }
@media (max-width: 820px) { .final-cta__inner { grid-template-columns: 1fr; gap: 2rem; } }

/* =========================================================
   Footer
   ========================================================= */
footer.site { padding: var(--space-5) 0 var(--space-3); border-top: 1px solid var(--rule); }
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.footer__brand { font-family: var(--font-display); font-size: 1.3rem; }
.footer__brand em { font-style: italic; color: var(--accent); }
.footer__brand p {
  margin-top: 0.6rem; font-family: var(--font-body); font-size: 0.9rem;
  color: var(--ink-soft); max-width: 28em;
}
.footer__col h4 {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--ink-faint); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 500; margin-bottom: 0.8rem;
}
.footer__col ul li { margin-bottom: 0.4rem; }
.footer__col a { font-size: 0.92rem; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid var(--rule); padding-top: 1.2rem;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1.5rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--ink-faint); letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__brand { grid-column: 1 / -1; }
}

/* =========================================================
   Animation d'entrée
   ========================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: rise 0.85s var(--ease) both; }
.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.20s; }
.reveal:nth-child(3) { animation-delay: 0.36s; }
.reveal:nth-child(4) { animation-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
