/* Source Sans 3 (Adobe, licence SIL OFL) : hébergée sur le site, aucun appel à Google. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/source-sans-3-light.woff") format("woff"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/source-sans-3-lightit.woff") format("woff"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-regular.woff") format("woff"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-semibold.woff") format("woff"); }

/* =========================================================
   TLP Photo : feuille de style unique
   Identité tirée du logo : fond crème, encre anthracite,
   trait fin comme le dessin de la main et de l'appareil.
   ========================================================= */

:root {
  --cream: #F2EFE8;      /* fond du logo */
  --paper: #FAF8F4;      /* surfaces claires */
  --white: #FFFFFF;
  --ink: #2A2A2A;        /* encre du logo */
  --graphite: #5F5B55;   /* texte secondaire */
  --sand: #DDD6CA;       /* filets, bordures */
  --field-line: #8C8475; /* contour des champs : contraste ≥ 3:1 */
  --taupe: #A39886;      /* détails discrets */
  --ok: #4F6B4A;
  --warn: #85591A;   /* assombri : contraste ≥ 4,5:1 sur fond crème */
  --danger: #9C3B32;

  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --line: 1px solid var(--sand);
  --radius: 2px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--graphite); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-weight: 300; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; font-weight: 400; }
p { margin: 0 0 1em; }
code { background: var(--paper); padding: .1em .4em; border: var(--line); font-size: .9em; }
hr { border: 0; border-top: var(--line); margin: 2rem 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.section { padding: clamp(48px, 8vw, 104px) 0; }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.muted { color: var(--graphite); }
.small { font-size: .9rem; }
.lead { font-size: 1.25rem; font-weight: 300; color: var(--graphite); max-width: 60ch; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--ink); color: var(--cream); padding: 8px 14px; }
.page-title { margin-bottom: .3em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 1.5rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Le petit « Photographie » espacé reprend la signature du logo. */
.signature { font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: var(--graphite); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--cream); border: 1px solid var(--ink);
  padding: 12px 24px; font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; border-radius: var(--radius); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-small { padding: 7px 16px; font-size: .95rem; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--white); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button.danger { color: var(--danger); }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 1.1rem; }
fieldset { border: 0; border-top: var(--line); padding: 1.5rem 0 0; margin: 0 0 1rem; display: grid; gap: 1.1rem; }
legend { font-size: 1.3rem; font-weight: 300; padding-right: 12px; }
.field { display: grid; gap: 6px; }
label { font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=number], input[type=url], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--white); border: 1px solid var(--field-line); border-radius: var(--radius);
  padding: 11px 13px; min-height: 46px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field small, .hint { color: var(--graphite); font-size: .88rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--ink); }
.grid-2 { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.hp { position: absolute; left: -9999px; }

/* ---------- Messages ---------- */
.flashes { padding-top: 20px; }
.flash { padding: 12px 16px; margin-bottom: 12px; border-left: 3px solid var(--ink); background: var(--paper); }
.flash-success { border-color: var(--ok); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.flash-info { border-color: var(--taupe); }

/* ---------- En-tête public ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(242, 239, 232, .94); backdrop-filter: blur(8px); border-bottom: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 62px; height: auto; }
.brand-text { display: grid; line-height: 1; }
.brand-name { font-size: 1.35rem; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.brand-sub { font-size: .62rem; letter-spacing: .38em; text-transform: uppercase; color: var(--graphite); margin-top: 5px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"]:not(.btn) { border-color: var(--ink); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle .bar { display: block; height: 1px; background: var(--ink); margin: 7px 0; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: var(--line); padding: 8px var(--gutter) 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: var(--line); }
  .site-nav .btn { margin-top: 16px; }
  .brand img { width: 50px; }
}

/* ---------- Accueil ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 5fr 6fr; } }
.hero-logo { width: min(100%, 460px); margin: 0 0 clamp(20px, 3vw, 36px) -6px; }
.hero-text p { font-size: 1.2rem; font-weight: 300; max-width: 46ch; color: var(--graphite); }
.hero-photos { position: relative; }
.hero-photos .main { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.hero-photos .inset {
  position: absolute; width: 38%; aspect-ratio: 3 / 4; object-fit: cover;
  left: -12%; bottom: -8%; border: 8px solid var(--cream);
}
@media (max-width: 899px) { .hero-photos .inset { left: auto; right: 6%; bottom: -10%; width: 34%; } .hero-photos { margin-bottom: 40px; } }

/* Écran d'ouverture : le logo se dessine de gauche à droite, puis l'écran s'efface. */
.splash {
  position: fixed; inset: 0; z-index: 200; background: var(--cream);
  display: grid; place-items: center; cursor: pointer;
  animation: splash-out .7s ease 2.6s forwards;
}
.splash img { width: min(70vw, 420px); animation: draw 1.6s cubic-bezier(.6, .1, .3, 1) .2s both; }
.splash.splash-leave { animation: splash-out .4s ease forwards; }
html.splash-on { overflow: hidden; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .splash { animation: splash-out .3s ease 1.2s forwards !important; }
  .splash img { animation: none !important; }
}

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; max-width: 48ch; color: var(--graphite); }

.categories { display: grid; gap: clamp(16px, 2.5vw, 28px); grid-template-columns: 1fr; }
@media (min-width: 700px) { .categories { grid-template-columns: repeat(3, 1fr); } }
.category { text-decoration: none; display: grid; gap: 14px; }
.category img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; transition: opacity .3s; }
.category:hover img { opacity: .88; }
.category h3 { margin: 0; font-size: 1.5rem; font-weight: 300; }
.category p { margin: 0; color: var(--graphite); font-size: .98rem; }

.band { background: var(--paper); border-top: var(--line); border-bottom: var(--line); }

.process { display: grid; gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 800px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process li { border-top: 1px solid var(--ink); padding-top: 16px; }
.process li::before { counter-increment: step; content: counter(step); display: block; font-size: 2rem; font-weight: 300; line-height: 1; margin-bottom: 12px; }
.process h3 { font-size: 1.15rem; margin-bottom: .4em; }
.process p { color: var(--graphite); margin: 0; font-size: .98rem; }

.quote-block { max-width: 760px; margin: 0 auto; text-align: center; }
.quote-block blockquote { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 300; font-style: italic; line-height: 1.35; }
.cta-band { text-align: center; }
.cta-band .lead { margin: 0 auto 1.6rem; }

/* ---------- Réalisations ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 36px; border-bottom: var(--line); }
.filters a { text-decoration: none; padding: 10px 0; margin-bottom: -1px; border-bottom: 1px solid transparent; color: var(--graphite); }
.filters a[aria-current="true"], .filters a:hover { color: var(--ink); border-color: var(--ink); }

.portfolio-grid { display: grid; gap: clamp(24px, 3vw, 40px) clamp(16px, 2.5vw, 28px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
.work { text-decoration: none; display: grid; gap: 10px; }
.work img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--sand); transition: opacity .3s; }
.work:hover img { opacity: .88; }
.work h3 { margin: 0; font-size: 1.25rem; }
.work .meta { color: var(--graphite); font-size: .92rem; }

.work-header { display: grid; gap: 24px; margin-bottom: clamp(28px, 5vw, 56px); }
@media (min-width: 900px) { .work-header { grid-template-columns: 2fr 1fr; align-items: end; } }
.work-facts { list-style: none; padding: 0; margin: 0; border-top: var(--line); }
.work-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: var(--line); }
.work-facts span:first-child { color: var(--graphite); }

.masonry { columns: 1; column-gap: 16px; }
@media (min-width: 600px) { .masonry { columns: 2; } }
@media (min-width: 1000px) { .masonry { columns: 3; } }
.masonry a { display: block; margin-bottom: 16px; break-inside: avoid; cursor: zoom-in; }
.masonry img { width: 100%; background: var(--sand); }

.back-link { display: inline-block; margin-bottom: 24px; color: var(--graphite); }

/* ---------- Prestations ---------- */
.offer-group { margin-bottom: clamp(40px, 6vw, 72px); }
.offer-group > h2 { border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 0; }
.offer { display: grid; gap: 16px 40px; padding: 28px 0; border-bottom: var(--line); }
@media (min-width: 860px) { .offer { grid-template-columns: 1.1fr 1.2fr auto; align-items: start; } }
.offer h3 { margin-bottom: .3em; font-size: 1.45rem; font-weight: 300; }
.offer .summary { color: var(--graphite); margin: 0; }
.offer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.offer li { padding-left: 20px; position: relative; }
.offer li::before { content: ""; position: absolute; left: 0; top: .75em; width: 10px; border-top: 1px solid var(--ink); }
.offer-price { text-align: left; display: grid; gap: 12px; justify-items: start; }
@media (min-width: 860px) { .offer-price { text-align: right; justify-items: end; } }
.price { font-size: 1.2rem; white-space: nowrap; }

/* ---------- À propos ---------- */
.about-grid { display: grid; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 5fr 6fr; } }
.about-photo { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about-text p { font-size: 1.12rem; max-width: 62ch; }

/* ---------- Devis & connexion ---------- */
.devis-grid { display: grid; gap: clamp(32px, 6vw, 72px); }
@media (min-width: 960px) { .devis-grid { grid-template-columns: 1fr 2fr; } }
.devis-aside { border-top: 1px solid var(--ink); padding-top: 20px; }
.devis-aside ol { padding-left: 1.2em; color: var(--graphite); }
.devis-aside li { margin-bottom: .6em; }
.card-form { background: var(--paper); border: var(--line); padding: clamp(20px, 4vw, 40px); }

.auth { min-height: 60vh; display: grid; place-items: center; padding: 48px 0; }
.auth-box { width: min(100%, 440px); }
.auth-box .mark { width: 120px; margin: 0 auto 20px; }
.auth-box h1 { text-align: center; font-size: 2rem; }
.auth-box .intro { text-align: center; color: var(--graphite); }

.prose { max-width: 70ch; }
.prose p { white-space: normal; }
.install-logo { width: 220px; margin-bottom: 24px; }
.install .panel { margin: 24px 0; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: var(--line); padding: 56px 0 24px; margin-top: 40px; background: var(--paper); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.3fr; } }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-form input { min-height: 40px; padding: 8px 12px; }
.footer-logo { width: 190px; margin-bottom: 12px; }
.footer-title { font-weight: 600; margin-bottom: .5em; }
.site-footer p { margin: 0 0 .35em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.socials { display: flex; gap: 16px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: var(--line); font-size: .9rem; color: var(--graphite); }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(242, 239, 232, .97); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 10px; padding: 48px 0; height: 100vh; height: 100dvh; align-content: center; }
.lightbox img { max-height: calc(100dvh - 120px); max-width: 100%; object-fit: contain; }
.lightbox figcaption { color: var(--graphite); font-size: .92rem; }
.lightbox button { background: none; border: 0; font-size: 2.6rem; font-weight: 300; color: var(--ink); cursor: pointer; height: 64px; width: 64px; }
.lb-close { position: absolute; top: 8px; right: 8px; }
@media (max-width: 600px) { .lightbox { grid-template-columns: 40px 1fr 40px; } .lightbox button { width: 40px; } }

/* =========================================================
   Espace client & administration
   ========================================================= */
.app { background: var(--paper); }
.app-shell { display: grid; min-height: 100vh; }
@media (min-width: 960px) { .app-shell { grid-template-columns: 260px 1fr; } }
.app-side { background: var(--cream); border-right: var(--line); }
@media (min-width: 960px) { .app-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; } }
.app-side-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: var(--line); }
.app-side .brand img { width: 46px; }
.app-side .brand-name { font-size: 1.1rem; }
.app-nav { padding: 16px 12px 20px; display: flex; flex-direction: column; flex: 1; }
.app-area { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--graphite); margin: 6px 10px 12px; }
.app-nav > a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; padding: 10px 12px; border-radius: var(--radius); }
.app-nav > a:hover { background: var(--paper); color: var(--ink); }
.app-nav > a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.app-nav-bottom { margin-top: auto; padding: 24px 12px 0; display: grid; gap: 12px; font-size: .95rem; }
.app-user { display: flex; align-items: center; gap: 10px; color: var(--graphite); margin: 8px 0 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink); display: inline-grid; place-items: center; font-size: .8rem; font-weight: 600; flex: none; color: var(--ink); }
.badge { background: var(--ink); color: var(--cream); border-radius: 999px; font-size: .75rem; font-weight: 600; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; }
.app-nav > a[aria-current="page"] .badge { background: var(--cream); color: var(--ink); }
@media (max-width: 959px) {
  .nav-toggle { display: block; }
  .app-nav { display: none; }
  .app-nav.open { display: flex; }
}

.app-main { padding: clamp(20px, 4vw, 48px); min-width: 0; }
.app-main h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.app-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.app-head h1, .app-head p { margin: 0; }
.app-head p { color: var(--graphite); margin-top: 6px; }

.panel { background: var(--white); border: var(--line); padding: clamp(18px, 3vw, 28px); margin-bottom: 24px; }
.panel > h2 { font-size: 1.35rem; font-weight: 400; margin-bottom: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; font-size: 1.35rem; font-weight: 400; }
.cols { display: grid; gap: 24px; }
@media (min-width: 1100px) { .cols { grid-template-columns: 3fr 2fr; } .cols > div > .panel:last-child { margin-bottom: 0; } }

.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--white); border: var(--line); padding: 18px 20px; text-decoration: none; display: block; }
.stat strong { display: block; font-size: 2.2rem; font-weight: 300; line-height: 1.1; }
.stat span { color: var(--graphite); font-size: .95rem; }
a.stat:hover { border-color: var(--ink); color: var(--ink); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.table th { text-align: left; font-weight: 600; font-size: .88rem; color: var(--graphite); padding: 10px 12px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.table td { padding: 12px; border-bottom: var(--line); vertical-align: top; }
.table tr:hover td { background: var(--paper); }
.table a { font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }

.pill { display: inline-block; font-size: .82rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--sand); white-space: nowrap; background: var(--paper); }
.pill-nouveau { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pill-envoye { border-color: var(--warn); color: var(--warn); }
.pill-accepte { border-color: var(--ok); color: var(--ok); }
.pill-refuse, .pill-expired { border-color: var(--danger); color: var(--danger); }
.pill-archive { color: var(--graphite); }

.empty { text-align: center; padding: 40px 20px; color: var(--graphite); }
.empty img { width: 140px; margin: 0 auto 16px; opacity: .7; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dl.facts dt { color: var(--graphite); }
dl.facts dd { margin: 0; }
.message-box { background: var(--paper); border-left: 2px solid var(--sand); padding: 12px 16px; white-space: pre-line; }

/* Suivi de prestation */
.steps { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(6, 1fr); } }
.steps li { position: relative; display: flex; gap: 12px; align-items: center; padding: 8px 0; }
@media (min-width: 760px) {
  .steps li { flex-direction: column; text-align: center; align-items: center; padding: 0 4px; }
  .steps li::before { content: ""; position: absolute; top: 9px; left: calc(-50% + 12px); right: calc(50% + 12px); border-top: 1px solid var(--sand); }
  .steps li:first-child::before { display: none; }
  .steps li.step-done::before, .steps li.step-current::before { border-color: var(--ink); }
}
.steps .dot { width: 19px; height: 19px; border-radius: 50%; border: 1px solid var(--sand); background: var(--white); flex: none; }
.steps .step-done .dot { background: var(--ink); border-color: var(--ink); }
.steps .step-current .dot { border: 5px solid var(--ink); }
.steps .step-label { font-size: .88rem; color: var(--graphite); line-height: 1.3; }
.steps .step-current .step-label { color: var(--ink); font-weight: 600; }

/* Galeries */
.gallery-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery-card { background: var(--white); border: var(--line); text-decoration: none; display: grid; }
.gallery-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: var(--sand); }
.gallery-card .body { padding: 14px 16px; display: grid; gap: 4px; }
.gallery-card strong { font-weight: 600; }
.gallery-card span { color: var(--graphite); font-size: .92rem; }
a.gallery-card:hover { border-color: var(--ink); color: var(--ink); }
.gallery-card.is-expired { opacity: .6; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 0; margin-bottom: 20px; border-top: var(--line); border-bottom: var(--line); position: sticky; top: 0; background: var(--paper); z-index: 5; }
.toolbar .group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.segmented { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.segmented a { padding: 6px 14px; text-decoration: none; font-size: .95rem; }
.segmented a[aria-current="true"] { background: var(--ink); color: var(--cream); }

.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.photo { position: relative; background: var(--sand); }
.photo > a { display: block; cursor: zoom-in; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; padding: 6px; background: linear-gradient(transparent, rgba(42, 42, 42, .55)); }
.photo-actions .name { color: var(--white); font-size: .8rem; padding-left: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: rgba(250, 248, 244, .92); color: var(--ink); cursor: pointer; text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--white); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.fav-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.photo .fav-flag { position: absolute; top: 8px; right: 8px; background: var(--ink); color: var(--cream); font-size: .75rem; padding: 2px 8px; border-radius: 999px; }
.photo-check { position: absolute; top: 8px; left: 8px; }
.photo-check input { width: 20px; height: 20px; accent-color: var(--ink); }

/* Envoi de photos */
.dropzone { border: 1px dashed var(--taupe); background: var(--paper); padding: 32px 20px; text-align: center; cursor: pointer; transition: background .2s, border-color .2s; }
.dropzone.drag { background: var(--cream); border-color: var(--ink); }
.dropzone p { margin: .3em 0; }
.upload-progress { margin-top: 14px; display: grid; gap: 6px; }
.progress { height: 4px; background: var(--sand); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

/* Tchat */
.chat { display: grid; grid-template-rows: 1fr auto; height: min(70vh, 720px); background: var(--white); border: var(--line); }
.chat-log { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(78%, 560px); display: grid; gap: 2px; }
.msg .bubble { padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { font-size: .76rem; color: var(--graphite); padding: 0 6px; }
.msg.theirs { align-self: flex-start; }
.msg.theirs .bubble { background: var(--cream); border-bottom-left-radius: 3px; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .bubble { background: var(--ink); color: var(--cream); border-bottom-right-radius: 3px; text-align: left; }
.chat-day { align-self: center; font-size: .8rem; color: var(--graphite); margin: 8px 0; }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: var(--line); align-items: flex-end; }
.chat-form textarea { min-height: 46px; height: 46px; max-height: 160px; resize: none; }
.chat-empty { margin: auto; text-align: center; color: var(--graphite); max-width: 36ch; }

.threads { display: grid; }
.thread { display: flex; gap: 12px; align-items: center; padding: 14px 4px; border-bottom: var(--line); text-decoration: none; }
.thread:hover { background: var(--paper); color: var(--ink); }
.thread .t-body { flex: 1; min-width: 0; }
.thread .t-body strong { display: block; }
.thread .t-body span { color: var(--graphite); font-size: .92rem; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thread time { color: var(--graphite); font-size: .85rem; }

.thumb-admin { width: 56px; height: 56px; object-fit: cover; }
.portfolio-admin { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.portfolio-admin figure { margin: 0; background: var(--white); border: var(--line); }
.portfolio-admin img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.portfolio-admin figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 8px; font-size: .85rem; }
.portfolio-admin .is-cover { outline: 2px solid var(--ink); outline-offset: -2px; }

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

/* =========================================================
   Document de devis (écran + impression / PDF)
   ========================================================= */
.quote-doc { background: var(--white); border: var(--line); padding: clamp(20px, 5vw, 56px); max-width: 900px; font-size: .98rem; color: var(--ink); }
.qd-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.qd-brand img { width: 190px; }
.qd-company { text-align: right; font-size: .9rem; color: var(--graphite); line-height: 1.5; }
.qd-trade { font-size: 1.05rem; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.qd-meta { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; margin: 28px 0; }
.qd-meta p { margin: 0; }
.qd-label { font-size: .75rem; letter-spacing: .28em; text-transform: uppercase; color: var(--graphite); margin-bottom: 6px !important; }
.qd-client { background: var(--paper); padding: 14px 18px; }
.qd-title { font-size: 1.6rem; margin: 0 0 .5em; }
.qd-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0 0 1.2em; }
.qd-facts dt { color: var(--graphite); }
.qd-facts dd { margin: 0; }
.qd-intro { color: var(--graphite); }
.qd-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.qd-table th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--graphite); border-bottom: 1px solid var(--ink); padding: 8px 6px; }
.qd-table td { padding: 10px 6px; border-bottom: var(--line); vertical-align: top; }
.qd-table .num { text-align: right; white-space: nowrap; }
.qd-desc { color: var(--graphite); font-size: .9rem; margin-top: 2px; }
.qd-bottom { display: grid; gap: 20px; grid-template-columns: 1fr auto; align-items: start; }
.qd-notes p { margin: 0 0 .5em; font-size: .92rem; }
.qd-totals { border-collapse: collapse; min-width: 260px; }
.qd-totals th { text-align: left; font-weight: 400; color: var(--graphite); padding: 6px 16px 6px 0; }
.qd-totals td { text-align: right; padding: 6px 0; white-space: nowrap; }
.qd-totals .grand th, .qd-totals .grand td { border-top: 1px solid var(--ink); font-weight: 600; color: var(--ink); font-size: 1.1rem; padding-top: 10px; }
.qd-section { margin-top: 24px; font-size: .9rem; }
.qd-section h3 { font-size: .98rem; font-weight: 600; margin-bottom: .4em; }
.qd-section p { margin-bottom: .6em; }
.qd-small { font-size: .82rem; color: var(--graphite); }
.qd-sign { margin-top: 28px; border-top: var(--line); padding-top: 18px; }
.qd-sign-box { border: 1px dashed var(--taupe); height: 90px; max-width: 340px; }
.qd-proof { font-size: .8rem; color: var(--graphite); word-break: break-all; }
.qd-annex { margin-top: 32px; padding: 18px; border: 1px dashed var(--taupe); font-size: .88rem; }
.qd-annex h3 { font-size: .98rem; font-weight: 600; }
.qd-footer { margin-top: 32px; padding-top: 12px; border-top: var(--line); font-size: .78rem; color: var(--graphite); text-align: center; }
@media (max-width: 640px) {
  .qd-meta, .qd-bottom { grid-template-columns: 1fr; }
  .qd-company { text-align: left; }
}

/* Éditeur de lignes de devis */
.lines-editor { width: 100%; border-collapse: collapse; }
.lines-editor th { text-align: left; font-size: .85rem; color: var(--graphite); padding: 6px; border-bottom: 1px solid var(--ink); }
.lines-editor td { padding: 6px; vertical-align: top; border-bottom: var(--line); }
.lines-editor input, .lines-editor textarea { min-height: 40px; padding: 8px 10px; }
.lines-editor textarea { min-height: 40px; height: 40px; }
.lines-editor .w-qty { width: 90px; }
.lines-editor .w-price { width: 130px; }
.lines-editor .w-total { width: 120px; text-align: right; white-space: nowrap; padding-top: 16px; }
.lines-editor .w-del { width: 40px; }
.totals-preview { text-align: right; margin-top: 12px; font-size: 1.1rem; }
@media (max-width: 760px) {
  .lines-editor thead { display: none; }
  .lines-editor tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: var(--line); }
  .lines-editor td { border: 0; padding: 0; }
  .lines-editor td:first-child { grid-column: 1 / -1; }
  .lines-editor .w-qty, .lines-editor .w-price, .lines-editor .w-total { width: auto; }
}

/* Page imprimable */
.print-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
@media print {
  @page { size: A4; margin: 14mm; }
  body, .app { background: #fff !important; }
  .app-side, .print-bar, .app-flashes, .site-header, .site-footer, .no-print, .toolbar, .app-head .actions { display: none !important; }
  .app-shell { display: block; }
  .app-main { padding: 0; }
  .quote-doc { border: 0; padding: 0; max-width: none; font-size: 10.5pt; }
  .qd-annex, .qd-sign { break-inside: avoid; }
  .qd-annex { break-before: page; }
  a { text-decoration: none; }
}
.qd-sign-2 { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.qd-sign-2 p { margin: 0 0 6px; }
.qd-sig { max-width: 220px; max-height: 90px; margin: 6px 0; }
@media (max-width: 640px) { .qd-sign-2 { grid-template-columns: 1fr; } }

/* Signature électronique */
.sign-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1100px) { .sign-layout { grid-template-columns: minmax(0, 1fr) 400px; } .sign-form { position: sticky; top: 96px; } }
.sign-form h2 { margin-bottom: .2em; }
.signature-pad { position: relative; background: var(--white); border: 1px solid var(--ink); border-radius: var(--radius); }
.signature-pad canvas { display: block; cursor: crosshair; }
.signature-pad::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 34px; border-top: 1px dashed var(--sand); pointer-events: none; }
.signature-pad [data-signature-clear] { position: absolute; top: 8px; right: 10px; font-size: .88rem; }
.signature-preview { max-width: 280px; background: var(--white); border: var(--line); padding: 8px; }
.otp-step { border-top: var(--line); padding-top: 14px; display: grid; gap: 10px; justify-items: start; }
.otp-step .field { width: 100%; }
#code { font-size: 1.4rem; letter-spacing: .3em; max-width: 220px; }
.refuse summary { cursor: pointer; color: var(--graphite); font-size: .95rem; }
.panel-callout { border-color: var(--ink); background: var(--paper); }
.panel-callout .panel-head { margin-bottom: .4rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: var(--line); margin-bottom: 24px; }
.tabs a { text-decoration: none; padding: 10px 0; margin-bottom: -1px; border-bottom: 1px solid transparent; color: var(--graphite); }
.tabs a[aria-current="true"] { color: var(--ink); border-color: var(--ink); }
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.filters-bar .field { min-width: 160px; }
.filters-bar input, .filters-bar select { min-height: 40px; padding: 8px 10px; }
.inline-form { display: inline; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 12px 0 12px 18px; border-left: 1px solid var(--sand); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline .meta { font-size: .85rem; color: var(--graphite); }
.timeline p { margin: 2px 0 0; white-space: pre-line; }
.alert-legal { border-left: 3px solid var(--warn); background: var(--paper); padding: 12px 16px; margin-bottom: 20px; }
.kpi-row { display: flex; gap: 24px; flex-wrap: wrap; }
.kpi-row div strong { display: block; font-size: 1.6rem; font-weight: 300; }
.kpi-row div span { color: var(--graphite); font-size: .9rem; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table input { width: 18px; height: 18px; accent-color: var(--ink); }

/* Agenda */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-head h2 { margin: 0; text-transform: capitalize; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--white); }
.calendar th { font-size: .82rem; color: var(--graphite); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--ink); text-align: left; }
.calendar td { border: var(--line); vertical-align: top; height: 112px; padding: 6px; }
.calendar td.other { background: var(--paper); color: var(--graphite); }
.calendar td.today { box-shadow: inset 0 0 0 2px var(--ink); }
.calendar .day-num { font-size: .85rem; display: flex; justify-content: space-between; }
.calendar .day-num a { text-decoration: none; color: var(--graphite); }
.cal-ev { display: block; font-size: .78rem; line-height: 1.25; padding: 3px 6px; margin-top: 4px; border-left: 3px solid var(--ink); background: var(--cream); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev.t-rdv { border-color: var(--taupe); }
.cal-ev.t-retouche { border-color: var(--ok); }
.cal-ev.t-autre { border-color: var(--sand); }
@media (max-width: 760px) { .calendar-wrap { display: none; } }
@media (min-width: 761px) { .agenda-list-mobile { display: none; } }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--graphite); margin-top: 10px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--ink); vertical-align: middle; }
.legend .t-rdv::before { background: var(--taupe); }
.legend .t-retouche::before { background: var(--ok); }
.legend .t-autre::before { background: var(--sand); }

/* Statuts matériel */
.pill-fonctionnel, .pill-actif, .pill-publie, .pill-envoyee, .pill-traitee, .pill-paye { border-color: var(--ok); color: var(--ok); }
.pill-a_verifier, .pill-planifie, .pill-en_cours, .pill-acompte, .pill-a_valider, .pill-en_attente { border-color: var(--warn); color: var(--warn); }
.pill-en_reparation, .pill-hors_service, .pill-desinscrit, .pill-erreur, .pill-retracte { border-color: var(--danger); color: var(--danger); }
.bar-chart { display: grid; gap: 8px; }
.bar-chart .row { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; font-size: .9rem; }
.bar-chart .track { height: 10px; background: var(--paper); border: var(--line); }
.bar-chart .fill { height: 100%; background: var(--ink); }
.category-empty { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--cream); border: var(--line); }
.category-empty img { width: 55%; aspect-ratio: auto; opacity: .55; }
.category:hover .category-empty img { opacity: .8; }
.category-empty { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--cream); border: var(--line); }
.category-empty img { width: 55%; aspect-ratio: auto; opacity: .55; }
.category:hover .category-empty img { opacity: .8; }
@media (min-width: 1000px) { .cols.cols-chat { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
/* Les colonnes ne doivent jamais s'élargir au-delà de l'écran (tableaux larges = défilement interne). */
.cols > *, .grid-2 > *, .grid-3 > *, .devis-grid > *, .sign-layout > *, .about-grid > *, .hero-grid > * { min-width: 0; }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 14px; } .stat strong { font-size: 1.6rem; } }
@media (min-width: 700px) { .grid-2.grid-compact { grid-template-columns: minmax(160px, 240px) 1fr; } }
@media (min-width: 700px) { form > .grid-2.grid-compact:has(> button) { grid-template-columns: 1fr auto; } }

/* Les panneaux d'une même rangée gardent leur hauteur naturelle (pas d'étirement). */
.cols { align-items: start; }
.form { align-content: start; }

/* Liste des conversations */
.threads { display: flex; flex-direction: column; padding: 6px !important; }
.thread { padding: 12px 10px; border-radius: var(--radius); border-bottom: 0; min-width: 0; }
.thread + .thread { border-top: var(--line); }
.thread[aria-current="true"] { background: var(--paper); box-shadow: inset 3px 0 0 var(--ink); }
.thread .t-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.thread time { white-space: nowrap; }
@media (min-width: 1000px) { .threads { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; } }
@media (max-width: 999px) { .threads { max-height: 260px; overflow-y: auto; } }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.chat-head h2 { margin: 0; font-size: 1.35rem; font-weight: 400; }
.msg .bubble { max-width: 100%; }

/* Équipe */
.team-add { display: grid; gap: 12px; }
.team-add .row { display: grid; gap: 10px; align-items: end; }
@media (min-width: 760px) { .team-add .row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; } .team-add .row.row-4 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; } }
.team-add .field label { font-size: .85rem; }
.team-add input, .team-add select { min-height: 40px; padding: 8px 10px; }
.team-add details summary { cursor: pointer; color: var(--graphite); font-size: .95rem; }
.team-add details[open] summary { margin-bottom: 10px; }
.team-table td { vertical-align: middle; }
.team-table select { min-height: 38px; padding: 6px 10px; width: auto; min-width: 150px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; font-size: .92rem; }
.switch input { width: 18px; height: 18px; accent-color: var(--ink); }

/* Aperçu de la signature e-mail */
.signature-preview-box { border: var(--line); background: var(--white); padding: 18px 20px; }
.signature-preview-box .sig-logo { width: 200px; margin-bottom: 12px; }
.signature-preview-box .sig-name { margin: 0; font-size: 1.1rem; }
.signature-preview-box .sig-title { margin: 2px 0 8px; font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; color: var(--graphite); }
.signature-preview-box .sig-contact { margin: 0 0 12px; font-size: .9rem; color: var(--graphite); line-height: 1.6; }
.signature-preview-box .sig-mark { width: 56px; }

/* Formulaire client (particulier / entreprise) */
.client-fields { display: grid; gap: 1rem; }
.segmented-choice { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; width: fit-content; max-width: 100%; }
.segmented-choice label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font-weight: 400; cursor: pointer; }
.segmented-choice input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-choice label:has(input:checked) { background: var(--ink); color: var(--cream); }
.segmented-choice label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: -4px; }
.pro-fields { display: grid; gap: 1rem; padding: 16px; background: var(--paper); border: var(--line); }
.client-fields { container-type: inline-size; }
@container (max-width: 620px) { .client-fields .grid-2, .client-fields .grid-3 { grid-template-columns: 1fr; } }
.new-client { border: 1px dashed var(--taupe); padding: 16px; background: var(--white); }

/* ---- Anti-débordement : boutons, champs, tableaux ---- */
.btn, button { max-width: 100%; }
.btn { white-space: normal; text-align: center; line-height: 1.25; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
.field input[type=date], .field input[type=time], .field input[type=datetime-local] { width: 100%; }
.actions, .app-head, .panel-head, .toolbar, .filters-bar { flex-wrap: wrap; }
.app-head > div:first-child { min-width: 0; }
.perm-table th { white-space: normal; }

@media (max-width: 700px) {
  .table-wrap:has(.table-stack) { overflow: visible; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr { display: block; width: 100%; }
  .table-stack tr { border: var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; background: var(--white); }
  .table-stack tr:hover td { background: transparent; }
  .table-stack td { display: grid; grid-template-columns: minmax(90px, 36%) minmax(0, 1fr); gap: 10px; align-items: center;
    padding: 6px 0; border: 0; white-space: normal !important; overflow-wrap: anywhere; }
  .table-stack td::before { content: attr(data-label); font-size: .8rem; color: var(--graphite); }
  .table-stack td:first-child { display: block; padding-top: 2px; font-size: 1.02rem; }
  .table-stack td:first-child::before, .table-stack td[data-label=""]::before { content: none; }
  .table-stack td[data-label=""] { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
  .table-stack td:empty { display: none; }
  .table-stack td > form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .team-table select { min-width: 0; width: 100%; }
  .table-stack .td-v { min-width: 0; }
  .table-stack .td-v > .pill:only-child { display: inline-block; width: auto; }
  .perm-table th, .perm-table td { padding: 10px 6px; }
}

/* ---- Parcours du devis ---- */
.stepper-box { margin: 0 0 22px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); counter-reset: s; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 4px; min-width: 0; }
.stepper li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--sand); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.step-done::before, .stepper li.step-current::before { background: var(--ink); }
.step-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: .85rem; font-weight: 600; border: 2px solid var(--sand); background: var(--white); color: var(--graphite); }
.step-done .step-dot { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.step-current .step-dot { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px rgba(42,42,42,.1); }
.step-label { font-size: .88rem; font-weight: 600; line-height: 1.2; }
.step-todo .step-label { color: var(--graphite); font-weight: 400; }
.step-date { font-size: .76rem; color: var(--graphite); }
.stepper-off li .step-dot { opacity: .6; }
.stepper-hint { margin: 16px 0 0; padding: 12px 16px; background: var(--paper); border-left: 3px solid var(--ink); font-size: .95rem; }
.stepper-hint.is-off { border-left-color: var(--danger); }
@media (max-width: 640px) {
  .stepper { grid-template-columns: 1fr; gap: 0; }
  .stepper li { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 0 0 14px; }
  .stepper li::before { top: auto; bottom: 100%; right: auto; left: 15px; width: 2px; height: 14px; }
  .stepper li.step-todo { padding-bottom: 10px; }
  .step-date { margin-left: auto; }
}
.stage-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; white-space: nowrap; }
.stage-dots { display: inline-flex; gap: 3px; }
.stage-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.stage-dots i.on { background: var(--ink); }
.stage-facture .stage-dots i.on, .stage-paye .stage-dots i.on { background: var(--ok); }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.next-actions:not(:has(*)) { display: none; }
.next-actions form { margin: 0; }
.stepper-panel { padding-bottom: 20px; }
.stage-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.stage-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: var(--line); border-radius: 999px;
  text-decoration: none; color: var(--ink); font-size: .9rem; background: var(--white); }
.stage-tabs a span { font-size: .78rem; color: var(--graphite); }
.stage-tabs a.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.stage-tabs a.active span { color: var(--sand); }
@media (min-width: 701px) { .table td:first-child a { white-space: nowrap; } }

/* ---- Fiche client : prestations ---- */
.project-card { border: var(--line); background: var(--white); padding: 16px 18px; margin: 0 0 14px; }
.project-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.project-card-head h3 { margin: 0; font-size: 1.15rem; }
.project-card-head p { margin: 2px 0 0; }
.pstep { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pstep li { position: relative; min-width: 0; }
.pstep li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--sand); }
.pstep li:first-child::before { display: none; }
.pstep li.pstep-done::before, .pstep li.pstep-current::before { background: var(--ink); }
.pstep button { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 2px;
  background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: center; }
.pstep button:disabled { cursor: default; }
.pstep-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600;
  border: 2px solid var(--sand); background: var(--white); color: var(--graphite); transition: transform .15s, border-color .15s; }
.pstep-done .pstep-dot { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pstep-current .pstep-dot { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px rgba(42,42,42,.1); }
.pstep button:not(:disabled):hover .pstep-dot { transform: scale(1.1); border-color: var(--ink); }
.pstep button:focus-visible .pstep-dot { outline: 2px solid var(--ink); outline-offset: 2px; }
.pstep-label { font-size: .8rem; line-height: 1.2; }
.pstep-todo .pstep-label { color: var(--graphite); }
.pstep-current .pstep-label { font-weight: 600; }
.project-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
.project-edit, .project-add { margin-top: 12px; }
.project-edit summary { cursor: pointer; font-size: .9rem; color: var(--graphite); }
.project-edit[open] summary { margin-bottom: 12px; }
.project-add summary { list-style: none; display: inline-flex; }
.project-add summary::-webkit-details-marker { display: none; }
.project-add[open] summary { margin-bottom: 14px; }
@media (max-width: 640px) {
  .pstep { grid-template-columns: 1fr; }
  .pstep li::before { top: auto; bottom: 100%; right: auto; left: 15px; width: 2px; height: 10px; }
  .pstep li + li { margin-top: 10px; }
  .pstep button { flex-direction: row; text-align: left; gap: 12px; }
  .pstep-label { font-size: .92rem; }
}

/* ---- Fiche client : journal ---- */
.note-form { display: grid; gap: 10px; margin: 14px 0 22px; }
.note-form textarea { min-height: 70px; }
.note-types { display: flex; flex-wrap: wrap; gap: 8px; }
.note-type { position: relative; }
.note-type input { position: absolute; opacity: 0; pointer-events: none; }
.note-type span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: var(--line); border-radius: 999px; cursor: pointer; font-size: .9rem; background: var(--white); }
.note-type input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.note-type input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.note-type span::before, .journal-icon::before { content: "✎"; font-size: .9em; }
.note-appel span::before, .journal-appel .journal-icon::before { content: "☎"; }
.note-email span::before, .journal-email .journal-icon::before { content: "✉"; }
.note-rdv span::before, .journal-rdv .journal-icon::before { content: "◷"; }
.journal-auto .journal-icon::before { content: "⚙"; }
.journal { list-style: none; margin: 0; padding: 0; }
.journal-day { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); margin: 18px 0 8px; }
.journal-day:first-child { margin-top: 0; }
.journal-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: var(--line); }
.journal-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--cream); font-size: .95rem; }
.journal-auto .journal-icon { background: var(--paper); color: var(--graphite); border: var(--line); }
.journal-meta { margin: 0; font-size: .82rem; color: var(--graphite); }
.journal-text { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.journal-auto .journal-text { color: var(--graphite); font-size: .93rem; }
.journal-del button { font-size: 1.1rem; line-height: 1; color: var(--graphite); }
.journal-del button:hover { color: var(--danger); }
.panel-alert { border-color: var(--danger); }
.footer-bottom .socials { gap: 14px; align-items: center; }
.footer-bottom .socials a { color: var(--graphite); display: inline-flex; opacity: 1; transition: opacity .15s, color .15s; }
.footer-bottom .socials a:hover, .footer-bottom .socials a:focus-visible { opacity: 1; color: var(--ink); }

/* ---- Pied de page : liens légaux ---- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.footer-legal a, .footer-legal .link-button { color: var(--graphite); font-size: inherit; }
.footer-legal a:hover, .footer-legal .link-button:hover { color: var(--ink); }
.legal-table { font-size: .9rem; }
.legal-table td { vertical-align: top; }

/* ---- Bannière cookies : petite carte discrète en bas à gauche, non bloquante ---- */
.cookie-banner { position: fixed; left: 16px; bottom: 16px; z-index: 60; width: min(340px, calc(100vw - 32px));
  background: var(--white); color: var(--ink); border: 1px solid var(--sand); box-shadow: 0 6px 18px rgba(42,42,42,.10);
  padding: 12px 14px; display: grid; gap: 10px; font-size: .82rem; line-height: 1.45; }
.cookie-banner[hidden], .cookie-prefs[hidden], .cookie-actions[hidden] { display: none; }
.cookie-banner p { margin: 0; color: var(--graphite); }
.cookie-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.cookie-btn { font: inherit; font-size: .8rem; padding: 6px 12px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); cursor: pointer; }
.cookie-btn:hover { opacity: .85; }
.cookie-link { font: inherit; font-size: .8rem; background: none; border: 0; padding: 6px 4px; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-prefs { display: grid; gap: 6px; justify-items: start; }
.cookie-prefs .check { font-size: .8rem; gap: 8px; }
.cookie-prefs .cookie-btn { justify-self: end; }

/* ---- Statistiques : barres (une seule série, couleur d'encre) ---- */
.stat small { display: block; margin-top: 4px; font-size: .78rem; color: var(--graphite); }
.bar-chart { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 220px; padding: 22px 0 26px; border-bottom: 1px solid var(--sand); }
.bar-chart-max { position: absolute; top: 0; left: 0; font-size: .75rem; color: var(--graphite); }
.bar-chart::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; border-top: 1px dashed var(--sand); }
.bar { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; outline: none; }
.bar-fill { display: block; width: 100%; max-width: 28px; margin: 0 auto; height: max(var(--h), 2px); background: var(--ink); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.bar-chart:hover .bar-fill { opacity: .45; }
.bar:hover .bar-fill, .bar:focus-visible .bar-fill { opacity: 1; }
.bar-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font-size: .72rem; color: var(--graphite); white-space: nowrap; }
.bar:hover::after, .bar:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(var(--h) + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); font-size: .78rem; padding: 4px 8px; white-space: nowrap; z-index: 2; pointer-events: none; }
.meter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.meter-list li { display: grid; grid-template-columns: 96px 1fr 48px; gap: 12px; align-items: center; font-size: .92rem; }
.meter { height: 8px; background: var(--paper); border: 1px solid var(--sand); }
.meter span { display: block; height: 100%; background: var(--ink); }
.meter-list strong { text-align: right; font-weight: 600; }
.portfolio-admin .alt-input { width: 100%; font-size: .8rem; padding: 6px 8px; min-height: 0; margin-top: 6px; }
.alt-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.alt-save p { flex: 1 1 320px; margin: 0; }

/* ---- Page 404 ---- */
.error-page { text-align: center; }
.error-page .narrow { margin: 0 auto; }
.error-mark { width: 120px; height: auto; margin: 0 auto 18px; display: block; opacity: .8; }
.eyebrow { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--graphite); margin: 0 0 8px; }
.error-links { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }

/* Lien secondaire : un seul vrai bouton d'action par écran (« Demander un devis »). */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; font-weight: 400; padding: 10px 4px; }
.link-arrow::after { content: "→"; text-decoration: none; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
label.check .field-error { flex-basis: 100%; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
label.check:has(.field-error) { flex-wrap: wrap; }

/* ---- Micro-entreprise ---- */
.meter-list-wide li { grid-template-columns: 140px 1fr auto; }
.meter.is-warn span { background: var(--warn); }
.row-highlight td { background: var(--paper); }
.receipts-table tfoot td { border-top: 1px solid var(--ink); padding-top: 12px; }
@media (max-width: 640px) { .meter-list-wide li { grid-template-columns: 1fr auto; } .meter-list-wide .meter { grid-column: 1 / -1; grid-row: 2; } }
@media print { .receipts-table { font-size: 10pt; } .stage-tabs { display: none; } }

/* ---- Visionneuse : actions sous la photo ---- */
.lightbox .lb-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lightbox .lb-tools[hidden], .lightbox .lb-tool[hidden] { display: none; }
.lightbox .lb-tool { display: inline-flex; align-items: center; gap: 8px; width: auto; height: auto; font-size: .92rem; font-weight: 400;
  padding: 9px 16px; border: 1px solid var(--ink); background: var(--white); color: var(--ink); text-decoration: none; cursor: pointer; }
.lightbox .lb-tool svg { width: 18px; height: 18px; }
.lightbox .lb-tool[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.lightbox .lb-tool[aria-pressed="true"] svg { fill: currentColor; }
.lightbox img { max-height: calc(100dvh - 170px); }

/* ================= Galerie client immersive ================= */
.gallery-page { background: var(--cream); }
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 12px var(--gutter); background: var(--cream); border-bottom: var(--line); }
.gallery-bar nav { display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.gallery-bar nav a { color: var(--ink); text-decoration: none; }
.gallery-bar nav a:hover { text-decoration: underline; }

.g-hero { position: relative; min-height: min(86vh, 920px); display: grid; align-items: end; background: var(--ink); color: #fff; overflow: hidden; }
.g-hero.is-compact { min-height: clamp(220px, 34vh, 360px); }
.g-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,20,0) 35%, rgba(20,20,20,.68) 100%); }
.g-hero-text { position: relative; z-index: 1; text-align: center; padding: 48px var(--gutter) clamp(36px, 7vh, 72px); }
.g-hero h1 { font-weight: 300; font-size: clamp(2.1rem, 6vw, 4.2rem); line-height: 1.05; margin: 6px 0 10px; color: #fff; text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.g-hero.is-compact h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.g-eyebrow { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; margin: 0; opacity: .92; }
.g-by { margin: 0; font-size: 1.02rem; opacity: .95; }
.g-cta { margin-top: 26px; background: #fff; color: var(--ink); border-color: #fff; }
.g-cta:hover { background: var(--cream); color: var(--ink); }

.g-tabs { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: var(--line); }
.g-inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.g-tabs-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; min-height: 60px; }
.g-tablist { display: flex; gap: 4px 26px; flex-wrap: wrap; }
.g-tablist a { display: inline-flex; gap: 6px; align-items: baseline; padding: 18px 0 16px; color: var(--graphite); text-decoration: none; border-bottom: 2px solid transparent; }
.g-tablist a span { font-size: .8rem; }
.g-tablist a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.g-tablist a:hover { color: var(--ink); }
.g-tab-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.g-tab-actions svg { width: 18px; height: 18px; }

.g-section { padding: clamp(32px, 6vw, 64px) 0; }
.g-center { text-align: center; }
.g-intro { display: grid; gap: 28px; justify-items: center; text-align: center; margin-bottom: 36px; }
.g-message { max-width: 62ch; font-size: 1.12rem; line-height: 1.7; font-weight: 300; }
.g-sign { color: var(--graphite); font-size: .95rem; margin-top: 4px; }
.g-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 48px; }
.g-facts li { display: grid; gap: 2px; }
.g-facts strong { font-weight: 400; font-size: 1.25rem; }
.g-facts span { font-size: .85rem; color: var(--graphite); }
.g-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.g-preview a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--sand); }
.g-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.g-preview a:hover img { transform: scale(1.04); }
.g-help { margin-top: 36px; }
.g-help p { max-width: 70ch; margin: 0 auto; color: var(--graphite); font-size: .92rem; text-align: center; }

.g-grid { columns: 3 300px; column-gap: 10px; }
.g-photo { position: relative; margin: 0 0 10px; break-inside: avoid; background: var(--sand); }
.g-photo > a { display: block; cursor: zoom-in; }
.g-photo img { display: block; width: 100%; height: auto; }
.g-photo-actions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.g-photo:hover .g-photo-actions, .g-photo:focus-within .g-photo-actions { opacity: 1; }
.g-photo-actions .icon-btn { background: rgba(255,255,255,.94); border-color: transparent; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.g-photo-actions .fav-btn[aria-pressed="true"] { opacity: 1; }
.g-photo:has(.fav-btn[aria-pressed="true"]) .g-photo-actions { opacity: 1; }
@media (hover: none) { .g-photo-actions { opacity: 1; } }
@media (max-width: 640px) {
  .g-grid { columns: 2 150px; column-gap: 6px; }
  .g-photo { margin-bottom: 6px; }
  .g-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-preview a:nth-child(n+5) { display: none; }
  .g-tabs-inner { padding-top: 4px; padding-bottom: 10px; }
  .g-tablist a { padding: 12px 0 10px; }
  .g-tab-actions, .g-tab-actions .btn { width: 100%; justify-content: center; }
}
.gallery-foot { text-align: center; padding: 28px var(--gutter); font-size: .82rem; color: var(--graphite); border-top: var(--line); }

/* Liste des albums du client */
.album-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.album-card { display: grid; background: var(--white); border: var(--line); text-decoration: none; color: var(--ink); transition: box-shadow .2s; }
.album-card:hover { box-shadow: 0 12px 30px rgba(42,42,42,.1); }
.album-cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.album-card:hover .album-cover img { transform: scale(1.03); }
.album-cover .album-placeholder { object-fit: contain; padding: 18%; opacity: .5; }
.album-body { display: grid; gap: 4px; padding: 16px 18px 18px; }
.album-body strong { font-weight: 400; font-size: 1.2rem; }
.album-body span { color: var(--graphite); font-size: .9rem; }
.album-body .album-open { color: var(--ink); margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
.album-card.is-expired { opacity: .75; }
.g-photo-actions .fav-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.g-welcome { max-width: 46ch; display: grid; gap: 12px; }
.g-welcome h2 { font-weight: 300; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0; }
.g-welcome p { margin: 0; font-size: 1.12rem; line-height: 1.6; color: var(--graphite); font-weight: 300; }

/* ---- Partage d'album ---- */
.share-panel { margin-top: 48px; padding-top: 32px; border-top: var(--line); }
.share-panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.share-panel-head h2 { font-weight: 300; font-size: 1.6rem; margin: 0 0 6px; }
.share-panel-head p { margin: 0; max-width: 60ch; }
.share-panel .btn, .g-tab-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.share-panel .btn svg, .g-tab-actions .btn svg { width: 18px; height: 18px; }
.g-tab-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-list { list-style: none; margin: 20px 0 0; padding: 0; }
.share-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 14px 0; border-bottom: var(--line); }
.share-dialog { border: 1px solid var(--sand); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--white); color: var(--ink); box-shadow: 0 20px 60px rgba(42,42,42,.25); }
.share-dialog::backdrop { background: rgba(42,42,42,.45); }
.share-dialog form { padding: 22px 24px 24px; }
.share-dialog-head { display: flex; justify-content: space-between; align-items: center; }
.share-dialog-head h2 { margin: 0; font-weight: 300; font-size: 1.5rem; }
.share-dialog-head .link-button { font-size: 1.8rem; text-decoration: none; line-height: 1; }
.share-thumb { width: 96px; height: 96px; object-fit: cover; }
.share-dl { align-self: end; padding-bottom: 12px; }
.share-box { max-width: 560px; margin: 0 auto; text-align: center; }
.share-eyebrow { color: var(--graphite); }
.share-form { text-align: left; margin: 24px 0; }
.code-input { font-size: 1.4rem !important; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
.share-note { max-width: 60ch; margin: 0 auto 28px; text-align: center; font-size: 1.1rem; font-weight: 300; }
.share-note p { margin: 0 0 4px; }
.g-count { padding: 18px 0 16px; color: var(--graphite); }
.g-grid.is-single { columns: 1; max-width: 900px; margin: 0 auto; }
@media (max-width: 640px) { .share-panel-head .btn { width: 100%; justify-content: center; } }
.legal-form { border: 1px dashed var(--field-line); background: var(--white); padding: 18px 22px; margin: 18px 0 8px; }
.legal-form h3 { margin-top: 0; }
@media print { .site-header, .site-footer, .cookie-banner { display: none !important; } }
.form-notice { font-size: .88rem; color: var(--graphite); margin: 0; }

/* Glisser-déposer des photos */
[data-sortable] [data-sort-id] { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
[data-sortable] [data-sort-id] img { -webkit-user-drag: none; pointer-events: none; }
.is-sorting-grid, .is-sorting-grid * { cursor: grabbing !important; }
[data-sort-id].is-sorting { opacity: .25; outline: 2px dashed var(--ink); outline-offset: -2px; }
.sort-ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; margin: 0; opacity: .92; box-shadow: 0 18px 40px rgba(42,42,42,.3); }
.sort-ghost img { width: 100%; height: 100%; object-fit: cover; }
.sort-hint { margin: 0 0 12px; }
.sort-status { margin-left: 8px; color: var(--ok); }

/* ---- Avis clients ---- */
.review-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-items: start; }
.review-card { margin: 0; background: var(--white); border: var(--line); padding: 46px 26px 22px; display: grid; gap: 14px; position: relative; }
.review-card::before { content: "“"; position: absolute; top: 10px; left: 22px; font-size: 3.4rem; line-height: 1; color: var(--sand); font-family: Georgia, serif; }
.review-card .stars { position: absolute; top: 20px; right: 24px; }
.review-card blockquote { margin: 0; font-size: 1.04rem; line-height: 1.65; font-weight: 300; }
.review-card figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; border-top: var(--line); padding-top: 12px; }
.review-card figcaption span { font-size: .82rem; color: var(--graphite); }
.reviews-section { background: var(--paper); }
.stars { display: inline-flex; gap: 2px; font-size: 1.1rem; line-height: 1; }
.stars span { color: var(--sand); }
.stars span.on { color: var(--ink); }
.stars-small { font-size: .9rem; vertical-align: -1px; }
.review-legal { margin-top: 28px; max-width: 80ch; }
.star-field { border: 0; padding: 0; margin: 0; }
.star-field legend { font-weight: 600; font-size: .95rem; margin-bottom: 4px; padding: 0; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.2rem; line-height: 1; color: var(--sand); cursor: pointer; padding: 2px; transition: color .1s, transform .1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--ink); }
.star-input label:hover { transform: scale(1.1); }
.star-input input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.review-form .field-error { flex-basis: 100%; }
.review-admin { list-style: none; margin: 0; padding: 0; }
.review-admin li { padding: 16px 0; border-bottom: var(--line); display: grid; gap: 8px; }
.review-admin li.is-hidden { opacity: .6; }
.review-admin-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.review-admin p { margin: 0; white-space: normal; }

/* Pages du vignoble (référencement local) */
.landing-hero .actions { margin-top: 1.4rem; }
.work .h3 { font-size: 1.25rem; font-weight: 400; margin: 0; }
.landing-blocks { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1fr; }
.landing-blocks h2 { font-size: 1.35rem; margin-bottom: .5em; }
.landing-blocks p { color: var(--graphite); margin: 0; }
@media (min-width: 860px) { .landing-blocks { grid-template-columns: repeat(3, 1fr); } }
.landing-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 1.2rem; }
.local-section { padding-bottom: 0; }
.offer-tarif { margin: 0 0 10px; font-size: .95rem; color: var(--graphite); font-style: italic; }
.cookie-title { display: block; color: var(--ink); font-size: .85rem; margin-bottom: 2px; }
.dev-lock { border-left: 3px solid var(--ink); }
.dev-lock-title { font-size: .85rem; letter-spacing: .12em; font-weight: 600; margin: 0 0 14px; }
.ban-page { text-align: center; } .ban-page img { margin: 0 auto 28px; display: block; max-width: 220px; height: auto; }
.ban-page .lead { margin-left: auto; margin-right: auto; }

/* Fiche client : boutons de même taille */
.client-actions { display: grid; grid-template-columns: repeat(3, 170px); gap: 10px; }
.client-actions .btn { width: 100%; justify-content: center; text-align: center; }
@media (max-width: 640px) { .client-actions { grid-template-columns: 1fr; width: 100%; } }
.client-sheet .panel .btn { width: 100%; justify-content: center; text-align: center; }
/* Champs côte à côte : toujours alignés en haut, même si l'un a une aide en dessous */
.grid-2 > .field, .grid-3 > .field { align-self: start; }
.field-note { margin: -.4rem 0 1.1rem; }
/* Devis : bouton « Ajouter une ligne » détaché du tableau, note selon le type de client */
.add-line-row { margin: 18px 0 26px; }
.type-note { display: grid; gap: 4px; border-left: 3px solid var(--ink); background: var(--paper); padding: 10px 14px; margin: -.2rem 0 1.2rem; font-size: .88rem; color: var(--graphite); }
.type-note strong { color: var(--ink); font-size: .92rem; }
.type-note[hidden] { display: none; }
/* Lignes du devis : dans un cadre étroit, chaque ligne devient une fiche (désignation en pleine largeur) */
.panel:has(.lines-editor) { container-type: inline-size; }
@container (max-width: 700px) {
  .lines-editor thead { display: none; }
  .lines-editor tr { display: grid; grid-template-columns: 90px 1fr auto 32px; gap: 8px 10px; align-items: end; padding: 14px 0; border-bottom: var(--line); }
  .lines-editor td { border: 0; padding: 0; width: auto; }
  .lines-editor td:first-child { grid-column: 1 / -1; display: grid; gap: 6px; }
  .lines-editor td:first-child textarea { margin-top: 0 !important; }
  .lines-editor .w-qty::before, .lines-editor .w-price::before { display: block; font-size: .78rem; color: var(--graphite); margin-bottom: 4px; }
  .lines-editor .w-qty::before { content: "Qté"; }
  .lines-editor .w-price::before { content: "Prix unitaire"; }
  .lines-editor .w-qty, .lines-editor .w-price, .lines-editor .w-total { width: auto; }
  .lines-editor .w-total { padding: 0 0 10px; text-align: right; }
  .lines-editor .w-del { padding-bottom: 8px; text-align: center; }
}

/* Documents à signer (droit à l'image, désistement) */
.signdoc { background: var(--white); border: var(--line); padding: clamp(20px, 4vw, 44px); max-width: 860px; font-size: .97rem; }
.signdoc h3 { font-size: 1.05rem; margin: 1.4em 0 .4em; }
.signdoc h3:first-of-type { margin-top: .6em; }
.signdoc p { margin: 0 0 .6em; color: var(--graphite); }
.signdoc-ref { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.uses-field { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.uses-field legend { font-weight: 600; margin-bottom: 6px; }
.docs-tabs { margin-bottom: 20px; }
.consents-box { border-left: 3px solid var(--sand); padding: 8px 12px; margin: 6px 0 14px; background: var(--paper); }
.consent-panel { border-left: 3px solid var(--warn); } .consent-panel.is-ok { border-left-color: var(--ok, #4F6B4A); }
.consent-panel:target { box-shadow: 0 0 0 3px var(--warn); scroll-margin-top: 20px; }
.app-head .dash-clock { margin-top: 2px; font-variant-numeric: tabular-nums; }
