/* ==========================================================================
   Liam Ramirez — Portfolio
   Style : Swiss Modernism — grille rationnelle, typographie forte,
   un seul accent. Clair par défaut, sombre selon l'appareil.
   ========================================================================== */

:root{
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --text: #09090b;
  --text-dim: #52525b;
  --text-faint: #6b6b74;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eef3ff;
  --on-accent: #ffffff;
  --ok: #16a34a;
  --shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px -12px rgba(9,9,11,.12);

  --term-bg: #0f1115;
  --term-bar: #171a20;
  --term-text: #d4d4d8;
  --term-prompt: #7aa2ff;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --nav-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b0b0d;
    --surface: #131316;
    --surface-2: #1b1b1f;
    --text: #fafafa;
    --text-dim: #a1a1aa;
    --text-faint: #8b8b94;
    --border: #26262b;
    --border-strong: #34343a;
    --accent: #6b9bff;
    --accent-hover: #8fb3ff;
    --accent-soft: rgba(107,155,255,.12);
    --on-accent: #0b0b0d;
    --ok: #4ade80;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*,*::before,*::after{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }
body{
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,svg{ display: block; max-width: 100%; }
a{ color: inherit; text-decoration: none; }
ul,ol{ list-style: none; }
button{ font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong{ font-weight: 600; color: var(--text); }
sup{ font-size: .6em; }

:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link{
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus{ top: 1rem; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: 0 1.4rem;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--primary{ background: var(--text); color: var(--bg); }
.btn--primary:hover{ background: var(--accent); color: var(--on-accent); }
.btn--ghost{ border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn--ghost:hover{ border-color: var(--text); }
.btn--sm{ min-height: 40px; padding: 0 1.1rem; font-size: .88rem; }

/* ---------- Status dot ---------- */
.dot{ width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot--up{ background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }

/* ==========================================================================
   NAV (flottante)
   ========================================================================== */
.site-nav{
  position: fixed; top: 12px; left: 12px; right: 12px; z-index: 50;
  max-width: calc(var(--max) + 48px); margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.nav-inner{
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 .75rem 0 1rem;
}
.nav-logo{ display: flex; align-items: center; gap: .6rem; }
.nav-logo__mark{
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: -.02em;
}
.nav-links{ display: flex; gap: .25rem; margin-left: auto; }
.nav-links a{
  position: relative;
  padding: .5rem .75rem; border-radius: 999px;
  font-size: .9rem; font-weight: 500; color: var(--text-dim);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover{ color: var(--text); background: var(--surface-2); }
.nav-links a.is-active{ color: var(--text); background: var(--surface-2); }
.nav-cta{ flex: none; }

.nav-toggle{
  display: none; width: 44px; height: 44px; margin-left: auto;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  border-radius: 10px;
}
.nav-toggle span{ width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.nav-progress{ position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }

@media (max-width: 960px){
  .nav-cta{ display: none; }
  .nav-toggle{ display: flex; }
  .nav-links{
    position: fixed; top: calc(12px + var(--nav-h) + 8px); left: 12px; right: 12px;
    flex-direction: column; gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: .5rem; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav-links.is-open{ opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a{ padding: .85rem 1rem; font-size: 1rem; border-radius: 10px; }
  .site-nav{ overflow: visible; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 72px) 0 72px;
  overflow: hidden;
}
.hero-grid{
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  opacity: .7;
}
.hero-topology{
  position: absolute; right: -5%; top: 8%; width: 60%; height: 80%;
  color: var(--accent); opacity: .22; pointer-events: none;
}
.topo-pulse{ fill: var(--accent); }

.hero-inner{
  position: relative;
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3.5rem; align-items: center;
}
.hero-kicker{
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .9rem .4rem .75rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim);
  margin-bottom: 1.75rem;
}
.hero-title{
  font-family: var(--font-display);
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  font-weight: 700; line-height: .95; letter-spacing: -.045em;
}
.hero-role{
  margin-top: 1.25rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -.01em;
  color: var(--accent);
}
.hero-desc{ margin-top: 1.1rem; max-width: 34rem; color: var(--text-dim); font-size: 1.05rem; }
.hero-actions{ display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

/* Terminal — reste sombre dans les deux thèmes */
.terminal{
  background: var(--term-bg);
  border: 1px solid #23262d;
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(9,9,11,.45);
  overflow: hidden;
}
.terminal__bar{ display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem; background: var(--term-bar); border-bottom: 1px solid #23262d; }
.terminal__dot{ width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--r{ background: #ff5f57; } .terminal__dot--y{ background: #febc2e; } .terminal__dot--g{ background: #28c840; }
.terminal__title{ margin-left: auto; margin-right: auto; font-family: var(--font-mono); font-size: .75rem; color: #8a8f99; transform: translateX(-18px); }
.terminal__body{
  min-height: 250px; padding: 1.25rem 1.3rem;
  font-family: var(--font-mono); font-size: .84rem; line-height: 1.7;
  color: var(--term-text); white-space: pre-wrap;
}
.terminal__body .p{ color: var(--term-prompt); }
.terminal__body .o{ color: #9ca3af; }
.terminal__cursor{ display: inline-block; width: 8px; height: 1.05em; background: var(--term-prompt); vertical-align: text-bottom; animation: blink 1s steps(2) infinite; }
@keyframes blink{ to{ opacity: 0; } }

@media (max-width: 900px){
  .hero{ min-height: auto; }
  .hero-inner{ grid-template-columns: 1fr; gap: 2.75rem; }
  .hero-topology{ width: 100%; right: -30%; opacity: .14; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
main{ counter-reset: sec; }
.section{ padding: 112px 0; position: relative; }
.section--alt{ background: var(--surface); border-block: 1px solid var(--border); }
.section-inner{ max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

.section-title{
  counter-increment: sec;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.05;
}
.section-title::before{
  content: counter(sec, decimal-leading-zero) " /";
  display: block; margin-bottom: .9rem;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; letter-spacing: .02em;
  color: var(--accent);
}
.section-lede{ margin-top: .9rem; max-width: 40rem; color: var(--text-dim); font-size: 1.08rem; }
.section-lede--mono{ font-family: var(--font-mono); font-size: .88rem; color: var(--text-faint); }
.section-lede--mono::before{ content: "$ "; color: var(--accent); }

@media (max-width: 620px){ .section{ padding: 80px 0; } }

/* ==========================================================================
   À PROPOS
   ========================================================================== */
.about-layout{ display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start; }
.about-copy .section-lede{ font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; color: var(--text); letter-spacing: -.01em; margin-bottom: 1.5rem; }
.about-copy p + p{ margin-top: 1rem; }
.about-copy p:not(.section-lede){ color: var(--text-dim); max-width: 36rem; }

.about-panel{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.about-panel__head{
  display: flex; align-items: center; gap: .6rem;
  padding: .9rem 1.25rem; border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .78rem; color: var(--text-faint);
  background: var(--surface-2);
}
.about-facts{ padding: .25rem 1.25rem; }
.about-facts__row{ display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); font-size: .93rem; }
.about-facts__row:last-child{ border-bottom: 0; }
.about-facts dt{ color: var(--text-faint); }
.about-facts dd{ font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.about-facts dd a{ transition: color .2s var(--ease); }
.about-facts dd a:hover{ color: var(--accent); }
.about-panel__cta{ display: flex; margin: .5rem 1.25rem 1.25rem; }

@media (max-width: 860px){ .about-layout{ grid-template-columns: 1fr; gap: 2.5rem; } }

/* ==========================================================================
   COMPÉTENCES
   ========================================================================== */
.skills-grid{
  margin-top: 3rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
}
.skill-panel{
  padding: 1.75rem 1.6rem 2rem;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background-color .2s var(--ease);
}
.skill-panel:hover{ background: var(--bg); }
.skill-panel__title{
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em;
  margin-bottom: 1.25rem;
}
.skill-panel__icon{
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
}
.skill-list{ display: flex; flex-wrap: wrap; gap: .45rem; }
.skill-list li{
  padding: .32rem .7rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: .84rem; color: var(--text-dim);
}
.skill-list .dot{ display: none; }

@media (max-width: 960px){ .skills-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px){ .skills-grid{ grid-template-columns: 1fr; } }

/* ==========================================================================
   PARCOURS (expériences & formation)
   ========================================================================== */
.trace{ margin-top: 3rem; position: relative; display: grid; gap: 1.25rem; }
.hop{ display: grid; grid-template-columns: 56px 1fr; gap: 1.5rem; position: relative; }
.hop:not(:last-child)::before{
  content: ""; position: absolute; left: 27px; top: 56px; bottom: -1.25rem;
  width: 1px; background: var(--border-strong);
}
.hop__marker{
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  position: relative; z-index: 1;
}
.hop__num{ font-family: var(--font-mono); font-size: .82rem; font-weight: 500; color: var(--accent); }
.hop__card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.section--alt .hop__card, .section--alt .hop__marker{ background: var(--bg); }
.hop__card:hover{ border-color: var(--border-strong); box-shadow: var(--shadow); }
.hop__head{ display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.hop__role{ font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.hop__org{ margin-top: .25rem; color: var(--text-dim); font-size: .95rem; }
.hop__duration{
  flex: none; padding: .3rem .7rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; white-space: nowrap;
}
.hop__dates{ margin-top: .6rem; font-family: var(--font-mono); font-size: .8rem; color: var(--text-faint); }
.hop__list{ margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); display: grid; gap: .55rem; }
.hop__list li{ position: relative; padding-left: 1.2rem; color: var(--text-dim); font-size: .95rem; }
.hop__list li::before{ content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--accent); }

@media (max-width: 620px){
  .hop{ grid-template-columns: 1fr; gap: .75rem; }
  .hop:not(:last-child)::before, .hop__marker{ display: none; }
  .hop__card{ padding: 1.3rem 1.25rem; }
  .hop__head{ flex-direction: column-reverse; gap: .6rem; }
}

/* ==========================================================================
   PROJETS
   ========================================================================== */
.projects-grid{ margin-top: 3rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.project-card{
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.project-card:hover{ border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-card__icon{
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: var(--text); color: var(--bg);
  margin-bottom: 1.4rem;
}
.project-card__title{ font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }
.project-card__desc{ margin-top: .6rem; color: var(--text-dim); font-size: .95rem; flex: 1; }
.tag-row{ display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.tag-row li{ font-family: var(--font-mono); font-size: .74rem; color: var(--text-faint); padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 6px; }
.project-card__link{
  align-self: flex-start; margin-top: 1.4rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600; font-size: .9rem; color: var(--accent);
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease);
}
.project-card__link::after{ content: "→"; transition: transform .2s var(--ease); }
.project-card__link[target="_blank"]::after{ content: ""; }
.project-card__link:hover{ border-color: var(--accent); }
.project-card__link:hover::after{ transform: translateX(3px); }

@media (max-width: 760px){ .projects-grid{ grid-template-columns: 1fr; } }

/* ==========================================================================
   CERTIFICATIONS
   ========================================================================== */
.certs-row{ margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.cert-badge{
  display: flex; flex-direction: column; gap: 1.1rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color .2s var(--ease);
}
.cert-badge:hover{ border-color: var(--border-strong); }
.cert-badge__main{ display: flex; align-items: flex-start; gap: 1rem; flex: 1; }
.cert-badge__icon{
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
}
.cert-badge__title{ font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.cert-badge__sub{ margin-top: .2rem; color: var(--text-dim); font-size: .86rem; }
.cert-badge__year{ margin-left: auto; flex: none; padding-top: .15rem; font-family: var(--font-mono); font-size: .74rem; color: var(--text-faint); white-space: nowrap; }
.cert-badge__actions{ display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.cert-btn{
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: 0 .95rem; border-radius: 999px;
  font-size: .86rem; font-weight: 600; cursor: pointer;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.cert-btn:hover{ background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cert-btn--ghost{ background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.cert-btn--ghost:hover{ background: var(--surface); color: var(--text); border-color: var(--text); }
.cert-btn__meta{ font-family: var(--font-mono); font-size: .7rem; font-weight: 400; color: var(--text-faint); }

@media (max-width: 400px){ .certs-row{ grid-template-columns: 1fr; } }

/* Visionneuse d'attestation */
.cert-viewer{
  width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  overflow: hidden;
}
.cert-viewer[open]{ display: flex; flex-direction: column; animation: viewer-in .2s var(--ease); }
.cert-viewer::backdrop{ background: rgba(9,9,11,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes viewer-in{ from{ opacity: 0; transform: translateY(8px) scale(.98); } }
.cert-viewer__bar{
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem .75rem .75rem 1.25rem; border-bottom: 1px solid var(--border);
}
.cert-viewer__title{ flex: 1; min-width: 0; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert-viewer__close{
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%;
  transition: background-color .2s var(--ease);
}
.cert-viewer__close:hover{ background: var(--surface-2); }
.cert-viewer__body{
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1.25rem; display: grid; gap: 1rem; background: var(--surface-2);
}
.cert-viewer__body img{
  width: 100%; height: auto; margin: 0 auto; border-radius: 6px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.cert-viewer__body img.is-portrait{ max-width: 640px; }
.cert-viewer__page{ font-family: var(--font-mono); font-size: .72rem; color: var(--text-faint); text-align: center; margin-top: -.5rem; }
html.has-modal{ overflow: hidden; }
@media (max-width: 520px){
  .cert-viewer__dl-label{ display: none; }
  .cert-viewer__body{ padding: .75rem; }
}
@media (prefers-reduced-motion: reduce){ .cert-viewer[open]{ animation: none; } }

/* ==========================================================================
   VEILLE
   ========================================================================== */
.feed{ margin-top: 3rem; border-top: 1px solid var(--text); }
.feed-item{
  display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem;
  padding: 1.6rem 0; border-bottom: 1px solid var(--border);
}
.feed-item__tag{
  align-self: start; justify-self: start;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .06em;
  color: var(--accent); padding: .25rem .55rem; border: 1px solid currentColor; border-radius: 6px;
}
.feed-item__title{ font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; }
.feed-item__body p{ margin-top: .4rem; color: var(--text-dim); max-width: 46rem; }
.feed-item__body a{
  display: inline-block; margin-top: .7rem;
  font-size: .88rem; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border-strong); transition: border-color .2s var(--ease), color .2s var(--ease);
}
.feed-item__body a:hover{ color: var(--accent); border-color: var(--accent); }

@media (max-width: 620px){ .feed-item{ grid-template-columns: 1fr; gap: .75rem; } }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact{ background: var(--text); color: var(--bg); }
.contact .section-title::before{ color: #7aa2ff; }
@media (prefers-color-scheme: dark){ .contact{ background: var(--surface); color: var(--text); border-top: 1px solid var(--border); } }
.contact .section-lede{ color: color-mix(in srgb, currentColor 70%, transparent); }

.contact-grid{ margin-top: 3rem; display: grid; gap: 1.5rem; }
.contact-primary__label{ font-family: var(--font-mono); font-size: .78rem; opacity: .65; }
.contact-primary__row{ margin-top: .5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.contact-primary__value{
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 4.6vw, 2.75rem); letter-spacing: -.03em;
  overflow-wrap: anywhere;
  border-bottom: 2px solid transparent; transition: border-color .2s var(--ease);
}
.contact-primary__value:hover{ border-color: var(--accent); }
.copy-btn{
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: 0 .95rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  font-size: .85rem; font-weight: 500;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.copy-btn:hover{ border-color: currentColor; }
.copy-btn.is-copied{ background: var(--ok); border-color: var(--ok); color: #fff; }

.contact-cards{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.contact-card{
  display: flex; align-items: center; gap: 1rem;
  padding: 1.15rem 1.25rem; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  transition: border-color .2s var(--ease);
}
a.contact-card:hover{ border-color: currentColor; }
.contact-card__icon{
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 10px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.contact-card__label{ display: block; font-size: .8rem; opacity: .65; }
.contact-card__value{ display: block; font-weight: 600; }

.contact-footer{
  margin-top: 1rem; padding-top: 1.75rem;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
}
.social-row{ display: flex; gap: .6rem; }
.social-icon{
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.social-icon:hover{ border-color: var(--accent); color: var(--accent); }
.contact .btn--primary{ background: var(--accent); color: #fff; }
.contact .btn--primary:hover{ background: var(--accent-hover); }
@media (prefers-color-scheme: dark){ .contact .btn--primary{ color: #0b0b0d; } }

@media (max-width: 620px){ .contact-cards{ grid-template-columns: 1fr; } }

/* ==========================================================================
   FOOTER & TO-TOP
   ========================================================================== */
.site-footer{ padding: 1.75rem 0; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text-faint); }
.site-footer__inner{ display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a:hover{ color: var(--text); }

.to-top{
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), border-color .2s;
}
.to-top.is-visible{ opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover{ border-color: var(--text); }

/* ==========================================================================
   APPARITION AU DÉFILEMENT
   ========================================================================== */
.reveal{ opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in{ opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity: 1; transform: none; } }
