/* ============================================================
   SACHSELEC – Styles
   Design: sobre, contrasté, qualitatif
   Couleur principale: #30594C (vert)
============================================================ */

html, body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* empêche le débordement horizontal */
}

/* Par précaution : médias jamais plus larges que le conteneur */
img, svg, video, canvas{
  max-width: 100%;
  height: auto;
}

/* =========================
   ZONE PERSONNALISABLE – Thème
========================= */
:root{
  --brand: #30594C;
  --brand-2: #2a4f44; /* variante un peu plus sombre */
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --text: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --border: rgba(17, 24, 39, 0.10);
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);

  --radius: 18px;
  --radius-lg: 26px;
  --container: 1120px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* =========================================================
   ANCRES + HEADER STICKY
   Objectif : éviter que le header masque le haut des sections
========================================================= */
:root{
  --header-offset: 60px; /* header ~74px + marge; ajuste si besoin */
  
  --header-height: 74px;     /* hauteur du header */
  --anchor-gap: 18px;        /* marge visuelle pour les ancres */
  --anchor-offset: calc(var(--header-height) + var(--anchor-gap));
  --hero-gap: 10px;          /* marge visuelle pour le hero */
  --hero-offset: calc(var(--header-height) + var(--hero-gap));

}

/* Toutes les sections avec un id (Prestations, Réalisations, À propos, Contact...) */
section[id]{
  section[id]{ scroll-margin-top: var(--anchor-offset); }
}

/* Mobile : header/menu légèrement différent */
@media (max-width: 680px){
  :root{
    --header-offset: 100px;
  }
  
}

/* Accessibilité */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}
.skip-link{
  position:absolute; left: 12px; top: 12px;
  background: var(--text); color: white;
  padding: 10px 12px; border-radius: 10px;
  transform: translateY(-150%);
  transition: transform .2s ease;
  z-index: 9999;
}
.skip-link:focus{ transform: translateY(0); }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
}

.section{
  padding: 20px 0;
}
.section-alt{
  background: var(--bg-alt);
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--brand);
  color: white;
  box-shadow: 0 8px 20px rgba(48, 89, 76, 0.22);
}
.btn-primary:hover{ background: var(--brand-2); }
.btn-ghost{
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover{
  background: rgba(48, 89, 76, 0.06);
  border-color: rgba(48, 89, 76, 0.25);
}
.btn-small{ padding: 10px 14px; font-size: 14px; }

.muted{ color: var(--muted); }
.small{ font-size: 14px; }

/* =========================
   Header
========================= */
/* =========================================================
   LOGO HEADER
   ZONE PERSONNALISABLE – taille / rendu
========================================================= */

.brand-logo{
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;

  /* transparent au top pour voir le hero derrière */
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;

  transition: background .2s ease, border-color .2s ease, backdrop-filter .2s ease;
}

/* Quand on scroll : header lisible (effet vitre) */
.site-header.scrolled{
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.10);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
}


.brand-link{
  display: inline-flex;
  align-items: center;      /* ✅ centre verticalement contenu du lien */
  gap: 10px;
  padding: 6px 0;           /* optionnel: évite que ça touche le bord */
  line-height: 1;           /* ✅ évite les effets baseline/line-height */
}

.brand-mark{
  width: 14px; height: 14px;
  border-radius: 6px;
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(48, 89, 76, 0.25);
}
.brand-name{
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* =========================================================
   Burger icon (3 traits verts)
========================================================= */
.nav-toggle{
  display: none;               /* déjà géré par tes media queries */
  border: none;                /* ✅ plus de bouton encadré */
  background: transparent;     /* ✅ transparent */
  padding: 10px 8px;
  cursor: pointer;
  border-radius: 12px;
}

/* Optionnel : un léger fond au survol */
.nav-toggle:hover{
  background: rgba(48, 89, 76, 0.06);
}

/* Le “hamburger” : 3 traits */
.burger{
  display: inline-block;
  width: 26px;
  height: 18px;
  position: relative;
}

/* Traits */
.burger::before,
.burger::after{
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;                 /* épaisseur du trait */
  background: var(--brand);    /* ✅ vert du site */
  border-radius: 999px;
}

.burger::before{
  top: 0;
}

.burger::after{
  top: 50%;
  transform: translateY(-50%);
}

/* 3e trait via box-shadow (propre, léger) */
.burger{
  /* on “duplique” le trait du milieu vers le bas */
}
.burger::after{
  box-shadow: 0 8px 0 0 var(--brand);
}

.nav-menu{
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-menu a{
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
}
.nav-menu a:hover{
  background: rgba(48, 89, 76, 0.06);
}

/* =========================
   Hero
========================= */
.hero{
  position: relative;
  overflow: hidden;
  padding-top: 0px;
  min-height: 70vh;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: center;
  padding-top: var(--header-offset);
  padding-bottom: 100px;
}
.kicker{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  color: var(--brand);
  background: rgba(48, 89, 76, 0.07);
  border: 1px solid rgba(48, 89, 76, 0.15);
  padding: 8px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.hero h1{
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.accent{ color: var(--brand); }

.lead{
  font-size: 18px;
  margin: 0 0 18px;
  color: rgba(17, 24, 39, 0.88);
}

.hero-cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 14px;
}

.trust-badges{
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.hero-media{
  display: flex;
  justify-content: flex-end;
}
/* =========================================================
   HERO - Carte artisan responsive (FLUID)
   - Réduit automatiquement sur mobile
========================================================= */

.artisan-card{
  /* Largeur qui s’adapte : ~280px sur mobile -> ~360px sur desktop */
  width: clamp(260px, 42vw, 360px);

  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(48, 89, 76, 0.08), rgba(48, 89, 76, 0.02));
  border: 1px solid rgba(48, 89, 76, 0.18);

  /* Padding qui s’adapte : moins d’air sur mobile */
  padding: clamp(14px, 2.2vw, 22px);

  box-shadow: var(--shadow);
  position: relative;
}

.artisan-photo{
  width: 100%;
  /* Photo carrée mais qui suit la largeur de la carte */
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 999px;
  display: block;
}


.artisan-caption{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(48, 89, 76, 0.25);
  text-align: center;
}
.caption-title{
  margin: 0;
  font-weight: 800;
}
.caption-sub{
  margin: 2px 0 0;
  color: var(--muted);
}

/* Fallback si pas d'image artisan */
.artisan-fallback .artisan-fallback-content{ display: grid; gap: 8px; place-items: center; }
.artisan-fallback-content{ display:none; }
.avatar-placeholder{
  width: 170px; height: 170px;
  border-radius: 999px;
  border: 2px dashed rgba(48, 89, 76, 0.35);
  background: rgba(255,255,255,0.6);
}


/* Fond décoratif du hero sur toute la hauteur */
.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(48, 89, 76, 0.18), transparent 55%),
    radial-gradient(circle at 75% 20%, rgba(48, 89, 76, 0.12), transparent 60%),
    linear-gradient(to bottom, rgba(48, 89, 76, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Assure-toi que le contenu passe au-dessus */
.hero .container{
  position: relative;
  z-index: 1;
}

/* =========================
   Sections – Head
========================= */
.section-head{
  margin-bottom: 22px;
}
.section-head h2{
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

/* =========================
   Cartes prestations
========================= */
.cards-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.card h3{
  margin: 0 0 8px;
  font-size: 18px;
}
.card p{
  margin: 0;
  color: var(--muted);
}
.note{
  margin-top: 16px;
  background: rgba(48, 89, 76, 0.07);
  border: 1px solid rgba(48, 89, 76, 0.15);
  padding: 14px 16px;
  border-radius: var(--radius);
}

/* =========================
   Galerie 6 visuels
========================= */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-item{
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.gallery-item img{
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;         /* carré */
  object-fit: cover;
}
.gallery-item figcaption{
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(17, 24, 39, 0.85);
  line-height: 1.2;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,1));
}

/* Placeholder si image manquante */
.gallery-item.ph{
  background:
    linear-gradient(135deg, rgba(48, 89, 76, 0.10), rgba(48, 89, 76, 0.02)),
    repeating-linear-gradient(45deg, rgba(48, 89, 76, 0.10), rgba(48, 89, 76, 0.10) 10px, rgba(48, 89, 76, 0.05) 10px, rgba(48, 89, 76, 0.05) 20px);
}
.gallery-item.ph::before{
  content: "Visuel à ajouter";
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  font-weight: 800;
  color: rgba(17, 24, 39, 0.55);
}

/* =========================
   À propos
========================= */
.about-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: center;
}


.cert-mention{
  margin: 6px 0 14px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.4;
}
.cert-title{
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.about-certs{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;      /* ✅ reste côte à côte */
  max-width: 100%;
}

.about-cert-logo{
  height: 100px;           /* taille lisible dans À propos */
  width: auto;
  object-fit: contain;
  display: block;
  opacity: 0.92;
  filter: drop-shadow(0 6px 12px rgba(17,24,39,0.10));
}

/* Mobile : un peu plus petit */
@media (max-width: 680px){
  .about-cert-logo{ height: 36px; }
}

/* ✅ Correction remontée du titre HERO en mobile */
@media (max-width: 680px){
  .hero-grid{
    padding-top: 30px; /* valeur sûre */
  }
}

.checklist{
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.checklist li::before{
  content: "✔";
  color: var(--brand);
  font-weight: 900;
  margin-right: 10px;
}
.about-panel{
  background: linear-gradient(180deg, rgba(48, 89, 76, 0.10), rgba(48, 89, 76, 0.02));
  border: 1px solid rgba(48, 89, 76, 0.18);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}
.about-panel h3{ margin: 0 0 8px; }
.about-panel .btn{ margin-top: 8px; }

/* =========================
   Contact
========================= */
.contact-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}
.form{
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.field{
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
label{ font-weight: 700; font-size: 14px; }
input, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
  font: inherit;
}
input:focus, textarea:focus{
  border-color: rgba(48, 89, 76, 0.45);
  box-shadow: 0 0 0 4px rgba(48, 89, 76, 0.12);
}
.checkbox{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  margin: 10px 0 0;
  min-width: 0;
  max-width: 100%;

}

.checkbox input{
  flex: 0 0 auto;
  margin-top: 4px; /* tu l'as déjà, ok */
}


/* Le texte doit pouvoir se couper / passer à la ligne */
.checkbox span{
  min-width: 0;               /* clé pour flex */
  max-width: 100%;
  overflow-wrap: anywhere;    /* casse si nécessaire */
  word-break: break-word;     /* fallback */
  line-height: 1.35;
}


.form-actions{
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.contact-card{
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.contact-lines{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.contact-line{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.contact-line:hover{
  border-color: rgba(48, 89, 76, 0.25);
  background: rgba(48, 89, 76, 0.04);
}
.dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(48, 89, 76, 0.25);
}
.divider{
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}
.mini-note{
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(48, 89, 76, 0.07);
  border: 1px solid rgba(48, 89, 76, 0.15);
}

/* =========================
   Footer
========================= */
/* =========================
   Footer (3 colonnes)
========================= */
.footer-3cols{
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* gauche / centre / droite */
  align-items: center;
  gap: 14px;
}

/* Gauche */
.footer-left{
  justify-self: start;
}

/* Centre */
.footer-center{
  justify-self: center; /* ✅ centre pile au milieu */
}

/* Droite */
.footer-right{
  justify-self: end;
  text-align: right;
}

/* Liens du footer (droite) */
.footer-links{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-links a{
  color: var(--muted);
}
.footer-links a:hover{ color: var(--text); }

/* Réseaux sociaux */
.footer-social{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.social-link{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  background: rgba(48, 89, 76, 0.04);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.social-link:hover{
  transform: translateY(-1px);
  background: rgba(48, 89, 76, 0.10);
  border-color: rgba(48, 89, 76, 0.25);
}

.social-icon{
  width: 18px;
  height: 18px;
  fill: var(--muted);
  transition: fill .15s ease;
}

.social-link:hover .social-icon{
  fill: var(--brand);
}

/* Responsive : empilement propre */
@media (max-width: 680px){
  .footer-3cols{
    grid-template-columns: 1fr; /* tout en colonne */
    text-align: center;
  }
  .footer-left, .footer-center, .footer-right{
    justify-self: center;
  }
  .footer-right{
    text-align: center;
  }
  .footer-links{
    justify-content: center;
  }
}
/* =========================
   Micro-animations (scroll reveal)
========================= */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Responsive
========================= */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-media{ justify-content: center; }
  .cards-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .about-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 680px){
  .nav-toggle{ display: inline-flex; }
  .hero-media{ justify-content: center; }
  .nav-menu{
    position: absolute;
    right: 18px;
    top: 64px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
    box-shadow: var(--shadow);
  }
  .nav-menu.open{ display: flex; }
  .nav-menu a{ padding: 10px 12px; }

  .cards-grid{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: 1fr; }
}

/* Champ anti-spam (honeypot) : invisible pour humains */
.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}