/* ===== MB Electricité multi-services — Style Pro/Classique ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e3a8a;       /* bleu nuit pro */
  --primary-dark: #152b6b;
  --primary-light: #2e54b8;
  --accent: #f59e0b;        /* orange électricien */
  --accent-dark: #d97706;
  --dark: #0f172a;
  --gray-900: #1e293b;
  --gray-700: #475569;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--white);
  font-size: 18px;
  letter-spacing: 1px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text small { font-size: 11px; opacity: .8; font-weight: 400; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--white);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  transition: background .2s;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.12); color: var(--white); }
.nav .cta {
  background: var(--accent);
  margin-left: 8px;
  padding: 10px 20px;
}
.nav .cta:hover { background: var(--accent-dark); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.hamburger span { display: block; width: 26px; height: 3px; background: var(--white); border-radius: 2px; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: var(--white);
  background-image: linear-gradient(rgba(15,23,42,0.65), rgba(30,58,138,0.65)), url('https://images.unsplash.com/photo-1581094288338-2314dddb7ece?w=1600&q=80');
  background-size: cover;
  background-position: center;
}
.hero-inner { padding: 80px 20px; max-width: 1200px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; max-width: 800px; }
.hero p { font-size: 19px; max-width: 700px; margin-bottom: 32px; opacity: .95; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-badge {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-secondary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-dark); color: var(--white); }

/* ===== SECTIONS ===== */
section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  background: var(--gray-100);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: 36px; color: var(--dark); margin-bottom: 16px; font-weight: 700; }
.section-head p { font-size: 17px; color: var(--gray-700); max-width: 700px; margin: 0 auto; }

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.service-card-img { height: 200px; background: var(--gray-100); overflow: hidden; }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; }
.service-card-body { padding: 24px; }
.service-card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--white);
}
.service-card h3 { font-size: 20px; color: var(--dark); margin-bottom: 10px; }
.service-card p { color: var(--gray-700); font-size: 15px; margin-bottom: 16px; }
.service-card a { font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }

/* ===== BLOCS INFO ===== */
.info-bar { background: var(--gray-50); padding: 60px 0; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  text-align: center;
}
.info-item-icon {
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-item h4 { font-size: 17px; color: var(--dark); margin-bottom: 6px; }
.info-item p { font-size: 14px; color: var(--gray-700); }

/* ===== APROPOS / SPLIT ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-img { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); }
.split-img img { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }
.split-content h2 { font-size: 34px; color: var(--dark); margin-bottom: 20px; }
.split-content p { color: var(--gray-700); margin-bottom: 16px; font-size: 16px; }
.split-list { list-style: none; margin: 24px 0; }
.split-list li {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 10px 0;
  font-size: 16px;
  color: var(--gray-900);
}
.split-list li svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* ===== CTA BAND ===== */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}
.cta-band h2 { font-size: 34px; margin-bottom: 16px; }
.cta-band p { font-size: 18px; opacity: .9; margin-bottom: 28px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-band .btn { background: var(--accent); border-color: var(--accent); color: var(--white); }
.cta-band .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ===== GALERIE ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.contact-info { background: var(--gray-50); padding: 36px; border-radius: 10px; }
.contact-info h3 { font-size: 22px; color: var(--dark); margin-bottom: 24px; }
.contact-line {
  display: flex;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.contact-line:last-child { border-bottom: none; }
.contact-line-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-line strong { color: var(--dark); display: block; margin-bottom: 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.contact-line span { color: var(--gray-700); font-size: 15px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-100);
  padding: 36px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-900); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s;
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-msg { padding: 14px; border-radius: 6px; margin-bottom: 18px; font-size: 14px; display: none; }
.form-msg.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; display: block; }
.form-msg.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; display: block; }

/* ===== MAP ===== */
.map-wrap { margin-top: 48px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ===== FOOTER ===== */
.footer { background: var(--dark); color: var(--gray-300); padding: 60px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 { color: var(--white); font-size: 16px; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.footer p, .footer a { color: var(--gray-300); font-size: 14px; line-height: 1.8; }
.footer a:hover { color: var(--accent); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}

/* ===== COOKIE BAR ===== */
.cookie-bar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-bar.show { display: flex; }
.cookie-bar p { flex: 1; font-size: 14px; color: var(--gray-700); margin: 0; min-width: 200px; }
.cookie-bar button { padding: 8px 18px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.cookie-accept { background: var(--primary); color: var(--white); }
.cookie-refuse { background: var(--gray-100); color: var(--gray-700); }

/* ===== PAGE LEGALE ===== */
.legal-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}
.legal-content h1 { font-size: 36px; color: var(--dark); margin-bottom: 32px; }
.legal-content h2 { font-size: 22px; color: var(--primary); margin: 32px 0 14px; }
.legal-content p, .legal-content li { color: var(--gray-700); margin-bottom: 12px; }
.legal-content ul { padding-left: 24px; margin-bottom: 16px; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}
.page-header h1 { font-size: 42px; margin-bottom: 12px; }
.page-header p { font-size: 17px; opacity: .9; }
.breadcrumb { margin-top: 14px; font-size: 14px; opacity: .8; }
.breadcrumb a { color: var(--white); }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 17px; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 12px 16px; }
  .nav .cta { margin-left: 0; margin-top: 8px; text-align: center; justify-content: center; }
  .header-inner { position: relative; }
  .logo-text small { display: none; }
  .logo-text strong { font-size: 16px; }
  section { padding: 56px 0; }
  .hero { min-height: 460px; }
  .hero-inner { padding: 56px 20px; }
  .hero h1 { font-size: 30px; }
  .section-head h2 { font-size: 28px; }
  .page-header { padding: 50px 0; }
  .page-header h1 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-info, .contact-form { padding: 24px; }
}

/* ===== ADMIN ===== */
.admin-body { background: var(--gray-100); min-height: 100vh; padding: 20px; }
.admin-box {
  max-width: 1100px;
  margin: 30px auto;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.admin-header {
  background: var(--primary);
  color: var(--white);
  padding: 22px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-header h1 { font-size: 20px; }
.admin-content { padding: 30px; }
.admin-login {
  max-width: 420px;
  margin: 80px auto;
  background: var(--white);
  border-radius: 10px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.admin-login h1 { font-size: 26px; color: var(--dark); margin-bottom: 8px; text-align: center; }
.admin-login p { color: var(--gray-500); text-align: center; margin-bottom: 28px; font-size: 14px; }
.msg-card {
  background: var(--gray-50);
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.msg-card.unread { border-left-color: var(--accent); background: #fffbeb; }
.msg-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.msg-head strong { color: var(--dark); }
.msg-head small { color: var(--gray-500); font-size: 13px; }
.msg-meta { font-size: 14px; color: var(--gray-700); margin-bottom: 8px; }
.msg-content { color: var(--gray-900); white-space: pre-wrap; line-height: 1.6; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state svg { margin: 0 auto 16px; opacity: .5; }

.domain-box {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  padding: 28px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.domain-box h3 { margin-bottom: 10px; font-size: 19px; }
.domain-box p { opacity: .95; margin-bottom: 16px; font-size: 14px; }
.domain-box input {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}
.domain-box button {
  background: var(--white);
  color: var(--accent-dark);
  padding: 11px 22px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.domain-box button:hover { background: var(--gray-100); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--gray-100); padding: 20px; border-radius: 8px; text-align: center; }
.stat-card .num { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
