/* MD Solutions d’entretien — feuille de style */
:root {
  --navy: #063B73;
  --navy-dark: #042a55;
  --turquoise: #18B7B0;
  --green: #70C93D;
  --gray-bg: #f4f6f8;
  --text: #243040;
  --muted: #5b6672;
  --white: #ffffff;
  --radius: 10px;
  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h2 { font-size: 1.9rem; margin-bottom: 0.6rem; text-align: center; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid #e5e9ee;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px;
}
.brand-logo { height: 56px; width: auto; display: block; }
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--turquoise); }
.site-nav .nav-cta {
  background: var(--turquoise); color: var(--white) !important;
  padding: 0.5rem 1.1rem; border-radius: 999px;
}
.site-nav .nav-cta:hover { background: var(--navy); }
.nav-toggle, .nav-burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 70%);
  color: var(--white);
  text-align: center;
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 0.8rem; }
.hero-tagline {
  letter-spacing: 0.35em; text-transform: uppercase;
  font-size: 0.8rem; color: var(--turquoise); font-weight: 700;
  margin-bottom: 1.2rem;
}
.hero-intro { max-width: 620px; margin: 0 auto 2rem; font-size: 1.1rem; color: #d7e3f0; }
.hero .btn { margin-top: 0.4rem; }
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 46px;
  background: var(--white);
  clip-path: ellipse(60% 100% at 50% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 0.85rem 1.9rem; border-radius: 999px; font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-primary { background: var(--turquoise); color: var(--white); }
.btn-primary:hover { background: var(--green); transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--gray-bg); }
.section-cta { background: var(--navy); color: var(--white); text-align: center; }
.section-cta h2, .section-cta .lead { color: var(--white); }
.section-cta .lead { color: #d7e3f0; }

/* ---------- Services ---------- */
.service-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  margin-bottom: 2rem;
}
.service-grid li {
  background: var(--white); border: 1px solid #e5e9ee;
  border-top: 4px solid var(--turquoise);
  border-radius: var(--radius); padding: 1.4rem;
}
.service-grid li:nth-child(3n+2) { border-top-color: var(--green); }
.service-grid li:nth-child(3n) { border-top-color: var(--navy); }
.service-grid p { color: var(--muted); font-size: 0.95rem; }
.note {
  text-align: center; font-weight: 600; color: var(--navy);
  max-width: 700px; margin: 0 auto;
}

/* ---------- Pourquoi nous ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.why-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.6rem; border: 1px solid #e5e9ee; text-align: center;
}
.why-card h3 { margin-bottom: 0.6rem; }
.why-card p { color: var(--muted); font-size: 0.95rem; }
.why-card:first-child h3 { color: var(--turquoise); }

/* ---------- Zone ---------- */
.zone-inner { text-align: center; }

/* ---------- Contact ---------- */
.contact-list {
  list-style: none; margin: 0 auto 2rem; font-size: 1.15rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.contact-label { color: #9fb4cc; font-weight: 600; }
.contact-list a { color: var(--white); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--turquoise); }
.contact-list a:hover { color: var(--turquoise); }

/* ---------- Formulaire de contact ---------- */
.contact-form {
  max-width: 560px; margin: 2.2rem auto 0; text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius); padding: 1.6rem;
}
.contact-form label { display: block; color: #d7e3f0; font-weight: 600; font-size: 0.92rem; margin-bottom: 1rem; }
.contact-form input,
.contact-form textarea {
  display: block; width: 100%; margin-top: 0.35rem;
  border: 1px solid #dfe5ec; border-radius: 8px;
  padding: 0.7rem 0.9rem; font-size: 0.95rem; font-family: inherit;
  background: var(--white); color: var(--text);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--turquoise); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { border: none; cursor: pointer; width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hp-field { display: none; }
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark); color: #9fb4cc;
  text-align: center; padding: 1.4rem 0; font-size: 0.9rem;
}

/* ---------- Clavardage automatisé ---------- */
#md-chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(6, 59, 115, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}
#md-chat-fab:hover { background: var(--turquoise); transform: scale(1.06); }

#md-chat-panel {
  position: fixed; right: 20px; bottom: 92px; z-index: 200;
  width: 340px; max-width: calc(100vw - 40px); height: 460px; max-height: 70vh;
  background: var(--white); border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(6, 59, 115, 0.25);
  display: flex; flex-direction: column;
  border: 1px solid #e5e9ee;
}
#md-chat-panel[hidden] { display: none; }

.md-chat-header {
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
}
.md-chat-logo { width: 36px; height: 36px; border-radius: 50%; background: var(--white); object-fit: contain; }
.md-chat-title { flex: 1; line-height: 1.3; }
.md-chat-title strong { display: block; font-size: 0.9rem; }
.md-chat-title span { font-size: 0.75rem; color: #9fb4cc; }
#md-chat-close {
  background: none; border: none; color: var(--white);
  font-size: 1.6rem; cursor: pointer; line-height: 1; padding: 4px 8px;
}

.md-chat-messages {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--gray-bg);
}
.md-msg {
  max-width: 85%; padding: 9px 12px; border-radius: 14px;
  font-size: 0.88rem; line-height: 1.45;
}
.md-msg-bot { background: var(--white); color: var(--text); align-self: flex-start; border: 1px solid #e5e9ee; border-bottom-left-radius: 4px; }
.md-msg-user { background: var(--navy); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }

.md-chat-quick {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px;
  background: var(--white); border-top: 1px solid #eef1f4;
}
.md-quick-btn {
  background: var(--white); color: var(--navy);
  border: 1.5px solid var(--turquoise); border-radius: 999px;
  padding: 5px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.md-quick-btn:hover { background: var(--turquoise); color: var(--white); }

.md-chat-form {
  display: flex; gap: 8px; padding: 10px 12px;
  background: var(--white); border-top: 1px solid #eef1f4;
}
.md-chat-form input {
  flex: 1; border: 1px solid #dfe5ec; border-radius: 999px;
  padding: 9px 14px; font-size: 0.88rem; outline: none;
}
.md-chat-form input:focus { border-color: var(--turquoise); }
.md-chat-form button {
  background: var(--turquoise); color: var(--white); border: none;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.md-chat-form button:hover { background: var(--navy); }

@media (max-width: 560px) {
  #md-chat-panel { right: 12px; bottom: 86px; }
  #md-chat-fab { right: 12px; bottom: 14px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .service-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2rem; }
}
@media (max-width: 560px) {
  .service-grid, .why-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 3.6rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero-tagline { letter-spacing: 0.2em; }
  .section { padding: 2.8rem 0; }
  h2 { font-size: 1.55rem; }

  /* Menu mobile */
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer;
    padding: 8px;
  }
  .nav-burger span { display: block; width: 26px; height: 3px; background: var(--navy); border-radius: 2px; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 0.6rem 1.2rem 1.2rem; gap: 0;
    border-bottom: 1px solid #e5e9ee;
    box-shadow: 0 12px 24px rgba(6, 59, 115, 0.12);
  }
  .site-nav a { padding: 0.7rem 0; border-top: 1px solid #eef1f4; }
  .site-nav .nav-cta { text-align: center; margin-top: 0.6rem; border-top: none; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .brand-logo { height: 46px; }
}
