/* =========================================================================
   LR Charpente — thème beige & bleu canard
   Navigation latérale (gauche) + contenus alignés à gauche
   ========================================================================= */

:root {
  --white: #ffffff;
  --cream: #fbf7f0;
  --beige: #f3ebdd;
  --beige-dark: #e8dcc6;
  --sand: #d9c9ab;

  --teal: #15636b;          /* bleu canard */
  --teal-dark: #0e474d;
  --teal-light: #2b838c;
  --teal-soft: #e2edec;

  --ink: #17282a;
  --ink-soft: #3d4f50;
  --ink-muted: #6c7a78;

  --border: #e5dccb;
  --shadow: 0 24px 64px rgba(20, 40, 42, 0.10);
  --shadow-soft: 0 10px 34px rgba(20, 40, 42, 0.07);

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Outfit", system-ui, -apple-system, Segoe UI, sans-serif;

  --sidebar-w: 17rem;        /* largeur de la barre de navigation latérale */
  --topbar-h: 4.5rem;        /* hauteur de la barre mobile */
  --max-width: 60rem;
  --radius: 4px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-align: left;
  padding-left: var(--sidebar-w);   /* laisse la place à la nav latérale */
}

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

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }

h1, h2, h3 { font-family: var(--font-serif); color: var(--ink); font-weight: 500; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.container {
  width: min(100% - 3rem, var(--max-width));
  margin-inline: 0;                 /* aligné à gauche, non centré */
  margin-left: clamp(1.25rem, 4vw, 3.5rem);
}

/* ---------- Typographie utilitaire ---------- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.1rem;
}

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
}

.section-lead {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.divider {
  width: 66px; height: 2px; margin: 0 0 1.6rem;
  background: var(--teal);
  opacity: 0.85;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.95rem 2.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-soft); }

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

.btn-light { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.5); backdrop-filter: blur(4px); }
.btn-light:hover { background: #fff; color: var(--teal-dark); }

/* =========================================================================
   Barre de navigation latérale (gauche)
   ========================================================================= */
.site-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-right: 1px solid var(--border);
  padding: 2.2rem 1.6rem;
}

.sidebar-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.sidebar-logo .logo-img { height: 46px; width: auto; }
.logo-word {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}
.logo-word span { color: var(--teal); }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.side-nav a {
  position: relative;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.7rem 0 0.7rem 1rem;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), padding-left var(--transition);
}
.side-nav a:hover { color: var(--teal); padding-left: 1.3rem; }
.side-nav a.is-active {
  color: var(--teal);
  border-left-color: var(--teal);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
.sidebar-foot .foot-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}
.sidebar-foot a { color: var(--ink-soft); }
.sidebar-foot a:hover { color: var(--teal); }

/* Barre mobile (masquée sur desktop) */
.mobile-bar { display: none; }
.nav-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 2px; background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle-bar::before { transform: translate(-50%, -7px); }
.nav-toggle-bar::after { transform: translate(-50%, 5px); }

/* =========================================================================
   Hero (accueil) — titre à gauche, centré en hauteur
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;      /* aligné à gauche */
  justify-content: center;      /* centré en hauteur */
  text-align: left;
  overflow: hidden;
  padding: 4rem clamp(1.25rem, 5vw, 4.5rem);
}
.hero-media {
  position: absolute; inset: 0;
  background: var(--teal-dark) center/cover no-repeat;
  transform: scale(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(14,71,77,0.72) 0%, rgba(14,71,77,0.42) 55%, rgba(23,40,42,0.58) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 54rem; }
.hero .eyebrow { color: #e7d8bd; }

.hero-title {
  font-size: clamp(2.1rem, 6.4vw, 5.4rem);
  line-height: 1.03;
  font-weight: 500;
  color: #fff;
  margin: 0 0 1.4rem;
  white-space: nowrap;           /* gros titre sur une seule ligne */
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero-lead {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.92);
  max-width: 38rem;
  margin: 0 0 2.2rem;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 1rem; justify-content: flex-start; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 1.6rem; left: clamp(1.25rem, 5vw, 4.5rem);
  z-index: 2; color: rgba(255,255,255,0.7); font-size: 0.7rem;
  letter-spacing: 0.25em; text-transform: uppercase;
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 34px; margin: 0.6rem 0 0;
  background: rgba(255,255,255,0.6);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--beige); }
.section-teal { background: var(--teal); color: #fff; }
.section-teal .section-title,
.section-teal h2 { color: #fff; }
.section-teal .section-lead { color: rgba(255,255,255,0.85); }
.section-teal .eyebrow { color: #e7d8bd; }

.section-header { margin-bottom: 3.2rem; max-width: 46rem; }

/* Bandeau page interne */
.page-hero {
  padding: 5rem clamp(1.25rem, 5vw, 4.5rem) 4rem;
  background: var(--teal);
  color: #fff;
}
.page-hero .eyebrow { color: #e7d8bd; }
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); color: #fff; margin: 0 0 0.8rem; }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 42rem; margin: 0; }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--teal);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.6rem;
}
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.4rem; } }

/* ---------- Grille de services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 1.8rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--sand); }
.card-icon {
  width: 58px; height: 58px; margin: 0 0 1.3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.5rem; margin: 0 0 0.6rem; }
.card p { margin: 0; color: var(--ink-muted); font-size: 0.98rem; }

/* ---------- Bloc "à propos" ---------- */
.about { max-width: 48rem; }
.about p { margin: 0 0 1.2rem; }

.feature-list {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.feature-list li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--ink-soft); }
.feature-list svg { flex: none; width: 22px; height: 22px; color: var(--teal); margin-top: 3px; }

/* ---------- Savoir-faire (cartes image de fond) ---------- */
.services-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 1100px) { .services-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-gallery { grid-template-columns: 1fr; } }

.service-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--beige-dark);
}
.service-media {
  position: absolute;
  inset: 0;
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-item:hover .service-media img { transform: scale(1.06); }
.service-media.is-fallback {
  background: linear-gradient(150deg, var(--teal-soft), var(--beige-dark));
}
.service-caption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 1.5rem 1.2rem 1.2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(14,71,77,0.88) 55%, rgba(14,71,77,0.95) 100%);
  color: #fff;
  text-align: left;
}
.service-caption strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.service-caption p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.9);
}

/* ---------- Mosaïque réalisations ---------- */
.container--wide {
  width: min(100% - 2rem, 80rem);
  margin-left: clamp(1rem, 3vw, 2.5rem);
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.45rem;
}
@media (min-width: 900px) {
  .mosaic { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.55rem; }
}

.mosaic-item {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--beige-dark);
  aspect-ratio: 1;
}
.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter var(--transition);
}
.mosaic-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.05);
}

/* ---------- Galerie / réalisations (legacy) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 1100px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--beige-dark);
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(14,71,77,0.85));
  color: #fff;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }
.gallery-caption strong { display: block; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; }
.gallery-caption span { font-size: 0.8rem; letter-spacing: 0.08em; opacity: 0.85; }

.empty-state {
  padding: 3rem 1rem; color: var(--ink-muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ---------- Bandeau CTA ---------- */
.cta-band { padding: clamp(4rem, 8vw, 6rem) 0; }
.cta-inner { max-width: 44rem; }
.cta-inner h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 1rem; }
.cta-inner p { margin: 0 0 2rem; max-width: 38rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-bottom: 3.2rem;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.5rem;
}
.contact-card .card-icon { margin-bottom: 1rem; }
.contact-card h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.contact-card p, .contact-card a { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }

.form {
  max-width: 42rem; text-align: left;
  display: grid; gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field span { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.field input, .field textarea, .field select {
  font-family: var(--font-sans); font-size: 1rem; color: var(--ink);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.field textarea { resize: vertical; min-height: 140px; }
.form .btn { justify-self: start; margin-top: 0.5rem; }

.form-status { text-align: left; font-size: 0.95rem; min-height: 1.4rem; margin: 0; }
.form-status.is-ok { color: var(--teal); }
.form-status.is-error { color: #b4433a; }

.captcha-q {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--teal);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Pages de texte (légal) ---------- */
.prose { max-width: 48rem; text-align: left; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 0.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }
.prose a { text-decoration: underline; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding: 3.5rem 0 2rem;
}
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.footer-logo .logo-word { color: #fff; }
.footer-logo .logo-word span { color: var(--teal-light); }
.footer-tagline { max-width: 34rem; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: flex-start; }
.footer-nav a { color: rgba(255,255,255,0.72); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin: 0.5rem 0 0; }
.footer-copy a { color: rgba(255,255,255,0.7); }
.footer-copy a:hover { color: #fff; }

/* ---------- Loader ---------- */
.site-loader {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: var(--cream);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.site-loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-logo { width: 90px; height: auto; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.35; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- Animations au scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Visionneuse d'images ---------- */
.viewer { position: fixed; inset: 0; z-index: 900; display: none; place-items: center; background: rgba(17,26,27,0.92); }
.viewer.is-open { display: grid; }
.viewer img { max-width: 90vw; max-height: 84vh; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.viewer button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); width: 52px; height: 52px;
  border-radius: 50%; font-size: 1.4rem; cursor: pointer; transition: background var(--transition);
}
.viewer button:hover { background: rgba(255,255,255,0.28); }
.viewer-close { top: 1.4rem; right: 1.4rem; }
.viewer-prev { left: 1.4rem; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 1.4rem; top: 50%; transform: translateY(-50%); }

/* =========================================================================
   Responsive — bascule de la nav latérale vers une barre mobile
   ========================================================================= */
@media (max-width: 900px) {
  body { padding-left: 0; padding-top: var(--topbar-h); }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--topbar-h);
    z-index: 120;
    padding: 0 1.25rem;
    background: rgba(251, 247, 240, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .mobile-bar .sidebar-logo { margin: 0; }
  .mobile-bar .logo-img { height: 38px; }
  .mobile-bar .logo-word { font-size: 1.25rem; }

  .site-sidebar {
    inset: var(--topbar-h) 0 auto 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-130%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-soft);
  }
  .site-sidebar.is-open { transform: translateY(0); }
  .site-sidebar > .sidebar-logo { display: none; }  /* logo déjà dans la barre mobile */

  .side-nav { gap: 0; }
  .side-nav a { padding: 0.85rem 0; border-left: none; }
  .side-nav a.is-active { border-left: none; }

  .sidebar-foot { margin-top: 1.4rem; }

  .hero { min-height: calc(100vh - var(--topbar-h)); }
}

@media (max-width: 620px) {
  .hero-title { white-space: normal; }   /* évite le débordement sur petits écrans */
}
