/* ==========================================================
   Nathan Fraysse — portfolio
   Le paysage (canvas) change d'heure avec le scroll :
   fin d'après-midi → nuit étoilée → aube.
   ========================================================== */

:root {
  --ink: #22122E;
  --paper: #F4EEF7;
  --fox: #F2711C;
  --fox-hot: #FF8A3D;
  --fox-deep: #C9530E;
  --night: #0D1028;
  --panel: rgba(13, 16, 42, 0.74);
  --panel-strong: rgba(15, 18, 48, 0.92);
  --line-light: rgba(244, 238, 247, 0.13);
  --soft-light: rgba(244, 238, 247, 0.7);

  /* Couleur de texte « au-dessus du ciel », basculée par script.js */
  --fg: var(--ink);
  --fg-soft: rgba(34, 18, 46, 0.74);
  --nav-bg: rgba(255, 246, 238, 0.55);
  --nav-line: rgba(34, 18, 46, 0.12);

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

body[data-light="night"] {
  --fg: var(--paper);
  --fg-soft: var(--soft-light);
  --nav-bg: rgba(13, 16, 42, 0.55);
  --nav-line: rgba(244, 238, 247, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #0D1028;
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  transition: color .6s ease;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--fox-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Scène ---------- */

#sky, #ridge {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#sky { z-index: 0; }
#ridge { z-index: 2; }

main { position: relative; }

/* Tout le contenu passe au-dessus de la crête, sauf le grand nom du héros */
section, .hero-intro { position: relative; z-index: 3; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 14px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.brand, .nav-links, .nav-cv {
  background: var(--nav-bg);
  border: 1px solid var(--nav-line);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-radius: 999px;
  transition: background .6s ease, border-color .6s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.brand-mark { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  margin-left: auto;
  padding: 4px;
}
.nav-links a {
  display: block;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: background .2s ease;
}
.nav-links a:hover { background: rgba(242, 113, 28, 0.16); }
.nav-links a[aria-current="true"] { background: var(--fox); color: #fff; }

.nav-cv {
  padding: 8px 18px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.nav-cv:hover { background: var(--fox); color: #fff; border-color: var(--fox); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  background: none;
  cursor: pointer;
  transition: transform .2s var(--ease-out), background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: #FFF6EC; }
.btn-ink:hover { background: #3A1F4A; }
.btn-ghost { border-color: rgba(34, 18, 46, .35); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(34, 18, 46, .06); }
.btn-fox { background: var(--fox); color: #fff; }
.btn-fox:hover { background: var(--fox-deep); }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--fox-hot);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Héros ---------- */

.hero {
  position: relative; /* sans z-index : le nom peut passer sous la crête */
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gutter);
  color: var(--ink);
}

.hero-intro {
  padding-top: max(110px, 17vh);
  max-width: 30rem;
}

.hero-lede {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.45;
  font-weight: 500;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 600;
}
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2F9E5B;
  box-shadow: 0 0 0 0 rgba(47, 158, 91, .5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 91, .55); }
  80%, 100% { box-shadow: 0 0 0 10px rgba(47, 158, 91, 0); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* Le nom se tient derrière la crête du premier plan */
.hero-name {
  position: absolute;
  z-index: 1;
  left: calc(var(--gutter) - 0.04em);
  bottom: 8vh;
  bottom: 8svh;
  font-family: var(--display);
  font-weight: 900;
  font-size: min(20vw, 28vh);
  line-height: .8;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
}
.hero-name .line { display: block; }
.hero-name .line > span {
  display: inline-block;
  animation: rise 1.5s var(--ease-out) both;
}
.hero-name .line:nth-child(1) > span { animation-delay: .35s; }
.hero-name .line:nth-child(2) > span { animation-delay: .5s; }
@keyframes rise {
  from { transform: translateY(45%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.hero-intro { animation: fade 1s ease .9s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- À propos ---------- */

.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26vh var(--gutter) 22vh;
}
.about-text {
  max-width: 22ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: .98;
  letter-spacing: .002em;
}
.about-text a {
  color: inherit;
  text-decoration-color: var(--fox);
  text-decoration-thickness: .08em;
  text-underline-offset: .1em;
}
.about-text a:hover { color: var(--fox-deep); }
body[data-light="night"] .about-text a:hover { color: var(--fox-hot); }
.about-sub {
  max-width: 46ch;
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--fg-soft);
}

/* ---------- Têtes de section ---------- */

.section-head {
  max-width: var(--max);
  margin: 0 auto 40px;
  padding: 0 var(--gutter);
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 8rem);
  line-height: .86;
}
.section-head p {
  max-width: 52ch;
  margin-top: 16px;
  color: var(--fg-soft);
}

/* ---------- Compétences ---------- */

.skills { padding: 6vh 0 18vh; }

.skills-cols {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skills-col {
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: 20px;
  padding: 22px 10px 12px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.skills-col h3 {
  padding: 0 14px 12px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--soft-light);
}

.skill-row {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(7.5rem, auto) 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: none;
  border: 0;
  border-top: 1px solid var(--line-light);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease;
}
.skill-list li:first-child .skill-row { border-top-color: transparent; }
.skill-row:hover { background: rgba(242, 113, 28, .12); }
.skill-row:hover .dot { background: var(--fox-hot); }

.skill-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(244, 238, 247, .92);
  padding: 4px;
}
.skill-icon img { width: 100%; height: 100%; object-fit: contain; }
.skill-icon.letter {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
}
.skill-name { font-weight: 600; }
.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fox);
  transition: background .2s ease;
}
.skill-count {
  font-size: .88rem;
  color: var(--soft-light);
  font-variant-numeric: tabular-nums;
}

/* ---------- Projets à la une ---------- */

.featured { padding: 4vh 0 14vh; }

.feat {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9vh var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  color: var(--paper);
}
.feat:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feat:nth-child(even) .feat-copy { order: 2; }

.feat-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.feat-head img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(244, 238, 247, .1);
}
.feat-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.8rem, 5.4vw, 4.6rem);
  line-height: .9;
}
.feat-meta {
  margin-top: 16px;
  color: var(--soft-light);
  font-size: .95rem;
}
.feat-desc {
  margin-top: 14px;
  max-width: 54ch;
  color: rgba(244, 238, 247, .88);
}
.feat .chips { margin-top: 20px; }
.feat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn-line {
  border-color: rgba(244, 238, 247, .3);
  color: var(--paper);
  min-height: 44px;
  padding: 10px 18px;
}
.btn-line:hover { border-color: var(--fox-hot); color: #fff; background: rgba(242, 113, 28, .14); }
.btn-line.primary { background: var(--fox); border-color: var(--fox); color: #fff; }
.btn-line.primary:hover { background: var(--fox-deep); border-color: var(--fox-deep); }

.feat-visual {
  position: relative;
  will-change: transform;
}

/* Fenêtre de navigateur pour les captures paysage */
.browser {
  border-radius: 14px;
  overflow: hidden;
  background: #12152F;
  border: 1px solid rgba(244, 238, 247, .14);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .3);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: #1A1D3D;
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(244, 238, 247, .22);
}
.browser-bar i:first-child { background: var(--fox); }
.browser-url {
  margin-left: 12px;
  flex: 1;
  max-width: 320px;
  height: 20px;
  border-radius: 6px;
  background: rgba(244, 238, 247, .08);
  font-size: .72rem;
  line-height: 20px;
  padding: 0 10px;
  color: var(--soft-light);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.browser img { width: 100%; height: auto; }

/* Téléphones pour les captures portrait */
.phones {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
}
.phone {
  width: min(42%, 250px);
  aspect-ratio: 9 / 19;
  border-radius: 34px;
  border: 7px solid #0A0C20;
  background: #0A0C20;
  overflow: hidden;
  box-shadow: 0 40px 70px -28px rgba(0, 0, 0, .75), 0 0 0 1px rgba(244, 238, 247, .12);
}
.phone:nth-child(2) { margin-top: 56px; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips li {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  background: rgba(244, 238, 247, .09);
  border: 1px solid rgba(244, 238, 247, .12);
  color: rgba(244, 238, 247, .9);
}

/* ---------- Grille de projets ---------- */

.projects { padding: 6vh 0 16vh; }

.filters {
  max-width: var(--max);
  margin: 0 auto 26px;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 18px 26px;
  color: var(--paper);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  font-size: .85rem;
  color: var(--fg-soft);
  font-weight: 500;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-light);
}
.seg button {
  border: 0;
  background: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--paper);
  transition: background .2s ease, color .2s ease;
}
.seg button:hover { background: rgba(244, 238, 247, .08); }
.seg button[aria-pressed="true"] { background: var(--fox); color: #fff; }

select {
  appearance: none;
  min-width: 200px;
  padding: 10px 40px 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23F4EEF7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px,
    var(--panel);
  color: var(--paper);
  cursor: pointer;
}
select option { background: #12152F; color: var(--paper); }

.filter-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  min-height: 44px;
}
#result-count {
  color: var(--fg-soft);
  font-variant-numeric: tabular-nums;
}

.grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 22px;
}
.grid li { animation: cardIn .45s var(--ease-out) both; }
@keyframes cardIn {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}

.card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 18px;
  text-align: left;
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: 18px;
  cursor: pointer;
  transition: border-color .25s ease, transform .35s var(--ease-out), background .25s ease;
}
.card:hover {
  border-color: rgba(242, 113, 28, .6);
  background: var(--panel-strong);
  transform: translateY(-4px);
}
.card:hover .thumb-fg { transform: scale(1.035); }

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 11px;
  overflow: hidden;
  background: #0A0C20;
}
.thumb-bg {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(18px) brightness(.5) saturate(1.2);
}
.thumb-fg {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .5s var(--ease-out);
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(10, 12, 32, .78);
  color: var(--fox-hot);
  border: 1px solid rgba(242, 113, 28, .45);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 6px 0;
}
.card-head img {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(244, 238, 247, .1);
}
.card-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.65rem;
  line-height: 1;
}
.card-plat {
  font-size: .85rem;
  color: var(--soft-light);
}
.card .chips { margin: 14px 6px 0; }
.card .chips li { font-size: .78rem; padding: 3px 9px; }

.grid-empty {
  max-width: var(--max);
  margin: 30px auto 0;
  padding: 0 var(--gutter);
  color: var(--fg-soft);
}
.data-note {
  max-width: var(--max);
  margin: 28px auto 0;
  padding: 0 var(--gutter);
  font-size: .85rem;
  color: var(--fg-soft);
}

/* ---------- Modale projet ---------- */

.modal {
  width: min(1120px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: 22px;
  background: #0F1230;
  color: var(--paper);
  overflow: auto;
  overscroll-behavior: contain;
}
.modal[open] { animation: modalIn .4s var(--ease-out); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal::backdrop {
  background: rgba(5, 6, 20, .72);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  background: rgba(10, 12, 32, .8);
  cursor: pointer;
}
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { border-color: var(--fox-hot); color: var(--fox-hot); }

.gallery {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.gallery-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #070A1E;
}
.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .25s ease;
}
.gallery-stage img.swap { opacity: 0; }
.g-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  background: rgba(10, 12, 32, .75);
  cursor: pointer;
}
.g-nav svg { width: 20px; height: 20px; }
.g-nav:hover { border-color: var(--fox-hot); color: var(--fox-hot); }
.g-prev { left: 10px; }
.g-next { right: 10px; }
.g-nav[hidden] { display: none; }

.g-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.g-thumbs button {
  flex: none;
  width: 76px;
  height: 54px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #070A1E;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s ease, border-color .2s ease;
}
.g-thumbs button:hover { opacity: .9; }
.g-thumbs button[aria-current="true"] { border-color: var(--fox); opacity: 1; }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.modal-info {
  padding: 30px 28px 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.mi-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 48px;
}
.mi-icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(244, 238, 247, .1);
}
.mi-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: .95;
}
.mi-meta { color: var(--soft-light); font-size: .92rem; margin-top: 4px; }
.mi-desc { color: rgba(244, 238, 247, .9); }
.mi-tags h3 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--soft-light);
  margin: 0 0 8px;
}
.mi-tags .chips + h3 { margin-top: 16px; }
.mi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

/* ---------- Contact ---------- */

.contact {
  min-height: 100vh;
  min-height: 100svh;
  padding: max(110px, 15vh) 0 44vh;
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}
.contact-copy h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 8vw, 7.4rem);
  line-height: .86;
}
.contact-copy > p {
  margin-top: 18px;
  max-width: 40ch;
  color: var(--fg-soft);
  font-size: 1.1rem;
}

.contact-links { margin-top: 30px; }
.contact-links li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--nav-line);
}
.contact-links li:last-child { border-bottom: 1px solid var(--nav-line); }
.contact-links a {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  text-decoration: none;
  min-width: 0;
}
.cl-kind { font-weight: 600; }
.cl-value {
  color: var(--fg-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s ease;
}
.contact-links a:hover .cl-value { color: var(--fox-deep); }
body[data-light="night"] .contact-links a:hover .cl-value { color: var(--fox-hot); }

.copy-btn {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--nav-line);
  background: var(--nav-bg);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--fox); }

.contact-form {
  position: relative;
  padding: 26px;
  border-radius: 22px;
  background: rgba(255, 249, 244, .78);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px -30px rgba(34, 18, 46, .45);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(34, 18, 46, .18);
  background: rgba(255, 255, 255, .85);
  color: var(--ink);
  resize: vertical;
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--fox); outline: none; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #C0362C; }
.form-error { color: #B42318; font-weight: 600; font-size: .92rem; }
.form-error:empty { display: none; }

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity .35s ease, filter .35s ease, transform .45s var(--ease-out);
}
.form-fields[hidden] { display: none; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.form-hint {
  flex: 1 1 200px;
  font-size: .86rem;
  line-height: 1.45;
  color: rgba(34, 18, 46, .66);
}
/* sans animation, pas de promesse d'animation */
@media (prefers-reduced-motion: reduce) {
  .form-hint { display: none; }
}
.contact-form.is-sending .form-fields {
  opacity: 0;
  filter: blur(6px);
  transform: scale(.96);
  pointer-events: none;
}

/* champ piège anti-spam, invisible pour les humains */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* bouton pendant l'envoi */
.btn.is-loading { cursor: progress; opacity: .92; }
.btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* succès : cercle puis coche qui se tracent */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 8px 8px;
  outline: none;
}
.form-success[hidden] { display: none; }
.success-check {
  width: 74px;
  height: 74px;
  margin-bottom: 6px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-check circle {
  stroke: var(--fox);
  stroke-width: 3;
  stroke-dasharray: 145;
  stroke-dashoffset: 145;
  transform: rotate(-90deg);
  transform-origin: center;
  animation: draw .7s var(--ease-out) .1s forwards;
}
.success-check path {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
  animation: draw .45s var(--ease-out) .6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  animation: rise .7s var(--ease-out) .35s both;
}
.form-success p {
  max-width: 34ch;
  color: rgba(34, 18, 46, .74);
  animation: fade .6s ease .55s both;
}
.form-success .btn { margin-top: 8px; animation: fade .6s ease .8s both; }

/* l'enveloppe */
.envelope {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.envelope.in { opacity: 1; transform: none; }
.envelope svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 14px 18px rgba(34, 18, 46, .28)); }
.env-back { fill: #E9DCD2; }
.env-page rect { fill: #FFFDF9; }
.env-page path { stroke: #D8CCD9; stroke-width: 3; stroke-linecap: round; }
.env-page { transform: translateY(-26px); transition: transform .45s cubic-bezier(.5, 0, .3, 1); }
.envelope.page-in .env-page { transform: translateY(28px); }
.env-front { fill: #FFF8EF; }
.env-fold { stroke: #E6D8CE; stroke-width: 1.5; fill: none; }
.env-flap-back {
  fill: #E2D2C6;
  transform-box: fill-box;
  transform-origin: 50% 0;
  transform: scaleY(-1);
}
.envelope.closed .env-flap-back { opacity: 0; }
.env-flap {
  opacity: 0;
  fill: #F6EAE0;
  stroke: #E6D8CE;
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: 50% 0;
  transform: scaleY(-1);
  transition: transform .32s cubic-bezier(.6, 0, .4, 1);
}
.envelope.closed .env-flap { opacity: 1; transform: scaleY(1); }
.env-seal { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .3s cubic-bezier(.34, 1.8, .64, 1); }
.envelope.sealed .env-seal { transform: scale(1); }
.env-seal circle { fill: var(--fox); }
.env-seal path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* le renard qui vient chercher la lettre */
.fox-actor {
  position: fixed;
  z-index: 41;
  width: 0;
  height: 0;
  pointer-events: none;
}
.fox-flip { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fox-actor.facing-right .fox-flip { transform: scaleX(-1); }
.fox-svg { position: absolute; overflow: visible; }
.fox-actor[data-pose="sit"] .pose-run,
.fox-actor[data-pose="run"] .pose-sit { display: none; }
.fox-letter { display: none; }
.fox-actor.has-letter .fox-letter { display: inline; }
.legB { opacity: 0; }
.fox-actor.running .fox-svg { animation: gallop-bob .26s ease-in-out infinite; }
.fox-actor.running .legA { animation: gait .26s steps(1) infinite; }
.fox-actor.running .legB { animation: gait .26s steps(1) -.13s infinite; }
@keyframes gallop-bob { 50% { transform: translateY(-6%); } }
@keyframes gait { 0% { opacity: 1; } 50% { opacity: 0; } }
.fox-dust {
  position: fixed;
  z-index: 40;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 240, 230, .55);
  pointer-events: none;
}

.footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: .85rem;
  color: rgba(244, 238, 247, .7);
}
.footer-mark {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
}

.noscript {
  position: relative;
  z-index: 5;
  padding: 20px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .feat, .feat:nth-child(even) { grid-template-columns: 1fr; }
  .feat:nth-child(even) .feat-copy { order: 0; }
  .skills-cols { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-info { padding: 6px 20px 24px; }
  .filter-meta { margin-left: 0; width: 100%; }
}

@media (max-width: 640px) {
  .nav { top: 10px; gap: 8px; }
  .brand span { display: none; }
  .brand { padding: 6px; }
  .nav-links a { padding: 7px 11px; font-size: .9rem; }
  .nav-links li:first-child { display: none; }
  .hero-intro { padding-top: 96px; }
  .hero-name { font-size: 21vw; bottom: 12svh; }
  .about { padding: 18vh var(--gutter) 14vh; }
  .skill-row { grid-template-columns: 28px 1fr auto; }
  .skill-row .dots { grid-column: 2 / 4; grid-row: 2; }
  .seg button { padding: 7px 11px; }
  select { width: 100%; }
  .filter-group:has(select) { width: 100%; }
  .phone { border-radius: 26px; border-width: 5px; }
  .contact-form { padding: 20px; }
  .modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}
