/* ===============================================================
   Boivin & Co. — feuille de style de l'accueil, des Services et
   des Projets. Sortie de index.html pour être partagée entre ces
   trois pages.
   =============================================================== */

/* f et j de Fraunces : leurs crochets enroulés se lisent comme des
   lettres déformées dans les titres. Ces deux glyphes seuls viennent
   de Newsreader (sous-ensemble local), le reste du texte reste en
   Fraunces grâce à unicode-range. */
@font-face {
  font-family: 'Fraunces FJ';
  src: url('/assets/fonts/newsreader-fj-roman.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0066, U+006A;
}
@font-face {
  font-family: 'Fraunces FJ';
  src: url('/assets/fonts/newsreader-fj-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0066, U+006A;
}

:root {
  /* Thème d'ouverture : noir. La page se réchauffe jusqu'à l'orange au scroll. */
  --bg: #121110;
  --ink: #f4f0e9;
  --muted: #928a80;
  --line: rgba(244, 240, 233, 0.15);
  --accent: #dd6d4d;
  --body-txt: #b9b2a8;
  --nav-bg: rgba(18, 17, 16, 0.82);
  /* Survol du menu : le orange du point du logo « B. ». Il s'éclaircit
     dans les sections chaudes ci-dessous pour rester lisible. */
  --nav-hover: #c8553d;
  --logo-bg: #f4f0e9;
  --logo-fg: #121110;
  --panel-1: #201c19;
  --panel-2: #171412;
  /* Durée / courbe du fondu de palette au scroll */
  --tt: 0.7s;
  --te: cubic-bezier(0.4, 0, 0.2, 1);
}

/* PALETTE PAR SECTION — du noir à l'orange, au fil du scroll.
   Le thème actif est posé sur <html data-section="..."> par le script. */
html[data-section="about"] {
  --bg: #201a16;
  --ink: #f5f0e8;
  --muted: #9d9389;
  --line: rgba(245, 240, 232, 0.16);
  --body-txt: #c0b7ab;
  --accent: #e2764f;
  --nav-bg: rgba(32, 26, 22, 0.84);
  --nav-hover: #e2764f;
  --logo-bg: #f5f0e8;
  --logo-fg: #201a16;
  --panel-1: #2b241e;
  --panel-2: #201a16;
}
html[data-section="services"] {
  --bg: #3d2118;
  --ink: #f7f1e8;
  --muted: #b6a094;
  --line: rgba(247, 241, 232, 0.18);
  --body-txt: #d3c4b6;
  --accent: #ef8258;
  --nav-bg: rgba(61, 33, 24, 0.84);
  --nav-hover: #ef8258;
  --logo-bg: #f7f1e8;
  --logo-fg: #3d2118;
  --panel-1: #4b291d;
  --panel-2: #351c14;
}
html[data-section="work"] {
  --bg: #7d3520;
  --ink: #fdf5ec;
  --muted: #e3c2af;
  --line: rgba(253, 245, 236, 0.24);
  --body-txt: #ecd5c5;
  --accent: #ffb08c;
  --nav-bg: rgba(125, 53, 32, 0.86);
  --nav-hover: #ffb08c;
  --logo-bg: #fdf5ec;
  --logo-fg: #7d3520;
  --panel-1: #8d3f27;
  --panel-2: #6b2b19;
}
html[data-section="contact"] {
  --bg: #b94a1e;
  --ink: #fff9f4;
  --muted: #fbe3d3;
  --line: rgba(255, 249, 244, 0.32);
  --body-txt: #fdf0e6;
  --accent: #33150a;
  --nav-bg: rgba(185, 74, 30, 0.86);
  --nav-hover: #ffd9c2;
  --logo-bg: #fff9f4;
  --logo-fg: #b94a1e;
  --panel-1: #c65526;
  --panel-2: #a33f18;
}

/* Tout ce qui porte une couleur de thème se fond au lieu de sauter */
html, body, nav, footer,
.hero-meta, .work-thumb,
.about p, .section-eyebrow, .section-eyebrow::before, .hero-eyebrow,
.hero-eyebrow::before, .brand-tagline, .brand-tagline::before,
.logo, .footer-logo, .work-title, .work-year, .work-tag,
.work-brand, .work-brand-logo, .work-brand-label, .work-swatch-hex,
.service-num, .service-title, .service-desc, .service-tags,
.service, .services-intro, .service-detail p, .service-points li,
.service-select, .service-chip, .service-chip span, .service-pick-note,
.service-cart-label, .service-cart-cta,
.hero-meta .label, .contact h3, .contact-intro, .contact-cta,
.about h3,
.section-end-logo svg circle, .section-end-logo svg text,
.logo-mark circle, .logo-mark text {
  transition: background-color var(--tt) var(--te),
              border-color var(--tt) var(--te),
              color var(--tt) var(--te),
              fill var(--tt) var(--te);
}

/* Les logos inline suivent la palette (fill codé en dur surchargé ici) */
.logo-mark circle,
.section-end-logo svg circle { fill: var(--logo-bg); }
.logo-mark text,
.section-end-logo svg text { fill: var(--logo-fg); }
.logo-mark text tspan,
.section-end-logo svg text tspan { fill: var(--accent); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
  /* iOS gonfle le texte en paysage sans cette ligne */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--line);
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}
.logo {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo span { color: var(--accent); }
.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-tagline {
  position: relative;
  padding-left: 15px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.brand-tagline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: var(--line);
}
/* BOUTON MENU — n'apparaît que sous 768 px (voir le bloc RESPONSIVE).
   Zone de 44 px : la cible minimale confortable au pouce. */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -11px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Trois traits : l'élément lui-même est celui du milieu */
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform 0.3s var(--te), opacity 0.2s ease, top 0.3s var(--te);
}
.nav-toggle-bars { top: calc(50% - 0.75px); }
.nav-toggle-bars::before { content: ''; top: -7px; }
.nav-toggle-bars::after { content: ''; top: 7px; }
/* Ouvert : les deux premiers traits se croisent, le troisième s'efface */
nav.is-open .nav-toggle-bars { transform: translateX(-50%) rotate(45deg); }
nav.is-open .nav-toggle-bars::before { top: 0; transform: translateX(-50%) rotate(-90deg); }
nav.is-open .nav-toggle-bars::after { opacity: 0; }

.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a,
.nav-links a.nav-cta {
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s var(--te);
}
.nav-links a:hover { color: var(--nav-hover); }
.nav-links a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
/* Lien Facebook — toujours visible en haut à droite, même sur mobile */
.nav-links { margin-left: auto; }
.nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 28px;
  margin-right: -9px;
  color: var(--ink);
  transition: color 0.2s var(--te);
}
.nav-social:hover { color: var(--nav-hover); }
.nav-social:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* HERO */
.hero {
  min-height: 100vh;
  /* Sur mobile, 100vh compte la barre d'adresse : svh s'en passe */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: end;
}
.hero-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  flex-shrink: 0;
  background: var(--ink);
}
.hero h1 {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(56px, 11vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-meta {
  display: grid;
  /* Cinq entrées tiennent sur une ligne : l'adresse reste à côté du statut */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  max-width: 1080px;
}
.hero-meta div { font-size: 14px; }
.hero-meta .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 8px;
}
/* L'adresse se coupe plutôt que de déborder de sa colonne */
.hero-meta a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  overflow-wrap: anywhere;
  transition: color var(--tt) var(--te), border-color var(--tt) var(--te);
}
.hero-meta a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.hero-meta a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* SECTIONS */
section { padding: 140px 0; }
.section-eyebrow {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  flex-shrink: 0;
  background: var(--muted);
}

/* PAGES SERVICES ET PROJETS
   La section y ouvre la page : on la dégage de la barre fixe et on
   pose le titre principal au-dessus du contenu. */
section.page-first { padding-top: 180px; }
.page-title {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  margin-bottom: 40px;
}
.page-title em { font-style: italic; color: var(--accent); }
.nav-links a[aria-current="page"]:not(.nav-cta) { color: var(--accent); }
@media (max-width: 768px) {
  section.page-first { padding-top: 130px; }
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
}
.about h3 {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0;
  font-kerning: normal;
  font-optical-sizing: auto;
  margin-bottom: 24px;
}
.about-photo {
  margin: 0;
  max-width: 300px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel-1);
  transition: background-color var(--tt) var(--te);
}
.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about p {
  font-size: 17px;
  color: var(--body-txt);
  margin-bottom: 20px;
  max-width: 60ch;
}

/* SERVICES */
.services-intro {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 40px;
}
.services-list {
  display: grid;
  grid-template-columns: 1fr;
}
.service {
  border-top: 1px solid var(--line);
  transition: border-color var(--tt) var(--te);
}
.service:last-of-type { border-bottom: 1px solid var(--line); }
.service-head {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 2fr 1fr;
  gap: 32px;
  padding: 36px 40px 36px 0;
  align-items: start;
  transition: padding 0.3s ease;
}
.service:hover .service-head,
.service.is-open .service-head { padding-left: 16px; }
.service-num {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-size: 14px;
  color: var(--muted);
}
.service-title {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Le titre est un bouton : tout l'en-tête devient cliquable via ::after */
.service-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s ease;
}
.service-trigger::after {
  content: '';
  position: absolute;
  inset: 0;
}
.service-trigger:hover,
.service.is-open .service-trigger { color: var(--accent); }
.service-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.service-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.service-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.service:hover .service-icon,
.service.is-open .service-icon {
  transform: translateY(-2px);
}
.service-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}
.service-tags {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
}
.service-chevron {
  position: absolute;
  top: 38px;
  right: 0;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--tt) var(--te);
}
.service-chevron::before {
  content: '\002B';
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}
.service.is-open .service-chevron { color: var(--accent); }
.service.is-open .service-chevron::before { content: '\2212'; }

/* Panneau dépliable : hauteur animée via grid-template-rows */
.service-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.45s var(--te), visibility 0.45s;
}
.service.is-open .service-panel {
  grid-template-rows: 1fr;
  visibility: visible;
}
.service-panel-inner { overflow: hidden; }
.service-panel-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  /* 80px de colonne + 32px de gouttière : le détail s'aligne sous le titre */
  padding: 4px 40px 40px 112px;
  align-items: start;
  transition: padding 0.3s ease;
}
.service.is-open .service-panel-grid { padding-left: 128px; }
.service-detail p {
  font-size: 16px;
  color: var(--body-txt);
  line-height: 1.7;
  max-width: 52ch;
}
.service-points {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.service-points li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}
.service-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.service-pick-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 14px;
  max-width: 32ch;
}

/* Bouton de sélection d'un service */
.service-select {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 15px 22px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.service-select:hover { border-color: var(--ink); }
.service-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.service-select[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.service-select[aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); }
.service-select-box {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
}
.service-select[aria-pressed="true"] .service-select-box::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 6px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* Récapitulatif de la sélection, au bas de la section */
.service-cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: background-color var(--tt) var(--te), border-color var(--tt) var(--te);
}
.service-cart[hidden] { display: none; }
.service-cart-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 12px;
}
.service-cart-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.service-chip span {
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
}
.service-chip:hover { border-color: var(--accent); color: var(--accent); }
.service-chip:hover span { color: var(--accent); }
.service-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.service-cart-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  padding: 16px 32px;
  text-decoration: none;
  transition: background 0.3s ease, gap 0.3s ease, color var(--tt) var(--te);
}
.service-cart-cta:hover {
  background: var(--accent);
  gap: 20px;
}

/* WORK */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.work-item {
  cursor: pointer;
}
/* Les projets réalisés mènent à leur page ; les « à venir » restent inertes */
.work-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.work-item-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}
/* Repère de clic : discret au repos, affirmé au survol */
.work-view {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-top: 10px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease, color var(--tt) var(--te);
}
.work-view span {
  display: inline-block;
  transition: transform 0.3s ease;
}
.work-item-link:hover .work-view,
.work-item-link:focus-visible .work-view {
  opacity: 1;
  transform: none;
}
.work-item-link:hover .work-view span { transform: translateX(4px); }
/* Sans survol possible (tactile), le repère reste visible */
@media (hover: none) {
  .work-view { opacity: 1; transform: none; }
}
.work-thumb {
  aspect-ratio: 16/10;
  background: var(--line);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  transition: transform 0.4s ease, background-color var(--tt) var(--te);
}
/* La capture occupe toute la carte : un rectangle simple, juste adouci aux coins */
.work-shot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--te);
}
.work-item-link:hover .work-shot,
.work-item-link:focus-visible .work-shot { transform: scale(1.03); }
.work-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 45%, rgba(200,85,61,0.05));
  pointer-events: none;
}
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.play-icon:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
}
.play-icon svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  fill: var(--ink);
}
.click-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 11px;
  border-radius: 999px;
  background: rgba(244, 240, 233, 0.92);
  color: #121110;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}
.click-hint svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.work-item:hover .click-hint,
.work-item:focus-visible .click-hint {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
}
.work-item:hover .work-thumb { transform: translateY(-4px); }
.thumb-1 { background: linear-gradient(135deg, var(--panel-1), var(--panel-2)); }
.thumb-2 { background: linear-gradient(135deg, var(--panel-1), var(--panel-2)); }
.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.work-title {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
}
.work-year {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.work-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: 4px;
}

/* IDENTITÉ DU CLIENT — logo et palette du site livré, sous la carte.
   Les pastilles portent les couleurs réelles du site du client (posées
   par la variable --sw sur chaque <li>), pas celles du thème de la page :
   elles ne se fondent donc pas au scroll, c'est voulu. Pour ajouter une
   couleur, dupliquer un <li class="work-swatch"> et changer --sw + le hex. */
.work-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.work-brand-logo {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--logo-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.work-brand-logo img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.work-brand-body { min-width: 0; }
.work-brand-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 9px;
}
.work-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.work-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.work-swatch-chip {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.work-swatch-hex {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* CONTACT */
.contact {
  text-align: left;
  padding: 160px 0;
  border-top: 1px solid var(--line);
}
.contact h3 {
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  max-width: 14ch;
}
.contact h3 em { font-style: italic; color: var(--accent); }
.contact h3 .idea-icon {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.08em;
  margin-right: 0.18em;
  color: var(--accent);
}
.contact h3 .idea-icon svg { width: 100%; height: 100%; display: block; }
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.3s ease, color var(--tt) var(--te), border-color var(--tt) var(--te);
}
.contact-cta:hover { gap: 24px; }
/* Phrase d'introduction sous le grand titre, avant le bouton */
.contact-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--body-txt);
  max-width: 54ch;
  margin-bottom: 40px;
}

/* FOOTER */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Fraunces FJ', 'Fraunces', serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.footer-logo span { color: var(--accent); }
.footer-logo .logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 16px;
}
/* <address> porte l'adresse pour le référencement local, sans l'italique par défaut */
.footer-bottom address {
  font-style: normal;
  font-size: inherit;
  text-align: right;
}
/* TÉMOINS — bannière de consentement (Loi 25 / RGPD) */
.consent-manage {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.consent-manage:hover,
.consent-manage:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  padding: 0 32px 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--te), transform 0.5s var(--te);
}
.consent.is-visible {
  opacity: 1;
  transform: none;
}
.consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 22px 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  transition: background-color var(--tt) var(--te), border-color var(--tt) var(--te);
}
.consent-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 10px;
}
.consent-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--body-txt);
  max-width: 64ch;
}
.consent-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.consent-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 13px 28px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease, color var(--tt) var(--te);
}
.consent-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.consent-btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.consent-btn-ghost:hover {
  background: transparent;
  border-color: var(--ink);
}



/* HERO — PANNEAU CODE ANIMÉ */
.hero-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: end;
  margin-bottom: 40px;
}
.hero-top h1 { margin-bottom: 0; }

/* Scène 3D : porte la perspective, l'entrée animée et l'ombre au sol */
.hero-code-stage {
  position: relative;
  perspective: 1200px;
  perspective-origin: 50% 38%;
  opacity: 0;
  transform: translateY(18px);
  animation: code-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
.hero-code-stage::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  height: 30px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(58% 100% at 50% 50%, rgba(221, 109, 77, 0.26), transparent 72%);
  filter: blur(9px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-code-stage:hover::after {
  transform: translateY(5px) scale(1.04);
  opacity: 0.8;
}

.hero-code {
  --code-bg: #1c1815;
  --code-txt: #e9e5df;
  --code-dim: #7a7268;
  --code-str: #b79a63;
  --code-key: #d9694c;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glare-x: 50%;
  --glare-y: 0%;
  position: relative;
  background: var(--code-bg);
  border: 1px solid rgba(233, 229, 223, 0.16);
  border-radius: 3px;
  padding: 0 0 20px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--code-txt);
  /* Ombres empilées : contact net + diffusion large = volume */
  box-shadow:
    0 1px 1px rgba(20, 18, 16, 0.14),
    0 3px 6px -2px rgba(20, 18, 16, 0.16),
    0 10px 18px -8px rgba(20, 18, 16, 0.24),
    0 30px 50px -24px rgba(20, 18, 16, 0.40),
    0 56px 96px -44px rgba(20, 18, 16, 0.50),
    inset 0 1px 0 rgba(233, 229, 223, 0.10),
    inset 0 -1px 0 rgba(20, 18, 16, 0.55);
  overflow: hidden;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
.hero-code-stage:hover .hero-code {
  box-shadow:
    0 1px 1px rgba(20, 18, 16, 0.16),
    0 4px 8px -2px rgba(20, 18, 16, 0.18),
    0 14px 24px -10px rgba(20, 18, 16, 0.28),
    0 40px 64px -28px rgba(20, 18, 16, 0.46),
    0 72px 120px -48px rgba(20, 18, 16, 0.55),
    inset 0 1px 0 rgba(233, 229, 223, 0.14),
    inset 0 -1px 0 rgba(20, 18, 16, 0.55);
}
.hero-code::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(130% 95% at 100% 0%, rgba(200, 85, 61, 0.16), transparent 62%);
}
/* Reflet qui suit le curseur : accroche la lumière sur la surface */
.hero-code::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(340px 260px at var(--glare-x) var(--glare-y), rgba(233, 229, 223, 0.11), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.hero-code-stage:hover .hero-code::after { opacity: 1; }
@keyframes code-enter {
  to { opacity: 1; transform: translateY(0); }
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(233, 229, 223, 0.08);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--code-dim);
}
.code-head .code-file { color: rgba(233, 229, 223, 0.72); }
.code-run {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.code-run i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--code-key);
  animation: code-pulse 1.9s ease-in-out infinite;
}
@keyframes code-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.code-body {
  counter-reset: line;
  padding: 16px 18px 0 18px;
  /* Hauteur finale réservée (14 lignes) : la page ne saute pas pendant la frappe */
  min-height: calc(14 * 1.85em + 16px);
}
.code-line {
  counter-increment: line;
  position: relative;
  padding-left: 32px;
  min-height: 1.85em;
  white-space: pre-wrap;
  word-break: break-word;
}
.code-line::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 18px;
  text-align: right;
  font-size: 10.5px;
  color: var(--code-dim);
  opacity: 0.5;
}
.tk-k { color: var(--code-key); }
.tk-s { color: var(--code-str); }
.tk-f { color: var(--code-txt); font-weight: 500; }
.tk-p { color: rgba(233, 229, 223, 0.82); }
.tk-d { color: var(--code-dim); }
.tk-c { color: var(--code-dim); font-style: italic; }
.code-line .tk-c { color: rgba(217, 105, 76, 0.85); }
.code-line:first-child .tk-c { color: var(--code-dim); }

.code-caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  background: var(--code-key);
  vertical-align: -0.18em;
  animation: code-caret 1.05s steps(1) infinite;
}
@keyframes code-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (min-width: 1024px) {
  .hero-top {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 64px;
    /* Le titre se centre face au panneau : pas de vide au-dessus de lui */
    align-items: center;
  }
  .hero-code-stage { margin-bottom: 8px; }
  /* Inclinaison de repos : le panneau a du volume même sans interaction */
  .hero-code { --tilt-x: 1.3deg; --tilt-y: -2.6deg; }
}
@media (max-width: 768px) {
  .hero-code { font-size: 11.5px; }
  .code-body { padding: 14px 14px 0 14px; }
  .code-head { padding: 11px 14px; }
  .code-line { padding-left: 26px; }
  .code-line::before { width: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --tt: 0.01s; }
  .nav-links { transition: none; }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { transition: none; }
  .hero-code-stage { opacity: 1; transform: none; animation: none; }
  .hero-code {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    transition: none;
  }
  .code-caret, .code-run i { animation: none; }
  .consent { transition: none; }
  .service-panel { transition: none; }
}

/* ===============================================================
   RESPONSIVE
   ---------------------------------------------------------------
   Deux paliers : 768 px (tablette et téléphone) puis 480 px, où
   l'on resserre les titres et où l'on supprime les retraits qui
   mangent la largeur utile. Rien n'est masqué au passage : les
   liens du menu partent dans un panneau dépliable, pas à la
   poubelle.
   =============================================================== */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .consent { padding: 0 16px 16px; }
  .consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 20px;
  }
  .consent-actions { gap: 10px; }
  .consent-btn { flex: 1; padding: 14px 16px; }

  /* NAV — la barre se resserre et le menu passe en panneau */
  nav .container { padding-top: 12px; padding-bottom: 12px; }
  /* Ouvert, la barre devient opaque : le panneau se lit sur un fond
     plein plutôt que sur le contenu qui défile derrière. */
  nav.is-open { background: var(--bg); }
  .nav-toggle { display: block; }
  .nav-social { margin-left: auto; margin-right: 2px; width: 44px; height: 44px; }
  .nav-toggle { order: 1; }
  .brand-tagline { display: none; }
  .logo { font-size: 17px; }
  .logo-mark { width: 30px; height: 30px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    /* Téléphone en paysage : le panneau défile au lieu de sortir de l'écran */
    max-height: calc(100vh - 68px);
    max-height: calc(100svh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.28s var(--te), transform 0.28s var(--te), visibility 0.28s;
  }
  nav.is-open .nav-links {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  /* Une ligne par lien, hauteur de cible confortable au pouce */
  .nav-links a {
    padding: 17px 2px;
    font-size: 13px;
    border-top: 1px solid var(--line);
  }
  .nav-links a.nav-cta {
    margin-top: 18px;
    padding: 16px 20px;
    font-size: 13px;
    border: 1px solid var(--ink);
    border-top: 1px solid var(--ink);
    text-align: center;
  }

  /* HERO */
  .hero { padding-top: 92px; }
  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    padding-top: 32px;
  }
  .hero-meta .meta-email { grid-column: 1 / -1; }

  section { padding: 80px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { max-width: 200px; }

  /* SERVICES — le décalage au survol saute sur un écran tactile,
     où le « survol » colle après l'appui : on le neutralise. */
  .service-head {
    grid-template-columns: 40px 1fr;
    gap: 16px;
    padding: 28px 32px 28px 0;
  }
  .service:hover .service-head,
  .service.is-open .service-head { padding-left: 0; }
  .service-desc, .service-tags { grid-column: 2; }
  .service-tags { text-align: left; margin-top: 8px; }
  .service-chevron { top: 30px; }
  .service-panel-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 4px 0 32px 56px;
  }
  .service.is-open .service-panel-grid { padding-left: 56px; }
  .service-cart {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }
  .service-cart-cta { justify-content: center; }

  /* PROJETS */
  .work-grid { grid-template-columns: 1fr; gap: 32px; }
  .work-thumb { border-radius: 12px; }
  .work-brand { gap: 14px; }
  .work-brand-logo { width: 52px; height: 52px; }
  .work-brand-logo img { width: 42px; height: 42px; }

  /* CONTACT ET PIED DE PAGE */
  .contact { padding: 96px 0; }
  .contact-intro { font-size: 16px; margin-bottom: 32px; }
  footer .container { gap: 18px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .footer-bottom address { text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  /* Le panneau du menu suit le même retrait que le conteneur */
  .nav-links { padding-left: 20px; padding-right: 20px; }
  /* Les deux boutons de témoins restent côte à côte jusqu'à 320 px :
     « Refuser » et « Accepter » ne se coupent pas. */
  .consent-inner { padding: 18px; }
  .consent-btn { padding: 14px 10px; }
  .hero-eyebrow { margin-bottom: 24px; }
  .hero-meta { gap: 22px 16px; }
  .section-eyebrow { margin-bottom: 32px; }

  /* Le numéro du service se resserre, le titre passe en 20 px :
     « Gestion des réseaux sociaux » tient sur deux lignes au lieu de trois. */
  .service-head {
    grid-template-columns: 26px 1fr;
    gap: 12px;
    padding: 24px 28px 24px 0;
  }
  .service-title { font-size: 20px; gap: 10px; }
  .service-icon { width: 22px; height: 22px; }
  .service-chevron { top: 26px; }
  /* Plus de retrait : sur 320 px, 56 px de marge gauche coûtent trop cher */
  .service-panel-grid { padding-left: 0; }
  .service.is-open .service-panel-grid { padding-left: 0; }
  .service-select { width: 100%; justify-content: center; }
  .service-pick-note { max-width: none; }

  .work-meta { gap: 14px; }
  .work-title { font-size: 18px; }

  .contact-cta { font-size: 19px; }
}

/* SECTION END LOGO */
.section-end-logo {
  display: flex;
  justify-content: center;
  margin-top: 80px;
}
.section-end-logo svg {
  width: 36px;
  height: 36px;
}

@media (max-width: 768px) {
  .section-end-logo { margin-top: 48px; }
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease,
              background-color var(--tt) var(--te),
              border-color var(--tt) var(--te),
              color var(--tt) var(--te);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CURSEUR ROND */
.cursor-ring {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1.5px solid var(--accent);
  background: rgba(200, 85, 61, 0.12);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease,
              margin 0.2s ease, background 0.2s ease;
  will-change: transform;
}
.cursor-ring.is-visible { opacity: 1; }
.cursor-ring.is-hovering {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  background: rgba(200, 85, 61, 0.18);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.cursor-ring.is-pressed {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  background: rgba(200, 85, 61, 0.3);
  background: color-mix(in srgb, var(--accent) 34%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .cursor-ring { display: block; }
  html.custom-cursor,
  html.custom-cursor body,
  html.custom-cursor a,
  html.custom-cursor button,
  html.custom-cursor input,
  html.custom-cursor textarea,
  html.custom-cursor select,
  html.custom-cursor [class*="cursor"] { cursor: none; }
}
