/*---------------------------------------
  Mr Michel Dépannage DIJON — styles additionnels (thème bleu)
  (barre d'appel mobile, formulaire de contact, blocs zone d'intervention)
  Chargé APRÈS templatemo-nomad-force.css.
-----------------------------------------*/

:root {
  --mmd-accent: #0b5cbd;
  --mmd-accent-dark: #084a99;
  --mmd-accent-contrast: #ffffff;
}

/*--- Titre principal du hero ---*/
.hero-title {
  /* Le theme met "Quicksand" sur h1, police jamais chargee : le rendu
     tombait en serif. On reste sur la police du site. */
  font-family: var(--body-font-family);
  color: #fff;
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.hero-tagline {
  display: inline-block;
  background: var(--mmd-accent);
  color: var(--mmd-accent-contrast);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
  margin-bottom: 1rem;
}

.heroText img {
  display: block;
  margin: 0 auto;
  max-width: min(420px, 70vw);
  height: auto;
}

/*--- Boutons d'appel ---*/
.mmd-call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 1.25rem;
}

.mmd-btn-call {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--mmd-accent);
  color: var(--mmd-accent-contrast);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 14px 26px;
  border-radius: 10px;
  border: 2px solid transparent;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.mmd-btn-call:hover,
.mmd-btn-call:focus {
  background: var(--mmd-accent-dark);
  color: var(--mmd-accent-contrast);
}

.mmd-btn-call-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

.mmd-btn-call-outline:hover,
.mmd-btn-call-outline:focus {
  background: #fff;
  color: var(--mmd-accent-contrast);
}

/*--- Barre d'appel fixe (mobile) ---*/
.mmd-callbar {
  display: none;
}

@media (max-width: 991.98px) {
  .mmd-callbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.28);
  }

  .mmd-callbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    line-height: 1.2;
  }

  .mmd-callbar .mmd-callbar-main {
    background: var(--mmd-accent);
    color: var(--mmd-accent-contrast);
  }

  .mmd-callbar .mmd-callbar-alt {
    background: #1a1a1a;
    color: #fff;
  }

  .mmd-callbar small {
    display: block;
    font-weight: 400;
    font-size: 0.7rem;
    opacity: 0.85;
  }

  /* Laisse la place à la barre fixe */
  body {
    padding-bottom: 62px;
  }
}

/*--- Zone d'intervention / communes ---*/
.mmd-zone-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.mmd-zone-list li {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.95rem;
  color: #555;
}

/*--- Étapes ---*/
.mmd-steps {
  list-style: none;
  counter-reset: mmd-step;
  padding: 0;
  margin: 2rem 0 0;
}

.mmd-steps li {
  counter-increment: mmd-step;
  position: relative;
  padding-left: 62px;
  margin-bottom: 1.6rem;
  font-size: 1.05rem;
  color: #555;
  text-align: left;
}

.mmd-steps li::before {
  content: counter(mmd-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mmd-accent);
  color: var(--mmd-accent-contrast);
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mmd-steps li strong {
  display: block;
  color: #111;
  font-size: 1.15rem;
  margin-bottom: 2px;
}

/*--- FAQ ---*/
.mmd-faq {
  text-align: left;
  max-width: 820px;
  margin: 2rem auto 0;
}

.mmd-faq details {
  border-bottom: 1px solid #e2e2e2;
  padding: 16px 4px;
}

.mmd-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  color: #111;
  list-style: none;
}

.mmd-faq summary::-webkit-details-marker {
  display: none;
}

.mmd-faq summary::after {
  content: "+";
  float: right;
  color: var(--mmd-accent-dark);
  font-size: 1.4rem;
  line-height: 1;
}

.mmd-faq details[open] summary::after {
  content: "–";
}

.mmd-faq p {
  font-size: 1rem;
  margin: 12px 0 0;
}

/*--- Formulaire de contact ---*/
.mmd-form {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.mmd-form .row {
  --bs-gutter-x: 1rem;
}

.mmd-form label {
  font-weight: 700;
  color: #444;
  margin-bottom: 4px;
  display: block;
  font-size: 0.95rem;
}

.mmd-form input,
.mmd-form select,
.mmd-form textarea {
  width: 100%;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  margin-bottom: 1rem;
}

.mmd-form input:focus,
.mmd-form select:focus,
.mmd-form textarea:focus {
  outline: 2px solid var(--mmd-accent);
  outline-offset: 1px;
  border-color: var(--mmd-accent);
}

.mmd-form textarea {
  min-height: 130px;
  resize: vertical;
}

.mmd-form .mmd-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mmd-form button[type="submit"] {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 15px 32px;
  width: 100%;
  cursor: pointer;
  transition: background 0.3s;
}

.mmd-form button[type="submit"]:hover:not(:disabled) {
  background: var(--mmd-accent);
  color: var(--mmd-accent-contrast);
}

.mmd-form button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.mmd-form-note {
  font-size: 0.85rem;
  color: #777;
  margin-top: 12px;
}

.mmd-alert {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.mmd-alert ul {
  margin: 0;
  padding-left: 20px;
}

.mmd-alert-success {
  background: #e7f6ec;
  border: 1px solid #9fd7b3;
  color: #14612f;
}

.mmd-alert-error {
  background: #fdecec;
  border: 1px solid #f0b4b4;
  color: #8c1c1c;
}

/*--- Coordonnées ---*/
.contact-box p {
  font-size: 1rem;
  margin-bottom: 6px;
}

.contact-box a {
  color: #222;
  font-weight: 700;
}

.contact-box a:hover {
  color: var(--mmd-accent-dark);
}

/*--- Lien vers l'autre agence ---*/
.mmd-crosslink {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 2.5rem 1rem;
}

.mmd-crosslink h2 {
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 0.75rem;
}

.mmd-crosslink p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto 1.25rem;
  font-size: 1.05rem;
}

.mmd-crosslink a.mmd-crosslink-btn {
  display: inline-block;
  border: 2px solid var(--mmd-accent);
  color: var(--mmd-accent);
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 8px;
  text-decoration: none;
}

.mmd-crosslink a.mmd-crosslink-btn:hover {
  background: var(--mmd-accent);
  color: var(--mmd-accent-contrast);
}

/* La règle .d-flex mobile du thème casse les grilles Bootstrap : on la neutralise
   là où on a besoin d'un vrai comportement flex. */
@media (max-width: 768px) {
  .mmd-call-actions,
  .mmd-callbar,
  .mmd-zone-list {
    flex-direction: row;
  }
}


/*---------------------------------------
  SURCHARGE DU THÈME : bleu à la place du jaune
  (le site principal de Pontarlier reste jaune)
-----------------------------------------*/
:root {
  --primary-color: #0b5cbd;
}

.navbar-brand,
.navbar-nav .nav-link::after,
a:hover,
.social-icon-link:hover {
  color: var(--mmd-accent);
}

.vehicle-list i {
  color: var(--mmd-accent);
}

/* Bandeau du carrousel : bleu au lieu de bg-warning */
.team-thumb-accent {
  background: var(--mmd-accent);
}

.news-image-hover-warning::after {
  background: var(--mmd-accent);
}

.contact-form button[type="submit"]:hover {
  background: var(--mmd-accent);
}

.hero-tagline {
  color: #fff;
}

.mmd-btn-call {
  color: #fff;
}

.mmd-btn-call:hover,
.mmd-btn-call:focus {
  color: #fff;
}

.mmd-btn-call-outline {
  color: #fff;
}

.mmd-btn-call-outline:hover,
.mmd-btn-call-outline:focus {
  background: #fff;
  color: #0b5cbd;
}

.mmd-callbar .mmd-callbar-main {
  color: #fff;
}

.mmd-steps li::before {
  color: #fff;
}

.mmd-form button[type="submit"]:hover:not(:disabled) {
  color: #fff;
}

.mmd-crosslink a.mmd-crosslink-btn {
  border-color: #4d94f0;
  color: #4d94f0;
}

.mmd-crosslink a.mmd-crosslink-btn:hover {
  background: #4d94f0;
  color: #06213f;
}

/* Fond du hero : voile bleuté pour différencier visuellement les deux sites */
.hero .overlay {
  background: linear-gradient(to top, #05203f, rgba(5, 32, 63, 0.15) 90%);
}

/*--- Hauteur du hero sur mobile (le thème ne la définit qu'à partir de 992px,
      or le contenu du hero est en position absolue) ---*/
@media (max-width: 991.98px) {
  .hero {
    min-height: 88vh;
  }

  .heroText {
    width: 92%;
    padding: 24px 0;
  }
}


/*---------------------------------------
  BARRE DE NAVIGATION
  Sept entrées : on garde tout sur une seule ligne jusqu'en bas de
  l'écran desktop, et on bascule sur le menu déroulant en dessous de
  1200px (classe navbar-expand-xl dans le HTML).
-----------------------------------------*/
.navbar-brand {
  font-size: clamp(1.05rem, 0.55rem + 0.72vw, 1.5rem);
  white-space: nowrap;
}

.navbar-nav .nav-link {
  white-space: nowrap;
  font-size: clamp(0.82rem, 0.44rem + 0.6vw, 1.05rem);
}

.navbar-expand-xl .navbar-nav .nav-link {
  padding-left: clamp(6px, 0.62vw, 15px);
  padding-right: clamp(6px, 0.62vw, 15px);
}

/* Le theme affichait une petite fleche en icone apres chaque libelle : elle
   reservait ~25px de largeur sur chaque entree et venait se superposer au
   texte sur l'entree active. On la remplace par un simple soulignement. */
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 2px;
  width: 0;
  height: 3px;
  margin-left: 0;
  border-radius: 2px;
  background: var(--mmd-accent);
  opacity: 1;
  font-size: 0;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-item.active .nav-link::after {
  width: calc(100% - 20px);
  opacity: 1;
  transform: translateX(-50%);
}

/* Menu deroulant : libelles pleine taille, pas de fleche */
@media (max-width: 1199.98px) {
  .navbar-collapse .navbar-nav {
    padding: 10px 0 6px;
  }

  .navbar-nav .nav-link {
    font-size: 1.05rem;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }
}

/*---------------------------------------
  ANIMATIONS AOS - FILET DE SECURITE
  aos.js calcule les positions au chargement et rate des elements quand
  les images arrivent apres coup : des blocs entiers restaient invisibles.
  Sans JS (ou avant son execution), tout reste visible.
-----------------------------------------*/
html:not(.js-aos) [data-aos],
[data-aos].mmd-vu {
  opacity: 1 !important;
  transform: none !important;
}


/*--- Lisibilite du hero sur les photos reelles (voile bleute) ---*/
.hero .overlay {
  background: linear-gradient(to top, rgba(5, 32, 63, 0.9), rgba(5, 32, 63, 0.32) 55%, rgba(5, 32, 63, 0.48));
}

.heroText img {
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.6));
}


/*---------------------------------------
  PAGES LEGALES (mentions legales, confidentialite)
  Pages statiques autonomes : navbar + bandeau + cartes.
  Aucun data-aos ici, donc aucun risque de bloc invisible.
-----------------------------------------*/
.mmd-legal .navbar {
  position: relative;
}

.mmd-legal-head {
  background: #1a1a1a;
  color: #fff;
  padding: 46px 0 40px;
}

.mmd-legal-retour {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mmd-accent);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 22px;
}

.mmd-legal-retour:hover {
  color: #fff;
}

.mmd-legal-kicker,
.mmd-legal-num {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mmd-accent);
  margin-bottom: 6px;
}

.mmd-legal-head h1 {
  color: #fff;
  font-family: var(--body-font-family);
  font-size: clamp(1.8rem, 1.1rem + 2.2vw, 2.9rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
}

.mmd-legal-chapo {
  color: rgba(255, 255, 255, 0.82);
  max-width: 62ch;
  margin-bottom: 26px;
}

.mmd-legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mmd-legal-toc a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mmd-legal-toc a:hover {
  background: var(--mmd-accent);
  border-color: var(--mmd-accent);
  color: var(--mmd-accent-contrast);
}

/* Le thème réserve beaucoup d'air autour des sections : trop ici,
   le bandeau et les cartes doivent rester rapprochés. */
.mmd-legal .section-padding {
  padding-top: 46px;
  padding-bottom: 70px;
}

.mmd-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
}

.mmd-legal-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-left: 4px solid var(--mmd-accent);
  border-radius: 12px;
  padding: 26px 26px 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  scroll-margin-top: 24px;
}

.mmd-legal-card h2 {
  font-family: var(--body-font-family);
  font-size: 1.28rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.mmd-legal-card p {
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.mmd-legal-card a {
  color: var(--mmd-accent-dark);
  font-weight: 600;
  text-decoration: underline;
}

.mmd-legal-card a:hover {
  color: #1a1a1a;
}

.mmd-legal-adresse {
  background: #f7f7f7;
  border-radius: 8px;
  padding: 12px 14px;
}

/* Liens legaux du pied de page (sur toutes les pages, index compris) */
.site-footer .copyright-text a[href^="mentions-legales"],
.site-footer .copyright-text a[href^="politique-confidentialite"] {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

.site-footer .copyright-text a[href^="mentions-legales"]:hover,
.site-footer .copyright-text a[href^="politique-confidentialite"]:hover {
  color: var(--mmd-accent);
}

@media (max-width: 575.98px) {
  .mmd-legal-card {
    padding: 22px 18px 10px;
  }

  .mmd-legal-toc a {
    font-size: 0.82rem;
    padding: 6px 12px;
  }
}
