/* ═══════════════════════════════════════════════════════════════════════════
 * jouan.us — portfolio stylesheet · "Édition Noir & Or"
 *   Canvas noir profond · accent or champagne (#D4AF37) · profondeur 3D
 *   Newsreader (serif éditorial, titres) · Inter (UI/corps) · IBM Plex Mono
 * Tokens 100% CSS-variables. Les noms de classes restent ceux attendus par
 * app.js / i18n.js (work-card, tl-*, skill-group, journal-*, feature-*,
 * .serif, .italic, .link-gold). Le moteur 3D vit dans public/js/fx.js.
 * ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Or champagne (accent) ─────────────────────────────────────────────── */
  --brand:       #D4AF37;
  --brand-d:     #A9823C;
  --brand-l:     #E7CF86;
  --brand-tint:  rgba(212, 175, 55, 0.10);
  --ring:        rgba(212, 175, 55, 0.32);
  --gold:        #D4AF37;
  --on-brand:    #0A0A0C;   /* texte sombre posé sur un aplat d'or */

  /* ── Noir & encres chaudes ─────────────────────────────────────────────── */
  --ink:         #ECE7DB;
  --ink-soft:    #BDB6A6;
  --ink-mute:    #837C6C;
  --faint:       #5F5A4F;

  --bg:          #09090B;
  --bg-soft:     #101013;
  --bg-elev:     #16161B;
  --cream:       #15151A;   /* puces / inputs : surface basse */
  --ivory:       #101013;
  --sand:        #1B1B21;
  --white:       #141418;   /* surface carte */

  --line:        rgba(212, 175, 55, 0.16);
  --line-2:      rgba(212, 175, 55, 0.26);
  --line-soft:   rgba(236, 231, 219, 0.08);

  --green:       #5FAE6E;
  --warn:        #E0A458;
  --err:         #E0705E;

  /* ── Alias hérités (markup + JS inline) ────────────────────────────────── */
  --gold-soft:   var(--brand-l);
  --gold-deep:   var(--brand-d);
  --gold-glow:   rgba(212, 175, 55, 0.22);

  /* ── Ombres + halo or ──────────────────────────────────────────────────── */
  --shadow-sm:   0 1px 2px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.5);
  --shadow:      0 14px 38px rgba(0,0,0,.55), 0 3px 10px rgba(0,0,0,.45);
  --shadow-lg:   0 44px 100px rgba(0,0,0,.7);
  --glow:        0 0 0 1px rgba(212,175,55,.22), 0 26px 60px -22px rgba(212,175,55,.40);

  /* ── Typographie ───────────────────────────────────────────────────────── */
  --fh:    'Newsreader', Georgia, 'Times New Roman', serif;
  --ff:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fm:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fh-ar: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  --serif: var(--fh);
  --sans:  var(--ff);
  --mono:  var(--fm);

  --container: min(1140px, 100% - 3rem);
  --radius:    16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --ease:      cubic-bezier(.2, .7, .2, 1);
}

/* ─── Reset & base ─── */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
}
body {
  margin: 0;
  font-family: var(--ff);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}
body.nav-open { overflow: hidden; touch-action: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--brand); color: var(--on-brand); }

.serif  { font-family: var(--fh); font-weight: 500; letter-spacing: -0.012em; }
.italic { font-style: italic; }
.link-gold {
  color: var(--brand); font-weight: 600;
  border-bottom: 1px solid rgba(212,175,55,.35);
  transition: color .2s, border-color .2s;
}
.link-gold:hover { color: var(--brand-l); border-color: var(--brand-l); }

/* ─── Scroll progress bar (or) ─── */
#scrollbar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--brand-d), var(--brand) 50%, var(--brand-l));
  box-shadow: 0 0 14px rgba(212,175,55,.6);
  z-index: 120; pointer-events: none;
  transition: width .1s linear;
}

/* ─── Fond atmosphérique (noir + halos or) ─── */
.bg-noise { display: none; }
.bg-gradient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60rem 50rem at 82% -8%, rgba(212,175,55,.10), transparent 60%),
    radial-gradient(46rem 42rem at -8% 6%, rgba(212,175,55,.055), transparent 58%),
    radial-gradient(70rem 60rem at 50% 118%, rgba(212,175,55,.06), transparent 60%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(236,231,219,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(236,231,219,.025) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at center, #000 22%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 22%, transparent 78%);
}
body > *:not(.bg-noise):not(.bg-gradient):not(.bg-grid) { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
 * Navigation — pilule sticky en verre fumé
 * ═══════════════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  width: var(--container); margin: 0 auto;
  padding: .65rem .75rem .65rem 1.1rem;
  margin-top: 14px;
  border-radius: 18px;
  background: rgba(18,18,22,.62);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid rgba(212,175,55,.14);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
  transition: background .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s, margin-top .3s, padding .3s;
}
.nav.scrolled {
  margin-top: 8px;
  background: rgba(10,10,13,.9);
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  border-color: rgba(212,175,55,.24);
}
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--fh); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-l), var(--brand) 55%, var(--brand-d));
  color: var(--on-brand);
  font-family: var(--fh); font-weight: 600; font-size: .95rem;
  letter-spacing: .02em;
  box-shadow: 0 4px 14px rgba(212,175,55,.34), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand-name { font-size: 1.12rem; letter-spacing: .01em; color: var(--ink); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 1.7rem; font-size: .9rem; }
.nav-links a {
  color: var(--ink-soft); font-weight: 500; transition: color .2s; position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  border-radius: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  padding: .6rem 1.2rem;
  background: linear-gradient(135deg, var(--brand-l), var(--brand) 60%, var(--brand-d));
  color: var(--on-brand) !important;
  border-radius: 10px; font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px -8px rgba(212,175,55,.5);
  transition: all .25s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); filter: brightness(1.06);
  box-shadow: 0 2px 6px rgba(0,0,0,.4), 0 18px 34px -10px rgba(212,175,55,.6); }

.nav-toggle { display: none; background: none; border: none; padding: .5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ─── Boutons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .85rem 1.6rem;
  font-family: var(--ff); font-weight: 600; font-size: .94rem;
  letter-spacing: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .25s, background .2s, border-color .2s, color .2s, filter .2s;
  cursor: pointer;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-gold {                    /* primaire = aplat d'or, texte sombre */
  background: linear-gradient(135deg, var(--brand-l) 0%, var(--brand) 52%, var(--brand-d) 100%);
  color: var(--on-brand); border-color: transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -10px rgba(212,175,55,.5);
}
.btn-gold:hover {
  transform: translateY(-2px); filter: brightness(1.06);
  box-shadow: 0 2px 6px rgba(0,0,0,.4), 0 20px 40px -12px rgba(212,175,55,.62);
}
.btn-ghost {
  border-color: var(--line-2); color: var(--ink); background: rgba(255,255,255,.02);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-block { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
 * Hero
 * ═══════════════════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 9rem 0 4rem;
  position: relative;
}
.hero-inner { width: var(--container); text-align: center; max-width: 900px; }
.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--fm); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--brand); font-weight: 600;
  background: var(--brand-tint);
  padding: .5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 1.8rem;
}
.kicker::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px rgba(212,175,55,.16), 0 0 12px var(--brand);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero-title {
  font-family: var(--fh);
  font-size: clamp(3rem, 8.5vw, 6.6rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -.025em;
  margin: 0 0 1.6rem;
  color: var(--ink);
  overflow-wrap: break-word;
}
.hero-title span { display: block; }
.hero-title .italic {
  font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, var(--brand-d), var(--brand-l) 45%, var(--brand) 70%, var(--brand-l));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: goldShimmer 6s linear infinite;
}
@keyframes goldShimmer { to { background-position: 220% center; } }

.hero-roles {
  font-family: var(--fh); font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--ink-soft); margin-bottom: 1.6rem;
  display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center;
  min-height: 2.2em;
}
.role-rotator { position: relative; display: inline-block; min-width: min(280px,100%); max-width: 100%; min-height: 1.5em; text-align: left; }
.role {
  position: absolute; left: 0; top: 0; right: 0;
  color: var(--brand); font-style: italic;
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  white-space: nowrap;
}
.role.active { opacity: 1; transform: translateY(0); position: relative; }

.hero-sub {
  max-width: 620px; margin: 0 auto 2.4rem;
  font-size: 1.08rem; color: var(--ink-soft); line-height: 1.7;
}
.hero-cta { display: inline-flex; gap: .9rem; flex-wrap: wrap; justify-content: center; margin-bottom: 3rem; }
.hero-meta {
  display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
  font-size: .86rem; color: var(--ink-mute);
}
.meta-item { display: inline-flex; align-items: center; gap: .5rem; transition: color .2s; }
.meta-item:hover { color: var(--brand); }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1.5px solid var(--line-2);
  border-radius: 12px; display: flex; justify-content: center; padding-top: 6px;
  background: rgba(255,255,255,.02);
}
.scroll-cue span {
  width: 3px; height: 7px; background: var(--brand); border-radius: 2px;
  box-shadow: 0 0 8px var(--brand);
  animation: scroll-cue 1.8s var(--ease) infinite;
}
@keyframes scroll-cue {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(18px); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Sections (partagé)
 * ═══════════════════════════════════════════════════════════════════════════ */
.section { padding: 6.5rem 0; width: var(--container); margin: 0 auto; }
.section-head { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 3.5rem; }
.section-num {
  font-family: var(--fm); font-size: .75rem; font-weight: 600;
  color: var(--brand); letter-spacing: .12em;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin: 0; color: var(--ink); flex-shrink: 0; }
.section-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2) 0%, transparent 100%); }

/* ─── Carte 3D générique (le moteur fx.js incline au pointeur) ─── */
.tilt3d { transform-style: preserve-3d; will-change: transform; }

/* ─── About ─── */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4.5rem; align-items: start; }
.lead-text {
  font-family: var(--fh); font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.45; color: var(--ink); margin: 0 0 1.6rem; font-weight: 500;
}
.about-lead p:not(.lead-text) { font-size: 1.04rem; color: var(--ink-soft); line-height: 1.8; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.stat {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--line-2); }
.stat-num {
  display: block; font-family: var(--fh);
  font-size: clamp(2.4rem, 5vw, 3.3rem); font-weight: 600;
  color: var(--brand); line-height: 1; margin-bottom: .7rem;
  text-shadow: 0 0 26px rgba(212,175,55,.25);
}
.stat-label {
  display: block; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink-mute); line-height: 1.5; font-weight: 500;
}

/* ─── Pillars ─── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pillar {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: var(--line-2); }
.pillar-featured {
  border-color: var(--line-2);
  box-shadow: 0 0 0 1px rgba(212,175,55,.18), 0 18px 50px -22px rgba(212,175,55,.4);
}
.pillar-badge {
  position: absolute; top: -11px; left: 2rem;
  font-family: var(--fm); font-size: .64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  background: linear-gradient(135deg, var(--brand-l), var(--brand-d));
  color: var(--on-brand);
  padding: .35rem .75rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(212,175,55,.4);
}
.pillar-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint);
  color: var(--brand);
  border: 1px solid var(--line);
  margin-bottom: 1.4rem;
  box-shadow: inset 0 0 20px rgba(212,175,55,.08);
}
.pillar-title { font-size: 1.4rem; margin: 0 0 .75rem; color: var(--ink); }
.pillar-body { font-size: .96rem; color: var(--ink-soft); margin: 0 0 1.4rem; line-height: 1.7; }
.pillar-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pillar-tags li {
  font-family: var(--fm); font-size: .7rem; font-weight: 500;
  color: var(--ink-soft);
  padding: .3rem .65rem;
  border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--cream);
}

/* ─── Timeline ─── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-d) 45%, transparent 100%);
  box-shadow: 0 0 12px rgba(212,175,55,.3);
}
.tl-item { position: relative; padding-bottom: 3rem; }
.tl-marker {
  position: absolute; left: -2rem; top: 6px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(212,175,55,.12), 0 0 14px rgba(212,175,55,.4);
}
.tl-marker::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 6px; height: 6px; background: var(--brand); border-radius: 50%;
}
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.tl-role { font-size: 1.3rem; margin: 0; color: var(--ink); }
.tl-dates { font-family: var(--fm); font-size: .78rem; font-weight: 500; color: var(--brand); letter-spacing: .04em; }
.tl-company { color: var(--brand); font-size: .96rem; font-weight: 600; margin: .35rem 0 1rem; }
.tl-points { list-style: none; padding: 0; margin: 0; }
.tl-points li {
  position: relative; padding-left: 1.5rem;
  font-size: .97rem; color: var(--ink-soft);
  margin-bottom: .65rem; line-height: 1.7;
}
.tl-points li::before { content: '—'; position: absolute; left: 0; top: 0; color: var(--brand); }

/* ═══════════════════════════════════════════════════════════════════════════
 * Featured work
 * ═══════════════════════════════════════════════════════════════════════════ */
.feature {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem;
  align-items: center; margin-bottom: 4rem;
  padding: 3.2rem;
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.feature::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--brand-l), var(--brand-d));
  box-shadow: 0 0 18px rgba(212,175,55,.4);
}
.feature-eyebrow {
  font-family: var(--fm); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--brand); display: block; margin-bottom: 1rem;
}
.feature-title { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0 0 1rem; line-height: 1.02; }
.feature-tagline { font-family: var(--fh); font-size: 1.32rem; color: var(--ink); font-style: italic; line-height: 1.4; margin: 0 0 1.4rem; }
.feature-body { color: var(--ink-soft); font-size: 1rem; line-height: 1.75; margin-bottom: 1.4rem; }
.feature-bullets { list-style: none; padding: 0; margin: 0 0 1.8rem; }
.feature-bullets li {
  position: relative; padding-left: 1.5rem; margin-bottom: .65rem;
  font-size: .96rem; color: var(--ink-soft); line-height: 1.65;
}
.feature-bullets li::before { content: '◆'; position: absolute; left: 0; top: .35em; color: var(--brand); font-size: .68rem; }
.feature-stack { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.8rem; }
.feature-stack span {
  font-family: var(--fm); font-size: .7rem; font-weight: 500;
  color: var(--brand);
  padding: .3rem .65rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--brand-tint);
}
.feature-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Mockup navigateur (terminal sombre, accents or) */
.feature-visual { display: flex; align-items: center; justify-content: center; perspective: 1400px; }
.device-frame {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, #1A1A1F, #0B0B0E);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 50px 100px -28px rgba(0,0,0,.8),
              0 22px 50px -18px rgba(212,175,55,.18),
              inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg);
  transition: transform .5s var(--ease);
  transform-style: preserve-3d;
}
.feature:hover .device-frame { transform: rotateY(-3deg) rotateX(1deg); }
.device-screen { display: flex; flex-direction: column; }
.mock-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .7rem .9rem;
  background: linear-gradient(180deg, #1F1F25, #14141A);
  border-bottom: 1px solid var(--line-soft);
}
.mock-bar > span:not(.mock-url) { width: 10px; height: 10px; border-radius: 50%; background: #3A3A42; }
.mock-bar .mock-url {
  flex: 1; text-align: center; font-family: var(--fm); font-size: .7rem;
  color: var(--ink-mute); background: rgba(0,0,0,.35); padding: .35rem .8rem;
  border-radius: 20px; border: 1px solid var(--line-soft); margin-left: .4rem;
}
.mock-body { padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .6rem;
  background: linear-gradient(180deg, #101014, #0A0A0D); }
.mock-title { font-family: var(--fh); font-size: 1.4rem; font-weight: 600; color: var(--brand); }
.mock-sub { font-size: .72rem; color: var(--ink-mute); margin-bottom: .5rem; }
.mock-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .5rem .8rem; border: 1px solid var(--line-soft); border-radius: 10px;
  background: rgba(255,255,255,.02); font-size: .8rem; color: var(--ink-soft);
}
.mock-row strong { color: var(--ink); font-family: var(--fm); font-size: 1rem; font-variant-numeric: tabular-nums; }
.mock-row strong.warn { color: var(--warn); }
.mock-bars {
  display: flex; gap: .35rem; align-items: flex-end; height: 78px;
  margin-top: .5rem; padding: .8rem; border: 1px solid var(--line-soft);
  border-radius: 12px; background: rgba(255,255,255,.02);
}
.mock-bars span { flex: 1; background: linear-gradient(180deg, var(--brand-l), var(--brand-d)); border-radius: 3px 3px 1px 1px; opacity: .9; }

/* ─── Autres projets ─── */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.work-card {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  padding: 1.9rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; gap: .9rem;
}
.work-card:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--line-2); }
.work-year { font-family: var(--fm); font-size: .72rem; font-weight: 500; color: var(--brand); letter-spacing: .1em; }
.work-title-link { color: inherit; display: block; }
.work-title-link:hover .work-title { color: var(--brand); }
.work-title { font-size: 1.3rem; margin: 0; color: var(--ink); transition: color .2s; }
.work-body { font-size: .93rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }
.work-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.work-tags span {
  font-family: var(--fm); font-size: .68rem;
  color: var(--ink-mute); padding: .25rem .55rem;
  border: 1px solid var(--line-soft); border-radius: 8px; background: var(--cream);
}

/* ─── Skills ─── */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.skill-group {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.skill-group:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--line-2); }
.skill-group h4 {
  font-family: var(--fh); font-size: 1.22rem; font-weight: 600; color: var(--brand);
  margin: 0 0 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line-soft);
}
.skill-group ul { list-style: none; padding: 0; margin: 0; }
.skill-group li {
  font-size: .92rem; color: var(--ink-soft);
  padding: .35rem 0; position: relative; padding-left: 1.2rem;
}
.skill-group li::before { content: ''; position: absolute; left: 0; top: .95em; width: 7px; height: 2px; border-radius: 2px; background: var(--brand); }

/* ─── Journal (blog) ─── */
.journal-tagline {
  max-width: 720px; margin: -1.5rem 0 2.5rem;
  color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7;
  font-style: italic; font-family: var(--fh);
}
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.journal-card {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem; cursor: pointer;
  display: flex; flex-direction: column; gap: .8rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.journal-card:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--line-2); }
.journal-card.featured { border-color: var(--line-2); }
.journal-card.featured::before {
  content: '★'; position: absolute; top: 1rem; right: 1rem; color: var(--brand); font-size: .9rem;
}
.journal-cover {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--sand), var(--bg));
  border-radius: 10px; margin-bottom: .3rem;
  background-size: cover; background-position: center;
  border: 1px solid var(--line-soft);
}
.journal-date { font-family: var(--fm); font-size: .72rem; font-weight: 500; color: var(--brand); letter-spacing: .1em; text-transform: uppercase; }
.journal-title { font-family: var(--fh); font-size: 1.32rem; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.3; transition: color .2s; }
.journal-card:hover .journal-title { color: var(--brand); }
.journal-excerpt { color: var(--ink-soft); font-size: .92rem; line-height: 1.65; margin: 0; flex: 1; }
.journal-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; align-items: center; }
.journal-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.journal-tags span {
  font-family: var(--fm); font-size: .66rem;
  color: var(--ink-mute); padding: .2rem .55rem;
  border: 1px solid var(--line-soft); border-radius: 8px; background: var(--cream);
}
.journal-reading { margin-left: auto; font-family: var(--fm); font-size: .72rem; color: var(--ink-mute); }

/* ─── Article reader modal ─── */
.article-modal {
  position: fixed; inset: 0;
  background: rgba(5,5,7,.78);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  z-index: 200; display: none; overflow-y: auto; padding: 4rem 1.5rem;
}
.article-modal.show { display: block; }
.article-modal-inner {
  max-width: 760px; margin: 0 auto;
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3.4rem 3rem 4rem; position: relative;
  box-shadow: var(--shadow-lg);
}
.article-close {
  position: sticky; top: 0; float: right;
  width: 38px; height: 38px;
  background: var(--cream); border: 1px solid var(--line);
  color: var(--ink); font-size: 1.5rem; line-height: 1;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s; z-index: 10;
}
.article-close:hover { color: var(--brand); border-color: var(--brand); transform: rotate(90deg); }
.article-modal h1 {
  font-family: var(--fh); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15;
  margin: 0 0 1rem; color: var(--ink); letter-spacing: -.01em;
}
.article-modal .article-meta {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 2rem;
  font-family: var(--fm); font-size: .78rem;
  color: var(--ink-mute); letter-spacing: .06em; text-transform: uppercase;
}
.article-modal .article-meta .dot { color: var(--brand); }
.article-modal .article-cover {
  width: 100%; aspect-ratio: 16/9; border-radius: 12px; margin-bottom: 2rem;
  background-size: cover; background-position: center; border: 1px solid var(--line-soft);
}
.article-modal .article-content { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.85; }
.article-modal .article-content p { margin: 0 0 1.3rem; }
.article-modal .article-tags {
  display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2.5rem;
  padding-top: 2rem; border-top: 1px solid var(--line-soft);
}
.article-modal .article-tags span {
  font-family: var(--fm); font-size: .72rem; color: var(--brand);
  padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--brand-tint);
}

/* ─── Education ─── */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.edu-card {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.edu-card:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--line-2); }
.edu-year { font-family: var(--fm); font-size: .72rem; font-weight: 500; color: var(--brand); letter-spacing: .12em; display: block; margin-bottom: 1rem; }
.edu-card h4 { font-size: 1.35rem; margin: 0 0 .4rem; color: var(--ink); }
.edu-major { color: var(--ink); font-size: .95rem; margin: 0 0 .5rem; }
.edu-major em { color: var(--brand); font-style: italic; }
.edu-school { color: var(--ink-mute); font-size: .85rem; margin: 0; }
.edu-lang { display: flex; flex-direction: column; gap: .3rem; }
.lang-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: .9rem; color: var(--ink-soft);
}
.lang-row:last-child { border-bottom: none; }
.lang-level {
  font-family: var(--fm); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .1em;
  padding: .2rem .6rem; border-radius: 999px;
}
.lang-level.fluent { color: var(--brand); background: var(--brand-tint); border: 1px solid var(--line); }
.lang-level.basic  { color: var(--ink-mute); background: var(--cream); border: 1px solid var(--line-soft); }

/* ─── Contact ─── */
.section-contact { padding-bottom: 8rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-lead h3 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.3; color: var(--ink); margin: 0 0 1.4rem; }
.contact-lead p { color: var(--ink-soft); margin: 0 0 2rem; line-height: 1.75; }
.contact-channels { display: flex; flex-direction: column; gap: .6rem; }
.contact-channels a {
  font-family: var(--fm); font-size: .92rem; color: var(--brand);
  padding: .75rem 0; border-bottom: 1px solid var(--line-soft);
  transition: color .2s, border-color .2s, padding-left .25s; display: block;
}
.contact-channels a:hover { color: var(--brand-l); border-color: var(--brand); padding-left: .4rem; }

.contact-form {
  background: linear-gradient(180deg, var(--white), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
}
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row > span {
  font-family: var(--fm); font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute);
}
.form-row > span em { color: var(--ink-mute); text-transform: none; letter-spacing: 0; font-style: normal; }
.form-row input, .form-row textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: .75rem .85rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
  resize: vertical;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--faint); }
.form-row input:focus, .form-row textarea:focus {
  outline: none; background: var(--bg-elev);
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring);
}
.form-status { margin: 0; font-size: .85rem; color: var(--ink-mute); min-height: 1.3em; text-align: center; }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--err); }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 3rem 0 2.5rem; margin-top: 4rem;
}
.footer-inner {
  width: var(--container); margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}
.footer-brand { display: flex; align-items: center; gap: .7rem; font-size: 1.1rem; font-family: var(--fh); font-weight: 600; }
.footer-tag { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.footer-copy { color: var(--ink-mute); font-size: .8rem; margin: 0; font-family: var(--fm); letter-spacing: .03em; }

/* ─── Reveal + variantes 3D ─── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-l { transform: translateX(-34px); } .reveal-r { transform: translateX(34px); }
.reveal-s { transform: scale(.955); }
.reveal.visible.reveal-l, .reveal.visible.reveal-r, .reveal.visible.reveal-s { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-title .italic { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Responsive
 * ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .section { padding: 5.5rem 0; }
  .about-grid, .feature, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .feature { padding: 2.8rem; }
  .pillars, .works-grid, .skills-grid, .edu-grid, .journal-grid { grid-template-columns: repeat(2, 1fr); }
  .device-frame { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 768px) {
  :root { --container: min(1140px, 100% - 2rem); }

  .nav { padding: .55rem .65rem .55rem .9rem; margin-top: 10px; }
  .nav.scrolled { margin-top: 6px; }
  .brand-name { display: none; }

  .nav-links {
    position: fixed !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: auto !important;
    width: min(80vw, 320px) !important; height: 100dvh !important; max-width: 320px !important;
    background: #0C0C10 !important; background-image: none !important;
    border: none !important; border-left: 3px solid var(--brand) !important;
    box-shadow: -30px 0 80px -10px rgba(0,0,0,.7) !important;
    display: flex !important; flex-direction: column !important;
    justify-content: flex-start !important; align-items: stretch !important;
    gap: 0 !important; padding: 80px 0 2rem 0 !important; margin: 0 !important;
    transform: translateX(100%); visibility: hidden; pointer-events: none;
    transition: transform .35s var(--ease), visibility .35s;
    z-index: 100 !important; overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-links.open { transform: translateX(0) !important; visibility: visible !important; pointer-events: auto !important; }

  body.nav-open::after {
    content: '' !important; display: block !important; position: fixed !important; inset: 0 !important;
    background: rgba(0,0,0,.6) !important; -webkit-backdrop-filter: blur(3px) !important; backdrop-filter: blur(3px) !important;
    z-index: 90 !important; pointer-events: none !important;
  }
  .nav { z-index: 110 !important; }

  .nav-links a {
    display: block !important; width: 100% !important;
    padding: 1.15rem 2rem !important; margin: 0 !important;
    font-family: var(--ff) !important; font-size: 1.12rem !important; font-weight: 500 !important;
    color: var(--ink) !important; text-align: left !important;
    background: transparent !important; border: none !important;
    border-bottom: 1px solid var(--line-soft) !important;
    transition: background .2s, color .2s, padding-left .2s;
  }
  .nav-links a:hover, .nav-links a:focus-visible, .nav-links a:active {
    color: var(--brand) !important; background: var(--brand-tint) !important; padding-left: 2.5rem !important;
  }
  .nav-links a::after { display: none !important; }
  .nav-links a.nav-cta {
    margin: 1rem 1.5rem 0 !important; padding: .95rem 1.5rem !important;
    background: linear-gradient(135deg, var(--brand-l), var(--brand-d)) !important; color: var(--on-brand) !important;
    text-align: center !important; font-weight: 700 !important; border-radius: 10px !important;
    border-bottom: none !important;
  }
  .nav-links a.nav-cta:hover { padding-left: 1.5rem !important; filter: brightness(1.06); }
  .nav-links .lang-switcher {
    align-self: center !important; margin: 1.5rem auto 0 !important; padding: 4px !important;
    background: var(--cream) !important; border: 1px solid var(--line) !important;
  }
  .nav-links .lang-btn { font-size: .85rem !important; padding: .5rem 1rem !important; }

  .nav-toggle { display: block; z-index: 65; position: relative; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--brand); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--brand); }

  .section { padding: 4.5rem 0; }
  .section-head { flex-wrap: wrap; gap: .75rem; margin-bottom: 2.5rem; }
  .section-rule { min-width: 60px; }

  .hero { padding: 7rem 0 3rem; min-height: 100svh; }
  .kicker { font-size: .66rem; padding: .45rem .9rem; text-align: center; line-height: 1.5; letter-spacing: .1em; }
  .hero-title { font-size: clamp(2.6rem, 12vw, 4.5rem); margin: 0 0 1.4rem; }
  .hero-roles { font-size: clamp(1.1rem, 4vw, 1.4rem); flex-direction: column; align-items: center; min-height: 0; gap: .25rem; }
  .role-rotator { position: relative; min-width: 0; width: 100%; text-align: center; min-height: 1.8em; }
  .role { position: absolute; left: 0; right: 0; top: 0; white-space: normal; }
  .role.active { position: relative; }
  .hero-sub { font-size: .98rem; margin-bottom: 2rem; max-width: 100%; padding: 0 .5rem; }
  .hero-cta { gap: .7rem; margin-bottom: 2.5rem; }
  .hero-meta { gap: 1.2rem 1.5rem; font-size: .8rem; }
  .scroll-cue { display: none; }

  .about-grid { gap: 2.5rem; }
  .lead-text { font-size: clamp(1.15rem, 4vw, 1.4rem); margin-bottom: 1.5rem; }
  .stat { padding: 1.4rem 1rem; }
  .stat-num { font-size: clamp(1.9rem, 8vw, 2.8rem); margin-bottom: .5rem; }
  .stat-label { font-size: .68rem; letter-spacing: .1em; }

  .pillars, .works-grid, .skills-grid, .edu-grid, .journal-grid { grid-template-columns: 1fr; gap: 1rem; }
  .journal-tagline { margin: -.5rem 0 2rem; font-size: .98rem; }
  .journal-card { padding: 1.5rem; }
  .article-modal { padding: 2rem 1rem; }
  .article-modal-inner { padding: 2rem 1.5rem 2.5rem; }
  .pillar { padding: 2rem 1.5rem; }
  .pillar-title { font-size: 1.3rem; }
  .skill-group, .edu-card, .work-card { padding: 1.5rem; }

  .timeline { padding-left: 1.5rem; }
  .timeline::before { left: 6px; }
  .tl-marker { left: -1.5rem; width: 14px; height: 14px; }
  .tl-item { padding-bottom: 2.5rem; }
  .tl-role { font-size: 1.15rem; }
  .tl-head { gap: .5rem; }

  .feature { padding: 2rem 1.5rem; gap: 2rem; }
  .feature-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .feature-tagline { font-size: 1.1rem; }
  .feature-body, .feature-bullets li { font-size: .95rem; }
  .device-frame { max-width: 100%; transform: rotateY(-3deg) rotateX(2deg); }

  .contact-grid { gap: 2.5rem; }
  .contact-form { padding: 1.5rem; }
  .section-contact { padding-bottom: 4.5rem; }
  .contact-lead h3 { font-size: clamp(1.5rem, 5vw, 2rem); }

  .footer { padding: 2.5rem 0 2rem; margin-top: 2rem; }
  .footer-tag { font-size: .88rem; }
}

@media (max-width: 480px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 6.5rem 0 2.5rem; }
  .kicker { font-size: .6rem; padding: .4rem .75rem; letter-spacing: .08em; }
  .hero-title { font-size: clamp(2.2rem, 13vw, 3.2rem); line-height: 1; }
  .hero-roles { font-size: 1.05rem; }
  .hero-sub { font-size: .92rem; }
  .hero-cta { flex-direction: column; width: 100%; max-width: 280px; margin-left: auto; margin-right: auto; margin-bottom: 2rem; }
  .hero-cta .btn { width: 100%; }
  .hero-meta { flex-direction: column; align-items: center; gap: .7rem; font-size: .78rem; }
  .stat-num { font-size: 1.65rem; }
  .stat-label { font-size: .64rem; }
  .feature { padding: 1.5rem 1.2rem; }
  .feature-bullets li, .tl-points li, .skill-group li { font-size: .88rem; }
  .pillar { padding: 1.75rem 1.25rem; }
  .pillar-icon { width: 48px; height: 48px; margin-bottom: 1rem; }
  .skill-group h4 { font-size: 1.1rem; }
  .edu-card h4 { font-size: 1.2rem; }
  .feature-eyebrow { letter-spacing: .12em; font-size: .65rem; }
  .form-row input, .form-row textarea { font-size: 16px; }   /* >=16px : iOS ne zoome pas */
}

@media (max-height: 540px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 5rem 0 2rem; }
  .scroll-cue { display: none; }
}

/* ─── Grands écrans / 4K — montée d'échelle nette ─── */
@media (min-width: 1800px) {
  :root { --container: min(1380px, 100% - 5rem); }
  html { font-size: 17px; }
  .section { padding: 8rem 0; }
}
@media (min-width: 2560px) {
  :root { --container: min(1640px, 100% - 7rem); }
  html { font-size: 19px; }
  .hero-inner { max-width: 1080px; }
  .section { padding: 10rem 0; }
}
@media (min-width: 3500px) {
  :root { --container: min(2200px, 100% - 9rem); }
  html { font-size: 23px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Language switcher
 * ═══════════════════════════════════════════════════════════════════════════ */
.lang-switcher {
  display: inline-flex; gap: 2px; margin-left: .25rem; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--cream);
}
.lang-btn {
  font-family: var(--fm); font-size: .72rem; letter-spacing: .04em;
  color: var(--ink-mute); background: transparent; border: none;
  padding: .35rem .7rem; border-radius: 999px; cursor: pointer;
  transition: all .2s var(--ease); line-height: 1;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active {
  color: var(--on-brand); background: linear-gradient(135deg, var(--brand-l), var(--brand-d));
  box-shadow: 0 4px 12px rgba(212,175,55,.4);
}
.lang-btn[data-lang="ar"] { font-family: var(--fh-ar); font-size: .85rem; }

/* ═══════════════════════════════════════════════════════════════════════════
 * RTL (Arabe) — propriétés logiques + quelques flips directionnels
 * ═══════════════════════════════════════════════════════════════════════════ */
[dir="rtl"] body { font-family: var(--fh-ar); }
[dir="rtl"] .serif,
[dir="rtl"] .section-title,
[dir="rtl"] .hero-title,
[dir="rtl"] .lead-text,
[dir="rtl"] .feature-title,
[dir="rtl"] .feature-tagline,
[dir="rtl"] .pillar-title,
[dir="rtl"] .tl-role,
[dir="rtl"] .work-title,
[dir="rtl"] .skill-group h4,
[dir="rtl"] .journal-title,
[dir="rtl"] .edu-card h4,
[dir="rtl"] .contact-lead h3,
[dir="rtl"] .article-modal h1,
[dir="rtl"] .brand,
[dir="rtl"] .footer-brand { font-family: var(--fh-ar); }

/* Chiffres / codes / chips restent LTR */
[dir="rtl"] .stat-num, [dir="rtl"] .edu-year, [dir="rtl"] .tl-dates,
[dir="rtl"] .work-year, [dir="rtl"] .feature-eyebrow, [dir="rtl"] .section-num,
[dir="rtl"] .pillar-tags li, [dir="rtl"] .feature-stack span, [dir="rtl"] .work-tags span,
[dir="rtl"] .lang-level, [dir="rtl"] .meta-item, [dir="rtl"] .mock-url,
[dir="rtl"] .journal-date, [dir="rtl"] .journal-reading, [dir="rtl"] .footer-copy {
  direction: ltr; unicode-bidi: isolate;
}

[dir="rtl"] .nav { flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: .25rem; }

[dir="rtl"] .timeline { padding-left: 0; padding-right: 2rem; }
[dir="rtl"] .timeline::before { left: auto; right: 8px; }
[dir="rtl"] .tl-marker { left: auto; right: -2rem; }
[dir="rtl"] .tl-points li { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .tl-points li::before { left: auto; right: 0; }

[dir="rtl"] .feature::before { left: auto; right: 0; }
[dir="rtl"] .feature-bullets li { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .feature-bullets li::before { left: auto; right: 0; }

[dir="rtl"] .skill-group li { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .skill-group li::before { left: auto; right: 0; }

[dir="rtl"] .section-rule { background: linear-gradient(-90deg, var(--line-2) 0%, transparent 100%); }
[dir="rtl"] .nav-links a:not(.nav-cta)::after { transform-origin: right; }

[dir="rtl"] .about-grid, [dir="rtl"] .feature, [dir="rtl"] .contact-grid { direction: rtl; }
[dir="rtl"] .form-row > span, [dir="rtl"] .contact-channels a { text-align: right; }

[dir="rtl"] .device-frame { transform: rotateY(7deg) rotateX(3deg); }
[dir="rtl"] .feature:hover .device-frame { transform: rotateY(3deg) rotateX(1deg); }
[dir="rtl"] .journal-card.featured::before { right: auto; left: 1rem; }

[dir="rtl"] .lead-text, [dir="rtl"] .about-lead p, [dir="rtl"] .feature-body,
[dir="rtl"] .pillar-body, [dir="rtl"] .tl-points li, [dir="rtl"] .feature-bullets li,
[dir="rtl"] .skill-group li { line-height: 1.85; }

@media (max-width: 768px) {
  [dir="rtl"] .nav-links {
    left: 0; right: auto; transform: translateX(-100%);
    border-left: none; border-right: 3px solid var(--brand);
    box-shadow: 24px 0 60px -10px rgba(0,0,0,.7);
  }
  [dir="rtl"] .nav-links.open { transform: translateX(0); }
}
