/* ============================================
   MENUISERIE.LOCAL — Design System
   Bleu #0369A1 + Blanc — Responsive BEM
   Préfixe ml-
   ============================================ */

:root {
  --primary: #0369A1;
  --primary-dark: #075985;
  --primary-light: #0EA5E9;
  --secondary: #0EA5E9;
  --accent: #16A34A;
  --accent-dark: #15803D;
  --bg: #F0F9FF;
  --bg-alt: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --container: 1200px;
  --transition: 0.25s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* Container */
.ml-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   Header
   ============================================ */
.ml-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.ml-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.ml-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ml-logo__icon {
  font-size: 1.6rem;
}

.ml-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.ml-nav__link {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

.ml-nav__link:hover,
.ml-nav__link--active {
  color: var(--primary);
}

.ml-nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.ml-nav__cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition);
}

.ml-nav__cta:hover {
  background: var(--accent-dark);
}

.ml-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary);
}

/* ============================================
   Hero
   ============================================ */
.ml-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 2.5rem 0 3rem;
}

.ml-hero__split {
  display: flex;
  gap: 2.5rem;
  align-items: stretch;
}

.ml-hero__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
}

.ml-hero__right {
  flex: 0 0 440px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ml-hero__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.ml-hero__subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 1.75rem;
}

.ml-hero__search {
  display: flex;
  gap: 0.5rem;
}

.ml-hero__search-input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
}

.ml-hero__search-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.ml-hero__search-btn:hover {
  background: var(--accent-dark);
}

.ml-hero__widget {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ml-hero__widget iframe,
.ml-hero__widget div[id^="vf"] {
  width: 100% !important;
  min-height: 320px;
  display: block;
}

/* --- ViteUnDevis Widget : fix texte blanc sur fond blanc ---
   Le hero (.ml-hero) a color:#fff qui cascade dans le widget.
   Le CSS du widget (viteundevis.com/mb/v2/css.css) ne définit pas
   de color pour .devistap_choix / labels → ils héritent du blanc.
   On utilise #vud_mb_js_box pour égaler la spécificité du widget
   et !important pour overrider l'héritage. */
.ml-hero__widget {
  color: #333 !important;
}

body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_choix,
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_choix .devistap_choix_texte,
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_checkbox_container label,
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_formulaire_box label,
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_texte {
  color: #333 !important;
}

/* Les éléments sur fond coloré gardent le texte blanc */
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_progression_point,
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .vud_devis_bouton_bleu {
  color: #fff !important;
}

/* Labels de checkbox : couleur sombre */
body .ml-hero__widget #vud_mb_js_box .vud_reinitialise .devistap_checkbox_container input + label {
  color: #333 !important;
}

/* ============================================
   Iframe ViteUnDevis
   ============================================ */
.ml-section--iframe {
    background: var(--bg-alt);
    padding: 1rem 0;
}
.ml-iframe-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ml-iframe-wrapper iframe {
    width: 100%;
    min-height: 530px;
    border: none;
    border-radius: var(--radius-md, 8px);
}

/* ============================================
   Sections
   ============================================ */
.ml-section {
  padding: 3rem 0;
}

.ml-section--alt {
  background: var(--bg-alt);
}

.ml-section__title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 0.5rem;
}

.ml-section__subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ============================================
   Cards Grid
   ============================================ */
.ml-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ml-grid--cities {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.ml-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
}

.ml-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.ml-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.ml-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.ml-card__desc {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ml-card__badge {
  display: inline-block;
  background: var(--bg);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

/* ============================================
   City List
   ============================================ */
.ml-city-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ml-city-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.ml-city-card__name {
  font-weight: 600;
  color: var(--text);
}

.ml-city-card__count {
  background: var(--bg);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ============================================
   CTA
   ============================================ */
.ml-cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 0;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.ml-cta__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ml-cta__text {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.ml-cta__btn {
  display: inline-block;
  background: #fff;
  color: var(--accent-dark);
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform var(--transition);
}

.ml-cta__btn:hover {
  transform: scale(1.03);
}

.ml-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.ml-btn:hover {
  background: var(--primary-dark);
  color: #fff;
}

.ml-btn--accent {
  background: var(--accent);
}

.ml-btn--accent:hover {
  background: var(--accent-dark);
}

/* ============================================
   Page Header (sub-pages)
   ============================================ */
.ml-page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}

.ml-page-header__title {
  font-size: 2rem;
  font-weight: 800;
}

.ml-page-header__subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 0.3rem;
}

/* ============================================
   Breadcrumb
   ============================================ */
.ml-breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.ml-breadcrumb a {
  color: var(--text-light);
}

.ml-breadcrumb a:hover {
  color: var(--primary);
}

.ml-breadcrumb__sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* ============================================
   Business Listing
   ============================================ */
.ml-business {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.ml-business__avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.ml-business__info {
  flex: 1;
}

.ml-business__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.ml-business__meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.ml-business__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.ml-business__tag {
  background: var(--bg);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.ml-business__rating {
  color: #F59E0B;
  font-size: 0.9rem;
}

/* ============================================
   Forms
   ============================================ */
.ml-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ml-form__group {
  margin-bottom: 1.25rem;
}

.ml-form__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.95rem;
}

.ml-form__input,
.ml-form__select,
.ml-form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  background: var(--bg);
}

.ml-form__input:focus,
.ml-form__select:focus,
.ml-form__textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

.ml-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.ml-form__row {
  display: flex;
  gap: 1rem;
}

.ml-form__row .ml-form__group {
  flex: 1;
}

.ml-form__submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.ml-form__submit:hover {
  background: var(--accent-dark);
}

/* ============================================
   Content SEO
   ============================================ */
.ml-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.ml-content h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin: 2rem 0 0.75rem;
}

.ml-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.ml-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.ml-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.ml-content ul li {
  margin-bottom: 0.3rem;
}

/* ============================================
   Map
   ============================================ */
.ml-map {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.ml-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================
   Footer
   ============================================ */
.ml-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  margin-top: auto;
  padding: 2.5rem 0 1rem;
}

.ml-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.ml-footer__col-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ml-footer__col ul {
  list-style: none;
}

.ml-footer__col ul li {
  margin-bottom: 0.4rem;
}

.ml-footer__col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.ml-footer__col a:hover {
  color: #fff;
}

.ml-footer__about {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
}

.ml-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ============================================
   Utility
   ============================================ */
.ml-text-center { text-align: center; }
.ml-mt-1 { margin-top: 1rem; }
.ml-mt-2 { margin-top: 2rem; }
.ml-mb-1 { margin-bottom: 1rem; }
.ml-mb-2 { margin-bottom: 2rem; }
.ml-list-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0;
  list-style: none;
}

.ml-pill {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition);
}

.ml-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ml-alert {
  background: #DBEAFE;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .ml-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ml-burger {
    display: block;
  }

  .ml-nav {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    transform: translateY(-200%);
    transition: transform var(--transition);
    z-index: 99;
  }

  .ml-nav--open {
    transform: translateY(0);
  }

  .ml-nav__link {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .ml-nav__cta {
    text-align: center;
    margin-top: 0.5rem;
  }

  .ml-hero__title {
    font-size: 1.7rem;
  }

  .ml-hero__subtitle {
    font-size: 1rem;
  }

  .ml-hero__search {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ml-hero__split {
    flex-direction: column;
    gap: 1.5rem;
  }

  .ml-hero__right {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .ml-hero__widget {
    box-shadow: var(--shadow);
  }

  .ml-section {
    padding: 2rem 0;
  }

  .ml-section__title {
    font-size: 1.4rem;
  }

  .ml-business {
    flex-direction: column;
    gap: 1rem;
  }

  .ml-form__row {
    flex-direction: column;
    gap: 0;
  }

  .ml-page-header__title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .ml-footer__grid {
    grid-template-columns: 1fr;
  }

  .ml-grid {
    grid-template-columns: 1fr;
  }

  .ml-grid--cities {
    grid-template-columns: repeat(2, 1fr);
  }

  .ml-hero__title {
    font-size: 1.4rem;
  }

  .ml-cta__title {
    font-size: 1.4rem;
  }

  .ml-form {
    padding: 1.25rem;
  }
}