/* ===============================
   YMP ÉLECTRICITÉ - STYLE GLOBAL
   Charte : noir mat, bleu électrique, orange
================================= */

:root {
  --noir: #101014;
  --anthracite: #1c1f26;
  --bleu: #0d47a1;
  --orange: #ff8a00;
  --blanc: #ffffff;
  --gris: #f5f7fb;
  --texte: #1f2937;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--gris);
  color: var(--texte);
}

a { color: inherit; }

.header {
  min-height: 520px;
  padding: 24px 7vw 80px;
  color: var(--blanc);
  background:
    linear-gradient(135deg, rgba(16,16,20,.96), rgba(13,71,161,.78)),
    radial-gradient(circle at 85% 15%, rgba(255,138,0,.32), transparent 35%);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  letter-spacing: .08em;
}

.logo {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 2px solid var(--orange);
  background: rgba(255,255,255,.06);
  font-size: 24px;
  font-weight: 900;
}

.menu {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: rgba(255,255,255,.88);
  font-weight: 800;
  font-size: 14px;
}

.menu a:hover,
.menu a.active { color: var(--orange); }

.call-top,
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 900;
  border-radius: 999px;
}

.call-top,
.btn-orange {
  background: var(--orange);
  color: var(--blanc);
  padding: 13px 22px;
}

.btn-outline {
  border: 2px solid rgba(255,255,255,.48);
  color: var(--blanc);
  padding: 13px 22px;
}

.hero {
  max-width: 950px;
  margin-top: 90px;
}

.zone {
  display: inline-block;
  padding: 9px 14px;
  border-left: 4px solid var(--orange);
  background: rgba(255,255,255,.12);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
}

h1 {
  margin: 24px 0 16px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1;
}

.intro {
  max-width: 780px;
  color: rgba(255,255,255,.88);
  font-size: 21px;
  line-height: 1.55;
}

.actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

main {
  max-width: 1180px;
  margin: -45px auto 0;
  padding: 0 24px 70px;
}

.panel {
  background: var(--blanc);
  border-radius: 28px;
  padding: 42px;
  margin-bottom: 26px;
  box-shadow: 0 18px 45px rgba(16,16,20,.10);
}

h2 {
  margin-top: 0;
  color: var(--noir);
  font-size: 34px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  padding: 24px;
  border-radius: 20px;
  background: var(--gris);
  border-top: 4px solid var(--bleu);
}

.card h3 { margin-top: 0; }

.card p,
.card li {
  color: #5f6876;
  line-height: 1.6;
}

.orange-line {
  height: 5px;
  border-radius: 999px;
  margin: 20px 0 28px;
  background: linear-gradient(90deg, var(--bleu), var(--orange));
}

.cta {
  background: var(--noir);
  color: var(--blanc);
  border-bottom: 7px solid var(--orange);
}

.cta h2 { color: var(--blanc); }
.cta p { color: rgba(255,255,255,.82); }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
}

th {
  background: var(--noir);
  color: var(--blanc);
}

th, td {
  padding: 14px;
  border: 1px solid #ddd;
  text-align: left;
}

tr:nth-child(even) { background: #fafafa; }

.note {
  padding: 18px;
  margin-top: 24px;
  border-left: 5px solid var(--orange);
  border-radius: 12px;
  background: #fff7e8;
}

.contact-card {
  background: var(--noir);
  color: var(--blanc);
  border-radius: 24px;
  padding: 30px;
  border-bottom: 6px solid var(--orange);
}

.form input,
.form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-family: inherit;
}

.form button {
  border: 0;
  cursor: pointer;
}

footer {
  text-align: center;
  background: var(--noir);
  color: rgba(255,255,255,.72);
  padding: 30px 24px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    align-items: center;
  }

  .brand {
    flex: 1 1 auto;
  }

  .call-top {
    flex: 0 0 auto;
  }

  .menu {
    display: flex;
    order: 3;
    width: 100%;
    gap: 8px;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.16);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .menu::-webkit-scrollbar { display: none; }

  .menu a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    white-space: nowrap;
    font-size: 13px;
  }

  .menu a.active {
    background: rgba(255,138,0,.18);
  }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .panel { padding: 28px; }
  main { margin-top: -30px; }
  .header { padding-inline: 24px; }
  .brand span { font-size: 14px; }
}

@media (max-width: 560px) {
  .header {
    min-height: 500px;
    padding: 18px 18px 68px;
  }

  .site-logo {
    width: 72px;
    height: 58px;
  }

  .brand { gap: 8px; }
  .brand span { font-size: 12px; letter-spacing: .04em; }

  .call-top {
    padding: 10px 15px;
    font-size: 13px;
  }

  .hero,
  .legal-hero {
    margin-top: 54px;
  }

  h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .intro {
    font-size: 18px;
  }
}


/* Logo officiel YMP */
.site-logo {
  width: 92px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}


/* Mentions légales et pied de page */
footer a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 800;
}

footer a:hover { text-decoration: underline; }
.footer-sep { margin: 0 6px; }

.legal-header { min-height: 430px; }
.legal-hero { margin-top: 70px; }
.legal-panel { line-height: 1.7; }
.legal-panel p { color: #5f6876; }
.legal-panel strong { color: var(--noir); }
.legal-panel a { color: var(--bleu); font-weight: 800; }
.legal-details p { margin: 10px 0; }

.privacy-note {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #6b7280;
}
.privacy-note a { color: var(--bleu); font-weight: 800; }


/* Champ anti-spam invisible */
.hp-field{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important;}

.form-status{padding:12px 14px;border-radius:10px;margin:0 0 14px;font-weight:600;}
.form-status.success{background:#e9f7ef;color:#176b3a;border:1px solid #b9e3c9;}
.form-status.error{background:#fff1f0;color:#9b2c2c;border:1px solid #f3c0bd;}

/* ===============================
   FINITIONS V1 - AOÛT 2026
================================= */
html { scroll-behavior: smooth; }

.brand { text-decoration: none; color: var(--blanc); }
.site-logo { width: 86px; height: 68px; object-fit: contain; }

.btn, .call-top, .menu a, .card, .back-to-top {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover, .call-top:hover { transform: translateY(-2px); }
.btn-orange:hover, .call-top:hover { box-shadow: 0 10px 24px rgba(255,138,0,.28); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.trust-item {
  padding: 22px 18px;
  border-radius: 18px;
  background: var(--gris);
  border: 1px solid #e7eaf0;
}
.trust-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 13px;
  background: var(--noir);
  color: var(--orange);
  font-size: 20px;
  font-weight: 900;
}
.trust-item strong { display: block; color: var(--noir); margin-bottom: 8px; }
.trust-item p { margin: 0; color: #5f6876; line-height: 1.5; font-size: 14px; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr);
  gap: 36px;
  align-items: start;
}
.contact-card-simple a { color: var(--blanc); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-zone { color: rgba(255,255,255,.75); font-size: 14px; }
.form label { display: block; margin: 0 0 7px; font-weight: 800; color: var(--noir); }
.form input, .form textarea { font-size: 16px; background: #fff; }
.form input:focus, .form textarea:focus {
  outline: 3px solid rgba(13,71,161,.13);
  border-color: var(--bleu);
}
.form-submit { border: 0; cursor: pointer; min-width: 210px; }
.privacy-note { color: #667085; font-size: 13px; line-height: 1.55; margin-bottom: 0; }
.privacy-note a { color: var(--bleu); font-weight: 800; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-status { padding: 14px 16px; border-radius: 12px; margin-top: 0; font-weight: 800; line-height: 1.45; }
.form-status.success { background: #eaf8ee; color: #166534; border: 1px solid #b9e5c4; }
.form-status.error { background: #fff1f1; color: #991b1b; border: 1px solid #fecaca; }

.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16,16,20,.08); }

footer a { color: var(--blanc); text-underline-offset: 3px; }
.footer-sep { color: var(--orange); margin: 0 5px; }

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--blanc);
  text-decoration: none;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(16,16,20,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.compact-header { min-height: 500px; }

@media (max-width: 1100px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  /* Tous les liens du menu restent visibles : pas de défilement caché sur téléphone. */
  .menu {
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .contact-layout { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { margin-top: 62px; }
}

@media (max-width: 560px) {
  .nav { gap: 10px; }
  .brand { width: calc(100% - 94px); }
  .brand span { display: none; }
  .site-logo { width: 78px; height: 58px; }
  .call-top { padding: 11px 16px; font-size: 14px; }
  .menu { gap: 6px; margin-top: 8px; padding-top: 12px; }
  .menu a { padding: 8px 10px; font-size: 12px; }
  .hero { margin-top: 48px; }
  h1 { font-size: clamp(40px, 14vw, 58px); }
  .intro { font-size: 18px; }
  .actions { gap: 10px; }
  .actions .btn { width: 100%; text-align: center; }
  .panel { border-radius: 22px; padding: 24px 20px; }
  h2 { font-size: 28px; }
  .trust-grid { grid-template-columns: 1fr; }
  .form-submit { width: 100%; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Réalisations - visuel avant / après */




@media (max-width: 700px) {
}

/* Galerie automatique des réalisations */
.gallery-panel { text-align: center; }
.gallery-intro {
  max-width: 760px;
  margin: 0 auto 24px;
  color: #667085;
}
.realisations-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gallery-item {
  margin: 0;
  background: #0d0d0d;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(13,71,161,.22);
  box-shadow: 0 10px 26px rgba(16,16,20,.10);
}
.gallery-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.gallery-button img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease, filter .25s ease;
}
.gallery-button:hover img,
.gallery-button:focus-visible img { transform: scale(1.025); filter: brightness(1.03); }
.gallery-caption {
  margin: 0;
  padding: 12px 14px 14px;
  color: #fff;
  font-size: 14px;
  text-align: left;
  border-top: 2px solid var(--orange);
}
.gallery-loading,
.gallery-empty,
.gallery-error { grid-column: 1 / -1; margin: 0; padding: 24px; color: #667085; }

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 30px;
  background: rgba(0,0,0,.92);
}
.gallery-lightbox.open { display: grid; }
.gallery-lightbox-image {
  max-width: min(1400px, 94vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 22px rgba(13,71,161,.32), 0 0 26px rgba(255,138,0,.24);
}
.gallery-lightbox-caption {
  color: #fff;
  margin: 14px 0 0;
  text-align: center;
  font-weight: 700;
}
.gallery-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: #101014;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible { border-color: var(--orange); color: var(--orange); }
body.lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
  .realisations-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .realisations-gallery { grid-template-columns: 1fr; gap: 14px; }
  .gallery-lightbox { padding: 18px; }
  .gallery-lightbox-image { max-width: 96vw; max-height: 78vh; }
}
