/* ============================================================
   LAYOUT.CSS — Perfo Maroc
   Topbar, Header, Mobile Nav, Footer
   Chargé sur TOUTES les pages
============================================================ */

/* ===========================
   TOPBAR
=========================== */
.topbar {
  background: linear-gradient(90deg, var(--dark-2) 0%, #0D0E22 50%, var(--dark-2) 100%);
  border-bottom: 1px solid rgba(26, 111, 255, 0.15);
  padding: 8px 0;
  position: relative;
  overflow: hidden;
  z-index: 1001;
}

.topbar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: shimmer 4s infinite linear;
}

@keyframes shimmer { to { left: 200%; } }

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-family: var(--font-body);
  color: var(--silver);
  text-decoration: none;
  transition: var(--transition);
}

.topbar-item:hover { color: var(--primary-light); }

.topbar-item i {
  color: var(--primary);
  font-size: 11px;
  background: rgba(26, 111, 255, 0.12);
  padding: 5px;
  border-radius: 50%;
  border: 1px solid rgba(26, 111, 255, 0.2);
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}

.topbar-divider {
  width: 1px; height: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-hours {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
}

.topbar-hours i { color: var(--primary); font-size: 11px; }

.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.topbar-socials { display: flex; align-items: center; gap: 8px; }

.social-link {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(26, 111, 255, 0.2);
  color: var(--silver);
  font-size: 11px;
  transition: var(--transition);
  background: rgba(26, 111, 255, 0.05);
}

.social-link:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===========================
   HEADER
=========================== */
.header {
  background: rgba(10, 10, 18, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 111, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  overflow: visible;
  isolation: isolate;
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(26, 111, 255, 0.2);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
  position: relative;
}

/* ===========================
   LOGO SECTION INDÉPENDANTE
=========================== */
.header-logo-section {
  position: absolute;
  top: -35px;
  left: 2rem;
  z-index: 1100;
}

.header-logo-link {
  display: block;
  text-decoration: none;
}

.header-logo-badge {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0;
  box-shadow: none;
  transition: var(--transition);
}

.header-logo-badge::before { display: none; }

.header-logo-badge:hover {
  border: none;
  box-shadow: none;
  transform: translateY(-2px);
}

.header-logo-glow { display: none; }

/* Logo : largeur fixe, hauteur auto selon ratio 674x368 */
.header-logo-img {
  width: 190px;
  height: auto;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.header-logo-link:hover .header-logo-img {
  filter: brightness(1.15) drop-shadow(0 0 8px rgba(26,111,255,0.3));
}

/* NAVIGATION */
.nav { display: flex; align-items: center; gap: 0; }

.nav-link {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 500;
  color: var(--silver);
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-link:hover { color: var(--white); background: rgba(26, 111, 255, 0.08); }

.nav-link.active { color: var(--primary); }

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* DROPDOWN */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--dark-3);
  border: 1px solid rgba(26, 111, 255, 0.15);
  border-radius: 14px;
  padding: 8px;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--silver);
  font-size: 13px;
  font-family: var(--font-body);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(26, 111, 255, 0.1);
  color: var(--white);
  padding-left: 18px;
}

.dropdown-item i {
  color: var(--primary);
  width: 16px;
  text-align: center;
  font-size: 12px;
}

.dropdown-arrow {
  font-size: 10px;
  margin-left: 2px;
  transition: var(--transition);
  display: inline-block;
}

.nav-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

/* CTA BUTTON */
.header-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 10px 22px;
  border-radius: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-blue);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue-lg);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

/* BURGER */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  background: rgba(26, 111, 255, 0.1);
  border: 1px solid rgba(26, 111, 255, 0.2);
}

.burger span {
  width: 22px; height: 2px;
  background: var(--silver);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   MOBILE NAV
=========================== */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1999;
  backdrop-filter: blur(4px);
}

.overlay.open { display: block; }

.mobile-nav {
  position: fixed;
  top: 0; right: -100%;
  width: 300px; height: 100vh;
  background: var(--dark-3);
  border-left: 1px solid rgba(26, 111, 255, 0.15);
  z-index: 2000;
  padding: 2rem 1.5rem;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav.open { right: 0; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-close {
  background: rgba(26, 111, 255, 0.1);
  border: 1px solid rgba(26, 111, 255, 0.2);
  color: var(--silver);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.mobile-close:hover { background: rgba(26, 111, 255, 0.2); color: var(--white); }

.mobile-nav-section {
  font-family: var(--font-title);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1rem 0 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 14px;
  color: var(--silver);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.mobile-nav-link i {
  color: var(--primary);
  width: 16px;
  font-size: 12px;
}

.mobile-nav-link:hover { color: var(--primary-light); padding-left: 6px; }

.mobile-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  padding: 13px;
  border-radius: 10px;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-blue);
  transition: var(--transition);
}

.mobile-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-blue-lg); }

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--dark-2);
  border-top: 1px solid rgba(26,111,255,0.12);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.5rem 2rem 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 3rem;
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.3rem;
}

.footer-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.8rem;
  font-family: var(--font-body);
}

.footer-socials { display: flex; gap: 10px; }

.footer-social {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,111,255,0.08);
  border: 1px solid rgba(26,111,255,0.15);
  color: var(--silver);
  font-size: 13px;
  transition: var(--transition);
}

.footer-social:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-blue);
}

.footer-col-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--white);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1.3rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; }

.footer-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 6px 0;
  font-family: var(--font-body);
  transition: var(--transition);
}

.footer-links li a i { font-size: 9px; color: var(--primary); opacity: 0.6; }
.footer-links li a:hover { color: var(--primary-light); padding-left: 5px; }
.footer-links li a:hover i { opacity: 1; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.1rem;
}

.footer-contact-icon {
  width: 36px; height: 36px; min-width: 36px;
  background: rgba(26,111,255,0.1);
  border: 1px solid rgba(26,111,255,0.2);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 12px;
}

.footer-contact-text { display: flex; flex-direction: column; gap: 2px; }

.footer-contact-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-title);
}

.footer-contact-val {
  font-size: 13.5px;
  color: var(--silver-light);
  font-family: var(--font-body);
  line-height: 1.5;
}

/* VILLES */
.footer-cities {
  background: rgba(26,111,255,0.04);
  border-top: 1px solid rgba(26,111,255,0.08);
  padding: 1.5rem 2rem;
}

.footer-cities-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-cities-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-title);
  margin-bottom: 12px;
  text-align: center;
}

.cities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.city-tag {
  font-size: 12px;
  color: var(--silver);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  transition: var(--transition);
  cursor: default;
}

.city-tag:hover {
  border-color: rgba(26,111,255,0.3);
  color: var(--primary-light);
  background: rgba(26,111,255,0.06);
}

/* FOOTER BOTTOM */
.footer-divider {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.footer-copy span { color: var(--primary); }

.footer-legal { display: flex; gap: 1.5rem; }

.footer-legal a {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: var(--transition);
}

.footer-legal a:hover { color: var(--primary-light); }

/* ===========================
   RESPONSIVE LAYOUT
=========================== */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-cta { display: none; }
  .burger { display: flex; }
}

@media (max-width: 768px) {
  .topbar-hours { display: none; }
  .topbar-socials { display: none; }
  .topbar-right { display: none; }
  .topbar-item-email { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 540px) {
  .topbar-inner { justify-content: center; gap: 0.5rem; }
  .topbar-left { justify-content: center; width: 100%; }
  .topbar-item-email { display: none; }
  .topbar-divider { display: none; }
  .topbar-divider-phones { display: flex !important; }
  .header-inner { padding: 0 1rem; }
  .footer-top { padding: 2.5rem 1rem 2rem; }
  .footer-bottom { padding: 1rem; }
  .footer-cities { padding: 1.2rem 1rem; }
}
