:root {
  --color-primary: #0D3C55;
  --color-primary-light: #0f4c6e;
  --color-accent: #0284C7;
  --color-whatsapp: #25D366;
  --color-secondary: #E11D48;
  --bg-soft: #F0F4F8;
  --white: #FFFFFF;
  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--color-primary);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
}

a { text-decoration: none; }

.img-placeholder { display: block; width: 100%; }

.section-padding { padding: 5rem 0; }
@media (max-width: 767.98px) { .section-padding { padding: 3rem 0; } }

.bg-soft { background-color: var(--bg-soft); }

.text-primary-custom { color: var(--color-primary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-secondary-custom { color: var(--color-secondary) !important; }

.bg-primary-custom { background-color: var(--color-primary) !important; }
.bg-accent { background-color: var(--color-accent) !important; }
.bg-secondary-custom { background-color: var(--color-secondary) !important; }
.bg-whatsapp { background-color: var(--color-whatsapp) !important; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(2, 132, 199, .08);
  padding: .4rem 1rem;
  border-radius: 50px;
}

/* ===== Buttons ===== */
.btn-primary-custom {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  border-radius: 50px;
  padding: .85rem 1.75rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-primary-custom:hover {
  background-color: #026da3;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(2, 132, 199, .35);
}

.btn-secondary-custom {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
  border-radius: 50px;
  padding: .85rem 1.75rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-secondary-custom:hover {
  background-color: #be123c;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(225, 29, 72, .35);
}

.btn-outline-custom {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 50px;
  padding: .8rem 1.75rem;
  font-weight: 600;
  background: transparent;
  transition: all .2s ease;
}
.btn-outline-custom:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
  color: #fff;
  border-radius: 50px;
  padding: .85rem 1.75rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-whatsapp:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, .35);
}

/* ===== Navbar ===== */
.navbar-custom {
  background-color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(13, 60, 85, .06);
}
.navbar-custom .nav-link {
  color: var(--color-primary);
  font-weight: 500;
  margin: 0 .5rem;
}
.navbar-custom .nav-link:hover { color: var(--color-accent); }
.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-primary) !important;
  font-size: 1.35rem;
  padding: 0;
}
.navbar-brand span { color: var(--color-secondary); }
.navbar-logo-wrap {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: .75rem;
  padding: .3rem .6rem;
}
.navbar-logo { height: 40px; width: auto; display: block; }

@media (min-width: 992px) {
  .navbar-logo { height: 64px; }
}

.footer-logo-wrap {
  display: inline-flex;
  background: #fff;
  border-radius: .75rem;
  padding: .5rem .8rem;
}
.footer-logo { height: 48px; width: auto; display: block; }

/* ===== Organic blob shapes ===== */
.blob-shape {
  border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
}
.blob-decor {
  position: absolute;
  border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
  z-index: 0;
  filter: blur(2px);
  opacity: .5;
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  padding-top: 7rem;
  padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 100%);
  overflow: hidden;
}
@media (min-width: 992px) {
  .hero-section { padding-top: 9rem; }
}
.hero-blob-1 {
  top: -6rem; right: -8rem;
  width: 30rem; height: 30rem;
  background: rgba(2, 132, 199, .12);
}
.hero-blob-2 {
  bottom: -4rem; left: -6rem;
  width: 20rem; height: 20rem;
  background: rgba(225, 29, 72, .08);
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
}
.hero-visual-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(13, 60, 85, .18);
}
.hero-visual-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rating-badge {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: .85rem 1.25rem;
  box-shadow: 0 15px 35px rgba(13, 60, 85, .12);
}
.rating-badge .stars { color: #FBBF24; letter-spacing: 2px; }

/* Carrousel hero "Des chantiers pensés pour durer" */
.hero-carousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 30px 60px rgba(13, 60, 85, .18);
}
.hero-carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-carousel-slide.active { opacity: 1; }
.hero-carousel-caption {
  position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.25rem;
  padding: .65rem 1.1rem; border-radius: 50px;
  background: rgba(13, 60, 85, .78);
  color: #fff; font-weight: 700; font-size: .95rem;
  text-align: center;
  backdrop-filter: blur(2px);
}

/* ===== Promesse cards ===== */
.promise-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 15px 40px rgba(13, 60, 85, .08);
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}
.promise-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(13, 60, 85, .15); }
.promise-icon {
  width: 64px; height: 64px;
  border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff;
  margin-bottom: 1.25rem;
}

/* ===== DPE Banner ===== */
.dpe-banner {
  background: var(--color-primary);
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-xl);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.dpe-scale { display: flex; flex-direction: column; gap: .35rem; max-width: 320px; }
.dpe-row { display: flex; align-items: center; gap: .6rem; }
.dpe-letter {
  width: 42px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; border-radius: 4px 0 0 4px;
  font-family: var(--font-display);
}
.dpe-bar { height: 32px; border-radius: 0 6px 6px 0; }
.dpe-A { background:#009640; } .dpe-A-bar{background:#009640; width:40%;}
.dpe-B { background:#4cb648; } .dpe-B-bar{background:#4cb648; width:50%;}
.dpe-C { background:#aed136; } .dpe-C-bar{background:#aed136; width:60%;}
.dpe-D { background:#fef200; color:#0D3C55; } .dpe-D-bar{background:#fef200; width:70%;}
.dpe-E { background:#fdb913; } .dpe-E-bar{background:#fdb913; width:80%;}
.dpe-F { background:#f37021; } .dpe-F-bar{background:#f37021; width:90%;}
.dpe-G { background:#ed1c24; } .dpe-G-bar{background:#ed1c24; width:100%;}

/* ===== Projects grid ===== */
.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover img { transform: scale(1.08); }
.project-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(13,60,85,.85) 0%, rgba(13,60,85,0) 55%);
  display: flex; align-items: flex-end;
  padding: 1.25rem;
}
.project-card .overlay h5 { color: #fff; margin: 0; font-size: 1.05rem; }
.project-card .overlay span { color: rgba(255,255,255,.75); font-size: .8rem; }

/* ===== Counter ===== */
.counter-section {
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-xl);
  color: #fff;
}
.counter-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

/* ===== Team ===== */
.team-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(13, 60, 85, .08);
  text-align: center;
}
.team-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }

/* ===== Suivi chantier ===== */
.phone-mockup {
  width: 280px;
  border-radius: 2.5rem;
  border: 10px solid var(--color-primary);
  box-shadow: 0 30px 60px rgba(13, 60, 85, .25);
  overflow: hidden;
  margin: 0 auto;
}
.phone-mockup img { width: 100%; display: block; }

.mobile-app-mockup {
  width: 100%;
  aspect-ratio: 9/19;
  background: #f4f7f9;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  overflow: hidden;
}
.app-status-bar {
  display: flex;
  justify-content: space-between;
  padding: .5rem .9rem 0;
  font-size: .65rem;
  font-weight: 600;
  color: var(--color-primary);
}
.app-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  padding: .9rem .9rem 1.1rem;
  border-radius: 0 0 1rem 1rem;
  margin-top: .3rem;
}
.app-header-title { font-weight: 700; font-size: .95rem; }
.app-header-sub { font-size: .68rem; opacity: .85; margin-top: .15rem; }
.app-progress { padding: .8rem .9rem 0; }
.app-progress-label { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 600; color: var(--color-primary); margin-bottom: .3rem; }
.app-progress-bar { height: 6px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.app-progress-fill { height: 100%; background: var(--color-accent); border-radius: 10px; }
.app-section-title { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #64748b; padding: .9rem .9rem .4rem; }
.app-photo-grid { display: flex; gap: .4rem; padding: 0 .9rem; }
.app-photo { flex: 1; aspect-ratio: 1/1; border-radius: .5rem; background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary)); }
.app-photo:nth-child(2) { background: linear-gradient(135deg, var(--color-accent), var(--color-primary)); }
.app-photo:nth-child(3) { background: linear-gradient(135deg, var(--color-secondary), var(--color-primary-light)); }
.app-chat-bubble { display: flex; gap: .5rem; margin: .9rem .9rem 0; background: #fff; border-radius: .75rem; padding: .6rem; box-shadow: 0 4px 10px rgba(13,60,85,.08); }
.app-chat-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; flex-shrink: 0; }
.app-chat-msg strong { font-size: .72rem; color: var(--color-primary); display: block; }
.app-chat-msg p { font-size: .7rem; color: #475569; margin: .1rem 0 0; line-height: 1.3; }
.app-bottom-nav { margin-top: auto; display: flex; justify-content: space-around; padding: .7rem 0; background: #fff; border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: 1.1rem; }
.app-bottom-nav i:first-child { color: var(--color-accent); }

/* ===== Steps ===== */
.step-card { position: relative; padding-left: 1rem; }
.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* ===== Zone intervention ===== */
.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1px solid rgba(13,60,85,.12);
  border-radius: 50px;
  padding: .5rem 1.1rem;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: 0 8px 20px rgba(13,60,85,.06);
}
.map-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(13,60,85,.15);
}

/* ===== WhatsApp float button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 62px; height: 62px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.9rem;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .5);
  z-index: 1050;
  animation: pulse-wa 2.4s infinite;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }
@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===== Contact form ===== */
.contact-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(13, 60, 85, .15);
  padding: 2.5rem;
}
.contact-card .form-control,
.contact-card .form-select {
  border-radius: .8rem;
  padding: .75rem 1rem;
  border: 1px solid rgba(13,60,85,.15);
}
.contact-card .form-control:focus,
.contact-card .form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 .2rem rgba(2, 132, 199, .15);
}

/* ===== Devis / Facture (accès client) ===== */
.signature-canvas {
  border: 2px dashed rgba(13, 60, 85, .25);
  border-radius: .75rem;
  background: #fff;
  touch-action: none;
  width: 100%;
  height: 160px;
  display: block;
}
.doc-section-row td { background: var(--bg-soft); font-weight: 700; }
.doc-subtotal-row td { font-style: italic; color: #64748b; border-bottom: 2px solid #e2e8f0 !important; }

/* ===== Footer ===== */
.footer-custom {
  background: var(--color-primary);
  color: rgba(255,255,255,.8);
}
.footer-custom a { color: rgba(255,255,255,.8); }
.footer-custom a:hover { color: #fff; }
.footer-custom h6 { color: #fff; font-family: var(--font-display); }

/* ===== Simulateur "Simuler mon chantier" ===== */
.simulator-progress {
  height: 6px;
  border-radius: 50px;
  background: var(--bg-soft);
  overflow: hidden;
}
.simulator-progress-bar {
  height: 100%;
  width: 20%;
  background: var(--color-primary);
  transition: width .3s ease;
}
.simulator-step { display: none; }
.simulator-step.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.simulator-step-error .simulator-cards { outline: 2px solid #dc3545; outline-offset: 6px; border-radius: var(--radius-lg); }

.simulator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.simulator-card { position: relative; }
.simulator-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.simulator-card label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 90px;
  padding: 1rem;
  border: 2px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.simulator-card.selected label {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.simulator-estimate {
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.simulator-estimate-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: .5rem 0;
}

/* ===== Back office : sidebar ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid rgba(13, 60, 85, .08);
}
@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}
.admin-sidebar-brand {
  display: flex;
  align-items: center;
  padding: 1.5rem 1.25rem 1rem;
  text-decoration: none;
}
.admin-sidebar-nav { padding: .5rem 1rem; }
.admin-sidebar-group { margin-bottom: 1.5rem; }
.admin-sidebar-group-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  padding: 0 .75rem;
  margin-bottom: .4rem;
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  border-radius: .65rem;
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.admin-sidebar-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.admin-sidebar-link:hover { background: var(--bg-soft); }
.admin-sidebar-link.active {
  background: var(--color-primary);
  color: #fff;
}
.admin-sidebar-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(13, 60, 85, .08);
  margin-top: auto;
}
.admin-content {
  flex-grow: 1;
  min-width: 0;
  padding: 2rem;
}
@media (max-width: 767.98px) {
  .admin-content { padding: 1.25rem; }
}
