/* ====================================================================
   ENCRE & PIERRE · Étude notariale Saccoccio et associés
   Design system : pierre calcaire, encre, lumière du Sud, sceau de cire.
   ==================================================================== */

:root {
  /* Palette */
  --ink: #1a1f2a;
  --ink-soft: #2b313c;
  --paper: #ede7da;
  --paper-light: #f5f1e8;
  --wax: #7b2d26;
  --wax-dark: #5e211c;
  --brass: #9a8458;
  --brass-text: #756443; /* version foncée de --brass, contraste AA 4.5:1+ sur fond papier pour le texte de petite taille */
  --paper-line: rgba(26, 31, 42, 0.14);
  --paper-line-soft: rgba(26, 31, 42, 0.08);

  /* Typographie */
  --font-display: "Cormorant Garamond", serif;
  --font-text: "Spectral", serif;

  /* Rythme */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: 7rem;

  --max-width: 1180px;
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-s);
}

h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.7rem); }

p { margin: 0 0 var(--space-s); }

.label {
  font-family: var(--font-text);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--wax);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

@media (max-width: 640px) {
  .container { padding: 0 var(--space-s); }
}

/* ---------- Filets hairline (système notarié) ---------- */
.hairline {
  border: none;
  border-top: 1px solid var(--paper-line);
  margin: var(--space-l) 0;
}

.bordered {
  border: 1px solid var(--paper-line);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-light);
  border-bottom: 1px solid var(--paper-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-s);
  padding-bottom: var(--space-s);
  gap: var(--space-m);
}

.logotype {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.logotype small {
  display: block;
  font-family: var(--font-text);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wax);
  font-weight: 500;
  margin-top: 0.15rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-m);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-s) var(--space-m);
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--wax);
  transition: width 0.3s var(--ease-reveal);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  width: 100%;
}

.btn-rdv {
  font-family: var(--font-text);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--wax);
  color: var(--wax);
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}

.btn-rdv:hover {
  background: var(--wax);
  color: var(--paper-light);
}

.has-dropdown {
  position: relative;
}

.main-nav ul.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper-light);
  border: 1px solid var(--paper-line);
  min-width: 200px;
  padding: 0.4rem 0;
  margin: 0;
  list-style: none;
  z-index: 60;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  display: block;
}

.dropdown li {
  display: block;
}

.dropdown a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropdown a:hover {
  background: var(--paper);
  color: var(--wax);
}

.dropdown a::after { display: none; }

@media (max-width: 880px) {
  .main-nav ul.dropdown {
    display: block;
    position: static;
    border: none;
    padding-left: var(--space-s);
    margin-top: var(--space-xs);
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  margin: 6px 0;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 0;
    top: 64px;
    background: var(--paper-light);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-m);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-reveal);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: var(--space-m); width: 100%; }
  .main-nav a { font-size: 1.2rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-l);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-l);
  align-items: center;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-m); }
}

.hero-seal {
  width: 76px;
  height: 76px;
  margin-bottom: var(--space-m);
}

.hero h1 { margin-bottom: var(--space-m); }

.hero-lede {
  font-size: 1.15rem;
  max-width: 30em;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  gap: var(--space-m);
  align-items: center;
  margin-top: var(--space-m);
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--wax);
  color: var(--paper-light);
  padding: 0.85rem 1.6rem;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: background 0.25s;
}
.btn-primary:hover { background: var(--wax-dark); }

.link-secondary {
  font-size: 0.92rem;
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 0.2rem;
  transition: border-color 0.25s, color 0.25s;
}
.link-secondary:hover { border-color: var(--wax); color: var(--wax); }

.hero-image-frame {
  position: relative;
  aspect-ratio: 4/5;
  border: 1px solid var(--paper-line);
  padding: 10px;
  overflow: hidden;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(245, 241, 232, 0.22) 50%, transparent 65%);
  background-size: 250% 250%;
  background-position: -40% -40%;
  animation: light-sweep 16s ease-in-out infinite;
  pointer-events: none;
}

@keyframes light-sweep {
  0%, 100% { background-position: -40% -40%; }
  50% { background-position: 40% 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image-frame::after { animation: none; display: none; }
}

/* ---------- Reveals ----------
   Masqués uniquement si JS a pu s'exécuter (classe .js posée par script.js) :
   sans JS, ou si le script échoue, le contenu reste visible par défaut. */
.js .reveal {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.1s var(--ease-reveal);
}
.js .reveal.in { clip-path: inset(0 0 0 0); }

.js .fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal);
}
.js .fade-up.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .fade-up { clip-path: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Drop cap ---------- */
.dropcap::first-letter {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 700;
  color: var(--wax);
  float: left;
  line-height: 0.78;
  padding-right: 0.12em;
  margin-top: 0.08em;
}

/* ---------- Sections ---------- */
section { padding: var(--space-xl) 0; }
section.tight { padding: var(--space-l) 0; }

.section-head {
  max-width: 38em;
  margin-bottom: var(--space-l);
}

.section-head .label { display: block; margin-bottom: var(--space-xs); }

.bg-ink { background: var(--ink); color: rgba(245, 241, 232, 0.86); }
.bg-ink h2, .bg-ink h3 { color: var(--paper-light); }
.bg-ink .label { color: #c79a6f; }
.bg-ink .hairline { border-top-color: rgba(245, 241, 232, 0.18); }

/* ---------- Seal divider ---------- */
.seal-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  margin: var(--space-l) 0;
}
.seal-divider::before, .seal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--paper-line);
}
.seal-divider svg { width: 34px; height: 34px; flex-shrink: 0; }

/* ---------- Pôles d'expertise (asymmetric cards) ---------- */
.poles-list {
  display: grid;
  gap: 0;
}

.pole-row {
  display: grid;
  grid-template-columns: 0.3fr 1fr 1fr;
  gap: var(--space-m);
  padding: var(--space-m) 0;
  border-top: 1px solid var(--paper-line);
  align-items: baseline;
}

.pole-row:last-child { border-bottom: 1px solid var(--paper-line); }

.pole-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass-text);
}

.pole-row h3 { margin-bottom: 0.5rem; }

.pole-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: var(--space-s);
  list-style: none;
  padding: 0;
}

.pole-tags li {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  position: relative;
  padding-left: 0.7rem;
}
.pole-tags li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--wax);
}

/* Sur fond encre : papier atténué, lisible même en petit corps (AA 4.5:1+). */
.bg-ink .pole-tags li { color: rgba(245, 241, 232, 0.82); }
.bg-ink .pole-tags li::before { color: #c79a6f; }
.bg-ink .pole-row p { color: rgba(245, 241, 232, 0.86); }

@media (max-width: 760px) {
  .pole-row { grid-template-columns: 1fr; gap: var(--space-xs); }
  .pole-num { font-size: 1.2rem; }
}

.detail-row {
  display: grid;
  grid-template-columns: 0.4fr 1.6fr;
  gap: var(--space-l);
}

@media (max-width: 760px) {
  .detail-row { grid-template-columns: 1fr; gap: var(--space-xs); }
}

/* ---------- Territoire (tracé SVG) ---------- */
.territoire {
  position: relative;
}

.territoire-map {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.territoire-map svg { width: 100%; height: auto; }

.territoire-path {
  fill: none;
  stroke: var(--wax);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}
.js .territoire-path {
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1.8s var(--ease-reveal);
}
.js .territoire-map.in .territoire-path { stroke-dashoffset: 0; }

.territoire-point circle {
  fill: var(--ink);
  transition: r 0.4s var(--ease-reveal);
}

.territoire-point text {
  font-family: var(--font-text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  fill: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .territoire-path { stroke-dashoffset: 0; transition: none; }
}

.etudes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-m);
  margin-top: var(--space-l);
}

@media (max-width: 880px) {
  .etudes-grid { grid-template-columns: 1fr; }
}

.etude-card {
  border-top: 1px solid var(--brass);
  padding-top: var(--space-s);
}

.etude-card-photo {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: var(--space-s);
}

.etude-card .label { margin-bottom: var(--space-xs); }
.etude-card .schedule { margin-top: var(--space-s); font-size: 0.92rem; }
.etude-card .schedule dt { color: var(--ink); font-weight: 500; margin-top: 0.6rem; }
.etude-card .schedule dd { margin: 0; color: var(--ink-soft); }

/* ---------- Équipe ---------- */
.equipe-associes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-l);
}

.associe-card {
  text-align: center;
  padding: var(--space-m) var(--space-s);
  border: 1px solid var(--paper-line);
}

.initiale {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--paper-light);
  border: 1px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-s);
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--wax);
}

.associe-card .role {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-top: 0.3rem;
}

.equipe-groupe {
  margin-top: var(--space-l);
}

.equipe-groupe h3 {
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-s);
}

.equipe-noms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem var(--space-m);
  list-style: none;
  padding: 0;
  margin: 0;
}

.equipe-noms li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--paper-line-soft);
  font-size: 0.95rem;
}

.equipe-noms .fn {
  display: block;
  font-size: 0.78rem;
  color: var(--brass-text);
  letter-spacing: 0.02em;
}

/* ---------- Tableaux (tarifs) ---------- */
table.tarifs {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-m) 0;
  font-size: 0.95rem;
}

table.tarifs th, table.tarifs td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--paper-line);
}

table.tarifs th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
}

/* ---------- Lexique ---------- */
.lexique-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: sticky;
  top: 78px;
  background: var(--paper);
  padding: var(--space-s) 0;
  z-index: 10;
  border-bottom: 1px solid var(--paper-line);
}

.lexique-nav a, .lexique-nav span {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 1px solid var(--paper-line);
}

.lexique-nav a { color: var(--ink); }
.lexique-nav a:hover { background: var(--wax); color: var(--paper-light); border-color: var(--wax); }
.lexique-nav span { color: var(--paper-line); }

.lexique-letter {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--wax);
  margin-top: var(--space-l);
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: var(--space-xs);
}

dl.lexique-list { margin: var(--space-m) 0; }
dl.lexique-list dt {
  font-family: var(--font-text);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.92rem;
  color: var(--ink);
  margin-top: var(--space-m);
}
dl.lexique-list dd {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(245, 241, 232, 0.7);
  padding: var(--space-l) 0 var(--space-m);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-m);
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h3 {
  color: var(--paper-light);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-text);
  font-weight: 500;
  margin-bottom: var(--space-s);
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a:hover { color: var(--paper-light); }

.footer-legal {
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid rgba(245, 241, 232, 0.18);
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(245, 241, 232, 0.55);
}

.footer-legal a { color: rgba(245, 241, 232, 0.55); }
.footer-legal a:hover { color: var(--paper-light); }

.footer-seal {
  width: 28px;
  height: 28px;
  opacity: 0.55;
  margin-bottom: var(--space-s);
}

/* ---------- Cartouche sceau (animation de pressage) ---------- */
.js .seal-press {
  transform: scale(1.15);
  opacity: 0;
  transition: transform 0.7s var(--ease-reveal), opacity 0.5s ease;
}
.js .seal-press.pressed {
  transform: scale(1);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .seal-press { transform: none; opacity: 1; transition: none; }
}

/* ---------- Carte contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
}

@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.map-frame {
  border: 1px solid var(--paper-line);
  margin-top: var(--space-l);
}

.map-frame iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

form.contact-form {
  display: grid;
  gap: var(--space-s);
  max-width: 640px;
  margin-top: var(--space-m);
}

form.contact-form label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: 0.3rem;
}

form.contact-form input,
form.contact-form textarea {
  width: 100%;
  background: var(--paper-light);
  border: 1px solid var(--paper-line);
  padding: 0.7rem 0.8rem;
  font-family: var(--font-text);
  font-size: 0.95rem;
  color: var(--ink);
}

form.contact-form input:focus-visible,
form.contact-form textarea:focus-visible,
form.contact-form select:focus-visible {
  outline: 2px solid var(--wax);
  outline-offset: 1px;
  border-color: var(--wax);
}

/* ---------- Focus clavier visible (toute la page) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--wax);
  outline-offset: 2px;
}

form.contact-form button {
  justify-self: start;
  background: var(--wax);
  color: var(--paper-light);
  border: none;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-text);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s;
}
form.contact-form button:hover { background: var(--wax-dark); }

/* ---------- Utilitaires ---------- */
.reassurance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-m);
  margin-top: var(--space-l);
}

.reassurance-item {
  border-top: 1px solid var(--brass);
  padding-top: var(--space-s);
}

.reassurance-item h3 { font-size: 1.1rem; }
.reassurance-item p { font-size: 0.92rem; margin-bottom: 0; }

@media (max-width: 880px) {
  .reassurance-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .reassurance-grid { grid-template-columns: 1fr; }
}

.legal-content { max-width: 42em; }
.legal-content h2 { font-size: 1.3rem; margin-top: var(--space-l); }
.legal-content h2:first-of-type { margin-top: var(--space-m); }

.credits-list { font-size: 0.92rem; padding-left: 1.2em; }
.credits-list li { margin-bottom: 0.4rem; }

.mediateur-block {
  border: 1px solid var(--wax);
  padding: var(--space-m);
  margin: var(--space-m) 0;
  font-size: 0.95rem;
}

/* FAQ en accordéons natifs <details>/<summary> */
.faq-list details {
  border-top: 1px solid var(--paper-line);
}
.faq-list details:last-of-type {
  border-bottom: 1px solid var(--paper-line);
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) 0;
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary h2 {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0;
}

.faq-list summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--wax);
  border-bottom: 1px solid var(--wax);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-reveal);
  margin-bottom: 2px;
}
.faq-list details[open] summary::after { transform: rotate(225deg); }

.faq-list summary:hover h2 { color: var(--wax); }

.faq-list .faq-answer {
  padding: 0 0 var(--space-m);
  max-width: 42em;
}
.faq-list .faq-answer p:last-child { margin-bottom: 0; }

.faq-list details[open] .faq-answer {
  animation: faq-open 0.4s var(--ease-reveal);
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .faq-list details[open] .faq-answer { animation: none; }
  .faq-list summary::after { transition: none; }
}

.detail-row + .detail-row { margin-top: var(--space-l); }

.text-center { text-align: center; }
.mt-l { margin-top: var(--space-l); }
.mb-0 { margin-bottom: 0; }
.eyebrow { display: block; margin-bottom: var(--space-xs); }

.figure-caption {
  font-size: 0.8rem;
  color: var(--brass-text);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* ---------- Utilitaires de mise en page (remplacent les anciens styles inline) ---------- */
.measure-md { max-width: 42em; }
.measure-md-center { max-width: 42em; margin: 0 auto; }
.measure-sm-center { max-width: 34em; margin: 0 auto var(--space-m); }
.measure-sm38-center { max-width: 38em; margin: 0 auto; }
.measure-lg { max-width: 46em; }
.measure-narrow { max-width: 40em; }
.lede-md { max-width: 42em; font-size: 1.05rem; }
.center-mt { margin: 0 auto var(--space-m); }

.heading-xs { font-size: 1.1rem; }
.heading-sm { font-size: 1.2rem; }
.heading-sm-spaced { font-size: 1.2rem; margin-top: var(--space-l); }
.heading-sm-spaced-sm { font-size: 1.2rem; margin-top: var(--space-m); }
.heading-md { font-size: 1.4rem; }
.heading-lg { font-size: 1.6rem; }
.heading-xl { font-size: 1.8rem; }
.heading-xxl { font-size: 1.9rem; }
.pole-num-lg { font-size: 2rem; }

.text-sm { font-size: 0.92rem; }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 0.8rem; }
.inline-block { display: inline-block; }
.no-border-x { border-left: none; border-right: none; }

.note-brass { margin-top: 1rem; font-size: 0.85rem; color: var(--brass-text); }
.note-brass-md { max-width: 42em; font-size: 0.9rem; color: var(--brass-text); }
.note-brass-sm { font-size: 0.8rem; color: var(--brass-text); margin-top: 0.8rem; }
.phone-display { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }

.tags-stack { flex-direction: column; gap: 0.5rem; }
.tags-stack-md { gap: 0.6rem; max-width: 42em; flex-direction: column; }
.tags-loose { margin-top: var(--space-m); gap: 0.7rem 1.6rem; }
.tags-loose-md { gap: 0.6rem 1.6rem; max-width: 42em; }

.img-banner { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.img-banner-wide { aspect-ratio: 16/5; object-fit: cover; width: 100%; }

.select-field {
  width: 100%;
  background: var(--paper-light);
  border: 1px solid var(--paper-line);
  padding: 0.7rem 0.8rem;
  font-family: var(--font-text);
  font-size: 0.95rem;
  color: var(--ink);
}

.bordered-pad { padding: var(--space-m); margin-top: var(--space-m); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-l);
}
.grid-2-spaced { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); margin-top: var(--space-m); }
.grid-2-center { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); align-items: center; }

@media (max-width: 760px) {
  .grid-2, .grid-2-spaced, .grid-2-center { grid-template-columns: 1fr; }
}

.actions-row { margin-top: var(--space-m); display: flex; gap: var(--space-m); flex-wrap: wrap; }
.actions-center { display: flex; gap: var(--space-m); justify-content: center; flex-wrap: wrap; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper-light);
  padding: 0.5rem 1rem;
  z-index: 100;
}

/* ====================================================================
   VIEW TRANSITIONS & PARAPHE · identité d'animation au changement de page
   ==================================================================== */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 320ms;
  animation-timing-function: var(--ease-reveal);
}

::view-transition-old(root) { animation-name: vt-fade-out; }
::view-transition-new(root) { animation-name: vt-fade-in; }

@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes vt-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* Le header garde son propre groupe de transition : pas de flash/morph. */
.site-header { view-transition-name: site-header; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- Voile d'introduction + paraphe à l'encre ---------- */
.intro-veil {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  opacity: 1;
  visibility: visible;
  transition: opacity 150ms var(--ease-reveal), visibility 150ms;
}

.intro-veil.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-veil .paraphe path {
  fill: none;
  stroke: var(--wax);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Filet de sécurité : si le JS échoue ou ne retire pas le voile,
   cette animation le rend inerte à 700 ms quoi qu'il arrive. */
.intro-veil {
  animation: veil-failsafe 1ms linear 700ms forwards;
}
@keyframes veil-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-veil { display: none !important; }
}

/* ---------- Barre de progression de lecture ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--wax);
  z-index: 60;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress { display: none; }
}

/* ---------- Header : réduction au scroll ---------- */
.site-header { transition: box-shadow 0.25s var(--ease-reveal); }
.site-header .container { transition: padding 0.25s var(--ease-reveal); }
.site-header.scrolled { box-shadow: 0 2px 12px rgba(26, 31, 42, 0.1); }
.site-header.scrolled .container { padding-top: 0.6rem; padding-bottom: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header .container { transition: none; }
}

/* ---------- Footer : embossage du sceau au survol ---------- */
.footer-seal { transition: filter 0.25s var(--ease-reveal), transform 0.25s var(--ease-reveal); }
.footer-seal:hover { filter: drop-shadow(0 2px 4px rgba(26, 31, 42, 0.35)); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .footer-seal { transition: none; }
  .footer-seal:hover { transform: none; }
}
.skip-link:focus { left: 0; }

/* ---------- Message inline du formulaire (démo) ---------- */
.form-notice {
  border: 1px solid var(--brass);
  background: var(--paper-light);
  padding: var(--space-s) 1.2rem;
  margin-top: var(--space-s);
  max-width: 640px;
  font-size: 0.95rem;
  color: var(--ink);
}
.form-notice a { color: var(--wax); border-bottom: 1px solid var(--paper-line); }

/* ---------- Barre d'appel mobile ---------- */
.mobile-call-bar { display: none; }

@media (max-width: 720px) {
  .mobile-call-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    height: 52px;
    background: var(--ink);
    border-top: 1px solid rgba(245, 241, 232, 0.18);
  }
  .mobile-call-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paper-light);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-call-bar a + a { border-left: 1px solid rgba(245, 241, 232, 0.18); }
  .mobile-call-bar { height: calc(52px + env(safe-area-inset-bottom, 0px)); }
  body:has(.mobile-call-bar) { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  /* Repli pour navigateurs sans :has() : léger padding inutile sur la page
     contact (seule page sans barre), footer jamais masqué ailleurs. */
  @supports not selector(body:has(a)) {
    body { padding-bottom: 52px; }
  }
  /* Masquée quand le clavier est ouvert (un champ a le focus) */
  body:has(input:focus, textarea:focus, select:focus) .mobile-call-bar { display: none; }
  body:has(input:focus, textarea:focus, select:focus) { padding-bottom: 0; }
}

/* ---------- Impression ---------- */
@media print {
  .site-header,
  .site-footer,
  .main-nav,
  .nav-toggle,
  .btn-rdv,
  .btn-primary,
  .mobile-call-bar,
  .intro-veil,
  .reading-progress,
  .seal-divider,
  .map-frame,
  .skip-link { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    padding-bottom: 0 !important;
  }
  h1, h2, h3, h4, .pole-num, .label { color: #000; }
  .bg-ink { background: none; color: #000; }
  .bg-ink h2, .bg-ink h3, .bg-ink .label { color: #000; }
  a { color: #000; text-decoration: none; }
  section, section.tight { padding: 0.8rem 0; }
  .js .reveal, .js .fade-up { clip-path: none !important; opacity: 1 !important; transform: none !important; }
}
