/* =====================================================
   fix-interactive.css  (v4 - minimal, laisse Duda gerer)
   Role : corriger UNIQUEMENT les problemes de JS qui
   ne tourne pas cote clone. Ne pas ecraser le CSS Duda.
   ===================================================== */

/* =========================================================
   0. CAPTCHA MATHS
   ========================================================= */
.jcc-captcha {
  margin: 1rem 0;
}
.jcc-captcha__box {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #f7fafc;
  border: 2px solid #e0e6ed;
  border-radius: 6px;
  padding: .85rem 1rem;
  margin-top: .3rem;
}
.jcc-captcha__question {
  font-weight: 600;
  color: #1d1da1;
  font-size: 1.05rem;
  flex: 1;
  user-select: none;
}
.jcc-captcha__input {
  width: 80px !important;
  padding: .5rem !important;
  border: 1px solid #c0c8d2 !important;
  border-radius: 4px !important;
  font-size: 1rem !important;
  text-align: center;
  font-weight: 600;
  background: #fff;
}
.jcc-captcha__input:focus {
  outline: none;
  border-color: #009edc !important;
  box-shadow: 0 0 0 3px rgba(0, 158, 220, .15);
}
.jcc-captcha__reload {
  background: #009edc;
  color: #fff;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .3s;
  flex-shrink: 0;
}
.jcc-captcha__reload:hover {
  background: #007fb0;
  transform: rotate(180deg);
}
@media (max-width: 600px) {
  .jcc-captcha__box {
    flex-wrap: wrap;
    padding: .75rem;
  }
  .jcc-captcha__question {
    font-size: .95rem;
    width: 100%;
    margin-bottom: .5rem;
  }
  .jcc-captcha__input {
    flex: 1;
    width: auto !important;
  }
}

/* =========================================================
   1. MASQUAGES CRITIQUES (sans ces masquages, le site
      est bloque par des overlays Duda qui attendent du JS)
   ========================================================= */
#hamburger-drawer,
.hamburger-drawer,
.layout-drawer-overlay,
.color-overlay,
.pswp__share-modal,
.dm-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Bouton Duda "Afficher davantage" sur galerie (dupliqué) */
.photoGalleryViewAll,
[data-viewall],
.galleryViewAll,
.photo-gallery-view-all {
  display: none !important;
  visibility: hidden !important;
}

/* =========================================================
   2. MENU MOBILE CUSTOM
   Pas d'overlay qui bloque les clics : on ne force rien en
   pointer-events sauf quand le menu est ouvert.
   ========================================================= */
.jcc-mnav {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 90vw);
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, #1d1da1 0%, #0b0b4a 100%);
  color: #fff;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  z-index: 100000;
  padding: 0;
  overflow-y: auto;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  pointer-events: none; /* par defaut : ignore les clics */
}
.jcc-mnav--open {
  transform: translateX(0);
  pointer-events: auto;
}
.jcc-mnav__header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.jcc-mnav__close {
  background: rgba(255, 255, 255, .14);
  border: 0;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.jcc-mnav__close:hover { background: rgba(255, 255, 255, .25); }
.jcc-mnav__list {
  list-style: none;
  margin: 0;
  padding: .5rem 0;
  flex: 1;
}
.jcc-mnav__list li { margin: 0; }
.jcc-mnav__list a {
  display: flex;
  align-items: center;
  padding: 1.1rem 1.75rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all .2s;
  letter-spacing: .3px;
}
.jcc-mnav__list a:hover,
.jcc-mnav__list a:focus,
.jcc-mnav__list a.jcc-mnav__active {
  background: rgba(255, 255, 255, .1);
  border-left-color: #87CEEB;
  color: #87CEEB;
}
.jcc-mnav__footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem;
  opacity: .85;
  text-align: center;
}
.jcc-mnav__footer a { color: #fff; text-decoration: none; font-weight: 600; }
.jcc-mnav__contact-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: .5rem;
}
.jcc-mnav__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  transition: transform .2s, background .2s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.jcc-mnav__icon-btn--phone {
  background: #009edc;
}
.jcc-mnav__icon-btn--phone:hover {
  background: #00b8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 158, 220, .5);
}
.jcc-mnav__icon-btn--email {
  background: rgba(255, 255, 255, .18);
  border: 2px solid rgba(255, 255, 255, .35);
}
.jcc-mnav__icon-btn--email:hover {
  background: rgba(255, 255, 255, .28);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, .2);
}
.jcc-mnav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 99999;
}
.jcc-mnav-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   3. HAMBURGER TRIGGER : FIXED (garanti visible au scroll)
   position: fixed sur window, pas dependant du parent.
   ========================================================= */
@media (max-width: 768px) {
  #layout-drawer-hamburger,
  .layout-drawer-hamburger,
  #mobile-hamburger-drawer {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #fff !important;
    border: 0;
    width: 50px !important;
    height: 50px !important;
    cursor: pointer;
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 99998 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .2) !important;
    padding: 0 !important;
  }
  #layout-drawer-hamburger .hamburger__slice,
  .layout-drawer-hamburger .hamburger__slice {
    display: block !important;
    width: 24px;
    height: 3px;
    background: #1d1da1;
    margin: 3px 0;
    border-radius: 2px;
  }
}
@media (min-width: 769px) {
  #layout-drawer-hamburger,
  .layout-drawer-hamburger,
  #mobile-hamburger-drawer { display: none !important; }
}

/* =========================================================
   4. LIGHTBOX
   ========================================================= */
.jcc-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  padding: 1rem;
}
.jcc-lightbox--open { display: flex; }
.jcc-lightbox__img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  cursor: zoom-out;
}
.jcc-lightbox__close,
.jcc-lightbox__prev,
.jcc-lightbox__next {
  position: absolute;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.jcc-lightbox__close:hover,
.jcc-lightbox__prev:hover,
.jcc-lightbox__next:hover { background: rgba(255, 255, 255, .3); }
.jcc-lightbox__close { top: 1rem; right: 1rem; font-size: 2rem; }
.jcc-lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.jcc-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.jcc-lightbox__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, .5);
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: .9rem;
}

/* =========================================================
   5. GALERIE PROPRE (page galerie uniquement)
   ========================================================= */
.jcc-gallery-wrapper {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.jcc-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.jcc-gallery__item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #f0f0f0;
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.jcc-gallery__item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}
.jcc-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jcc-gallery__item--hidden { display: none !important; }
.jcc-gallery__actions {
  text-align: center;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.jcc-gallery__more,
.jcc-gallery__less {
  background: #009edc;
  color: #fff;
  border: 0;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  min-width: 200px;
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}
.jcc-gallery__more:hover,
.jcc-gallery__less:hover { background: #007fb0; }
.jcc-gallery__less {
  background: transparent;
  color: #009edc;
  border: 2px solid #009edc;
}
.jcc-gallery__less:hover { background: #009edc; color: #fff; }
@media (max-width: 900px) {
  .jcc-gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  .jcc-gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .jcc-gallery__actions { flex-direction: column; gap: .5rem; }
  .jcc-gallery__more,
  .jcc-gallery__less { width: 100%; min-width: 0; }
}

/* =========================================================
   6. MAP GOOGLE (override Duda height:200px)
   ========================================================= */
.jcc-map-wrapper,
.jcc-map-wrapper.inlineMap,
.inlineMap.jcc-map-wrapper {
  height: auto !important;
  min-height: 450px !important;
  max-height: none !important;
  width: 100% !important;
  position: relative !important;
  display: block !important;
  margin: 1.5rem 0 !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}
.jcc-map-wrapper iframe {
  display: block !important;
  width: 100% !important;
  height: 450px !important;
  border: 0 !important;
  position: static !important;
}
@media (max-width: 768px) {
  .jcc-map-wrapper,
  .jcc-map-wrapper.inlineMap,
  .inlineMap.jcc-map-wrapper { min-height: 320px !important; }
  .jcc-map-wrapper iframe { height: 320px !important; }
}

/* =========================================================
   7. CORRECTIONS MOBILE LEGERES
   On ne touche PAS aux tailles de police : elles sont
   gerees par le CSS Duda mobile (.dmMobileBody .m-font-size-X).
   ========================================================= */
html, body {
  -webkit-text-size-adjust: 100%;
}
body.dmMobileBody,
body.dmMobileBody * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Eviter le debordement horizontal mobile */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  img { max-width: 100%; height: auto; }

  /* TEXTE : mots entiers, passage a la ligne naturel, AUCUNE cesure tiret */
  p, span, li, td, th, div, a,
  .dmNewParagraph, .dmRespCol {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
  }

  /* TITRES H1 mobile : reduire + garder mots entiers */
  .dmBody h1,
  .dmNewParagraph h1,
  .dmNewParagraph h1 *,
  .dmNewParagraph h1 span,
  .dmBody .m-size-40,
  .dmBody .m-size-29,
  .dmBody .m-size-26,
  .dmBody .m-font-size-40,
  .dmBody .m-font-size-29,
  .dmBody .m-font-size-26 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    letter-spacing: -.2px !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    text-align: center !important;
    white-space: normal !important;
  }

  /* Tailles 24 / 32 (horaires, citations) : reduire a 17-18px pour tenir sur 1 ligne */
  .dmBody .m-size-24,
  .dmBody .m-font-size-24,
  .dmBody .size-32,
  .dmBody .font-size-32 {
    font-size: 17px !important;
    line-height: 1.35 !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    letter-spacing: 0 !important;
  }

  /* Horaires "Lundi 18h30 - 19h45" : empecher la coupure */
  .dmBody p:has(> span[style*="Gilroy-Bold"]),
  .dmNewParagraph p span[style*="Gilroy-Bold"] {
    white-space: nowrap;
  }
  /* Titres H2 / H3 */
  .dmBody h2,
  .dmNewParagraph h2,
  .dmBody h2 *,
  .dmNewParagraph h2 *,
  .dmBody .m-size-26,
  .dmBody .m-font-size-26 {
    font-size: 19px !important;
    line-height: 1.3 !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    text-align: center !important;
  }

  /* Paragraphes : centres + lisibles */
  .dmNewParagraph { text-align: center !important; }
  .dmNewParagraph .text-align-justify { text-align: left !important; }

  /* ALL titles and text : NEVER break word in middle */
  h1, h1 *, h2, h2 *, h3, h3 *,
  .dmNewParagraph, .dmNewParagraph *,
  span, p {
    word-break: keep-all !important;
    -webkit-hyphens: none !important;
    hyphens: none !important;
  }

  /* Eviter les URL ultra-longues qui cassent */
  a[href*="http"] {
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: none !important;
  }

  /* Paragraphes : padding lateral genereux pour lisibilite */
  .dmNewParagraph,
  .dmRespCol > .dmNewParagraph {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }
  .dmNewParagraph p {
    line-height: 1.65 !important;
    margin-bottom: .8em !important;
  }

  /* Rows : padding lateral pour ne pas coller les textes aux bords */
  .dmRespRow {
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box;
  }

  /* Max-width strict */
  .dmBody, .dmRespRow, .dmRespColsWrapper, .dmRespCol,
  #dm, #dm-outer-wrapper, #site_content {
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  /* inputs pleine largeur + font-size >=16 pour eviter zoom iOS */
  .jcc-inscription-form input,
  .jcc-inscription-form select,
  .jcc-inscription-form textarea {
    font-size: 16px !important;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Boutons tactiles min 44px */
  button, .btn, a.dmOnlyButton, input[type="submit"] {
    min-height: 44px;
  }

  /* Header : compact et aligne */
  .dmHeaderContainer img,
  #SITE_HEADER img,
  .dmLogoImage {
    max-height: 55px !important;
    max-width: 140px !important;
    width: auto !important;
    height: auto !important;
  }
}

/* Page galerie : ajuster padding autour */
@media (max-width: 768px) {
  .jcc-gallery-wrapper {
    padding: 0 .5rem;
    margin: 1rem auto;
  }
  .jcc-gallery { gap: 4px; }
}
