/* =====================================================
   AM ÉLECTRICITÉ – style.css
   =====================================================

   TABLE DES MATIÈRES
   [00] Variables / Base / Helpers
   [01] Header & Navigation
   [02] Hero
   [03] Avis Google (grille/cards)
   [04] Services
   [05] Dépannage
   [06] À propos
   [07] Carrousel Réalisations (+ mode GRID)
   [08] Lightbox
   [09] FAQ
   [10] Contact (form)
   [11] Footer
   [12] Responsive (<=1024 / <=680)
   [13] Carrousel Services (mobile)
   [14] Modale zones d’intervention
   [15] Bouton d’appel flottant (style WhatsApp, bleu)
   [16] Carrousel Avis (mobile)
   ===================================================== */


/* ===================================================== */
/* [00] Variables / Base / Helpers                       */
/* ===================================================== */
:root{
  --navy:#0A1E3A;
  --primary:#0F58D6;
  --primary-600:#0C46AD;
  --electric:#22D6FF;
  --bg:#ffffff;
  --muted:#F2F6FF;
  --stroke:#E4ECFF;
  --text:#0B1220;
  --success:#2E7D32;
  --danger:#C62828;
  --radius:18px;
  --radius-lg:26px;
  --shadow-sm:0 6px 16px rgba(10, 18, 32, .06);
  --shadow:0 14px 40px rgba(10, 18, 32, .10);
  --shadow-strong:0 24px 60px rgba(10, 18, 32, .18);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
html{scroll-behavior:smooth}
h1,h2,h3{letter-spacing:.2px}
a{color:var(--primary);text-decoration:none}
img{max-width:100%;height:auto;display:block}
:focus-visible{outline:3px solid var(--electric);outline-offset:2px}

/* Layout helpers */
.container{max-width:1180px;margin:0 auto;padding:0 20px}
.row{display:flex;align-items:center;justify-content:space-between}
section{padding:64px 0}
.section-title{font-size:30px;margin:0 0 8px;color:var(--navy)}
.section-sub{margin:0 0 24px;color:#5a6a81}
.badges{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 22px}
.badge{background:var(--muted);padding:7px 11px;border-radius:999px;font-size:13px;border:1px solid var(--stroke)}
.list{padding-left:18px;margin:10px 0}
.list li{margin:6px 0}

/* Ancre → marge sous le header */
section{ scroll-margin-top: 80px; }
@media (max-width:680px){
  section{ scroll-margin-top: 90px; }
}


/* ===================================================== */
/* [01] Header & Navigation                              */
/* ===================================================== */
header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.7);backdrop-filter:saturate(180%) blur(10px);border-bottom:1px solid var(--stroke)}
.brand{display:flex;align-items:center;gap:14px;padding:12px 0}
.brand__logo{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--stroke);box-shadow:var(--shadow-sm);background:linear-gradient(135deg, var(--navy) 0%, var(--navy) 100%)}
.brand__logo img{width:100%;height:100%;object-fit:contain;padding:6px;filter:drop-shadow(0 2px 6px rgba(0,0,0,.2))}
.brand__name{font-weight:800;letter-spacing:.3px;color:var(--navy)}

nav{flex:1;display:flex;justify-content:center}
nav ul{list-style:none;display:flex;gap:18px;margin:0;padding:0}
nav a{position:relative;padding:10px 12px;border-radius:12px}
nav a:after{content:"";position:absolute;left:12px;right:12px;bottom:6px;height:2px;background:linear-gradient(90deg,var(--primary),var(--electric));opacity:0;transform:translateY(4px);transition:.25s}
nav a:hover:after{opacity:1;transform:translateY(0)}
.btn{display:inline-flex;align-items:center;gap:10px;padding:12px 18px;border-radius:16px;border:1px solid var(--stroke);background:#fff;box-shadow:var(--shadow-sm);font-weight:700}
.btn--primary{background:linear-gradient(135deg,var(--primary) 0%,var(--electric) 100%);border:none;color:#fff;box-shadow:var(--shadow)}
.hamburger{display:none;background:none;border:none;font-size:26px;padding:6px;line-height:1}


/* ===================================================== */
/* [02] Hero                                             */
/* ===================================================== */
.hero{position:relative;overflow:hidden;background:radial-gradient(1200px 600px at 80% -10%, rgba(34,214,255,.20), transparent 60%), linear-gradient(180deg,#F7FAFF 0%, #FFFFFF 70%)}
.hero:before{content:"";position:absolute;inset:auto -10% 0 -10%;height:80px;background:linear-gradient(90deg,transparent,rgba(15,88,214,.15),transparent)}
.hero .wrap{display:grid;grid-template-columns:1.15fr .85fr;gap:32px;padding:68px 0}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font-weight:700;color:var(--primary);background:linear-gradient(90deg,#EEF4FF,#FFFFFF);border:1px solid var(--stroke);border-radius:999px;padding:6px 12px}
.hero h1{font-size:44px;line-height:1.05;margin:10px 0 12px;color:var(--navy)}
.hero p{font-size:18px;color:#3d4a5c}
.hero-art{position:relative;isolation:isolate}
.hero-art img{width:100%;height:auto;border-radius:24px;border:1px solid var(--stroke);box-shadow:var(--shadow-strong);background:linear-gradient(135deg,#fff, #F1F6FF)}
.spark{position:absolute;top:-8px;right:-8px;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle at 30% 30%,rgba(34,214,255,.45),transparent 60%);filter:blur(10px);z-index:-1}
.cta{display:flex;flex-wrap:wrap;gap:12px}

/* Centrage CTA sur petites largeurs */
.hero .cta{justify-content:center;}
@media (max-width:680px){
  .hero .cta{flex-direction:column;align-items:center;gap:10px;}
  .hero .cta .btn{width:100%;max-width:320px;justify-content:center;text-align:center;}
}


/* ===================================================== */
/* [03] Avis Google (grille/cards)                       */
/* ===================================================== */
.avis-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fill, minmax(260px,1fr));
}
.avis-card{
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:16px;
  background:#fff;
}
.avis-card .author{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.avis-card .author img{width:36px;height:36px;border-radius:50%;object-fit:cover}
.stars{font-size:14px;letter-spacing:1px}
.avis-text{margin:8px 0 0}
.avis-meta{color:#64748b;font-size:12px;margin-top:6px}

.avis-empty{
  border:1px dashed var(--stroke);
  border-radius:var(--radius);
  padding:20px;
  text-align:center;
  margin-top:8px;
  background:#fff;
}
.avis-cta{margin-top:16px;text-align:center}
.powered{display:block;margin-top:10px;color:#94a3b8;font-size:12px}
.powered span::before{content:"Powered by "}
.muted{color:#64748b}

/* ===== Avis – Header compact ===== */
.avis-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin:0 0 12px;
}
.avis-score{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.avis-stars{
  font-size:18px; letter-spacing:2px;
  color:#F5A524;                    /* étoiles jaunes */
  line-height:1;
}
.avis-note{
  font-size:22px; color:var(--navy);
}
.avis-total{
  font-size:14px; color:#64748b;
}

/* Bouton fantôme assorti à la charte */
.btn--ghost{
  background:transparent;
  border:1px solid var(--stroke);
  color:var(--navy);
}

/* Cartes d’avis : étoile jaune + micro-hover */
.stars{ color:#F5A524; }
.avis-card{ transition: box-shadow .2s ease, transform .2s ease; }
.avis-card:hover{ box-shadow: var(--shadow); transform: translateY(-1px); }
.avis-card .author img{ box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* Responsive : pile sur mobile */
@media (max-width:680px){
  .avis-header{ flex-direction:column; align-items:stretch; }
  .avis-actions{ display:flex; gap:8px; }
  .avis-actions .btn{ flex:1; justify-content:center; }
}

/* Mettre la note bien en avant sous le titre */
.section-sub{
  font-size:16px;
  color:#4a596d;
}
.section-sub #avis-note{
  font-weight:800;
  font-size:20px;
  color:var(--navy);
}

/* Étoiles jaunes + léger espacement dans chaque carte */
.stars{
  color:#F5A524;
  letter-spacing:1px;
  display:inline-block;
  line-height:1;
}

/* Meilleure lisibilité des cartes au survol (desktop) */
.avis-card{
  transition: box-shadow .2s ease, transform .2s ease;
}
.avis-card:hover{
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.avis-card .author img{
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  border: 1px solid var(--stroke);
}

/* Optionnel : limiter la hauteur du texte et couper proprement (3 lignes) */
.avis-text{
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bouton unique bien centré en bas */
.avis-cta{
  margin-top:20px;
  text-align:center;
}
.avis-cta .btn{
  min-width: 240px;
  justify-content:center;
}




/* ===================================================== */
/* [04] Services                                         */
/* ===================================================== */
.service-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:22px}
.service-card{background:#fff;border:1px solid var(--stroke);border-radius:22px;padding:22px;box-shadow:var(--shadow-sm)}
.service-card h3{margin:0 0 8px;color:var(--navy)}
.service-card p{margin:0;color:#4a596d}


/* ===================================================== */
/* [05] Dépannage                                        */
/* ===================================================== */
.emergency{background:linear-gradient(180deg,#FFFFFF 0%, #F7FAFF 100%)}
.ctaCard{flex:1 1 320px;background:#fff;border:1px solid var(--stroke);border-radius:22px;box-shadow:var(--shadow);padding:20px;max-width:420px}
.ctaCard__title{font-weight:800;color:var(--navy);margin-bottom:10px}
.ctaCard__btn{justify-content:center;width:100%}
.ctaCard__note{font-size:12px;color:#5a6a81;margin-top:8px}
.ctaCard .btn{ width:100%; }
.ctaCard .btn + .btn{ margin-top:10px; }


/* ===================================================== */
/* [06] À propos                                         */
/* ===================================================== */
.about{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center}
.about__media{border-radius:18px;border:1px solid var(--stroke);box-shadow:var(--shadow-sm);background:var(--navy);display:grid;place-items:center;padding:10px}
.about__media img{max-width:120px;height:auto}
.about__text p{margin-top:0}


/* ===================================================== */
/* [07] Carrousel Réalisations (+ mode GRID)             */
/* ===================================================== */
.carousel{position:relative;padding-bottom:8px}
.carousel__viewport{
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  background:transparent;
  border:none;
  padding:8px 0;
}
.carousel__track{display:flex;align-items:center;gap:12px;padding:0}

/* Slides par défaut (carrousel) */
.carousel__slide{
  position:relative;
  flex:0 0 100%;
  scroll-snap-align:center;
  scroll-snap-stop:always;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--stroke);
  box-shadow:var(--shadow);
  background:#fff;
  aspect-ratio: 2 / 3;     /* portrait */
  min-height: 420px;
  max-height: 70vh;
  display:grid;
  place-items:stretch;
}
.carousel__slide img{width:100%;height:100%;object-fit:cover;display:block}
.carousel__slide .caption{display:none}

/* Flèches */
.carousel__btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: none;
  border: none;
  box-shadow: none;
  color: var(--navy);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
  transition: opacity .2s;
}
.carousel__btn:hover{ opacity: 1; }
.carousel__btn--prev{ left: 8px; }
.carousel__btn--next{ right: 8px; }
.carousel__dots,.carousel__progress{display:none !important}

/* Mode GRID (desktop) */
@media (min-width: 900px){
  .carousel.is-grid .carousel__viewport{ overflow: visible; scroll-snap-type: none; padding: 0; }
  .carousel.is-grid .carousel__track{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
  }
  .carousel.is-grid .carousel__slide{
    flex: initial; scroll-snap-align: initial; aspect-ratio: 2 / 3; min-height: 0; max-height: none; cursor: pointer;
  }
  .carousel.is-grid .carousel__btn{ display: none; }
}


/* ===================================================== */
/* [08] Lightbox                                         */
/* ===================================================== */
.lightbox{
  position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(11,18,32,.8); padding:20px; visibility:hidden; opacity:0;
  transition:opacity .3s; z-index:100;
}
.lightbox.open{visibility:visible;opacity:1}

/* Grille 2 lignes : image + légende */
.lightbox__inner{
  position: relative;
  max-width: min(96vw, 500px);
  max-height: 92vh;
  background:#fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.lightbox__img{ width:100%; height:100%; object-fit:contain; display:block; background:#000; }
.lightbox__caption{
  padding:10px 12px; text-align:center; color:#f0f4ff; background:#0A1E3A;
  line-height:1.3; max-height:25vh; overflow:auto;
}

/* Boutons nav lightbox */
.lightbox__nav{
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,0,0,.45); color:#fff; border:none;
  width:42px; height:42px; border-radius:50%;
  display:grid; place-items:center; cursor:pointer; z-index:101;
}
.lightbox__nav:hover{ background:rgba(0,0,0,.6); }
.lightbox__nav--prev{ left:16px; }
.lightbox__nav--next{ right:16px; }


/* ===================================================== */
/* [09] FAQ                                              */
/* ===================================================== */
.faq{display:grid;gap:12px}
.faq__item{background:#fff;border:1px solid var(--stroke);border-radius:18px;box-shadow:var(--shadow-sm);overflow:hidden}
.faq__q{width:100%;text-align:left;padding:14px 16px;font:inherit;font-weight:700;border:0;background:#fff;cursor:pointer}
.faq__a{display:none;padding:0 16px 16px;color:#4a596d;border-top:1px solid var(--stroke)}
.faq__item.open .faq__a{display:block}


/* ===================================================== */
/* [10] Contact (form)                                   */
/* ===================================================== */
form{background:#fff;border:1px solid var(--stroke);border-radius:22px;box-shadow:var(--shadow);padding:20px}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.field input,.field textarea{padding:12px 14px;border:1px solid #dfe7f3;border-radius:12px;font:inherit}
.field textarea{min-height:120px;resize:vertical}
.form-note{font-size:13px;color:#617089}
.status{margin-top:10px;font-weight:700}


/* ===================================================== */
/* [11] Footer                                           */
/* ===================================================== */
footer{background:var(--navy);color:#cfe1ff;padding:36px 0;margin-top:48px}
footer .cols{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px}
footer a{color:#cfe1ff}
footer .copyright{margin-top:16px;font-size:12px;color:#9fb5d6}


/* ===================================================== */
/* [12] Responsive                                       */
/* ===================================================== */
@media (max-width:1024px){
  .hero:before{inset:auto 0 0 0}
  .hero .wrap{grid-template-columns:1fr;text-align:center;justify-items:center;padding:56px 0}
  .hero .wrap > div:first-child{display:flex;flex-direction:column;align-items:center}
  .badges{justify-content:center}
  .about{grid-template-columns:1fr}
  .service-grid{grid-template-columns:1fr}
}

@media (max-width:680px){
  /* Menu déroulant */
  nav ul{
    display:none;
    position:absolute;
    right:0;
    top:58px;
    background:#fff;
    border:1px solid var(--stroke);
    border-radius:14px;
    box-shadow:var(--shadow);
    padding:8px
  }
  nav ul.open{display:flex;flex-direction:column}

  .hamburger{
    display:block;
    margin-left:auto;
    margin-right:0;
  }

  .hero h1{font-size:36px}
  footer .cols{grid-template-columns:1fr}

  /* Carrousel (mobile) */
  .carousel__slide{aspect-ratio:4/3;min-height:240px;max-height:70vh}
  .carousel__viewport{scroll-snap-type:x mandatory;}
  .carousel__track{display:flex;}
  .carousel__btn{display:block;}
}


/* ===================================================== */
/* [13] Carrousel Services (mobile)                      */
/* ===================================================== */
@media (max-width:680px){
  #services .container{ position: relative; }

  #services.is-mobile-carousel .service-grid{
    position: relative;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    padding: 0;
    gap: 0;
  }

  #services.is-mobile-carousel .service-card{
    flex: 0 0 100%;
    scroll-snap-align: start;
    margin: 0;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #services.is-mobile-carousel .service-grid::-webkit-scrollbar{ display: none; }
  #services.is-mobile-carousel .service-grid{ scrollbar-width: none; }

  /* Flèches services */
  #svcPrev, #svcNext{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: none;
    border: none;
    box-shadow: none;
    color: var(--navy);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
    transition: opacity .2s;
  }
  #svcPrev:hover, #svcNext:hover{ opacity: 1; }
  #svcPrev{ left: 8px; }
  #svcNext{ right: 8px; }
}


/* ===================================================== */
/* [14] Modale zones d’intervention                      */
/* ===================================================== */
.small-link { font-size: 0.9em; background: none; border: none; text-decoration: underline; cursor: pointer; padding: 0; color: inherit; }
.modal { position: fixed; inset: 0; display: none; z-index: 1000; }
.modal[aria-hidden="false"] { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px); }
.modal__dialog { position: relative; max-width: 720px; margin: 6vh auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-strong); overflow: hidden; }
.modal__header, .modal__footer { padding: 16px 20px; }
.modal__header { border-bottom: 1px solid var(--stroke); display:flex; align-items:center; justify-content:space-between; }
.modal__title { margin: 0; font-size: 1.25rem; color: var(--navy); }
.modal__body { padding: 12px 20px 20px; max-height: 65vh; overflow:auto; }
.modal__intro { margin-top: 6px; color:#444; }
.modal__list { columns: 2 280px; column-gap: 24px; padding-left: 18px; margin: 12px 0 0; }
.modal__list li { break-inside: avoid; margin-bottom: 6px; }
.modal__close { font-size: 1.6rem; line-height: 1; background: none; border: none; cursor: pointer; padding: 0 6px; color: #555; }
.modal__close:hover { color: #111; }
.body--lock { overflow: hidden; }


/* ===================================================== */
/* [15] Bouton d’appel flottant (style WhatsApp, bleu)   */
/* ===================================================== */
.call-cta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 18, 32, .22);
  border: 2px solid rgba(255,255,255,.85);
  background: linear-gradient(135deg, var(--primary) 0%, var(--electric) 100%);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.call-cta__icon { width: 28px; height: 28px; }
.call-cta:hover { transform: scale(1.06); filter: brightness(1.05); box-shadow: 0 12px 28px rgba(10,18,32,.26); }
@media (prefers-reduced-motion: no-preference) {
  .call-cta.call-cta--brand::after{
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid rgba(34,214,255,.25);
    animation: callPulse 1.8s ease-out infinite;
    pointer-events: none;
  }
  @keyframes callPulse {
    0%   { transform: scale(0.9); opacity: .6; }
    70%  { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1.15); opacity: 0; }
  }
}
/* Desktop : masqué */
@media (min-width: 681px){ .call-cta { display: none; } }


/* ===================================================== */
/* [16] Carrousel Avis (mobile)                          */
/* ===================================================== */
@media (max-width:680px){
  #avis .container{ position: relative; }

  #avis.is-mobile-carousel .avis-grid{
    position: relative;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    padding: 0;
    gap: 0;
  }

  #avis.is-mobile-carousel .avis-card{
    flex: 0 0 100%;
    scroll-snap-align: start;
    margin: 0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #avis.is-mobile-carousel .avis-grid::-webkit-scrollbar{ display: none; }
  #avis.is-mobile-carousel .avis-grid{ scrollbar-width: none; }

  /* Flèches avis */
  #revPrev, #revNext{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: none;
    border: none;
    color: var(--navy);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
    transition: opacity .2s;
  }
  #revPrev:hover, #revNext:hover{ opacity: 1; }
  #revPrev{ left: 8px; }
  #revNext{ right: 8px; }
}
