/* ==========================================================================
   Menuiserie Calvez — styles.css
   Palette : charbon #211D19 · blanc cassé #F5F1EA · chêne #A9743F · rouille #B4552D
   ========================================================================== */

:root {
  --charbon: #211D19;
  --blanc: #F5F1EA;
  --chene: #A9743F;
  --rouille: #B4552D;

  --charbon-90: rgba(33, 29, 25, 0.9);
  --charbon-70: rgba(33, 29, 25, 0.7);
  --charbon-40: rgba(33, 29, 25, 0.4);

  --font-title: "Archivo", Arial, sans-serif;
  --font-text: "Inter", Arial, sans-serif;

  --border-w: 3px;
  --border-w-lg: 4px;

  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --container-max: 1240px;
  --section-pad-y: clamp(3rem, 8vw, 6rem);
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--charbon);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 44px; /* réserve la place du bandeau démo fixe */
}

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

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--charbon);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--blanc);
  border: var(--border-w) solid var(--charbon);
  padding: 0.7em 0.85em;
  width: 100%;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--rouille);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100px;
  background: var(--blanc);
  color: var(--charbon);
  border: var(--border-w) solid var(--charbon);
  padding: 0.6em 1em;
  z-index: 200;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0.5rem;
}

.eyebrow,
.section__kicker {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------------- */
/* Boutons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  padding: 0.9em 1.4em;
  border: var(--border-w) solid currentColor;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--lg { padding: 1.05em 1.7em; font-size: 0.95rem; }

.btn--accent {
  background: var(--rouille);
  border-color: var(--rouille);
  color: var(--blanc);
}
.btn--accent:hover { background: var(--charbon); border-color: var(--charbon); }

.btn--outline {
  background: transparent;
  border-color: var(--charbon);
  color: var(--charbon);
}
.btn--outline:hover { background: var(--charbon); color: var(--blanc); }

.btn--outline-invert {
  background: transparent;
  border-color: var(--blanc);
  color: var(--blanc);
}
.btn--outline-invert:hover { background: var(--blanc); color: var(--charbon); }

.btn--ghost-invert {
  background: transparent;
  border-color: transparent;
  color: var(--blanc);
  padding-left: 0;
  padding-right: 0;
}
.btn--ghost-invert:hover { color: var(--chene); }

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--charbon);
  color: var(--blanc);
  border-bottom: var(--border-w-lg) solid var(--rouille);
}

.site-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-header__brand-name {
  font-family: var(--font-title);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.site-header__brand-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--chene);
  font-weight: 600;
}

.burger {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--blanc);
  padding: 0.4em;
}
.burger__box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 20px;
}
.burger__bar {
  display: block;
  height: 3px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] .burger__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger__bar:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.burger__label {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.main-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(85vw, 340px);
  height: 100vh;
  background: var(--charbon);
  border-left: var(--border-w-lg) solid var(--rouille);
  padding: 5.5rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.main-nav.is-open { transform: translateX(0); }

.main-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.main-nav__list a {
  display: block;
  padding: 0.75em 0;
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--charbon-70);
  color: var(--blanc);
}
.main-nav__list a:hover { color: var(--chene); }

.main-nav__actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: auto;
}
.main-nav__actions .btn { justify-content: center; }

@media (min-width: 900px) {
  .burger { display: none; }

  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    border-left: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    transform: none;
    overflow: visible;
  }
  .main-nav__list {
    flex-direction: row;
    gap: 1.5rem;
  }
  .main-nav__list a {
    padding: 0.4em 0;
    font-size: 0.8rem;
    border-bottom: none;
  }
  .main-nav__actions {
    flex-direction: row;
    margin-top: 0;
  }
}

/* backdrop for mobile nav */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: var(--charbon-70);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 900px) {
  .nav-backdrop { display: none; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--charbon);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33, 29, 25, 0.1) 0%, rgba(33, 29, 25, 0.25) 50%, rgba(33, 29, 25, 0.8) 100%);
}
.hero__content {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1.25rem 3.5rem;
  color: var(--blanc);
}
.hero__content .eyebrow { color: var(--chene); margin-bottom: 0.9rem; display: block; }
.hero__title {
  color: var(--blanc);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  font-size: clamp(2rem, 6vw, 3.4rem);
  max-width: 18ch;
  margin-bottom: 1rem;
}
.hero__lead {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--blanc);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ---------------------------------------------------------------------- */
/* Bandeau chiffres                                                        */
/* ---------------------------------------------------------------------- */

.stats {
  background: var(--rouille);
  color: var(--blanc);
  border-bottom: var(--border-w-lg) solid var(--charbon);
}
.stats__list {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 700px) {
  .stats__list { grid-template-columns: repeat(4, 1fr); }
}
.stats__item {
  padding: 1.75rem 1.25rem;
  border: 1px solid rgba(245, 241, 234, 0.35);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stats__number {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
}
.stats__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Sections génériques                                                     */
/* ---------------------------------------------------------------------- */

.section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-pad-y) 1.25rem;
}

.section--dark {
  max-width: none;
  background: var(--charbon);
  color: var(--blanc);
}
.section--dark > * {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}
.section--dark .section__title,
.section--dark h3 { color: var(--blanc); }
.section--dark .section__kicker { color: var(--chene); }

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section__kicker {
  color: var(--rouille);
  display: block;
  margin-bottom: 0.6rem;
}
.section__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.section__intro {
  margin-top: 1rem;
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------------- */
/* Prestations                                                             */
/* ---------------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: var(--border-w) solid var(--charbon);
  border-left: var(--border-w) solid var(--charbon);
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  border-right: var(--border-w) solid var(--charbon);
  border-bottom: var(--border-w) solid var(--charbon);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.service-card__num {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--chene);
}
.service-card__title {
  font-size: 1.15rem;
}

/* ---------------------------------------------------------------------- */
/* Réalisations — comparateur avant/après                                  */
/* ---------------------------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 700px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  border: var(--border-w) solid var(--blanc);
}

.compare__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--charbon);
}
.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 4px;
  background: var(--rouille);
  transform: translateX(-50%);
  pointer-events: none;
}
.compare__divider::before,
.compare__divider::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--rouille);
  transform: translate(-50%, -50%) rotate(45deg);
}
.compare__divider::before { top: 50%; }
.compare__divider::after { display: none; }

.compare__tag {
  position: absolute;
  top: 0.6rem;
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 0.3em 0.6em;
  background: var(--charbon-90);
  color: var(--blanc);
}
.compare__tag--before { left: 0.6rem; }
.compare__tag--after { right: 0.6rem; }

.compare__caption {
  background: var(--blanc);
  color: var(--charbon);
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.compare__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.compare__meta strong { font-family: var(--font-title); text-transform: uppercase; font-size: 0.95rem; }
.compare__meta span { color: var(--rouille); font-weight: 600; }

.compare__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--charbon-70);
}

.compare__range {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: var(--border-w);
  background: var(--charbon);
  cursor: pointer;
}
.compare__range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--rouille);
  border: 2px solid var(--charbon);
  cursor: grab;
}
.compare__range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--rouille);
  border: 2px solid var(--charbon);
  cursor: grab;
  border-radius: 0;
}
.compare__range::-moz-range-track {
  height: var(--border-w);
  background: var(--charbon);
}

/* ---------------------------------------------------------------------- */
/* Étapes chantier                                                         */
/* ---------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: var(--border-w) solid var(--charbon);
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.step {
  padding: 1.75rem 1.5rem;
  border-bottom: var(--border-w) solid var(--charbon);
  border-right: var(--border-w) solid var(--charbon);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.steps > .step:first-child { border-left: var(--border-w) solid var(--charbon); }
@media (min-width: 800px) {
  .steps > .step { border-left: none; }
  .steps > .step:first-child { border-left: var(--border-w) solid var(--charbon); }
}

.step__num {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--rouille);
}
.step__title { font-size: 1.05rem; }

/* ---------------------------------------------------------------------- */
/* L'atelier                                                               */
/* ---------------------------------------------------------------------- */

.section--split {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--blanc);
  border-top: var(--border-w-lg) solid var(--charbon);
  border-bottom: var(--border-w-lg) solid var(--charbon);
}
@media (min-width: 900px) {
  .section--split { grid-template-columns: 1fr 1fr; }
}

.section--split__media { position: relative; min-height: 320px; }
.section--split__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section--split__text {
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
  max-width: 60ch;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}
.section--split__text .section__title { margin-bottom: 0.5rem; }

/* ---------------------------------------------------------------------- */
/* Avis clients                                                            */
/* ---------------------------------------------------------------------- */

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 800px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}

.review-card {
  border: var(--border-w) solid var(--blanc);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.review-card__stars {
  display: flex;
  gap: 0.25rem;
}
.review-card__stars svg {
  width: 18px;
  height: 18px;
  fill: var(--chene);
}
.review-card__text { font-size: 1rem; }
.review-card__author {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--chene);
}

/* ---------------------------------------------------------------------- */
/* Zone d'intervention                                                     */
/* ---------------------------------------------------------------------- */

.zone-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: var(--border-w) solid var(--charbon);
  border-left: var(--border-w) solid var(--charbon);
}
@media (min-width: 640px) {
  .zone-list { grid-template-columns: repeat(3, 1fr); }
}

.zone-list li {
  padding: 1.5rem 1rem;
  border-right: var(--border-w) solid var(--charbon);
  border-bottom: var(--border-w) solid var(--charbon);
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1rem;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Garanties                                                               */
/* ---------------------------------------------------------------------- */

.guarantees-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 800px) {
  .guarantees-grid { grid-template-columns: repeat(3, 1fr); }
}

.guarantee-card {
  border-left: var(--border-w-lg) solid var(--rouille);
  padding: 0.5rem 0 0.5rem 1.25rem;
}
.guarantee-card__title { font-size: 1.05rem; margin-bottom: 0.5rem; }

/* ---------------------------------------------------------------------- */
/* Contact / devis                                                         */
/* ---------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 2fr 1fr; }
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  border: var(--border-w) solid var(--charbon);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
@media (min-width: 560px) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.contact-form__submit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.contact-form__note {
  font-weight: 700;
  color: var(--rouille);
  min-height: 1.2em;
}

.contact-side {
  background: var(--charbon);
  color: var(--blanc);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}
.contact-side h3 {
  color: var(--blanc);
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--charbon);
  color: var(--blanc);
  border-top: var(--border-w-lg) solid var(--rouille);
}
.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 700px) {
  .site-footer__inner { grid-template-columns: repeat(3, 1fr); }
}

.site-footer__brand {
  color: var(--blanc);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.site-footer__col h3 {
  font-size: 0.85rem;
  color: var(--chene);
  margin-bottom: 0.9rem;
}
.site-footer__col p { color: rgba(245, 241, 234, 0.85); }
.site-footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__links a:hover { color: var(--chene); }
.site-footer__legal { font-size: 0.82rem; color: rgba(245, 241, 234, 0.6); }

.site-footer__credit {
  border-top: 1px solid rgba(245, 241, 234, 0.25);
  text-align: center;
  padding: 1.1rem 1.25rem;
  font-size: 0.78rem;
  color: rgba(245, 241, 234, 0.6);
}

/* ---------------------------------------------------------------------- */
/* Bandeau démo fixe                                                       */
/* ---------------------------------------------------------------------- */

.demo-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  background: var(--rouille);
  color: var(--blanc);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.55rem 1rem;
  border-top: var(--border-w) solid var(--charbon);
}
