/* Atelier Scripta Manent — site vitrine (sobre, lisible, mobile-first) */
:root {
  --cream: #f7f1e6;
  --cream-dark: #ebe3d4;
  --paper: #fffdf8;
  --ink: #1c1410;
  --ink-soft: #3d3229;
  --muted: #6b5e52;
  --red: #8b1e1e;
  --red-deep: #6b1515;
  --red-soft: #a33a3a;
  --gold: #b0892b;
  --gold-soft: #d4b45a;
  --gold-pale: #f0e4c0;
  --line: #ddd2c0;
  --shadow: 0 8px 28px rgba(28, 20, 16, 0.08);
  --radius: 12px;
  --max: 72rem;
  --font-serif: "EB Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text: 1.125rem;
  --leading: 1.65;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text);
  line-height: var(--leading);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--red-deep);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 230, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--red-deep);
  line-height: 1.15;
}

.brand-tag {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-phone {
  display: none;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  cursor: pointer;
}

.site-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.site-nav.open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.6rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--gold-pale);
  color: var(--red-deep);
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.1rem;
}

.page {
  padding: 1.75rem 0 4rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--red-deep);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42rem;
}

.prose {
  max-width: 42rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--red-deep);
  margin: 2rem 0 0.6rem;
  font-weight: 600;
}

.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 1.5rem 0 0.4rem;
}

.section {
  margin: 2.5rem 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--red-deep);
  margin: 0 0 1rem;
  font-weight: 600;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
  border: 0;
  margin: 2rem 0;
}

/* Hero */
.hero {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0 0.5rem;
}

.hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--red-deep);
  font-weight: 600;
}

.hero-copy .kicker {
  display: inline-block;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--paper);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-deep);
  color: #fff;
  border-color: var(--red-deep);
}

.btn-secondary {
  background: transparent;
  color: var(--red-deep);
  border-color: var(--red);
}

.btn-secondary:hover {
  background: var(--gold-pale);
  color: var(--red-deep);
}

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(28, 20, 16, 0.12);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-dark);
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.card-body h3 {
  font-family: var(--font-serif);
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  color: var(--red-deep);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.gallery-grid figure {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-grid figcaption {
  padding: 0.55rem 0.65rem 0.7rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 8, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(96vw, 1000px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Forms */
.form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  max-width: 40rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.form-field .hint {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.2rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  min-height: 3rem;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-pale);
}

.photo-drop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 1.1rem;
  text-align: center;
  background: var(--cream);
  color: var(--muted);
}

.photo-drop strong {
  color: var(--ink);
}

.photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.photo-previews img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-success {
  display: none;
  background: #eef6ea;
  border: 1px solid #b7d4a8;
  color: #245018;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.form-success.show {
  display: block;
}

/* Contact block */
.contact-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.contact-panel h2 {
  margin-top: 0;
  font-family: var(--font-serif);
  color: var(--red-deep);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin: 0.55rem 0;
}

.contact-list a {
  font-weight: 600;
  text-decoration: none;
}

.contact-list .big-phone {
  font-size: 1.35rem;
  color: var(--red);
}

/* Steps */
.steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 3.4rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.step h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-family: var(--font-serif);
  color: var(--red-deep);
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Split media */
.split {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  margin: 1.5rem 0;
}

.split img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

.img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

/* Footer */
.site-footer {
  background: var(--red-deep);
  color: #f6ebe0;
  padding: 2.2rem 0 6.5rem;
  margin-top: 2rem;
}

.site-footer a {
  color: var(--gold-soft);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-grid h3 {
  font-family: var(--font-serif);
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: #fff;
}

.footer-grid p,
.footer-grid li {
  margin: 0.25rem 0;
  color: #f0dccd;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-bottom {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.92rem;
  color: #e2c9b4;
}

/* Mobile sticky CTA */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(247, 241, 230, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
}

.mobile-cta .btn {
  min-height: 2.9rem;
  border-radius: 10px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

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

.breadcrumb a:hover {
  color: var(--red);
}

/* Notice / badge */
.badge {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--red-deep);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Desktop */
@media (min-width: 768px) {
  .header-phone {
    display: inline;
  }

  .nav-toggle {
    display: none;
  }

  /* Même largeur / padding que .header-inner pour coller au brand */
  .site-nav {
    display: block !important;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.1rem 0.7rem;
    border-top: 0;
    background: transparent;
  }

  .header-inner {
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
  }

  .site-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    gap: 0.1rem 0.15rem;
    justify-content: flex-start;
  }

  .site-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.92rem;
  }

  /* Le bouton « Devis » du header suffit en desktop */
  .site-nav li:last-child {
    display: none;
  }

  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    padding: 1.5rem 0 0.5rem;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid.two {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
  }

  .split.two {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .mobile-cta {
    display: none;
  }

  .site-footer {
    padding-bottom: 2.2rem;
  }

  .form-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Une seule ligne, répartie sur toute la largeur du contenu */
  .site-nav ul {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
  }

  .site-nav a {
    padding: 0.4rem 0.35rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  .site-nav a {
    padding: 0.45rem 0.5rem;
    font-size: 1rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  a.card:hover {
    transform: none;
  }
}
