/* Layout : colonne éditoriale unique, sections en bandes, index de section en marge mono */
:root {
  /* Charte (novembre 2026) : vert forêt et orange, comme la carte de visite */
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --muted: #57534E;
  --line: #E4DED1;
  --accent: #14532D;
  --accent-ink: #FFFFFF;
  --orange: #B45309;
  --sun: #D97706;
  --ok: #15803D;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1A11; --surface: #11241A; --ink: #F3EEE3; --muted: #A9B4AB;
    --line: #22392B; --accent: #86EFAC; --accent-ink: #052E16; --orange: #F59E0B; --sun: #F59E0B; --ok: #4ADE80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1A11; --surface: #11241A; --ink: #F3EEE3; --muted: #A9B4AB;
  --line: #22392B; --accent: #86EFAC; --accent-ink: #052E16; --orange: #F59E0B; --sun: #F59E0B; --ok: #4ADE80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;   /* sans ça, la marge de 8 px du navigateur fait « sauter » la barre du haut au défilement */
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1150px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p, ul { margin: 0; }

/* Nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
nav.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--orange); }
nav.top ul { display: flex; gap: 22px; list-style: none; padding: 0; font-size: 15px; }
nav.top ul a { text-decoration: none; color: var(--muted); }
nav.top ul a:hover { color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { content: ""; display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease, background .2s ease; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
nav.top.open .menu-btn span { background: transparent; }
nav.top.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
nav.top.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  nav.top .wrap { flex-wrap: wrap; }
  nav.top ul { display: none; width: 100%; flex-direction: column; gap: 0; padding-bottom: 8px; }
  nav.top.open ul { display: flex; }
  nav.top ul a { display: block; padding-block: 14px; border-top: 1px solid var(--line); font-size: 18px; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
}

/* Hero */
.hero { padding-block: 56px 56px; display:grid; grid-template-columns:1.4fr 350px; align-items:center; gap: 48px; }
.hero-text { display: grid; gap: 26px; min-width: 0; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 40px 48px; } .portrait { order: -1; width: 160px; } }
.eyebrow { font-family: var(--font-mono); font-size: 14px; color: var(--muted); letter-spacing: 0.04em; }
.hero h1 { font-size: clamp(52px, 9.5vw, 120px); font-weight: 800; line-height: 0.92; letter-spacing: -0.045em; }
.hero h1 .last { color: var(--accent); display: block; }
.hero .lede { max-width: 54ch; font-size: clamp(18px, 2.1vw, 21px); color: var(--muted); }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.portrait { position: relative; width: 100%; max-width: 100%; }
.portrait img { display: block; width: 100%; aspect-ratio: 440 / 470; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
.portrait::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 2px solid var(--accent); border-radius: 18px; z-index: -1; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: 500 15px var(--font-body);
  padding: 12px 20px; border-radius: 5px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .15s ease;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Sections */
section.band { border-top: 1px solid var(--line); }
section.band > .wrap { padding-block: 64px; display: grid; grid-template-columns: 180px 1fr; gap: 32px; }
@media (max-width: 760px) { section.band > .wrap { grid-template-columns: 1fr; gap: 20px; padding-block: 48px; } }
.label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 8px; }
.label b { color: var(--orange); font-weight: 500; }
.body { min-width: 0; display: grid; gap: 28px; }
.body h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.prose { display: grid; gap: 16px; max-width: 64ch; }
.goal { border-left: 3px solid var(--accent); padding-left: 16px; max-width: 60ch; }
.goal b { display: block; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 500; margin-bottom: 4px; }

/* Chiffres */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--surface); padding: 20px; }
.facts b { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 600px) { .duo { grid-template-columns: 1fr; } }
.duo h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.duo ul { padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.duo li b { color: var(--ink); font-weight: 600; }

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .skills { grid-template-columns: 1fr; } }
.skills h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-family: var(--font-mono); font-size: 13px; padding: 5px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.soft { border-top: 1px dashed var(--line); padding-top: 24px; }
.soft h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.soft .chips span { font-family: var(--font-body); font-size: 14px; border-radius: 999px; padding: 5px 12px; }

/* Projets */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }
.project {
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; transition: transform .2s ease, border-color .2s ease;
}
.project:hover { transform: translateY(-4px); border-color: var(--accent); }
.project canvas { width: 100%; aspect-ratio: 16 / 8; display: block; max-width: 100%; }
.project .info { padding: 20px; display: grid; gap: 10px; align-content: start; }
.project .meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pill { font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor; }
.pill.live { color: var(--ok); }
/* Statut d'un projet (page détails) : mêmes couleurs que sur les cartes */
.pill.progress { background: var(--sun); border-color: var(--sun); color: #1D1606; }
.pill.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.project h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.project .tag { font-style: italic; color: var(--ink); font-size: 15px; }
.project p { color: var(--muted); font-size: 15px; }
.project .chips span { font-size: 12px; background: var(--bg); }
a.project { color: inherit; text-decoration: none; cursor: pointer; }
.project .more { margin-top: 4px; font-weight: 600; font-size: 15px; color: var(--accent); }
.project:hover .more { text-decoration: underline; text-underline-offset: 4px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }
.service { background: var(--surface); padding: 26px; display: grid; gap: 10px; align-content: start; }
.service h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.service p { color: var(--muted); font-size: 15px; }
.svc-tag { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }

/* Page détails-projet */
#detail { padding-block: 32px 72px; }
.back { display: inline-flex; align-items: center; gap: 8px; font: 500 15px var(--font-body); color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 0; }
.back:hover { color: var(--accent); }
/* Flèches SVG (retour, haut de page, projet précédent / suivant) : taille et couleur du texte */
.icon-arrow { width: 1.1em; height: 1.1em; flex: none; }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
.d-head { display: grid; gap: 16px; padding-block: 28px 32px; }
.d-head h1 { font-size: clamp(44px, 8vw, 96px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.d-head .tag { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 52ch; }
.d-cover { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.d-cover canvas { display: block; width: 100%; aspect-ratio: 16 / 6; max-width: 100%; }
.d-grid { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding-top: 40px; }
@media (max-width: 820px) { .d-grid { grid-template-columns: 1fr; gap: 32px; } }
.d-main { display: grid; gap: 36px; min-width: 0; align-content: start; }
.d-main h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.d-main p { max-width: 64ch; }
.d-main ul { padding-left: 20px; display: grid; gap: 6px; max-width: 64ch; }
.d-side { display: grid; gap: 0; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.d-side div { padding-block: 14px; border-bottom: 1px solid var(--line); }
.d-side div:last-child { border-bottom: 0; }
.d-side dt { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.d-side dd { margin: 4px 0 0; font-weight: 500; }
.d-todo { border: 1px dashed var(--line); border-radius: 14px; padding: 20px; color: var(--muted); font-size: 15px; }
.d-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.d-nav a { text-decoration: none; display: grid; gap: 2px; }
.d-nav a small { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.d-nav .next small { justify-content: flex-end; }
.d-nav a span { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.d-nav a:hover span { color: var(--accent); }
.d-nav .next { text-align: right; margin-left: auto; }

/* Visuels projet */
.cover { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.cover img, .cover canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover.logo-cover { background: #FFFFFF; }
.cover.logo-cover img { object-fit: contain; padding: 18px; }
.d-cover img { display: block; width: 100%; height: auto; max-width: 100%; }
.d-cover.logo-cover { background: #FFFFFF; display: grid; place-items: center; }
.d-cover.logo-cover img { width: auto; max-height: 360px; padding: 24px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
/* Visuels d'un projet : grille de vignettes de même taille, sans légende ; un clic ouvre l'image en grand */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery .shot { display: block; width: 100%; padding: 0; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #FFFFFF; cursor: zoom-in; }
.gallery .shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .3s ease; }
.gallery .shot:hover img { scale: 1.04; }
.gallery .shot.logo img { object-fit: contain; padding: 12%; }

.lightbox { width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; background: #FFFFFF; overflow: hidden; box-shadow: 0 24px 60px rgb(28 25 23 / .18); }
.lightbox::backdrop { background: rgb(255 255 255 / .82); backdrop-filter: blur(8px); }
.lightbox img { display: block; width: 100%; max-height: calc(100vh - 32px); object-fit: contain; }
.lightbox button { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(28 25 23 / .75); color: #FFFFFF; font-size: 22px; line-height: 1; cursor: pointer; }
.steps { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 10px !important; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(step); font-family: var(--font-mono); font-size: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.steps b { display: block; }

/* Page tous les projets */
#all { padding-block: 32px 72px; }
.eyebrow { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { font: 500 14px var(--font-body); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.all-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .all-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .all-grid { grid-template-columns: 1fr; } }

/* Parcours */
.track h3.group { font-family: var(--font-mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.timeline { list-style: none; padding: 0; display: grid; }
.timeline > li { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 3px; }
.timeline time small { display: block; color: var(--muted); font-size: 12px; }
.timeline h4 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0; text-wrap: balance; }
.timeline .where { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.timeline .where b { color: var(--ink); font-weight: 600; }
.timeline ul { padding-left: 18px; display: grid; gap: 4px; font-size: 16px; max-width: 70ch; }
@media (max-width: 520px) { .timeline > li { grid-template-columns: 1fr; gap: 6px; } }

/* Contact */
.contact h2 { font-size: clamp(36px, 7vw, 76px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; }
.mailrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mail { font-family: var(--font-mono); font-size: clamp(14px, 1.6vw, 16px); padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); user-select: all; overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; }
.socials a { color: var(--muted); text-underline-offset: 4px; }
.socials a:hover { color: var(--accent); }

footer .wrap { padding-block: 28px 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); font-family: var(--font-mono); }

/* Cartes projet : visuel flouté, catégories et statut en surimpression */
.pcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 14px 34px -18px rgba(28, 25, 23, .3); }
.pcard .pc-media { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: #EDE8DC; }
.pcard .pc-media img, .pcard .pc-media canvas { display: block; width: 100%; height: 100%; object-fit: cover;  transform: scale(1.06); transition: transform .4s ease; }
.pcard .pc-media.logo-cover { background: #FFFFFF; }
.pcard .pc-media.logo-cover img { object-fit: contain; padding: 22px; }
.pcard .pc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, .1) 45%, rgba(255, 255, 255, .3) 100%); transition: opacity .3s ease; }
.pcard:hover .pc-media img, .pcard:hover .pc-media canvas { filter: none; transform: scale(1.02); }
.pcard:hover .pc-media::after { opacity: .55; }
.pc-cats { position: absolute; z-index: 1; top: 14px; left: 14px; right: 110px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #FFFFFF; padding: 2px 10px; border-radius: 8px; background: rgba(20, 83, 45, .78); backdrop-filter: blur(6px); width: fit-content; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 130px); }
.pc-status { position: absolute; z-index: 1; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; padding: 2px 10px; border-radius: 8px; background: var(--sun); color: #1D1606; }
.pc-status.done { background: var(--ok); color: #fff; }
.pc-icon { position: absolute; z-index: 1; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 14px; display: grid; place-items: center; color: #1C1917; background: rgba(255, 255, 255, .7); border: 1px solid rgba(28, 25, 23, .12); backdrop-filter: blur(8px); font-family: var(--font-mono); font-size: 16px; transition: transform .25s ease, background .25s ease; }

.pc-body { padding: 22px 22px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pc-body h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.pc-body h3 a { text-decoration: none; }
.pc-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.pc-body p { color: var(--muted); font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-body .chips span { font-size: 12px; background: var(--bg); }
.pc-foot { margin: 16px 22px 0; padding: 14px 0 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pc-foot .go { font-weight: 400; font-size: 15px; color: var(--accent); }
.pcard:hover .pc-foot .go { text-decoration: underline; text-underline-offset: 4px; }
.pc-foot .code { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); text-decoration: none; }
.pc-foot .code:hover { color: var(--ink); }
.pc-foot .code.off { opacity: .6; }
.pc-foot svg, .social svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Réseaux sociaux */
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .social-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .social-grid { grid-template-columns: 1fr; } }
.social { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .15s ease; min-width: 0; }
.social:hover { border-color: var(--accent); }
.social .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #FFFFFF; flex-shrink: 0; }
.social .ico svg { width: 20px; height: 20px; }
.social b { display: block; font-size: 15px; font-weight: 600; }
.social small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social > span:last-child { min-width: 0; }

/* Animations */
/* translate / scale / rotate (et non transform) pour ne pas bloquer les effets de survol */
@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes slide-in { from { opacity: 0; translate: -28px 0; } to { opacity: 1; translate: 0 0; } }

/* Ouverture de la page : l'en-tête se compose élément par élément */
.hero .eyebrow { animation: rise .6s ease-out both; }
.hero h1 { animation: slide-in .8s .12s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 .last { animation: slide-in .8s .26s cubic-bezier(.2, .7, .2, 1) both; }
.hero .lede { animation: rise .7s .38s ease-out both; }
.hero .cta { animation: rise .7s .5s ease-out both; }

/* Changement de page (accueil, tous les projets, détails) */
#home:not([hidden]), #all:not([hidden]), #detail:not([hidden]) { animation: rise .45s ease-out both; }
#all .pcard { animation: rise .55s ease-out both; }
.projects .pcard:nth-child(2) { animation-delay: .07s; }
.projects .pcard:nth-child(3) { animation-delay: .14s; }
.projects .pcard:nth-child(4) { animation-delay: .21s; }
.projects .pcard:nth-child(5) { animation-delay: .28s; }
.d-head h1 { animation: slide-in .7s .05s cubic-bezier(.2, .7, .2, 1) both; }
.d-head .tag, .d-actions { animation: rise .6s .15s ease-out both; }
.d-cover { animation: rise .7s .2s ease-out both; }

/* Arrivée des sections au défilement : une seule fois, quand l'élément entre à l'écran (classes posées par main.js) */
.reveal { opacity: 0; }
.reveal.is-in { animation: rise .6s ease-out both; }

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

/* Le contenu arrive de /api/content : la page reste masquée et les animations d'arrivée attendent qu'il soit affiché */
html.is-loading body { visibility: hidden; }
html.is-loading * { animation-play-state: paused !important; }

/* --- Refonte orientée clients ------------------------------------------------------------------- */
/* Accueil : l'accroche passe en avant, la ligne de soutien et le lien recruteur restent discrets */
.hero .lede { color: var(--ink); font-size: clamp(20px, 2.4vw, 25px); line-height: 1.4; font-weight: 500; }
.hero .lede-sub { max-width: 58ch; color: var(--muted); font-size: 17px; margin: -10px 0 0; animation: rise .7s .44s ease-out both; }
.hero .recruiter { color: var(--muted); font-size: 14px; margin: -8px 0 0; animation: rise .7s .58s ease-out both; }
.hero .recruiter a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; }

/* En-tête de section avec sous-titre (Services, Contact) */
.section-head { display: grid; gap: 10px; }
.section-sub { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0; }
.section-note { color: var(--muted); font-size: 15px; margin: 0; }
.svc-example { font-size: 14px; color: var(--muted) !important; }
.svc-example a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* Méthode : 4 cartes, grand numéro discret en filigrane */
.method { list-style: none; margin: 0; padding: 0; counter-reset: method; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.method li { counter-increment: method; position: relative; overflow: hidden; min-height: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 28px; display: grid; gap: 8px; align-content: start; }
.method li::after { content: counter(method); position: absolute; right: 10px; bottom: -34px; font-family: var(--font-display); font-size: 130px; font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: color-mix(in srgb, var(--accent) 9%, transparent); pointer-events: none; }
.method b, .method span { position: relative; z-index: 1; }
.method b { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.method span { color: var(--muted); font-size: 15px; max-width: 26ch; }
@media (max-width: 980px) { .method { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .method { grid-template-columns: 1fr; } .method li { min-height: 0; padding-right: 80px; } .method li::after { font-size: 96px; bottom: -24px; } }

/* Contact : boutons WhatsApp et e-mail */
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Bouton WhatsApp flottant, en bas à droite de toutes les pages publiques */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #25D366; color: #FFFFFF;
  box-shadow: 0 10px 24px -8px rgb(28 25 23 / .45);
}
.wa-float:hover { background: #1EBE5A; }
.wa-float[hidden] { display: none; }
@media (max-width: 520px) { .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; } }

/* Contact : bouton « Copier l'adresse » à la taille de l'adresse */
.mailrow .btn { padding: 9px 14px; font-size: 14px; }

/* Mobile : boutons principaux en pleine largeur, l'un sous l'autre */
@media (max-width: 640px) {
  .hero .cta, #services .cta, .contact-actions { flex-direction: column; align-items: stretch; }
  .hero .cta .btn, #services .cta .btn, .contact-actions .btn { display: flex; width: 100%; justify-content: center; padding: 15px 20px; font-size: 16px; }
}
