
/* ==========================================================================
   Plomberie Adel inc – Modern UI CSS
   Author: ChatGPT
   Notes:
   - Keeps compatibility with your existing HTML classes (about, feature, service, etc.)
   - Uses Bootstrap CSS variables where available; maps to a new, brand-consistent palette.
   - Adds motion-safety, accessibility tweaks, smoother transitions, refined spacing.
   - Includes dynamic, but lightweight effects (hover, focus, reveal-ready classes).
   ========================================================================== */

/* Google Fonts (optional; you can also include from HTML head) */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@500;700;800&display=swap");

/* Root variables (Brand) */
:root {
  /* Brand palette */
  --primary: #0077B6;           /* Bleu acier */
  --primary-600: #0d6efd;       /* Bootstrap default primary fallback */
  --primary-light: #90E0EF;     /* Bleu glacier */
  --secondary: #023E8A;         /* Bleu profond */
  --accent: #E63946;            /* Rouge urgence */
  --muted: #6b7280;             /* Texte secondaire */
  --bg: #ffffff;                /* Fond */
  --bg-soft: #F3F4F6;           /* Fond section clair */
  --card: #ffffff;              /* Cartes */
  --heading: #111827;           /* Titres */
  --text: #1F2937;              /* Texte principal */
  --ring: #90E0EF;              /* Focus outline */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-sm: 0 6px 20px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.12);

  /* Map to Bootstrap tokens for seamless integration */
  --bs-primary: var(--primary);
  --bs-secondary: var(--secondary);
  --bs-light: #f8f9fa;
  --bs-dark: #111827;
  --bs-white: #ffffff;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Base typography and layout */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FBFC 100%);
}

h1, h2, h3, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: "Poppins", "Open Sans", Arial, sans-serif;
  color: var(--heading);
  letter-spacing: 0.1px;
}

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

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

/* Spacing utilities (kept for compatibility) */
.fw-medium { font-weight: 600; }
.mt-6 { margin-top: 5rem; }
.mb-6 { margin-bottom: 5rem; }
.pt-6 { padding-top: 5rem; }
.pb-6 { padding-bottom: 5rem; }

/* Back to top */
.back-to-top {
  position: fixed;
  display: none;
  right: 24px;
  bottom: 24px;
  z-index: 99;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--bs-white);
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.back-to-top:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--secondary); }

/* Spinner */
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}
#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/* Buttons */
.btn {
  transition: .3s ease;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-primary, .btn-outline-primary:hover { color: var(--bs-light); background: var(--primary); border-color: var(--primary); }
.btn-secondary, .btn-outline-secondary:hover { color: var(--bs-dark); background: var(--bs-white); border-color: var(--secondary); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); background: transparent; }
.btn-outline-secondary { color: var(--secondary); border-color: var(--secondary); background: transparent; }

.btn-square { width: 38px; height: 38px; }
.btn-sm-square { width: 32px; height: 32px; }
.btn-lg-square { width: 48px; height: 48px; }
.btn-xl-square { width: 60px; height: 60px; }
.btn-xxl-square { width: 75px; height: 75px; }
.btn-square, .btn-sm-square, .btn-lg-square, .btn-xl-square, .btn-xxl-square {
  padding: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}

/* Focus ring for accessibility */
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

/* Navbar */
.sticky-top { top: -100px; transition: .5s; }
.navbar .navbar-nav .nav-link {
  margin-right: 28px;
  padding: 18px 0;
  color: var(--bs-dark);
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 700;
  outline: none;
  position: relative;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active { color: var(--bs-primary); }
.navbar .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 8px;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width .25s ease;
}
.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after { width: 32px; }

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

@media (max-width: 991.98px) {
  .navbar .navbar-nav .nav-link  { margin-right: 0; padding: 10px 0; }
  .navbar .navbar-nav { margin-top: 12px; border-top: 1px solid #EEEEEE; }
}

@media (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    display: block; border: none; margin-top: 0; top: 150%;
    opacity: 0; visibility: hidden; transition: .35s ease;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
  }
  .navbar .nav-item:hover .dropdown-menu {
    top: 100%; visibility: visible; opacity: 1;
  }
}

/* Header / Carousel */
.carousel .carousel-caption {
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: start; justify-content: center;
  text-align: left;
  background: rgba(2, 62, 138, .60); /* deeper overlay */
  padding: 3rem;
  padding-left: 10rem;
  z-index: 1;
  border-radius: 0;
}
.carousel .carousel-indicators {
  top: 0; bottom: 0; left: 0; right: auto;
  width: 84px; flex-direction: column; margin: 0; margin-left: 2.5rem;
}
.carousel .carousel-indicators [data-bs-target] {
  width: 70px; height: 70px; text-indent: 0; margin: 6px 0;
  border: 2px solid #FFFFFF; overflow: hidden; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.carousel .carousel-indicators [data-bs-target] img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 992px) {
  .carousel .carousel-item { position: relative; min-height: 560px; }
  .carousel .carousel-item img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
  .carousel .carousel-indicators [data-bs-target] { width: 60px; height: 60px; }
  .carousel .carousel-caption { padding-left: 7rem; }
}
@media (max-width: 768px) {
  .carousel .carousel-item { min-height: 480px; }
  .carousel .carousel-indicators [data-bs-target] { width: 50px; height: 50px; }
  .carousel .carousel-caption { padding-left: 2rem; padding-right: 1rem; }
}
@media (min-width: 1200px) {
  .carousel .carousel-item .display-1 { font-size: 6.2rem; }
}

.page-header {
  background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, .6)), url(../img/carousel-1.jpg) center center / cover no-repeat;
}

/* About */
.about-img {
  position: relative;
  padding-left: 45px;
}
.about-img::before {
  position: absolute; content: "";
  width: 200px; height: 300px;
  top: -25px; left: 0;
  border: 5px solid var(--bs-primary);
  border-radius: var(--radius-lg);
  animation: animateUpDown 3s ease-in-out infinite;
  z-index: -1;
  box-shadow: var(--shadow-sm);
}
@keyframes animateUpDown {
  0% { top: -25px; }
  50% { top: -45px; }
  100% { top: -25px; }
}

/* Features */
.feature {
  background: linear-gradient(to right, rgba(0, 119, 182, .25), rgba(2, 62, 138, .85) 50%), url(../img/carousel-1.jpg) left center / cover no-repeat;
}
.feature-row { box-shadow: var(--shadow-md); border-radius: var(--radius-lg); overflow: hidden; }
.feature-item { border-color: rgba(0, 0, 0, .05) !important; background: var(--card); }
.feature-icon { position: relative; transition: .4s ease; }
.feature-item:hover .feature-icon { margin-left: 1rem; transform: translateX(6px); }
.feature-item a { position: relative; font-weight: 700; }
.feature-item a::after {
  position: absolute; content: ""; width: 100%; height: 1px;
  background: var(--bs-secondary); top: 50%; left: 0; transform: translateY(-50%);
  z-index: -1;
}
.feature-item a:hover { color: var(--bs-primary) !important; }
.feature-item a:hover::after { background: var(--bs-primary); }

.experience .progress { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.experience .progress .progress-bar {
  width: 0px; transition: width 2.4s ease; background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* Services */
.service .service-item { position: relative; margin-top: 45px; }
.service .service-inner {
  position: relative; height: 100%; margin-top: 45px;
  background: var(--bs-white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service .service-inner::before {
  position: absolute; content: ""; width: 100%; height: 0; left: 0; bottom: 0;
  transition: 0.9s ease; background: var(--bs-primary);
}
.service .service-inner:hover::before { height: 100%; top: 0; }
.service .service-item img { margin-top: -45px; padding-left: 45px; border-top-left-radius: var(--radius-lg); }
.service .service-item * { position: relative; transition: .35s ease; z-index: 1; }
.service .service-item:hover h5, .service .service-item:hover p { color: var(--bs-white); }
.service .service-item:hover a { padding-left: 45px !important; }

/* Urgency stripe */
.stripe-urgency {
  background: var(--accent); color: #fff; padding: .9rem 0;
  box-shadow: var(--shadow-sm);
}
.stripe-urgency .cta { background: #fff; color: var(--accent); border: 2px solid #fff; font-weight: 800; }
.stripe-urgency .cta:hover { background: transparent; color: #fff; border-color: #fff; }

/* Appointment / Newsletter sections (renamed “appoinment” kept for compatibility) */
.appoinment,
.newsletter {
  background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-2.jpg) left center / cover no-repeat;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.newsletter { background-image: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-3.jpg); }

/* Team */
.team .team-item {
  background: var(--bs-white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.team .team-item .team-social {
  position: absolute; width: 0; height: 100%; top: 0; right: 0;
  transition: .4s ease; background: linear-gradient(90deg, rgba(0,119,182,.0), rgba(0,119,182,.85));
  display: flex; align-items: center; justify-content: center;
}
.team .team-item:hover .team-social { width: 100%; left: 0; }
.team .team-item .team-social .btn { opacity: 0; transition: .4s ease; }
.team .team-item:hover .team-social .btn { opacity: 1; transform: translateY(-2px); }

/* Testimonial */
.testimonial-img {
  position: relative; min-height: 400px; overflow: hidden; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.testimonial-img div { position: absolute; width: 100px; height: 100px; animation-duration: 5s; }
.testimonial-img div:nth-child(1) { top: 10%; left: 10%; animation-delay: .1s; }
.testimonial-img div:nth-child(2) { top: 60%; left: 20%; animation-delay: .4s; }
.testimonial-img div:nth-child(3) { top: 20%; left: 60%; animation-delay: .7s; }
.testimonial-img div:nth-child(4) { bottom: 10%; right: 10%; animation-delay: 1s; }
.testimonial-img div::after {
  position: absolute; content: ""; top: -1px; right: -1px; bottom: -1px; left: -1px;
  box-shadow: 0 0 10px 10px var(--bs-white) inset; z-index: 1; border-radius: var(--radius-md);
}
.testimonial-carousel .owl-item img { width: 100px; height: 100px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.testimonial-carousel .owl-nav {
  margin-top: 15px; display: flex; gap: 12px; justify-content: center;
}
.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
  color: var(--bs-primary); font-size: 36px; transition: .25s ease; line-height: 1;
}
.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover { color: var(--bs-dark); transform: translateY(-1px); }

/* Contact dividers */
@media (min-width: 992px) {
  .contact-info::after {
    position: absolute; content: ""; width: 0px; height: 100%; top: 0; left: 50%;
    border-left: 1px dashed rgba(255, 255, 255, .25);
  }
}
@media (max-width: 991.98px) {
  .contact-info::after {
    position: absolute; content: ""; width: 100%; height: 0px; top: 50%; left: 0;
    border-top: 1px dashed rgba(255, 255, 255, .25);
  }
}

/* Footer */
.footer .btn.btn-link {
  display: block; margin-bottom: 6px; padding: 0; text-align: left;
  color: var(--muted); font-weight: 600; text-transform: none; transition: .25s ease;
}
.footer .btn.btn-link::before {
  position: relative; content: "\f105"; font-family: "Font Awesome 5 Free"; font-weight: 900;
  color: var(--bs-primary); margin-right: 10px;
}
.footer .btn.btn-link:hover { color: var(--bs-primary); letter-spacing: .5px; box-shadow: none; }
.footer {
  background: var(--primary);
  color: #fff;
}
.footer a { color: #fff; }
.footer a:hover { color: var(--primary-light); }

.copyright { background: #0B335E; color: #e5e7eb; }
.copyright a { color: var(--bs-white); }
.copyright a:hover { color: var(--primary-light); }

/* Helpers */
.section-soft { background: var(--bg-soft); }
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Reveal-ready helper classes (if you use WOW/ScrollReveal) */
.reveal-up { transform: translateY(16px); opacity: 0; transition: .6s ease; }
.reveal-up.revealed { transform: translateY(0); opacity: 1; }
.reveal-fade { opacity: 0; transition: .6s ease; }
.reveal-fade.revealed { opacity: 1; }
.reveal-left { transform: translateX(-16px); opacity: 0; transition: .6s ease; }
.reveal-left.revealed { transform: translateX(0); opacity: 1; }
.reveal-right { transform: translateX(16px); opacity: 0; transition: .6s ease; }
.reveal-right.revealed { transform: translateX(0); opacity: 1; }

/* Utility for urgency pill */
.urgent-pill {
  background: var(--accent);
  color: #fff;
  padding: .45rem .7rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .8rem;
  box-shadow: var(--shadow-sm);
}

/* Page section headers */
.section-title .eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  color: var(--primary);
  font-size: .8rem;
}
.section-title h2 {
  margin: .35rem 0 1rem;
}

/* Make sure forms look clean */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .85rem 1rem;
  width: 100%;
  transition: border-color .25s ease, box-shadow .25s ease;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(144,224,239,.25);
  outline: none;
}

/* Phone CTA badge */
.cta-phone {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--primary);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.cta-phone:hover { background: var(--secondary); color: #fff; }
.cta-phone i { font-size: 1.1rem; line-height: 1; }
