/* =======================================================
   media-queries.css : Version responsive mobile & tablette
   Objectif : Réduction relative, responsive propre < 900px
   Ne modifie JAMAIS le design desktop > 900px
   ======================================================= */

@media screen and (max-width: 900px) {

  html, body {
    font-size: 92%;
    overflow-x: hidden;
  }

  .page-wrapper,
  .wrapper {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Titre principal en une seule ligne bien alignée */
  .main-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    display: flex;
    justify-content: center;
    flex-wrap: nowrap !important;
    gap: 0.3em;
    line-height: 1.2;
  }

  .main-title .beton-service,
  .main-title .express {
    white-space: nowrap;
  }

  .main-title span {
    line-height: 1.2;
  }

  .sous-titre-h1 {
    font-size: 0.95em;
    text-align: center;
    margin-bottom: 1.2em;
    display: block;
    line-height: 1.3em;
  }
  .sous-titre-h1 br {
    display: none;
  }
  .sous-titre-h1 span.text-orange::before {
    content: "\A";
    white-space: pre;
  }

  /* Bandeau header en colonne */
  .bandeau-header {
    flex-direction: column;
    align-items: center;
  }

  .bandeau-header .logo-col {
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 1em 0;
  }

  .bandeau-header .qui-col {
    width: 100%;
    padding: 0.5em 1em;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bandeau-header .qui-col h2 {
    text-align: center !important;
    font-size: 1.05em !important;
    line-height: 1.3;
  }

  .bandeau-header .qui-texte {
    font-size: 0.95em;
    line-height: 1.5;
    text-align: justify;
  }

  /* Avantages en 2 colonnes x 4 lignes */
  .avantages-cols {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em; /* augmenté pour plus d'air sur petits écrans */
  }

  .avantages-row {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .avantages-detaillees {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em 0;
  }

  .avantages-detaillees {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em 1em;
  }

  #avantages h2 {
    font-size: 1.05em !important;
    text-align: center;
    line-height: 1.3;
  }

  .avantages-detaillees li {
    width: calc(50% - 1em);
    max-width: 180px;
    margin: 0 auto;
    padding: 0.5em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .avantages-detaillees li {
    width: 45%;
    max-width: 160px;
    margin-bottom: 1.2em;
  }

  .icon-xl {
    width: 52px !important;
    height: 52px !important;
  }

  .avantages-detaillees .icon {
    width: 52px;
    height: 52px;
  }

  .avantages-detaillees div {
    font-size: 0.95em;
    line-height: 1.35;
    text-align: center;
  }

  /* Comment ça marche */
  #fonctionnement h2 {
    font-size: 1.05em !important;
    text-align: center;
    line-height: 1.3;
  }

  .etapes {
    flex-direction: column;
    gap: 0.6em;
  }

  .etapes img.icon-md {
    transform: rotate(90deg);
    margin: 0.3em auto;
  }

  .etape > div:not(.etape-num) {
    font-size: 0.95em;
  }

  /* CTA Chronobéton */
  .commande-texte {
    font-size: 0.9em;
  }

  .cta-beton-wrapper {
    padding: 1em;
  }

  .btn-orange {
    font-size: 0.9em;
    padding: 0.6em 1em;
  }

  /* Infos + Contact */
  #infos-contact {
    flex-direction: column;
  }

  #infos-contact .col {
    padding: 1em;
  }

  #infos-contact h2,
  #partenaires h2,
  .contact h2,
  section h2 {
    font-size: 1.05em !important;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 1em;
  }

  .infos-pratiques {
    font-size: 0.9em;
    line-height: 1.4;
  }

  .contact-form label {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-form label > span {
    font-size: 0.9em;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.9em;
    padding: 0.4em 0.6em;
    width: 100%;
    box-sizing: border-box;
  }

  .contact-form textarea {
    height: auto !important;
    min-height: 6em;
  }

  .contact-form button {
    font-size: 0.9em;
    height: 42px;
  }

  /* Partenaires */
  .partenaires-logos {
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
  }

  .partenaire-card {
    width: 45%;
    max-width: 150px;
    margin-bottom: 0.5em;
  }

  .partenaire-card img {
    height: 40px;
    object-fit: contain;
  }

  footer p {
    font-size: 0.75em;
  }

  .bandeau-titre .main-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
  }

  #infos-contact + .map-container {
    margin-top: 0;
  }
}

@media (max-width: 1100px) {
  .wrapper { max-width: 98vw; }
  .header-title-bandeau,
  .header-qui-bandeau {
    padding: 1.2em 1em;
  }
  .bandeau-header .qui-col {
    padding: 1.2em 1em;
  }
}

@media (max-width: 700px) {
  .bandeau { padding: 2em 0.5em; }
  .wrapper { padding: 0 0.5em; }
  .cta-beton-btn {
    font-size: 1.05em;
    padding: 0.8em 1.2em 0.8em 1.2em;
  }
}

@media (max-width: 600px) {
  .bandeau-header .logo-col img { max-height: 90px; }
  .photo-fullwidth img { height: 120px; }
  .modal-mentions__content {
    max-width: 98vw;
    padding: 1.2em 0.7em 1em 0.7em;
    font-size: 0.98em;
  }
  .modal-mentions__close {
    top: 0.5em;
    right: 0.5em;
    font-size: 1.5em;
  }

  .avantages-detaillees li {
    width: 100%;
    max-width: 280px;
  }
}
