/* Mise en page et composants. Les couleurs et les tailles viennent de tokens.css. */

/* ---------- Polices ---------- */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--color-accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--color-on-accent);
  background: var(--color-accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
}

/* ---------- Apparition au défilement ---------- */

.reveal-on [data-reveal] {
  --reveal-delay: calc(var(--reveal-order, 0) * 80ms);
  opacity: 0;
  translate: 0 18px;
  transition:
    opacity 0.6s ease var(--reveal-delay),
    translate 0.6s ease var(--reveal-delay),
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.reveal-on [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

@media print {
  .reveal-on [data-reveal] {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Mise en page ---------- */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  --container: var(--container-narrow);
}

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.section--alt {
  --section-bg: var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.section--after-header {
  padding-top: clamp(1rem, 3vw, 2rem);
}

.section__header {
  max-width: 42rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

.section__header p:last-child {
  margin-bottom: 0;
  font-size: var(--text-lg);
}

.section__more {
  display: flex;
  justify-content: center;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}

.pill {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-accent-soft-text);
  background: var(--color-accent-soft);
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.split {
  display: grid;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.split--top {
  align-items: start;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .split--media {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.split h2:last-child,
.split p:last-child {
  margin-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.actions--center {
  justify-content: center;
}

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

.button {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-on-accent);
  text-decoration: none;
  cursor: pointer;
  background: var(--color-accent);
  /* Relief : reflet en haut, ombre en bas, halo de la couleur d'accent sous le bouton. */
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.24),
    inset 0 -2px 0 rgb(0 0 0 / 0.18),
    0 10px 24px -10px var(--color-glow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  background: var(--color-accent-hover);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.24),
    inset 0 -2px 0 rgb(0 0 0 / 0.18),
    0 16px 30px -10px var(--color-glow);
  transform: translateY(-2px);
  animation: button-wiggle 0.45s ease;
}

.button:active {
  box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.3);
  transform: translateY(1px);
  animation: none;
}

.button .icon {
  transition: translate 0.2s ease;
}

.button:hover .icon--arrow {
  translate: 3px 0;
}

.button--ghost {
  border-color: var(--color-border-strong);
  color: var(--color-heading);
  background: var(--color-surface);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    0 8px 18px -12px rgb(0 0 0 / 0.55);
}

.button--ghost:hover {
  border-color: var(--color-accent-text);
  background: var(--color-surface-2);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    0 14px 24px -12px rgb(0 0 0 / 0.55);
}

.button--ghost .icon {
  color: var(--color-accent-text);
}

.button--small {
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  font-size: var(--text-sm);
}

@keyframes button-wiggle {
  0%,
  100% {
    rotate: 0deg;
  }

  25% {
    rotate: -1.6deg;
  }

  55% {
    rotate: 1.4deg;
  }

  80% {
    rotate: -0.6deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .button:hover,
  .card,
  .card:hover {
    transform: none;
    transition: none;
    animation: none;
  }
}

/* ---------- En-tête ---------- */

.scroll-progress {
  display: none;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 60;
    display: block;
    height: 2px;
    background: var(--gradient-accent);
    transform-origin: 0 50%;
    scale: 0 1;
    animation: scroll-progress linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes scroll-progress {
  to {
    scale: 1 1;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.site-logo {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-heading);
  text-decoration: none;
}

.site-header__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-heading);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  color: var(--color-heading);
  cursor: pointer;
  background: var(--color-surface);
}

.menu-toggle .icon--close,
.menu-toggle[aria-expanded="true"] .icon--menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon--close {
  display: block;
}

/* Petit écran : le menu se replie derrière le bouton. Sans JavaScript (pas de classe has-menu),
   il reste affiché sous le logo. */
@media (max-width: 47.99rem) {
  .site-header__nav {
    order: 3;
    width: 100%;
    padding-bottom: 0.5rem;
  }

  .has-menu .menu-toggle {
    display: grid;
  }

  .has-menu .site-header__nav {
    display: none;
    padding-block: 0.5rem 1rem;
    border-top: 1px solid var(--color-border);
  }

  .has-menu.is-open .site-header__nav {
    display: block;
  }

  .has-menu .site-nav {
    flex-direction: column;
  }

  .has-menu .site-nav a {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
  }
}

@media (min-width: 48rem) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .site-header__actions {
    justify-self: end;
  }
}

/* ---------- Bloc d'ouverture ---------- */

.hero,
.page-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.hero::before,
.page-header::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(58rem 26rem at 50% -6rem, var(--color-accent-soft), transparent 70%);
}

.hero {
  padding-block: clamp(4.5rem, 11vw, 8rem) clamp(6.5rem, 14vw, 10rem);
}

.hero__inner {
  --container: 64rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent-text);
}

.hero h1 {
  margin-bottom: 1.5rem;
  font-size: var(--text-hero);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.text-gradient {
  display: block;
  padding-bottom: 0.1em;
  color: transparent;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero .lead,
.page-header .lead {
  max-width: 40rem;
  margin-inline: auto;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  justify-content: center;
  padding: 0;
  margin: 3.25rem 0 0;
  list-style: none;
}

.stack li {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-muted);
}

/* Petit écran : trois pavés puis deux, plutôt que quatre et un orphelin. */
@media (max-width: 30rem) {
  .stack {
    max-width: 17rem;
    margin-inline: auto;
  }
}

.icon-tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  background: var(--color-surface-2);
}

.icon-tile .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-tile--accent {
  border-color: transparent;
  color: var(--color-accent-soft-text);
  background: var(--color-accent-soft);
}

.hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: clamp(2rem, 5vw, 4.5rem);
  color: var(--color-bg-alt);
}

.page-header {
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2rem, 5vw, 3rem);
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header .lead {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 1.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--color-heading);
}

.back-link .icon {
  rotate: 180deg;
}

/* Étiquette sous le lien de retour, sur sa propre ligne. */
.back-link + .pill {
  display: table;
  margin-inline: auto;
}

/* ---------- Chiffres ---------- */

.stats {
  padding-block: clamp(2.5rem, 6vw, 4.25rem);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
  margin-block: 0;
  text-align: center;
}

.stats__list div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.4rem;
}

.stats__list dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-heading);
}

.stats__list dt {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
}

/* ---------- Portrait ---------- */

.portrait {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.portrait img {
  width: 100%;
}

/* ---------- Cartes ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
}

.card__body > * {
  margin: 0;
}

.card__title {
  font-size: var(--text-xl);
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

/* Toute la carte est cliquable, le lien restant celui du titre. */
.card__title a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.card__meta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
}

.card__more {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding-top: 0.25rem;
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent-text);
}

.card__more .icon {
  transition: translate 0.2s ease;
}

.card:hover .card__more .icon {
  translate: 4px 0;
}

.card__flag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  margin-right: 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent-soft-text);
  background: var(--color-accent-soft);
}

/* Carte sans page de détail : rien à ouvrir, donc pas d'effet de survol. */
.card--static:hover {
  border-color: var(--color-border);
  box-shadow: none;
  transform: none;
}

/* Liste des réalisations : une rangée par réalisation, visuel et texte côte à côte,
   en alternant le côté du visuel. */
.projects {
  display: grid;
  gap: 1.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .projects .card {
    flex-direction: row;
  }

  .projects .card:nth-child(even) {
    flex-direction: row-reverse;
  }

  .projects .cover {
    flex: 0 0 46%;
    aspect-ratio: auto;
    min-height: 19rem;
    border-bottom: 0;
    border-right: 1px solid var(--color-border);
  }

  .projects .card:nth-child(even) .cover {
    border-right: 0;
    border-left: 1px solid var(--color-border);
  }

  .projects .cover > span {
    font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem);
  }

  .projects .card__body {
    gap: 1rem;
    justify-content: center;
    padding: clamp(1.75rem, 3vw, 2.75rem);
  }

  .projects .card__title {
    font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  }

  .projects .card__more {
    margin-top: 0.25rem;
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tags li {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface-2);
}

.tags--accent li {
  color: var(--color-accent-soft-text);
  background: var(--color-accent-soft);
}

/* Visuel d'une réalisation : faute de capture d'écran, son nom sur un fond tramé. */
.cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(120% 150% at 0% 0%, var(--color-accent-soft), transparent 62%),
    var(--color-surface-2);
}

.cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(var(--color-border-strong) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(135deg, transparent 20%, #000);
}

.cover > span {
  position: relative;
  padding-inline: 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-heading);
  text-align: center;
}

/* Visuel tiré d'une capture d'écran. */
.cover--image::before {
  display: none;
}

.cover--image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: scale 0.5s ease;
}

.card:not(.card--static):hover .cover--image img {
  scale: 1.03;
}

.cover__chip {
  position: absolute;
  z-index: 1;
  margin: 0;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-heading);
  background: color-mix(in srgb, var(--color-bg) 75%, transparent);
  backdrop-filter: blur(6px);
}

.cover--standalone {
  margin-block: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.cover--mockup {
  align-items: end;
  padding: 1.5rem 1.5rem 0;
}

.cover--mockup .mock-window {
  width: 100%;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: none;
}

.cover--mockup .mock-window__body {
  min-height: 7rem;
}

/* Écran réel du projet, présenté dans une fenêtre de navigateur. */
.cover--window {
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    radial-gradient(100% 120% at 0% 100%, var(--color-accent-soft), transparent 60%),
    var(--color-surface-2);
}

.cover--window::before {
  display: none;
}

.browser {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 10px;
  background: #f2f2f2;
  box-shadow: 0 24px 50px -20px rgb(0 0 0 / 0.7);
  transition:
    rotate 0.4s ease,
    translate 0.4s ease;
}

.browser__bar {
  display: flex;
  flex: none;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  padding: 0.45rem 0.7rem;
  background: #e4e6ea;
}

.browser__bar span:not(.browser__url) {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #c5c9d1;
}

.browser__url {
  flex: 1;
  margin-left: 0.6rem;
  padding: 0.1rem 0.6rem;
  border-radius: 4px;
  font-size: 0.625rem;
  color: #5b6372;
  background: #fff;
}

.browser img {
  display: block;
  width: 100%;
  height: auto;
}

/* Capture montrée en entier : la fenêtre, barre comprise, a les proportions d'un vrai écran (16/9) ;
   la capture s'y cale par le haut et, au besoin, perd un peu de son bas ou de ses marges blanches. */
.cover--window-entier {
  aspect-ratio: auto;
}

.cover--window-entier .browser {
  aspect-ratio: 16 / 9;
}

.cover--window-entier .browser img {
  flex: 1;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card:hover .cover--window-entier .browser {
  translate: 0 -4px;
}

/* Écran complet : seul le haut est visible, la fenêtre sort du bas du visuel. */
.cover--window-haut .browser {
  position: absolute;
  top: clamp(1.75rem, 9%, 3rem);
  right: 8%;
  bottom: 0;
  left: 8%;
  width: auto;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.cover--window-haut .browser img {
  flex: 1;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card:hover .cover--window-haut .browser {
  translate: 0 -4px;
}

/* Visuels en grand, en haut de la page d'une réalisation. */
.cover--standalone.cover--image {
  aspect-ratio: 16 / 8;
  overflow: hidden;
}

.cover--standalone.cover--window-entier {
  aspect-ratio: auto;
}

/* En haut de sa page, l'écran est montré en entier, posé sur le bas du visuel. */
.cover--standalone.cover--window-haut {
  aspect-ratio: auto;
  padding-bottom: 0;
}

.cover--standalone.cover--window-haut .browser {
  position: relative;
  inset: auto;
  width: 100%;
}

.cover--standalone.cover--window-haut .browser img {
  height: auto;
}

/* Carte de service : icône, titre, texte. */
.service {
  gap: 1rem;
  padding: 1.75rem;
}

.service > * {
  margin: 0;
}

.service h3 {
  font-size: var(--text-xl);
}

/* ---------- Méthode ---------- */

.steps {
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-top: 3.75rem;
  counter-increment: step;
}

.steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent-soft-text);
  content: counter(step, decimal-leading-zero);
  background: var(--color-accent-soft);
}

.steps h3 {
  font-size: var(--text-lg);
}

.steps p {
  margin: 0;
  font-size: 0.95rem;
}

@media (min-width: 64rem) {
  /* Trait qui relie chaque étape à la suivante. */
  .steps li:not(:last-child)::after {
    position: absolute;
    top: 1.375rem;
    right: -0.75rem;
    left: 3.5rem;
    height: 1px;
    content: "";
    background: var(--color-border-strong);
  }
}

/* ---------- Fenêtre de maquette (illustration) ---------- */

.mock-window {
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.mock-window__bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.mock-window__bar i {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--color-border-strong);
}

.mock-window__body {
  display: grid;
  grid-template-columns: 26% 1fr;
  min-height: 14rem;
}

.mock-window__side {
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
}

.mock-window__main {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  padding: 1.25rem;
}

.mock-window__main b {
  display: block;
  height: 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
}

.mock-window__main b:first-child {
  width: 55%;
  height: 0.9rem;
  background: var(--color-border-strong);
}

.mock-window__main b:nth-child(2) {
  width: 92%;
}

.mock-window__main b:nth-child(3) {
  width: 70%;
}

.mock-window__main span {
  display: block;
  width: 6rem;
  height: 1.6rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  background: var(--color-accent);
}

/* ---------- Appel à l'action ---------- */

/* Après une section sans fond, le bloc se rapproche : la section apporte déjà son espace. */
.cta {
  padding-block: 0 clamp(3.5rem, 8vw, 6rem);
}

.section--alt + .cta {
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.cta__panel {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-lg) + 8px);
  text-align: center;
  background: var(--color-surface);
}

.cta__panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(40rem 18rem at 50% 115%, var(--color-accent-soft), transparent 70%);
}

.cta__panel > p {
  max-width: 36rem;
  margin-inline: auto;
  font-size: var(--text-lg);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  justify-content: center;
  padding: 0;
  margin: 2rem 0 0;
  font-size: 0.95rem;
  list-style: none;
}

.contact-links a {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
}

.contact-links a:hover {
  color: var(--color-heading);
}

.contact-links .icon {
  color: var(--color-accent-text);
}

/* ---------- Pied de page ---------- */

.site-footer {
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
}

.site-footer p {
  margin: 0.5rem 0 0;
}

.site-footer .contact-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.site-footer__nav a {
  color: var(--color-muted);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--color-heading);
}

.site-footer .site-footer__bottom {
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
}

.site-footer__bottom a {
  color: inherit;
}

/* ---------- Pages intérieures ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
  text-align: left;
}

.facts div {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.facts:first-child {
  margin-top: 0;
}

.facts dt {
  margin-bottom: 0.2rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-heading);
}

.contact-list {
  display: grid;
  gap: 1.25rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-list p {
  margin: 0;
}

.contact-list__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
}

.contact-list__value {
  font-weight: 500;
  color: var(--color-heading);
}

.contact-list__value a {
  color: inherit;
  text-decoration-color: var(--color-border-strong);
}

.contact-list__value a:hover {
  text-decoration-color: var(--color-accent-text);
}

/* Parcours : frise verticale, alternée de part et d'autre du trait sur grand écran. */
.timeline {
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: calc(0.375rem - 1px);
  width: 2px;
  content: "";
  background: var(--color-border-strong);
}

.timeline li {
  position: relative;
  padding-left: 2.25rem;
}

.timeline li::before {
  position: absolute;
  top: 0.35rem;
  left: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  content: "";
  background: var(--color-accent);
  box-shadow: 0 0 0 5px var(--section-bg, var(--color-bg));
}

.timeline__period {
  margin: 0 0 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-text);
}

.timeline h3 {
  margin: 0;
  font-size: var(--text-xl);
}

.timeline__org {
  margin: 0.15rem 0 0.6rem;
  font-weight: 500;
  color: var(--color-muted);
}

.timeline li > p:last-child {
  margin: 0;
  font-size: 0.95rem;
}

@media (min-width: 56rem) {
  .timeline::before {
    left: calc(50% - 1px);
  }

  .timeline li {
    width: 50%;
    padding-left: 0;
  }

  .timeline li:nth-child(odd) {
    padding-right: 2.75rem;
    text-align: right;
  }

  .timeline li:nth-child(even) {
    padding-left: 2.75rem;
    margin-left: 50%;
  }

  .timeline li:nth-child(odd)::before {
    right: -0.375rem;
    left: auto;
  }

  .timeline li:nth-child(even)::before {
    left: -0.375rem;
  }
}

.prose {
  text-align: left;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose li::marker {
  color: var(--color-accent-text);
}

.prose--checks ul {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  margin: 0 0 1em;
  list-style: none;
}

.prose--checks li {
  position: relative;
  padding-left: 1.75rem;
}

/* Coche dessinée en CSS devant chaque ligne de liste. */
.prose--checks li::before {
  position: absolute;
  top: 0.5em;
  left: 0.15rem;
  width: 0.8rem;
  height: 0.45rem;
  border-bottom: 2px solid var(--color-accent-text);
  border-left: 2px solid var(--color-accent-text);
  content: "";
  rotate: -45deg;
}

/* Photo d'illustration dans le texte d'une réalisation, avec son crédit. */
.prose .photo {
  margin: 2rem 0 0.5rem;
}

.prose .photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.prose .photo figcaption {
  margin-top: 0.75rem;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-muted);
  text-align: center;
}

.prose .photo a {
  color: inherit;
}

.project-stack {
  margin-top: 1rem;
}

/* Aperçu d'une réalisation : de vrais écrans, l'un sous l'autre, dans une fenêtre de navigateur. */
.shot {
  margin: 0;
}

.shot .browser {
  color: inherit;
  text-decoration: none;
  transition: translate 0.25s ease;
}

.shot .browser:hover {
  translate: 0 -3px;
}

.shot figcaption {
  margin-top: 0.85rem;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
}

.gallery__title {
  margin: clamp(3rem, 7vw, 4.5rem) 0 1.75rem;
  font-size: var(--text-2xl);
  text-align: center;
}

.gallery {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.gallery__credit {
  margin: 1.75rem 0 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
}

/* ---------- Formulaire ---------- */

.form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.form p {
  margin: 0;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-heading);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  font: inherit;
  color: var(--color-heading);
  background: var(--color-bg);
}

.field textarea {
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-accent-text);
  outline: 0;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form__note {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.form__note--active {
  font-weight: 600;
  color: var(--color-accent-text);
}

/* ---------- Choix de la palette (aperçu uniquement) ---------- */

.palette-picker {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 70;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  max-width: calc(100% - 1.5rem);
  padding: 0.55rem 0.8rem 0.55rem 1.1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  white-space: nowrap;
  color: var(--color-muted);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.6);
  backdrop-filter: blur(12px);
  translate: -50% 0;
}

.palette-picker p {
  margin: 0;
  white-space: nowrap;
}

.palette-picker strong {
  color: var(--color-heading);
}

.palette-picker__list {
  display: flex;
  gap: 0.5rem;
  /* Les pastilles héritent de cette couleur pour leur anneau de sélection. */
  color: var(--color-heading);
}

/* Chaque pastille porte data-palette : les variables y prennent donc les valeurs de sa palette. */
.palette-picker button {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 2px solid var(--color-border-strong);
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-bg) 50%, var(--color-accent) 50%);
}

.palette-picker button[aria-pressed="true"] {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.has-palette-picker .site-footer {
  padding-bottom: 5.5rem;
}

@media (max-width: 30rem) {
  .palette-picker__word {
    display: none;
  }
}

@media print {
  .palette-picker,
  .scroll-progress {
    display: none;
  }
}
