/*
 * Feuille de style principale du site Artisan SMAIN.
 * Mobile‑first et responsive. Utilise des variables CSS pour les couleurs
 * principales. Respecte les contrastes et fournit des indicateurs de focus
 * visibles conformément aux bonnes pratiques d’accessibilité【59922298122240†L121-L137】.
 */

:root {
    --color-primary: #0a5ea8; /* bleu profond */
    --color-accent: #e74c3c; /* rouge/orange pour les appels à l’action */
    --color-button: #54a626;; /* vert pour les appels à l’action */
    --color-light: #f5f7fa; /* fond clair */
    --color-dark: #1f2a36;
    --color-text: #333;
    --max-width: 1200px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-light);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

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

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -1000;
}
.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #fff;
    z-index: 1000;
    border-radius: 4px;
}

/* Header */
.site-header {
    background: var(--color-primary);
    color: #fff;
    position: relative;
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    height: 8vh;
}

.logo img {
    height: 6vh;
    border-radius:10px
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.main-nav a {
    color: #fff;
    padding: 0.5rem;
    border-radius: 4px;
}

 .navImg {
    max-height: 5vh;
    width: auto;
    margin-left: 1vw;
    display: block;
  }

.main-nav a.active,
.main-nav a:hover,
.main-nav a:focus {
    background: rgba(255, 255, 255, 0.2);
}

.header-cta {
    display: none;
    gap: 0.5rem;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background var(--transition-speed);
}
.btn-primary {
    background: var(--color-button);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
    background: #418b16;
}
.btn-secondary {
    background: #fff;
    color: var(--color-primary);
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: #e5ecf5;
}


/* Navigation mobile */
.nav-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: transform var(--transition-speed);
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* =======================
   HERO (logique robuste iOS)
   ======================= */
.hero{
  position: relative;
  overflow: hidden;
  width: 100%;
  /* pas de height fixe : min-height + auto */
  min-height: 85vh;   /* fallback */
  min-height: 85svh;  /* iOS stable */
  display: grid;
}

/* image/overlay = couches */
.hero__img,
.hero__overlay{
  position: absolute;
  inset: 0;
}

.hero__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 75%;
  display:block;
}

.hero__overlay{
  background: #000;
  opacity: .5;
  pointer-events:none;
}

/* contenu = couche au-dessus, mais NON absolute */
.hero__content{
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
  display: grid;
  gap: .75rem;
  place-content: end center; /* desktop : plutôt en bas */
  text-align: center;
}

/* IMPORTANT : supprime ton ancien padding-top: 6rem sur .hero__content */
.hero__content h1,
.hero__content h2,
.hero__content p{
  margin: 0;
  color:#fff;
}

/* ===============================
   Simulation de prix
   =============================== */

.simulation {
  padding: 2rem 0 4rem;
}

.sim-lead {
  max-width: 75ch;
}

.sim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.sim-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.sim-card h2 {
  margin-top: 0;
  color: var(--color-primary);
}

.sim-form code {
  background: #f2f4f7;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.sim-hint {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #586574;
}

.sim-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}

.sim-price {
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.sim-price__value {
  display: inline-block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-dark);
  line-height: 1.1;
}

.sim-price__unit {
  font-weight: 800;
  margin-left: 0.25rem;
  color: var(--color-accent);
}

.sim-price__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: #586574;
}

.sim-formula p {
  margin: 0.35rem 0;
}

.sim-note {
  margin-top: 0.75rem;
  color: #586574;
}

.sim-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sim-output[data-empty="1"] .sim-range {
  opacity: 0.7;
}


.hero__content h2{
    margin-top: 0;
    color: white;
}

.hero__content h1,
.hero__content p {
    margin-top: 0;
    color: white;
    text-align: center;
}
.services-preview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.service-card {
    border-radius: 6px;
    padding: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.service-card h3 {
    margin-top: 0;
    color: white;
}
.service-card p {
    margin-top: 0;
    color: white;
    text-align: center;
}
.service-card .icon {
    font-size: 1.5rem;
    color: var(--color-accent);
}

/* Galerie */
.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}
.gallery-item {
    display: flex;
    flex-direction: column;
}
.gallery-item img {
    border-radius: 6px;
}
.gallery-item h4 {
    margin: 0.5rem 0;
    color: var(--color-primary);
}

/* ===============================
   Avant / Après – slider
   =============================== */

.ba {
  --pos: 50%;
  position: relative;
  width: 30vw;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  touch-action: none; /* drag fluide mobile */
}




.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba__img--after { z-index: 1; }

.ba__img--before {
  z-index: 2;
  /* Découpe propre sans déformer l'image */
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba__range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.ba__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  transform: translateX(-1.5px);
  background: var(--color-accent);
  z-index: 3;
}

.ba__handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--color-accent);
  z-index: 4;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.ba__handle span {
  color: var(--color-accent);
  font-weight: 900;
  letter-spacing: -2px;
  user-select: none;
}

.ba__label {
  position: absolute;
  top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(0,0,0,0.45);
  z-index: 4;
}

.ba__label--before { left: 10px; }
.ba__label--after  { right: 10px; }

.ba__range:focus-visible ~ .ba__handle {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.realisation-row{
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0;
}

/* 50/50 (adaptable) */
.realisation-row > *{
  flex: 1 1 0;
  min-width: 0;
  width: 30vw;
}

/* Alternance : image droite / texte gauche */
.realisation-row.is-even{
  flex-direction: row-reverse;
}


/* Bloc texte style “card” (optionnel) */
.realisation-content{
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.25rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.realisation-content h4{
  margin: 0 0 .5rem;
}

.realisation-desc{
  margin: 0 0 1rem;
  color: #2b2b2b;
  max-width: 85vw;
}

.realisation-points{
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}
/* Bouton mobile (caché par défaut) */
.ba__mobile-toggle{
  display: none;
  position: absolute;
  z-index: 10;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(0,0,0,0.55);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* MODE TELEPHONE : on désactive le slider et on fait un switch Avant/Après */
@media (max-width: 767px){

  .realisation-content{
  width: 80vw;
  }
   .service-card .service-desc, .service-card .icon{
    display: none;
  }
  .service-card{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .main-nav ul {
        flex-direction: column;
        background: var(--color-primary);
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        padding: 1rem;
        display: none;
    }
    .main-nav ul.open {
        display: block;
        z-index: 4;
    }
    .sr-only{
        display:none;
    }
    .site-footer{
        display:none !important;
    }
    .nav-toggle {
        display: inline-block;
    }

  /* layout : empiler image + texte */
  .realisation-row,
  .realisation-row.is-even{
    flex-direction: column;
  }

  .ba__mobile-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-button);
  }

  /* on masque les éléments du slider */
  .ba__range,
  .ba__divider,
  .ba__handle,
  .ba__label{
    display: none !important;
  }

  /* IMPORTANT : on laisse le scroll normal sur mobile */
  .ba{
    touch-action: auto;
    width: 50vw !important;
  }

  /* le clip-path ne sert plus en mobile */
  .ba__img--before{
    clip-path: none;
  }

  /* affichage 1 seule image selon data-view */
  .ba[data-view="before"] .ba__img--after{ display:none; }
  .ba[data-view="after"]  .ba__img--before{ display:none; }

  .realisation-row,
  .realisation-row.is-even{
    flex-direction: column;
  }
}


/* Classe utilitaire pour centrer les éléments */
.center {
    text-align: center;
    margin-top: 1rem;
}

/* Services page */
.service-details {
    margin: 2rem 0;
}
.service-details h2 {
    color: var(--color-primary);
}
.service-details ul {
    padding-left: 1.2rem;
}
.faq {
    margin-top: 1.5rem;
}
.faq dt {
    font-weight: bold;
}
.faq dd {
    margin: 0 0 1rem 0;
}

/* Contact form */
.contact-info {
    margin-bottom: 2rem;
}
.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--color-accent);
}
.contact-form .consent {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.contact-form .consent input {
    margin-right: 0.5rem;
}
.contact-form .honeypot {
    display: none;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.alert-success {
    background: #e2f5e9;
    color: #2e7d32;
}
.alert-error {
    background: #fbeaea;
    color: #c0392b;
}

/* Footer */
.site-footer {
    background: var(--color-dark);
    color: #fff;
    padding: 2rem 0;
}
/* Listes de footer : alignement horizontal + wrap */
.site-footer .footer-col ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem; /* vertical horizontal */
}

.site-footer .footer-col ul li {
  margin-bottom: 0; /* annule l'espacement vertical */
}
/* Coordonnées : alignement horizontal (wrap si écran étroit) */
.site-footer .footer-col p {
  display: inline-block;
  margin: 0 1.25rem 0.5rem 0;
}


.site-footer .footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.site-footer h2 {
    margin-top: 0;
    color: var(--color-accent);
}
.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer ul li {
    margin-bottom: 0.5rem;
}
.site-footer a {
    color: #fff;
}
.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Barre d’appel mobile */
.mobile-call-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: var(--color-dark);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 100;
}
.mobile-call-bar a {
    color: #fff;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: var(--color-button);
}
.mobile-call-bar a.btn-quote {
    background: #fff;
    color: var(--color-primary);
}

/* Cacher la barre mobile sur les écrans larges */
@media (min-width: 768px) {
    .mobile-call-bar {
        display: none;
    }
    .header-cta {
        display: flex;
        align-items: center; /* empêche le stretch et centre verticalement */
        gap: 0.5rem;
    }
    .nav-toggle {
        display: none;
    }
    .main-nav ul {
        display: flex;
    }
    .sim-grid {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
  }
  
}
