/* ============================================================
   FAICAL SERVICES — CSS dynamique
   Complément de css/style.css (statique).
   Ne pas dupliquer ce qui est déjà dans style.css.
   ============================================================ */

/* ── RTL body ── */
body.rtl { font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; }

/* ── Logo image ── */
.logo-img {
  height: 70px;
  max-width: 320px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ── Nav toggle mobile ── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.nav-toggle:hover { background: rgba(255,255,255,.15); }

/* ── Mobile nav animation ── */
@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Tablet (769px - 1024px) ── */
@media (max-width: 1024px) and (min-width: 769px) {
  nav a { padding: 8px 10px; font-size: 13px; }
  .blog-grid, .blog-page-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  /* Header layout */
  .header-content { flex-wrap: wrap; }
  .logo { flex: 1; }
  .nav-toggle { display: flex; }

  /* Navigation dropdown */
  nav {
    display: none;
    width: 100%;
    background: rgba(0, 25, 60, 0.98);
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    overflow: hidden;
  }
  nav.open {
    display: block;
    animation: navSlideDown .25s ease;
  }
  nav ul {
    flex-direction: column;
    padding: 6px 0;
    gap: 0;
  }
  nav ul li {
    border-bottom: 1px solid rgba(255,255,255,.07);
    width: 100%;
  }
  nav ul li:last-child { border-bottom: none; }
  nav a {
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 0;
    width: 100%;
  }
  nav a:hover { border-radius: 0; }
  nav a.active {
    border-radius: 0;
    border-left: 4px solid #ff6b35;
    background: rgba(255,107,53,.15);
    padding-left: 16px;
  }
  .nav-action {
    margin-left: 0 !important;
    border-radius: 0 !important;
    text-align: center;
  }
  .lang-switcher {
    margin-left: 0;
    padding: 6px 12px;
    justify-content: flex-start;
  }
  .lang-switcher a {
    border-radius: 6px !important;
    width: 100%;
    justify-content: flex-start;
  }

  /* Hero slider height */
  .hero-slider-container { height: 60vh; min-height: 280px; }

  /* Container padding */
  .container { padding: 0 15px; }

  /* Emergency */
  .emergency h2 { font-size: 28px !important; }
  .phone-display { font-size: 22px; padding: 14px; }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-slider-container { height: 52vh; min-height: 240px; }
  nav a { padding: 13px 16px; font-size: 14px; }
  .logo-img { height: 50px; }
}

/* ── RTL mobile fixes ── */
@media (max-width: 768px) {
  body.rtl nav a.active {
    border-left: none;
    border-right: 4px solid #ff6b35;
    padding-left: 20px;
    padding-right: 16px;
  }
  body.rtl .lang-switcher { margin-right: 0; }
}

/* ── Language switcher ── */
.lang-switcher { display: flex; align-items: center; margin-left: 15px; }
.flag-icon { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lang-switcher a {
  background: rgba(255,255,255,.15) !important;
  border-radius: 20px !important;
  padding: 5px 14px !important;
  font-weight: 700 !important;
  transition: background .2s !important;
}
.lang-switcher a:hover { background: rgba(255,255,255,.3) !important; }
nav ul li a.active { color: #ff6b35 !important; font-weight: 700; }

/* ── Form styles (contact) ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: #333; font-size: 14px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid #dde;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color .2s;
  background: #fff;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: #003366; }

/* ── Alert messages ── */
.alert-success { background: #d4edda; color: #155724; padding: 15px; border-radius: 8px; font-weight: 600; border: 1px solid #c3e6cb; }
.alert-error   { background: #fdecea; color: #c62828; padding: 15px; border-radius: 8px; font-weight: 600; border: 1px solid #f5c6cb; }

/* ── CTA button white modifier (not in style.css) ── */
.cta-button.white { background: #fff; color: #003366; }
.cta-button.white:hover { background: #f0f0f0; }

/* ── Generic CMS page content ── */
.page-content { padding: 60px 0; }
.page-body { max-width: 850px; margin: 0 auto; font-size: 16px; line-height: 1.9; color: #333; }
.page-body h2 { font-size: 26px; font-weight: 800; color: #003366; margin: 30px 0 12px; }
.page-body p { margin-bottom: 16px; }
.page-body ul, .page-body ol { padding-left: 20px; margin-bottom: 16px; }
.page-body strong { color: #003366; }

/* ── WhatsApp float ── */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  display: block;
  text-decoration: none;
  transition: transform .2s;
  z-index: 999;
}
.whatsapp-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(37,211,102,.5));
}
.whatsapp-float:hover { transform: scale(1.1); }
body.rtl .whatsapp-float { right: auto; left: 25px; }
