/* Overrides minimaux — ne pas écraser le design DIVI */

body:not(.et-fb) .mtc_element {
  display: none;
}

body:not(.et-fb) .mtc_element.mtc-visible {
  display: block;
}

/* Menu mobile — overlay centré, scroll verrouillé via .lna-menu-open sur body */
@media only screen and (max-width: 980px) {
  #mobile_menu {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 80px 32px 32px;
    list-style: none;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    border: none;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #mobile_menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #mobile_menu li {
    width: 100%;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    border-bottom: 1px solid rgba(10, 6, 6, 0.08);
  }

  #mobile_menu li:last-child {
    border-bottom: none;
  }

  #mobile_menu.is-open li {
    opacity: 1;
    transform: translateY(0);
  }

  #mobile_menu.is-open li:nth-child(1) { transition-delay: 0.05s; }
  #mobile_menu.is-open li:nth-child(2) { transition-delay: 0.1s; }
  #mobile_menu.is-open li:nth-child(3) { transition-delay: 0.15s; }
  #mobile_menu.is-open li:nth-child(4) { transition-delay: 0.2s; }

  #mobile_menu li a {
    display: block;
    padding: 20px 16px;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    text-transform: uppercase;
    text-decoration: none;
    color: #0a0606;
    letter-spacing: 0.02em;
  }

  #mobile_menu li.current-menu-item a,
  #mobile_menu li.current_page_item a {
    color: #720000;
  }

  body.lna-menu-open #main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100001;
  }

  body.lna-menu-open .mobile_menu_bar {
    position: relative;
    z-index: 100002;
  }

  .mobile_menu_bar.is-open::before {
    content: "\4d" !important;
  }
}

html.lna-menu-open,
body.lna-menu-open {
  overflow: hidden !important;
  touch-action: none;
}

.et_pb_contact_form_container .et_pb_contact_field_3.et_pb_contact_field {
  margin-bottom: 8px !important;
}

.lna-contact-privacy {
  font-size: 13px;
  color: #666;
  clear: both;
  margin-top: 0 !important;
  margin-bottom: 40px !important;
}

.et_pb_contact_form .lna-contact-privacy + .et_contact_bottom_container {
  margin-top: 8px !important;
}

.lna-contact-privacy a {
  color: #b1938b;
  font-weight: 700;
  text-decoration: underline;
}

.lna-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Adresse cliquable — même typo que le texte, sans effet au survol */
.et_pb_blurb .et_pb_blurb_description a.lna-address-link,
.et_pb_text_inner a.lna-address-link,
a.lna-address-link {
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  text-transform: inherit !important;
  color: inherit !important;
  text-decoration: none !important;
  cursor: inherit !important;
  opacity: 1 !important;
}

.et_pb_blurb .et_pb_blurb_description a.lna-address-link:hover,
.et_pb_blurb .et_pb_blurb_description a.lna-address-link:focus,
.et_pb_blurb .et_pb_blurb_description a.lna-address-link:active,
.et_pb_blurb .et_pb_blurb_description a.lna-address-link:visited,
.et_pb_text_inner a.lna-address-link:hover,
.et_pb_text_inner a.lna-address-link:focus,
.et_pb_text_inner a.lna-address-link:active,
.et_pb_text_inner a.lna-address-link:visited,
a.lna-address-link:hover,
a.lna-address-link:focus,
a.lna-address-link:active,
a.lna-address-link:visited {
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  text-transform: inherit !important;
  color: inherit !important;
  text-decoration: none !important;
  cursor: inherit !important;
  opacity: 1 !important;
}

/* Logos responsive — taille réduite */
@media only screen and (max-width: 980px) {
  #main-header .logo_container {
    text-align: left !important;
    height: auto !important;
  }

  #main-header #logo {
    float: left !important;
    max-height: 40px !important;
    height: auto !important;
    width: auto !important;
  }

  /* Accueil — section Valeurs : logo centré entre les blocs */
  body.home .et_pb_image_2.et_pb_module,
  body.home .et_pb_image_3.et_pb_module {
    display: block !important;
    width: auto !important;
    max-width: 72px !important;
    text-align: center !important;
    margin: 0 auto 30px auto !important;
  }

  body.home .et_pb_image_2 .et_pb_image_wrap,
  body.home .et_pb_image_3 .et_pb_image_wrap {
    text-align: center !important;
    display: inline-block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.home .wp-image-1077 {
    max-height: 52px !important;
    width: auto !important;
    height: auto !important;
  }
}

@media only screen and (max-width: 767px) {
  #main-header #logo {
    max-height: 34px !important;
  }

  body.home .et_pb_image_2.et_pb_module,
  body.home .et_pb_image_3.et_pb_module {
    max-width: 60px !important;
  }

  body.home .wp-image-1077 {
    max-height: 44px !important;
  }
}

/* iPad / tablettes — formulaire contact pleine largeur jusqu'à 1180px (portrait + paysage) */
@media only screen and (max-width: 1180px) {
  #contact.et_pb_row > .et_pb_column {
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 24px !important;
  }

  #contact.et_pb_row > .et_pb_column:last-child {
    margin-bottom: 0 !important;
  }

  .et_pb_contact_form_container,
  .et_pb_contact_form .et_pb_contact_field,
  .et_pb_contact_form .input,
  .et_pb_contact_form textarea.input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* Footer — liens de navigation */
.et-l--footer .lna-footer-nav-link {
  color: inherit !important;
  text-decoration: none !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-transform: inherit !important;
}

.et-l--footer .lna-footer-nav-link:hover,
.et-l--footer .lna-footer-nav-link:focus,
.et-l--footer .lna-footer-nav-link:active,
.et-l--footer .lna-footer-nav-link:visited {
  color: inherit !important;
  text-decoration: none !important;
  opacity: 0.85;
}

/* Footer — navigation : écarts égaux, logo à droite */
.et_pb_row_0_tb_footer,
.et_pb_row_2_tb_footer {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 40px;
}

.et_pb_row_0_tb_footer > .et_pb_column,
.et_pb_row_2_tb_footer > .et_pb_column {
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.et_pb_row_0_tb_footer > .et_pb_column:last-child,
.et_pb_row_2_tb_footer > .et_pb_column:last-child {
  margin-left: auto !important;
  width: 18% !important;
  text-align: right !important;
}

.et_pb_image_0_tb_footer,
.et_pb_image_1_tb_footer {
  text-align: right !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

.et_pb_text_4_tb_footer,
.et_pb_text_9_tb_footer {
  line-height: 1.45em !important;
  width: 100% !important;
}

.et_pb_text_4_tb_footer .lna-footer-legal,
.et_pb_text_9_tb_footer .lna-footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
}

.et_pb_text_4_tb_footer .lna-footer-legal p,
.et_pb_text_9_tb_footer .lna-footer-legal p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.45em !important;
  text-align: left !important;
}

.et_pb_text_4_tb_footer .lna-footer-legal a,
.et_pb_text_9_tb_footer .lna-footer-legal a {
  display: inline-block;
  line-height: 1.45em !important;
}

.et_pb_text_4_tb_footer .lna-footer-legal-links,
.et_pb_text_9_tb_footer .lna-footer-legal-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 28px;
  margin-left: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* iPad (768–980px) — typo fluide, hero mobile, bio alignée */
@media only screen and (min-width: 768px) and (max-width: 980px) {
  /*
   * Hero accueil (section_1) : remplace le 10vw/5vw DIVI par une échelle fluide
   * qui démarre près du mobile (30 px) et monte progressivement.
   */
  body.home .et_pb_section_1 .et_pb_text_3 h1 {
    font-size: clamp(32px, 4vw + 4px, 56px) !important;
    line-height: 1.2em !important;
  }

  body.home .et_pb_section_1 .et_pb_text_4 h2 {
    font-size: clamp(22px, 2.2vw + 6px, 30px) !important;
    line-height: 1.3em !important;
    font-style: normal !important;
  }

  body.home .et_pb_section_1 .et_pb_text_4 h2 em {
    font-style: normal !important;
  }

  body.home .et_pb_section_1 .et_pb_text_5 p {
    font-size: 18px !important;
    line-height: 1.8em !important;
  }

  body.home .et_pb_section_3 {
    display: block !important;
  }

  /* Bio — typo cohérente avec le live */
  body.home .et_pb_section_3 .et_pb_text_8 h2 {
    font-size: 22px !important;
    line-height: 1.2em !important;
  }

  body.home .et_pb_section_3 .et_pb_text_8 h3 {
    font-size: 20px !important;
    line-height: 1.3em !important;
  }

  body.home .et_pb_section_3 .et_pb_text_9 p {
    font-size: 18px !important;
    line-height: 1.4em !important;
  }

  /*
   * Portraits — largeur limitée, alignés à gauche sur le texte
   * (même marge latérale DIVI -15px que et_pb_text_8).
   */
  .et_pb_image:has(.wp-image-713),
  .et_pb_image:has(.wp-image-928) {
    width: min(50vw, 400px) !important;
    max-width: min(50vw, 400px) !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    text-align: left !important;
  }

  .et_pb_image:has(.wp-image-713) .et_pb_image_wrap,
  .et_pb_image:has(.wp-image-928) .et_pb_image_wrap {
    display: block !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .wp-image-713,
  .wp-image-928 {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
  }

  #main-header .container.clearfix.et_menu_container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  body.home .et_pb_image_2.et_pb_module,
  body.home .et_pb_image_3.et_pb_module {
    max-width: 80px !important;
  }

  body.home .wp-image-1077 {
    max-height: 58px !important;
  }
}

/* --- Accessibilité --- */
.lna-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100000;
  padding: 10px 16px;
  background: #0a0606;
  color: #fff;
  font-family: Karla, sans-serif;
  font-size: 16px;
  text-decoration: none;
  border-radius: 4px;
}

.lna-skip-link:focus,
.lna-skip-link:focus-visible {
  top: 16px;
  outline: 3px solid #b1938b;
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.mobile_menu_bar:focus-visible,
.mtc_button_1:focus-visible,
.mtc_button_2:focus-visible,
.mtc_button_3:focus-visible,
.mtc_button_4:focus-visible,
.et_pb_toggle_title:focus-visible {
  outline: 3px solid #b1938b !important;
  outline-offset: 2px;
}

.et_pb_blurb .et-pb-icon {
  speak: never;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .et_pb_parallax_css {
    transform: none !important;
  }

  #mobile_menu {
    transition: none !important;
  }

  .et-waypoint {
    opacity: 1 !important;
  }
}
