/* ----------------------------- */
/* --- Variables & Reset --- */
/* ----------------------------- */
:root {
    --primary-color: #D72C21; /* Rouge un peu plus profond, proche de certains logos auto */
    --secondary-color: #1A2E4C; /* Bleu nuit profond */
    --accent-color: #F0A500; /* Un doré/jaune pour l'accent */
    --light-color: #F8F9FA; /* Blanc cassé très clair */
    --dark-color: #212529; /* Gris très foncé / presque noir */
    --gray-color: #6C757D; /* Gris moyen */
    --text-color: #343A40; /* Couleur de texte principale */
    --light-text: #F8F9FA; /* Texte sur fond sombre */
  
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
  
    --header-height: 80px;
    --border-radius: 6px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem); /* Ajout d'un peu d'espace */
    width: 100%; /* Empêcher dépassement html */
    overflow-x: hidden; /* Forcer l'absence de scroll horizontal global */
  }
  
  body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: white;
    width: 100%; /* Empêcher dépassement body */
    overflow-x: hidden; /* Double sécurité */
    overflow-wrap: break-word; /* Permettre césure mots longs */
    word-wrap: break-word; /* Compatibilité */
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    overflow-wrap: break-word; /* Empêcher dépassement titres */
  }
  
  h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
  h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.5rem; }
  h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-bottom: 1rem; }
  h4 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); margin-bottom: 0.8rem; }
  
  p {
    margin-bottom: 1rem;
    overflow-wrap: break-word; /* Empêcher dépassement paragraphes */
  }
  
  a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
    overflow-wrap: break-word; /* Pour les liens longs */
  }
  
  a:hover {
    color: darkred; /* Style V1 */
  }
  
  /* Assurer que les médias ne dépassent jamais */
  img, svg, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  ul {
    list-style: none;
  }
  
  /* Container plus strict pour mobile */
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Padding mobile réduit par défaut */
  }
  @media (min-width: 576px) {
    .container {
      padding: 0 1.5rem; /* Padding standard V1 pour écrans plus grands */
    }
  }
  
  .section-padding {
    padding: 4rem 0; /* Padding réduit par défaut */
    width: 100%;
    overflow: hidden; /* Empêcher contenu de déborder */
  }
  @media (min-width: 992px) {
    .section-padding {
      padding: 5rem 0; /* Padding standard V1 */
    }
  }
  
  
  .section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
  }
  .section-title.text-left { text-align: left; }
  
  /* Soulignement décoratif pour les titres de section */
  .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
  }
  .section-title.text-left::after {
    left: 0;
    transform: none;
  }
  
  .section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    color: var(--gray-color);
  }
  
  .bg-dark { background-color: var(--secondary-color); }
  .bg-light { background-color: var(--light-color); }
  .text-light { color: var(--light-text); }
  .text-light h1, .text-light h2, .text-light h3, .text-light h4 { color: white; }
  .text-light p { color: rgba(255, 255, 255, 0.8); }
  .text-light a { color: var(--accent-color); }
  .text-light a:hover { color: white; }
  .text-center { text-align: center; }
  
  /* ----------------------------- */
  /* --- Buttons (Style V1 + Visibilité) --- */
  /* ----------------------------- */
  .btn {
    display: inline-block;
    padding: 0.8rem 1.8rem; /* Padding mobile ajusté */
    font-family: var(--font-secondary);
    font-weight: 700; /* Plus gras pour visibilité */
    font-size: 0.95rem; /* Taille mobile ajustée */
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    border: 2px solid transparent;
    margin: 0.5rem;
    white-space: normal; /* Permettre retour ligne mobile */
    max-width: 100%; /* Empêcher dépassement bouton */
  }
  @media (min-width: 768px) {
    .btn {
        padding: 0.8rem 2rem; /* Padding V1 desktop */
        font-size: 1rem; /* Taille V1 desktop */
        font-weight: 600; /* Poids V1 desktop */
        white-space: nowrap; /* Pas de retour ligne desktop */
    }
  }
  
  
  .btn-primary {
    background-color: var(--primary-color);
    color: white !important; /* Forcer couleur */
    border-color: var(--primary-color);
  }
  .btn-primary:hover {
    background-color: darkred; /* Style V1 hover */
    border-color: rgb(255, 255, 255);
    color: white !important; /* Forcer couleur */
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  }
  
  .btn-secondary {
    background-color: white;
    color: var(--secondary-color) !important; /* Forcer couleur */
    border: 2px solid var(--secondary-color); /* Bordure plus visible */
  }
  .btn-secondary:hover {
    background-color: var(--secondary-color); /* Style V1 hover */
    color: white !important; /* Forcer couleur */
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  }
  .bg-dark .btn-secondary {
    color: var(--light-text) !important;
    border-color: var(--light-text); /* Bordure visible */
  }
  .bg-dark .btn-secondary:hover {
    background-color: var(--light-text);
    color: var(--secondary-color) !important;
    border-color: var(--light-text);
  }
  
  .btn-lg {
    padding: 0.9rem 2.2rem; /* Padding mobile ajusté */
    font-size: 1.05rem; /* Taille mobile ajustée */
  }
  @media (min-width: 768px) {
      .btn-lg {
        padding: 1rem 2.5rem; /* Padding V1 desktop */
        font-size: 1.1rem; /* Taille V1 desktop */
      }
  }
  
  
  /* ----------------------------- */
  /* --- Header --- */
  /* ----------------------------- */
  .site-header {
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--box-shadow);
    height: var(--header-height);
    display: flex;
    align-items: center;
  }
  
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  
  .logo img {
    height: 45px; /* Logo mobile */
    width: auto;
    transition: transform var(--transition-speed);
  }
  @media (min-width: 768px) {
      .logo img { height: 50px; } /* Logo desktop V1 */
  }
  
  .logo img:hover {
    transform: scale(1.05);
  }
  
  .main-nav .nav-links {
    display: flex;
    list-style: none;
  }
  
  .main-nav .nav-links li { margin-left: 2.5rem; }
  
  .main-nav .nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    text-decoration: none;
    font-size: 1rem; /* Taille V1 */
  }
  
  .main-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
  }
  
  .main-nav .nav-links a:hover,
  .main-nav .nav-links a.active { color: var(--primary-color); }
  .main-nav .nav-links a:hover::after,
  .main-nav .nav-links a.active::after { width: 100%; }
  
  .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.5rem;
  }
  
  /* ----------------------------- */
  /* --- Hero Section --- */
  /* ----------------------------- */
  .hero {
    position: relative;
    /* height: calc(100vh - var(--header-height)); */ /* Peut causer problèmes mobile */
    min-height: 70vh; /* Hauteur min réduite */
    margin-top: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('mismotors-hero-bg.jpg') no-repeat center center/cover;
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0;
    overflow: hidden; /* Empêcher contenu hero de déborder */
  }
  
  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 46, 76, 0.7); /* Style V1 */
    z-index: 1;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px; /* Style V1 */
    /* animation: fadeInDown 1s ease-out; Retiré temporairement si pose pb */
    width: 100%; /* Important */
  }
  
  /* Titre Hero sur 2 lignes (adapté de V2) */
  .hero-title {
    color: white;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); /* Style V1 */
    line-height: 1.2;
    font-size: clamp(2.5rem, 6vw, 4rem); /* Taille ajustée */
  }
  .hero-title-sub {
    display: block;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: rgba(255, 255, 255, 0.9);
  }
  .hero-title-main {
    display: block;
    font-size: clamp(2.8rem, 8vw, 5rem); /* Taille principale */
    letter-spacing: 0.5px;
  }
  
  
  .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem); /* Taille ajustée */
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px; /* Largeur max réduite */
    margin-left: auto;
    margin-right: auto;
    padding: 0 0.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5); /* Style V1 */
  }
  
  .hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  /* ----------------------------- */
  /* --- Sections Générales (Fix Responsive) --- */
  /* ----------------------------- */
  section {
      width: 100%;
      overflow-x: hidden;
  }
  
  .service-cards-container,
  .about-container,
  .contact-details-container,
  .footer-container {
      width: 100%;
      max-width: 100%;
  }
  
  /* ----------------------------- */
  /* --- Services Section --- */
  /* ----------------------------- */
  .service-cards-container {
    display: grid;
    /* Utiliser 1 colonne par défaut, puis adapter */
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Espacement mobile réduit */
  }
  /* Appliquer le auto-fit de V1 seulement sur écrans larges */
  @media (min-width: 768px) {
    .service-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem; /* Espacement V1 desktop */
    }
  }
  
  .service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem; /* Padding mobile ajusté */
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .service-card:hover {
    transform: translateY(-8px); /* Effet V1 mais un peu réduit */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Ombre V1 ajustée */
  }
  
  .card-icon {
    font-size: 2.8rem; /* Taille mobile */
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1;
  }
  @media (min-width: 768px) {
      .card-icon { font-size: 3rem; } /* Taille V1 desktop */
  }
  
  .card-title { color: var(--secondary-color); margin-bottom: 1rem; }
  .card-text { color: var(--gray-color); margin-bottom: 1.5rem; flex-grow: 1; }
  .card-link { font-weight: 600; color: var(--primary-color); display: inline-block; }
  .card-link i { margin-left: 0.3rem; transition: transform var(--transition-speed); }
  .card-link:hover i { transform: translateX(5px); }
  
  
  /* ----------------------------- */
  /* --- Estimation Section --- */
  /* ----------------------------- */
  .estimation-section .section-title::after { background-color: var(--accent-color); }
  .feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 3rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Conserver wrap de V1 */
    gap: 1.5rem;
  }
  .feature-list li { font-size: 1.1rem; color: rgba(255, 255, 255, 0.9); }
  .feature-list i { color: var(--accent-color); margin-right: 0.5rem; }
  
  /* ----------------------------- */
  /* --- About Section (Image retirée) --- */
  /* ----------------------------- */
  .about-container {
    /*display: grid;  Commenté car plus de grille 2 colonnes */
    /* grid-template-columns: 1fr 1fr; */ /* Commenté */
    /* gap: 3rem; */ /* Commenté */
    /* align-items: center; */ /* Commenté */
    /* Rendre le contenu centré et limité en largeur */
    max-width: 800px; /* Limiter largeur du texte */
    margin: 0 auto; /* Centrer le bloc de contenu */
    text-align: center; /* Centrer le texte */
  }
  
  /* Styles pour le contenu texte seul */
  .about-content .section-title.text-left {
      text-align: center; /* Forcer le centrage du titre */
  }
  .about-content .section-title.text-left::after {
      left: 50%; /* Centrer la ligne sous le titre */
      transform: translateX(-50%);
  }
  
  .about-content p { margin-bottom: 1.5rem; }
  .values-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: inline-block; /* Pour que text-align: center fonctionne */
    text-align: left; /* Aligner le texte dans la liste */
  }
  .values-list li { margin-bottom: 1rem; font-weight: 500; font-size: 1.1rem; }
  .values-list i { color: var(--primary-color); margin-right: 0.8rem; width: 20px; text-align: center; }
  
  /* Plus besoin de règles spécifiques pour .about-image ou la grille 2 colonnes */
  /* Les règles responsives pour @media (max-width: 992px) pour .about-container sont inutiles */
  
  
  /* ----------------------------- */
  /* --- Contact Section --- */
  /* ----------------------------- */
  .contact-details-container {
    display: grid;
    /* Utiliser 1 colonne par défaut */
    grid-template-columns: 1fr;
    gap: 2rem; /* Espacement mobile */
    margin-top: 3rem;
  }
  /* Appliquer auto-fit de V1 seulement sur écrans larges */
  @media (min-width: 992px) { /* Utiliser 992px pour 2 colonnes ici */
      .contact-details-container {
          grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Minimum plus grand */
          gap: 3rem; /* Espacement V1 desktop */
      }
  }
  
  .contact-info h3 { color: var(--secondary-color); margin-bottom: 1.5rem; }
  .contact-info address { font-style: normal; margin-bottom: 1rem; line-height: 1.8; }
  .contact-info address i { margin-right: 0.5rem; color: var(--primary-color); }
  .contact-info p { margin-bottom: 1rem; }
  .contact-info p i { margin-right: 0.5rem; color: var(--primary-color); width: 20px; text-align: center;}
  .social-links { margin-top: 1.5rem; }
  .social-links a { font-size: 1.8rem; color: var(--secondary-color); margin-right: 1rem; transition: color var(--transition-speed); }
  .social-links a:hover { color: var(--primary-color); }
  
  .contact-map iframe { border-radius: var(--border-radius); box-shadow: var(--box-shadow); width: 100%; } /* Assurer 100% width */
  
  
  /* ----------------------------- */
  /* --- Footer --- */
  /* ----------------------------- */
  .site-footer {
    padding: 3rem 0 0 0; /* Padding réduit */
  }
  
  .footer-container {
    display: grid;
    /* 1 colonne par défaut */
    grid-template-columns: 1fr;
    gap: 2rem; /* Espacement mobile */
    padding-bottom: 2.5rem; /* Padding réduit */
    text-align: center; /* Centrer mobile */
  }
  /* Appliquer auto-fit V1 seulement sur desktop */
  @media (min-width: 768px) {
      .footer-container {
          grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
          gap: 3rem; /* Espacement V1 desktop */
          text-align: left; /* Alignement V1 desktop */
      }
  }
  
  
  .footer-about img { height: 40px; width: auto; margin-bottom: 1rem; display: inline-block; }
  .footer-about p { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
  
  .footer-links h4, .footer-contact h4 {
      color: white; font-family: var(--font-secondary); font-weight: 600;
      font-size: 1.1rem; margin-bottom: 1.2rem; position: relative; padding-bottom: 0.5rem; display: inline-block;
  }
  @media (min-width: 768px) {
      .footer-links h4, .footer-contact h4 { font-size: 1.2rem; margin-bottom: 1.5rem; display: block; }
  }
  
  .footer-links h4::after, .footer-contact h4::after {
      content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
      width: 40px; height: 2px; background-color: var(--accent-color);
  }
  @media (min-width: 768px) {
      .footer-links h4::after, .footer-contact h4::after { left: 0; transform: none; }
  }
  
  
  .footer-links ul { padding: 0; }
  .footer-links li { margin-bottom: 0.8rem; }
  .footer-links a { color: rgba(255, 255, 255, 0.7); transition: color var(--transition-speed), padding-left var(--transition-speed); font-size: 0.95rem; }
  .footer-links a:hover { color: white; padding-left: 5px; }
  .footer-contact p { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; margin-bottom: 1rem; }
  .footer-contact p i { margin-right: 0.5rem; color: var(--accent-color); }
  .footer-contact a { color: rgba(255, 255, 255, 0.7); }
  .footer-contact a:hover { color: white; }
  
  .social-links-footer {
      margin-top: 1rem;
      display: flex;
      justify-content: center;
      gap: 1rem;
  }
  @media (min-width: 768px) {
      .social-links-footer { justify-content: flex-start; }
  }
  
  .social-links-footer a { font-size: 1.3rem; color: rgba(255, 255, 255, 0.7); margin-right: 1rem; }
  .social-links-footer a:hover { color: white; }
  
  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem; /* Ajouter padding horizontal */
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
  }
  
  
  /* ----------------------------- */
  /* --- Responsive Menu V1 Logic (adapté) --- */
  /* ----------------------------- */
  @media (max-width: 991px) { /* Point de bascule menu mobile */
    .menu-toggle {
      display: block;
    }
    .main-nav .nav-links {
      display: none; /* Caché par défaut */
      position: absolute;
      top: var(--header-height);
      left: 0; /* Ancré à gauche */
      width: 100%;
      background-color: white;
      flex-direction: column;
      align-items: center;
      padding: 1rem 0 1.5rem 0; /* Padding quand ouvert */
      box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
      border-top: 1px solid #eee;
      /* Utiliser transition sur transform ou visibilité pour V1 */
       opacity: 0;
       visibility: hidden;
       transform: translateY(-10px);
       transition: opacity var(--transition-speed), visibility var(--transition-speed), transform var(--transition-speed);
    }
  
    .main-nav .nav-links.active {
      display: flex; /* Afficher */
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
  
    .main-nav .nav-links li {
      margin: 0.8rem 0; /* Espacement mobile */
      width: 100%;
      text-align: center;
    }
     .main-nav .nav-links a {
       display: block;
       padding: 0.8rem 1rem;
       font-size: 1rem; /* Taille liens mobile */
    }
    .main-nav .nav-links a::after { display: none; } /* Pas de soulignement mobile */
    .main-nav .nav-links a:hover { background-color: var(--light-color); }
  }
  
  /* Styles responsives généraux V1 (adaptés pour overflow) */
  @media (max-width: 768px) {
      /* Réduire padding global container */
     .container { padding: 0 1rem; }
  
    .section-padding { padding: 3rem 0; } /* Padding section réduit */
    h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
    h2 { font-size: clamp(1.8rem, 6vw, 2.2rem); }
  
    .header-container { padding: 0 1rem; } /* Padding header mobile */
  
    /* Empiler boutons Hero V1 */
    .hero { min-height: 65vh; padding: 3rem 0;} /* Hauteur hero réduite */
    .hero-cta { flex-direction: column; align-items: center; gap: 0.8rem; }
    .hero-cta .btn {
        width: 85%; /* Largeur mobile */
        max-width: 300px; /* Max largeur mobile */
    }
  
    /* Forcer 1 colonne pour les grilles */
    .service-cards-container,
    .contact-details-container,
    .footer-container {
        grid-template-columns: 1fr !important; /* Forcer 1 colonne */
        gap: 1.5rem; /* Espacement mobile */
    }
  
    .contact-map { margin-top: 1.5rem; }
  
    /* Footer mobile V1 */
    .footer-container { text-align: center; }
    .footer-about, .footer-links, .footer-contact { margin-bottom: 1.5rem; }
    .footer-links h4::after, .footer-contact h4::after { left: 50%; transform: translateX(-50%); }
    .social-links-footer { justify-content: center; }
  }
  
  /* ----------------------------- */
  /* --- Animations V1 --- */
  /* ----------------------------- */
  @keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); } /* Translation V1 */
    to { opacity: 1; transform: translateY(0); }
  }
  
  /* Appliquer animations V1 (commenté si non désiré) */
  /*
  .services-section .service-card,
  .estimation-section .feature-list li,
  .about-section .about-content,
  .contact-section .contact-info {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
  }
  
  .service-card:nth-child(1) { animation-delay: 0.1s; }
  .service-card:nth-child(2) { animation-delay: 0.2s; }
  .service-card:nth-child(3) { animation-delay: 0.3s; }
  .feature-list li:nth-child(1) { animation-delay: 0.1s; }
  .feature-list li:nth-child(2) { animation-delay: 0.2s; }
  .feature-list li:nth-child(3) { animation-delay: 0.3s; }
  */
  
  /* --- Fin du CSS --- */