/* ==========================================================================
   AMPÉRAGE SUD — Design System (Électricien Premium Var 83)
   ========================================================================== */
:root {
  --navy-950: #070d1b;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-600: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-900: #0f172a;
  --white: #ffffff;
  --green-500: #10b981;
  --red-500: #ef4444;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--slate-900);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  background: var(--navy-900);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--white);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--amber-400);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--amber-400);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  color: var(--navy-950);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.30);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fcd34d, var(--amber-400));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.42);
}

.btn-dark {
  background: var(--navy-900);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--navy-800);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--slate-200);
}

.btn-outline-dark:hover {
  border-color: var(--navy-900);
  background: var(--slate-50);
}

.btn-sm {
  padding: 9px 15px;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 45%),
              linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, #16233f 100%);
  color: var(--white);
  padding: 72px 0 84px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--amber-400);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--amber-400);
}

.hero-desc {
  font-size: 1.08rem;
  color: #cbd5e1;
  max-width: 560px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
}

.trust-item span {
  font-size: 0.82rem;
  color: var(--slate-400);
}

.hero-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.hero-logo-showcase {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 310px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #0f172a;
  margin: 0 auto 18px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.hero-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-card-meta small {
  color: var(--slate-400);
  display: block;
  font-size: 0.78rem;
}

.hero-card-meta strong {
  color: var(--white);
  font-size: 0.96rem;
}

/* ---------- Sections ---------- */
section {
  padding: 84px 0;
}

.section-alt {
  background: var(--slate-50);
}

.section-dark {
  background: var(--navy-900);
  color: var(--white);
}

.section-header {
  max-width: 680px;
  margin-bottom: 46px;
}

.section-header.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-600);
  margin-bottom: 10px;
}

.section-dark .section-eyebrow {
  color: var(--amber-400);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1.02rem;
  color: var(--slate-600);
}

.section-dark .section-sub {
  color: #cbd5e1;
}

/* ---------- Services Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245, 158, 11, 0.55);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--amber-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 18px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.93rem;
  color: var(--slate-600);
}

/* ---------- Portfolio Avant / Après Slider ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  background: var(--navy-900);
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 50% 0 0);
  pointer-events: none;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber-500);
  color: var(--navy-950);
  border: 3px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ba-tag {
  position: absolute;
  top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.ba-tag-before {
  left: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--white);
}

.ba-tag-after {
  right: 14px;
  background: var(--amber-500);
  color: var(--navy-950);
}

.project-body {
  padding: 22px 24px 26px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber-600);
}

.project-meta span.loc {
  color: var(--slate-500);
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-body p {
  font-size: 0.92rem;
  color: var(--slate-600);
}

/* ---------- Products / Stripe Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--amber-500);
}

.product-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--amber-soft);
  color: var(--amber-600);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.product-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-500);
}

.product-card p {
  font-size: 0.92rem;
  color: var(--slate-600);
  margin-bottom: 22px;
}

.stripe-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 10px;
}

/* ---------- Zone d'intervention ---------- */
.zones-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.zone-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Contact & Devis ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 36px;
  align-items: start;
}

.contact-grid > * {
  min-width: 0;
}

.contact-info-card {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px;
}

.contact-info-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.contact-info-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 26px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-row .ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-row small {
  display: block;
  color: var(--slate-400);
  font-size: 0.78rem;
}

.info-row strong {
  font-size: 0.98rem;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate-900);
  background: var(--slate-50);
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber-500);
  background: var(--white);
}

.toast {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.toast.success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.toast.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ---------- Footer ---------- */
footer {
  background: var(--navy-950);
  color: var(--slate-400);
  padding: 40px 0 96px;
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--amber-400);
}

/* ---------- Mobile Sticky Call Bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  gap: 10px;
}

.mobile-call-bar .btn {
  flex: 1;
  padding: 12px 10px;
  font-size: 0.88rem;
}

/* ---------- Admin Dashboard Styles ---------- */
.admin-body {
  background: var(--slate-100);
  min-height: 100vh;
}

.admin-topbar {
  background: var(--navy-900);
  color: var(--white);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mode-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-400);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.mode-pill.live {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 20px;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate-600);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  flex-wrap: wrap;
}

.admin-thumbs {
  display: flex;
  gap: 8px;
}

.admin-thumbs img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
}

.login-box {
  max-width: 440px;
  margin: 64px auto;
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
}

.danger-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  padding: 8px 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.danger-btn:hover {
  background: #fecaca;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .services-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }
  .hero {
    padding: 44px 0 56px;
  }
  .navbar-inner {
    height: 68px;
    gap: 8px;
  }
  .brand {
    gap: 8px;
    min-width: 0;
  }
  .brand-text {
    min-width: 0;
    overflow: hidden;
  }
  .brand-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
  }
  .brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-actions {
    flex-shrink: 0;
  }
  .nav-actions .btn-sm {
    padding: 8px 10px;
    font-size: 0.76rem;
  }
  .services-grid,
  .products-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .contact-info-card,
  .form-card {
    padding: 22px 18px;
  }
  .hero-trust {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nav-actions .hide-mobile {
    display: none;
  }
  .mobile-call-bar {
    display: flex;
  }
}
