/* ============================================================
   Cévennes Structures Bois — site vitrine (thème sombre)
   ============================================================ */

/* ---------- Thème sombre « Nuit sur les crêtes » ---------- */
:root {
  color-scheme: dark;
  --bg: #161b18;
  --bg-alt: #1c2320;
  --surface: #222a26;
  --ink: #ede6d8;
  --muted: #a39a88;
  --accent: #c98a4b;
  --accent-hover: #dda05f;
  --accent-ink: #1b140c;
  --accent-soft: #2c3630;
  --wood: #c98a4b;
  --border: #2f3a34;
  --shadow: 0 22px 48px -24px rgba(0, 0, 0, 0.65);
  --radius: 10px;
  --radius-sm: 6px;
  --header-bg: rgba(22, 27, 24, 0.88);
  --illu-sun: #c98a4b;
  --hill-far: #46554b;
  --hill-mid: #33413a;
  --hill-near: #232d27;
  --illu-line: #c98a4b;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--bg-alt);
  transition: background-color 0.35s ease;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

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

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
}

.brand-name small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-badges li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8438rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 7px 14px;
  transition: background-color 0.35s ease;
}

.hero-badges svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-illustration .illu-sun {
  fill: var(--illu-sun);
}

.hero-illustration .illu-far {
  fill: var(--hill-far);
}

.hero-illustration .illu-mid {
  fill: var(--hill-mid);
}

.hero-illustration .illu-near {
  fill: var(--hill-near);
}

.hero-illustration .illu-frame {
  stroke: var(--illu-line);
}

.hero-illustration .illu-peg {
  fill: var(--hill-near);
}
/* ---------- Hero vidéo (version simplifiée, centrée) ---------- */
.hero-video {
  min-height: 65vh;
  display: flex;
  align-items: center;
  padding: 0;
}

.hero-video .container {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.hero-video .hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-video h1 {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 6px 24px rgba(0, 0, 0, 0.55);
  margin-bottom: 0;
}

.hero-video .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

.hero-video .btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
}

.hero-video .btn--ghost:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Savoir-faire ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 36px;
  box-shadow: var(--shadow);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.skill-card svg {
  width: 46px;
  height: 46px;
  color: var(--wood);
  margin-bottom: 20px;
}

.skill-card h3 {
  font-size: 1.4375rem;
}

.skill-card > p {
  color: var(--muted);
}

.skill-card ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.skill-card li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9375rem;
}

.skill-card li::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-4px);
}

/* ---------- Portfolio ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.portfolio-card {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, background-color 0.35s ease, border-color 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-5px);
}

.portfolio-card:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

.portfolio-card.is-hidden {
  display: none;
}

.card-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  display: block;
  padding: 20px 22px 24px;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 8px;
}

.card-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

.card-place {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(680px, calc(100vw - 40px));
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
}

.lightbox::backdrop {
  background: rgba(20, 16, 10, 0.65);
  backdrop-filter: blur(3px);
}

.lightbox-media {
  position: relative;
}

.lightbox img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 16, 10, 0.55);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(20, 16, 10, 0.8);
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-count {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 16, 10, 0.55);
  color: #fff;
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.lightbox-body {
  padding: 24px 30px 30px;
}

.lightbox-body h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.lightbox-place {
  font-size: 0.9063rem;
  color: var(--wood);
  font-weight: 600;
  margin-bottom: 14px;
}

.lightbox-desc {
  color: var(--muted);
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  white-space: pre-line;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 16, 10, 0.55);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(20, 16, 10, 0.8);
}

/* ---------- Atelier ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
}

.about-text p strong {
  color: var(--ink);
}

.values {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.values li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.values svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.values strong {
  display: block;
  font-size: 1rem;
}

.values span {
  color: var(--muted);
  font-size: 0.9375rem;
}

.assurance {
  margin-top: 24px;
  padding: 18px 22px;
  border-left: 3px solid var(--wood);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9063rem;
  color: var(--muted);
  transition: background-color 0.35s ease;
}

/* ---------- Démarche (4 étapes) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  counter-increment: step;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--wood);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

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

/* ---------- Témoignages ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  margin: 0;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.testimonial p {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 18px;
}

.testimonial p::before {
  content: "« ";
  color: var(--wood);
}

.testimonial p::after {
  content: " »";
  color: var(--wood);
}

.testimonial footer {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background-color 0.35s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: #b3462e;
}

.field-error {
  display: none;
  font-size: 0.8125rem;
  color: #b3462e;
  margin-top: 5px;
}

.field.has-error .field-error {
  display: block;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

.form-success {
  display: none;
  padding: 22px 26px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  font-weight: 500;
}

.form-success.is-visible {
  display: block;
}

.contact-info h3 {
  font-size: 1.25rem;
}

.contact-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 16px;
}

.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-list svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-list span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

.zone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.zone h3 {
  margin-bottom: 8px;
}

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

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0 36px;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-legal {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Animations d'apparition ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section {
    padding: 72px 0;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-illustration {
    max-width: 520px;
  }

  .skills-grid,
  .contact-grid,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

  .testimonials {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: none;
  }

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

  .site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
  }

  .site-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: none;
    font-size: 1.0625rem;
  }

  .header-cta {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Avis Google ---------- */
.reviews-widget {
  min-height: 40px;
}

.reviews-link {
  text-align: center;
  margin: 28px 0 0;
}
