/* ==========================================================================
   J.A. CHAPES SÀRL — Styles de base et sections communes
   --------------------------------------------------------------------------
   Base, typographie, conteneurs, boutons, titres de section,
   réalisation phare, entreprise, pourquoi nous, processus,
   partenaires, contact, barre mobile et pages secondaires.
   ========================================================================== */

/* ==========================================================================
   2. BASE & TYPOGRAPHIE
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

/* L'attribut hidden doit toujours masquer l'élément, même si une règle
   .cards/.masonry plus bas définit un display: grid/columns. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* évite que le menu fixe cache les titres */
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--orange); color: var(--ink); }

/* Barre de défilement */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ==========================================================================
   3. UTILITAIRES DE MISE EN PAGE
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-padding) 0; }
.section--surface { background: var(--surface); }
.section--ink { background: var(--ink); }

/* ==========================================================================
   5. BOUTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.25s ease, background 0.25s ease,
              border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(255, 106, 26, 0.7);
}
.btn--primary:hover {
  background: var(--orange-soft);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.btn--ghost:hover { border-color: var(--orange); color: var(--orange-soft); }

.btn--sm { padding: 10px 20px; font-size: 14px; }

/* Flèche qui avance au survol */
.btn__arrow { transition: transform 0.25s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ==========================================================================
   7. TITRES DE SECTION
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--orange);
}

.section__title {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section__desc {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
}

.section__head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section__head--center .section__title,
.section__head--center .section__desc { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   8. RÉALISATION PHARE (Mabillon)
   ========================================================================== */
.featured { position: relative; overflow: hidden; color: #fff; }
.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(255,106,26,0.14), transparent 60%);
  pointer-events: none;
}
.featured .container { position: relative; }

.featured__date {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
.featured__date svg { color: var(--orange-soft); flex-shrink: 0; }

.featured__media {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-top: 46px;
}
.featured__media figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}
.featured__media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.featured__media figure:hover img { transform: scale(1.05); }

.featured__facts {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 30px;
  margin-top: 46px;
}

.featured__surface {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}
.featured__surface svg { color: var(--orange-soft); flex-shrink: 0; margin-top: 4px; }
.featured__surface strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  font-weight: 600;
}
.featured__surface p { margin-top: 6px; font-size: 14px; color: rgba(255,255,255,0.6); }

.featured__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.featured__list li {
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   9. ENTREPRISE
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__figure { position: relative; margin: 0; }
.about__figure::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 36px;
  background: linear-gradient(to top right, rgba(255,106,26,0.2), transparent 60%);
  filter: blur(30px);
  z-index: -1;
}
.about__figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.7s ease;
}
.about__figure:hover img { transform: scale(1.03); }

/* Encart "38 ans" posé sur la photo */
.about__badge {
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 220px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.about__badge strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  color: var(--orange-soft);
}
.about__badge p { margin-top: 4px; font-size: 14px; color: var(--muted); }

.about__body p { margin-top: 20px; color: var(--muted); }

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.about__stats strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  color: var(--orange-soft);
}
.about__stats span { font-size: 14px; color: var(--muted); }

/* ==========================================================================
   13. POURQUOI NOUS + CHIFFRES
   ========================================================================== */
.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}

.why__item {
  padding: 34px 28px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}
.why__item:hover {
  transform: translateY(-6px);
  background: var(--surface);
  border-color: rgba(255, 106, 26, 0.4);
}

.why__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255, 106, 26, 0.15);
  color: var(--orange);
  transition: background 0.4s ease, color 0.4s ease;
}
.why__item:hover .why__icon { background: var(--orange); color: var(--ink); }

.why__item h3 { margin-top: 20px; font-size: 1.2rem; }
.why__item p { margin-top: 8px; font-size: 14px; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 60px;
  padding-top: 46px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.stats strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--orange-soft);
}
.stats span { font-size: 14px; color: var(--muted); }

/* ==========================================================================
   14. PROCESSUS
   ========================================================================== */
.process {
  position: relative;
  max-width: 780px;
  margin: 46px auto 0;
}
/* Ligne verticale reliant les étapes */
.process::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 10px;
  width: 1px;
  height: calc(100% - 20px);
  background: var(--border);
}

.step { display: flex; gap: 22px; margin-bottom: 22px; }

.step__num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: var(--bg);
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  color: var(--orange);
}

.step__body {
  flex: 1;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.step__body h3 { font-size: 1.2rem; }
.step__body p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ==========================================================================
   15. PARTENAIRES
   ========================================================================== */
.partners {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.partners__label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.partners__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 32px;
}
.partners__grid figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 80px;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.partners__grid figure:hover { opacity: 1; transform: translateY(-3px); }
.partners__grid img { max-height: 100%; object-fit: contain; }

/* ==========================================================================
   16. CONTACT
   ========================================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 34px;
  margin-top: 46px;
}

.contact__cards { display: flex; flex-direction: column; gap: 18px; }

.contact__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact__card:hover { border-color: var(--orange); box-shadow: var(--shadow); }

.contact__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 106, 26, 0.15);
  color: var(--orange);
  transition: background 0.3s ease, color 0.3s ease;
}
.contact__card:hover .contact__icon { background: var(--orange); color: var(--ink); }

.contact__label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__value { font-weight: 600; }

/* Onglets Vaud / Valais */
.contact__tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s ease;
}
.tab.is-active { border-color: var(--orange); background: var(--orange); color: var(--ink); }

.contact__address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}
.contact__address svg { color: var(--orange); flex-shrink: 0; margin-top: 3px; }

.contact__map {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 440px;
}
.contact__map iframe { width: 100%; height: 100%; min-height: 440px; border: 0; display: block; }

/* ==========================================================================
   18. BARRE D'ACTION MOBILE
   ========================================================================== */
.mobile-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(11, 11, 12, 0.97);
  backdrop-filter: blur(12px);
}
.mobile-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  font-size: 14px;
  font-weight: 700;
}
.mobile-cta__call { color: var(--text); }
.mobile-cta__call svg { color: var(--orange); }
.mobile-cta__quote { background: var(--orange); color: var(--ink); }

/* ==========================================================================
   20. PAGES SECONDAIRES (chantiers/, menu/)
   ========================================================================== */
.subpage { padding: 140px 0 80px; }

.subpage__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.25s ease;
}
.subpage__back:hover { color: var(--orange); }

.subpage__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  margin-top: 30px;
}

.subpage__figure { margin: 0; }
.subpage__figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.subpage__place {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
}

.subpage__title { margin-top: 12px; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.subpage__date { margin-top: 12px; font-size: 14px; color: var(--muted); }

.subpage__list { margin: 26px 0 0; padding: 0; list-style: none; }
.subpage__list li {
  margin-bottom: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
  color: var(--muted);
}

/* ==========================================================================
   PAGES SANS BANDEAU D'ACCUEIL
   L'en-tête étant fixe, on décale le contenu pour qu'il ne passe pas dessous.
   (Utilisé par a-propos.html, prestations.html, chantiers.html, etc.)
   ========================================================================== */
.page-offset { padding-top: 92px; }
