/* =========================================================
   RP SOLUTIONS ÉLECTRIQUES
   CSS PREMIUM OPTIMISÉ & HIÉRARCHISÉ
   ---------------------------------------------------------
   OBJECTIF :
   - Garder EXACTEMENT le même design
   - Nettoyer la structure
   - Supprimer les doublons
   - Corriger les incohérences
   - Faciliter la maintenance
   - Rendre le CSS compréhensible
========================================================= */



/* =========================================================
   1. RESET GLOBAL
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

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



/* =========================================================
   2. VARIABLES GLOBALES
========================================================= */

:root {

  /* ---------- BLEUS ---------- */

  --blue-dark: #0a1e46;
  --blue-medium: #28508c;
  --blue-light: #3b82f6;

  /* ---------- ORANGES ---------- */

  --orange-main: #ff7a00;
  --orange-gradient-1: #ff8a00;
  --orange-gradient-2: #ff5e00;

  /* ---------- TEXTES ---------- */

  --text-dark: #1f2937;
  --text-light: #6b7280;

  /* ---------- FONDS ---------- */

  --bg-light: #f8fafc;
  --bg-card: #f1f5f9;
}



/* =========================================================
   3. GLOBAL
========================================================= */

body {
  overflow-x: hidden;
  background: #eef0f4;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
}

.page-wrapper {
  max-width: 1200px;
  margin: auto;
  background: #ffffff;
  border-radius: 20px;

  /* IMPORTANT :
     visible permet au trust-bar de sortir du hero */
  overflow: visible;
}

h1,
h2,
h3 {
  color: var(--blue-dark);
}



/* =========================================================
   4. SEO
========================================================= */

/* Invisible visuellement mais lisible Google */

.seo-hidden {
  position: absolute;
  left: -9999px;
  height: 1px;
  overflow: hidden;
}



/* =========================================================
   5. HEADER
========================================================= */

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.brand img {
  height: 160px;
}



/* =========================================================
   6. HEADER CTA
========================================================= */

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- TELEPHONE ---------- */

.phone-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- GOOGLE ---------- */

.google-inline {
  display: flex;
  align-items: center;
  gap: 4px;

  padding: 6px 10px;

  border-radius: 999px;

  background: rgba(255,255,255,0.7);

  backdrop-filter: blur(6px);

  font-size: 13px;
  font-weight: 600;
  color: #1f2937;

  text-decoration: none;

  transition: all 0.2s ease;
}

.google-inline img {
  width: 14px;
  height: 14px;
}

.google-inline:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.95);
}



/* =========================================================
   7. BOUTONS
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 56px;
  padding: 0 28px;

  border-radius: 999px;

  text-decoration: none;

  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--orange-gradient-1),
      var(--orange-gradient-2)
    );

  box-shadow:
    0 10px 25px rgba(255,120,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.3);

  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);

  background:
    linear-gradient(
      135deg,
      #ff7a00,
      #e65c00
    );
}

/* ---------- BOUTON SECONDAIRE ---------- */

.btn-secondary {
  height: 48px;
  padding: 0 20px;
  font-size: 14px;
  opacity: 0.95;
}



/* =========================================================
   8. HERO PRINCIPAL
========================================================= */

.hero-new {
  position: relative;

  display: flex;
  align-items: center;

  overflow: visible;

  min-height: 520px;

  padding: 80px 40px 180px;

  color: white;

  margin-bottom: 0px;
}

/* ---------- IMAGE ---------- */

.hero-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  z-index: 0;
}

/* ---------- OVERLAY ---------- */

.hero-overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  background:
    linear-gradient(
      90deg,
      rgba(8,20,40,0.98) 0%,
      rgba(8,20,40,0.88) 30%,
      rgba(8,20,40,0.7) 50%,
      rgba(8,20,40,0.35) 70%,
      transparent 100%
    ),

    radial-gradient(
      circle at 20% 50%,
      rgba(0,0,0,0.4),
      transparent 60%
    );
}

/* ---------- CONTENU ---------- */

.hero-container {
  position: relative;
  z-index: 2;

  max-width: 600px;

  animation: fadeUp 0.8s ease;
}

@keyframes fadeUp {

  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- BADGE ---------- */

.hero-badge {
  display: inline-block;

  margin-bottom: 20px;
  padding: 8px 14px;

  border-radius: 20px;

  background: rgba(255,255,255,0.1);

  font-size: 14px;
}

/* ---------- TITRE ---------- */

.hero-new h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.5px;

  color: #ffffff;

  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-new h1 span {
  color: var(--orange-main);
}

/* ---------- TEXTE ---------- */

.hero-new p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
}

/* ---------- FEATURES ---------- */

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;

  margin-bottom: 25px;

  font-size: 14px;
}

/* ---------- BOUTONS HERO ---------- */

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;

  margin-top: 15px;
  margin-bottom: 10px;
}

.btn-call {
  padding: 14px 20px;

  border-radius: 8px;

  background: var(--orange-main);

  color: white;
  font-weight: bold;

  text-decoration: none;
}

.btn-devis {
  padding: 14px 22px;

  border-radius: 10px;

  border: 2px solid rgba(255,255,255,0.4);

  background: rgba(255,255,255,0.05);

  backdrop-filter: blur(4px);

  color: white;
  font-weight: 500;

  transition: 0.2s;
}

.btn-devis:hover {
  background: rgba(255,255,255,0.12);
  border-color: white;
}



/* =========================================================
   9. TRUST BAR
========================================================= */

.trust-bar {
  position: absolute;

  left: 50%;
  bottom: -20px;

  transform: translateX(-50%);

  z-index: 10;

  width: 90%;
  max-width: 1100px;

  display: flex;
  align-items: center;

  padding: 22px 28px;

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      #0f2235,
      #0a1e46
    );

  box-shadow:
    0 20px 50px rgba(0,0,0,0.4);
}

.trust-item {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  text-align: center;
}

.trust-item:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.08);
}

.trust-item.google {
  flex-direction: row;
  justify-content: center;
}

.trust-item.google img {
  width: 20px;
  height: 20px;
}

.icon {
  width: 34px;
  height: 34px;
  min-width: 34px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trust-text strong {
  font-size: 14px;
  font-weight: 600;
}

.trust-text small {
  font-size: 12px;
  opacity: 0.7;
}



/* =========================================================
   10. SERVICES
========================================================= */

.services {
  padding: 40px 20px;

  background: var(--bg-light);

  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);

  gap: 15px;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 20px;

  border-radius: 16px;

  background: var(--bg-card);

  text-align: center;
}

.service-card img {
  width: 100%;
  height: 220px;

  object-fit: cover;

  border-radius: 12px;
}

.service-card p {
  flex-grow: 1;
  color: var(--text-light);
}

.card-btn {
  margin-top: 10px;

  color: var(--orange-main);
  font-weight: 500;
}



/* =========================================================
   11. REALISATIONS
========================================================= */

.realisations h2 {
  text-align: center;
  margin-bottom: 40px;
}

.real-grid {
  display: flex;
  gap: 15px;

  overflow-x: auto;

  padding-bottom: 10px;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.real-grid::-webkit-scrollbar {
  height: 6px;
}

.real-grid::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

.real-card {
  display: flex;
  flex-direction: column;

  box-shadow: 0 10px 25px rgba(0,0,0,0.06);

  transition: transform 0.25s ease;
}

.real-card:hover {
  transform: translateY(-6px);
}

.real-card h3 {
  margin-top: 12px;
  margin-bottom: 6px;

  font-size: 18px;
  font-weight: 600;

  color: var(--blue-dark);
}

.real-card p {
  font-size: 14px;
  line-height: 1.4;

  color: var(--text-light);
}

/* ---------- IMAGES ---------- */

.real-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.img-box {
  position: relative;
  overflow: hidden;

  border-radius: 12px;
}

.img-box img {
  width: 100%;
  height: 160px;

  object-fit: cover;

  transition: transform 0.25s ease;
}

.img-box:hover img {
  transform: scale(1.05);
}

/* ---------- BADGES ---------- */

.badge {
  position: absolute;
  top: 8px;
  left: 8px;

  z-index: 2;

  padding: 5px 10px;

  border-radius: 6px;

  font-size: 11px;
  font-weight: 700;

  color: white;
}

.badge.avant {
  background: #111;
}

.badge.apres {
  background: var(--orange-main);
}



/* =========================================================
   12. WHY SECTION
========================================================= */

.why {
  padding: 60px;
  background: #f3f4f6;
}

.why-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;

  align-items: center;

  gap: 30px;
}

.why ul {
  list-style: none;
}

.why-list li {
  display: flex;
  align-items: center;

  margin-bottom: 8px;
}

.icon-dot {
  width: 6px;
  height: 6px;

  margin-right: 10px;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      #ff8a00,
      #ff5e00
    );
}

.why-images img {
  width: 180px;
  height: 140px;

  object-fit: cover;

  border-radius: 12px;

  transition: 0.2s;
}

.why-images img:hover {
  transform: scale(1.03);

  box-shadow:
    0 10px 25px rgba(0,0,0,0.15);
}



/* =========================================================
   13. ZONE
========================================================= */

.zone {
  padding: 60px;
}

.zone-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;

  align-items: center;
  justify-items: center;
}

.map {
  width: 100%;
  max-width: 420px;
  height: 260px;

  object-fit: cover;

  border-radius: 12px;
}

.zone-text .btn {
  margin-top: 20px;
}



/* =========================================================
   14. AVIS / REVIEWS
========================================================= */

.reviews {
  padding: 30px 20px;
}

.avis-section {
  text-align: center;
  padding-bottom: 20px;
}

.avis-section h2 {
  margin-bottom: 40px;
  font-size: 28px;
}

/* ---------- SLIDER ---------- */

.slider {
  position: relative;

  display: flex;
  justify-content: center;

  overflow: hidden;

  width: 100%;

  margin: 40px auto;
}

.slide-track {
  display: flex;
  width: max-content;

  animation: scroll 35s linear infinite;
}

.slider:hover .slide-track {
  animation-play-state: paused;
}

@keyframes scroll {

  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ---------- FADES ---------- */

.slider::before,
.slider::after {
  content: "";

  position: absolute;
  top: 0;

  width: 120px;
  height: 100%;

  z-index: 2;
}

.slider::before {
  left: 0;
  background: linear-gradient(to right, white, transparent);
}

.slider::after {
  right: 0;
  background: linear-gradient(to left, white, transparent);
}

/* ---------- CARDS ---------- */

.avis-card {
  width: 220px;
  min-width: 220px;

  margin-right: 12px;
  padding: 10px 12px;

  border-radius: 14px;

  background: #f8f9fb;

  box-shadow:
    0 8px 20px rgba(0,0,0,0.06);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.avis-card:hover {
  transform: translateY(-6px) scale(1.02);

  box-shadow:
    0 12px 30px rgba(0,0,0,0.12);
}

.avis-card p {
  font-size: 14px;
  color: #333;
}

.avis-card span {
  display: block;

  margin-top: 10px;

  font-weight: bold;

  color: #0f1c3f;
}

/* ---------- HEADER AVIS ---------- */

.avis-header {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 6px;
}

.avatar {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--orange-main);

  color: white;
  font-weight: 600;
}

.avis-name {
  font-size: 13px;
}

.stars {
  margin-bottom: 5px;

  color: #f5b301;
  font-size: 12px;
}

.avis-text {
  margin-top: 5px;

  font-size: 12px;
  line-height: 1.3;

  color: #333;
}

/* ---------- BOUTON AVIS ---------- */

.btn-avis {
  display: block;
  width: fit-content;

  margin: 40px auto 0;
  padding: 12px 25px;

  border-radius: 6px;

  background: #ff6a00;

  color: white;

  text-decoration: none;
}



/* =========================================================
   15. FOOTER
========================================================= */

.footer-separator {
  height: 60px;

  background:
    linear-gradient(
      to bottom,
      transparent,
      rgba(10,30,70,0.05),
      rgba(10,30,70,0.12)
    );
}

footer {
  padding: 30px 0 20px;

  background:
    linear-gradient(
      180deg,
      #f8fafc 0%,
      #eef2f7 100%
    );
}

/* ---------- TEXTE SEO ---------- */

.footer-seo {
  max-width: 750px;

  margin: 20px auto 15px;
  padding: 0 10px;

  text-align: center;

  font-size: 14px;
  line-height: 1.6;

  color: #6b7280;
}

/* ---------- STRUCTURE ---------- */

.footer-content {
  max-width: 1200px;

  margin: auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;

  gap: 50px;
}

/* ---------- BLOC PRINCIPAL ---------- */

.footer-main {
  padding: 22px;

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f3f6fb
    );

  border: 1px solid rgba(0,0,0,0.04);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.footer-main h3 {
  margin-bottom: 8px;

  font-size: 18px;

  color: var(--blue-dark);
}

.footer-main p {
  margin-bottom: 6px;

  font-size: 14px;
  line-height: 1.4;

  color: var(--text-dark);
}

.footer-phone {
  display: inline-block;

  margin: 6px 0;

  font-size: 16px;
  font-weight: 700;

  color: var(--blue-dark);
}

.footer-main .btn {
  margin-top: 10px;

  height: 46px;
  padding: 0 24px;

  border-radius: 10px;
}

.footer-trust {
  margin-top: 8px;

  font-size: 13px;

  color: var(--text-light);
}

/* ---------- COLONNES ---------- */

.footer-column h4 {
  margin-bottom: 12px;

  font-size: 13px;

  text-transform: uppercase;
  letter-spacing: 0.6px;

  color: var(--blue-dark);
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 8px;
  font-size: 13px;
}

.footer-column a {
  color: var(--text-dark);

  text-decoration: none;

  opacity: 0.9;

  transition: all 0.2s ease;
}

.footer-column a:hover {
  transform: translateX(4px);

  color: var(--orange-main);

  opacity: 1;
}

/* ---------- INFOS BAS FOOTER ---------- */

.footer-infos-inline {
  margin-top: 30px;
  padding-top: 20px;

  text-align: center;

  font-size: 13px;

  color: #6b7280;

  border-top: 1px solid rgba(0,0,0,0.06);
}



/* =========================================================
   16. PAGE ANNEXE
========================================================= */

.service-page {
  padding: 35px 20px 80px;
}

.center {
  max-width: 900px;
  margin: auto;

  text-align: center;
}

.center-list {
  list-style: none;
}

.center-list li {
  margin: 10px 0;
}

.intro {
  margin-bottom: 30px;
  font-size: 18px;
}

.service-page h1 {
  margin-bottom: 20px;
  font-size: 36px;
}

.service-page h2 {
  margin-top: 40px;
  font-size: 26px;
}

.service-page p {
  line-height: 1.6;
}

/* ---------- BOUTON RETOUR ---------- */

.retour-accueil {
  text-align: center;
  margin: 0 0 50px;
}

.btn-retour {
  display: inline-block;

  margin-top: 40px;
  padding: 15px 30px;

  border-radius: 50px;

  background: #ff7b00;

  color: white;
  font-weight: 700;

  text-decoration: none;

  box-shadow:
    0 10px 25px rgba(255,122,0,0.25);

  transition: 0.3s ease;
}

.btn-retour:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}



/* =========================================================
   17. RESPONSIVE MOBILE
========================================================= */

@media (max-width: 768px) {

  /* =====================================================
     GLOBAL
  ===================================================== */

  body {
    font-size: 15px;
  }

  .page-wrapper {
    border-radius: 0;
  }

  /* =====================================================
     HEADER
  ===================================================== */

  .header-flex {
    flex-direction: column;
    gap: 12px;

    padding: 15px;
  }

  .brand img {
    height: 65px;
  }

  .header-cta {
    width: 100%;
    justify-content: space-between;
  }

  .phone-btn {
    flex: 1;

    height: 44px;

    justify-content: center;

    font-size: 14px;

    white-space: nowrap;
  }

  .google-inline {
    padding: 4px 8px;
    font-size: 12px;
  }

  .btn-secondary {
    height: 44px;
    font-size: 13px;
  }

  /* =====================================================
     HERO
  ===================================================== */

  .hero-new {
    padding: 50px 20px 140px;
  }

  .hero-new h1 {
    font-size: 30px;
  }

  .hero-new h1 span {
    display: block;
  }

  .hero-new p {
    font-size: 14px;
  }

  .hero-badge {
    padding: 6px 10px;
    font-size: 12px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  /* =====================================================
     TRUST BAR
  ===================================================== */

  .trust-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 12px;

    bottom: -40px;
  }

  .trust-item {
    display: grid;
    grid-template-columns: 26px 1fr;

    gap: 8px;

    text-align: left;
  }

  .icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }

  .trust-text {
    align-items: flex-start;
    min-height: 40px;
  }

  .trust-text strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .trust-text small {
    font-size: 11px;
    line-height: 1.2;
  }

  /* =====================================================
     SERVICES
  ===================================================== */

  /* =====================================================
   SERVICES - MOBILE
===================================================== */

.services {
  padding: 35px 12px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;

  width: 100%;
  overflow: visible;
  padding: 0;
}

.service-card {
  width: 100%;
  min-width: 0;
  padding: 12px;

  flex: none;
  border-radius: 14px;
}

.service-card img {
  width: 100%;
  height: 130px;

  object-fit: cover;
  border-radius: 10px;
}

.service-card h3 {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.service-card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.card-btn {
  margin-top: 8px;
  font-size: 14px;
}

  /* =====================================================
     REALISATIONS
  ===================================================== */

  .real-grid {
    padding-left: 15px;
  }

  .real-card {
    min-width: 75%;
    padding: 10px;
  }

  .real-card h3 {
    font-size: 16px;
  }

  .real-card p {
    font-size: 13px;
  }

  .real-images {
    grid-template-columns: 1fr;
  }

  .img-box img {
    height: 110px;
  }

  /* =====================================================
     WHY
  ===================================================== */

  .why {
    padding: 40px 20px;
  }

  .why-images {
    display: flex;
    gap: 20px;
  }

  /* =====================================================
     ZONE
  ===================================================== */

  .zone {
    padding: 40px 20px;
  }

  /* CORRECTION :
     zone-inner est un GRID
     donc on utilise grid-template-columns
     et non flex-direction */

  .zone-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .zone-text {
    text-align: center;
  }

  .zone-text .btn {
    width: 90%;
    margin: 20px auto 0;
  }

  .map {
    width: 100%;
    height: auto;
  }

  /* =====================================================
     FOOTER
  ===================================================== */

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-main {
    order: -1;
  }

}