/* Mobile overrides */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Header : logo + burger */
  #header .wr {
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  #headerMenuButton, .burger {
    margin-right: 0 !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
  }
  #headerLogo img {
    max-width: 56px !important;
    height: auto !important;
  }

  /* Hero content centre */
  /* Ft est un flex row sur desktop (image | text). Mobile: empiler et tout centrer */
  .ft {
    flex-direction: column !important;
    width: 100% !important;
    min-height: 0 !important;
    text-align: center !important;
  }
  .ft__half,
  .ft--right .ft__half,
  .ft--left .ft__half {
    width: 100% !important;
    justify-content: center !important;
    padding: 30px 16px !important;
    align-items: center !important;
  }
  .ft__wrapper, .ft__content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
  }
  /* Paragraphes text-align:justify produisent des trous sur mobile - preferer left */
  .ft p, .section p, p[align="justify"] {
    text-align: center !important;
    hyphens: none !important;
  }
  /* Titres de section tout centres */
  .section__title, .section__subtitle,
  .ft__content h1, .ft__content h2, .ft__content h3,
  .ft__content p.section__subtitle {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .ft, .ft--center, .ft__half, .ft__wrapper, .ft__content {
    max-width: 100vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
  .ft__wrapper { max-width: 100% !important; }

  .hero__title {
    font-size: 18pt !important;
    line-height: 1.25 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: manual !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero__subtitle {
    font-size: 14px !important;
    line-height: 1.55 !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .ctas {
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  .btn, .btn--large {
    font-size: 14px !important;
    padding: 14px 18px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    max-width: calc(100vw - 48px) !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  /* Sections generiques */
  .section .wr, .section__content {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    max-width: 100vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .section__title {
    font-size: 22pt !important;
    line-height: 1.2 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
  }
  .section__subtitle {
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }

  img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Bouton chat FAB + boutons flottants contact - garder dans l'ecran */
  #co-w .co-fab {
    bottom: 16px !important;
    right: 16px !important;
  }
  #co-w .co-fab-btn {
    width: 56px !important;
    height: 56px !important;
  }
  #floatingContact {
    bottom: 14px !important;
    right: 14px !important;
  }
  .btt {
    right: 14px !important;
    bottom: 150px !important;
  }
}

@media (max-width: 400px) {
  .hero__title { font-size: 16pt !important; }
  .section__title { font-size: 19pt !important; }
  #headerLogo img { max-width: 48px !important; }
}

@media (max-width: 340px) {
  .hero__title { font-size: 14pt !important; }
}

/* Masquer le bouton cookies quand le chat plein ecran est ouvert */
html.co-chat-locked .cc-floating,
html.co-chat-locked .cc-card-wrap,
html.co-chat-locked .btt,
html.co-chat-locked #floatingContact {
  display: none !important;
}

/* ftPoint (image + texte alignes a gauche par defaut) — forcer centrage sur mobile */
@media (max-width: 640px) {
  .ft__description {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }
  .ftPoint {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }
  .ftPoint .icon, .ftPoint .iconWrapper {
    margin: 0 auto 10px !important;
  }
  .ftPoint__meta {
    max-width: 100% !important;
    width: 100% !important;
    text-align: center !important;
    align-items: center !important;
  }
  .ftPoint__title, .ftPoint__description, .ftPoint__description p {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
