body.medespoir-refonte {
  --med-ink: #142b3c;
  --med-muted: #3e5567;
  --med-brand: #17634f;
  --med-dark: #102d36;
  --med-surface: #edf6f1;
  --med-border: #ccdcd5;
  --med-focus: #146ac1;
  --med-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--med-ink);
}

.medespoir-refonte :focus-visible {
  outline: 3px solid var(--med-focus);
  outline-offset: 3px;
}

.med-skip {
  position: fixed;
  inset: 10px auto auto 10px;
  z-index: 100001;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: white;
  color: #142b3c;
  transform: translateY(-160%);
}

.med-skip:focus { transform: none; }

.med-navigation-ready #Top_bar,
.med-navigation-ready #Header > .header_placeholder,
.med-navigation-ready #Side_slide,
.med-navigation-ready #body_overlay {
  display: none !important;
}

.medespoir-refonte #Header {
  min-height: 0;
}

.med-header {
  position: relative;
  z-index: 30;
  background: white;
  border-bottom: 1px solid var(--med-border);
  color: var(--med-ink);
  font: 600 15px/1.35 var(--med-font);
}

.med-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 34px);
  width: min(100% - 64px, 1320px);
  min-height: 80px;
  margin-inline: auto;
}

.med-brand { display: inline-flex; align-items: center; min-height: 44px; }
.med-brand img { width: clamp(150px, 16vw, 230px); height: auto; }

.med-header .med-cta,
#Subheader .med-cta,
#Subheader .med-secondary {
  display: inline-flex;
  min-height: 48px;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: .7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--med-brand);
  color: white;
  font: 700 15px/1.3 var(--med-font);
  text-decoration: none;
}

.med-header .med-cta:hover,
#Subheader .med-cta:hover { background: #114c3d; color: white; }
#Subheader .med-secondary { background: white; color: var(--med-ink); border-color: var(--med-border); }
#Subheader .med-secondary:hover { background: #e0eee6; color: var(--med-ink); }

.med-navigation { justify-self: center; }
.med-header .med-nav-list { list-style: none; margin: 0; padding: 0; }
.med-navigation > .med-nav-list { display: flex; align-items: center; gap: clamp(4px, .8vw, 12px); }
.med-nav-item { position: relative; min-width: 0; }
.med-nav-row { display: flex; align-items: center; }
.med-submenu[hidden] { display: none !important; }

.med-header .med-nav-link,
.med-header .med-submenu-toggle,
.med-header .med-menu-button {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .55rem;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  box-sizing: border-box;
  box-shadow: none;
  background: transparent;
  color: var(--med-ink);
  text-align: left;
  font: inherit;
  text-decoration: none;
}

.med-header button::after { display: none; }
.med-header .med-nav-link:hover,
.med-header .med-nav-link[aria-current],
.med-header .med-submenu-toggle:hover,
.med-header .med-submenu-toggle[aria-expanded="true"] {
  background: var(--med-surface);
  color: var(--med-brand);
}

.med-header .med-submenu-toggle { cursor: pointer; }
.med-header .med-nav-link + .med-submenu-toggle { justify-content: center; min-width: 44px; }
.med-header .med-menu-button { display: none; }
.med-chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); flex: none; }
[aria-expanded="true"] > .med-chevron { transform: rotate(225deg); }

.med-header ul.med-submenu { padding: .45rem; }
.med-navigation > ul > li > .med-submenu {
  position: absolute;
  inset: 100% auto auto 0;
  width: min(19rem, 90vw);
  max-height: min(64vh, 34rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--med-border);
  border-radius: 12px;
  background: white;
  box-shadow: 0 14px 30px #142b3c26;
}

.med-submenu .med-submenu { margin: 0 0 .25rem .65rem; border-left: 2px solid var(--med-border); }
.med-submenu .med-nav-link, .med-submenu .med-submenu-toggle:first-child { flex: 1; }
.med-submenu .med-submenu-toggle .med-chevron { margin-left: auto; }

.medespoir-refonte #Subheader {
  padding: clamp(46px, 7vw, 104px) 0 !important;
  background: linear-gradient(125deg, #eef7f1, #f9fbfa 72%);
  border-bottom: 1px solid var(--med-border);
}

.medespoir-refonte #Subheader .title {
  max-width: 23ch;
  margin-inline: auto;
  color: var(--med-ink);
  font: 750 clamp(30px, 4.3vw, 59px)/1.07 var(--med-font);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.medespoir-refonte #Subheader .breadcrumbs li,
.medespoir-refonte #Subheader .breadcrumbs li a {
  color: var(--med-muted);
}

.medespoir-refonte.home #Subheader {
  background: linear-gradient(90deg, #edf6f1 2%, #eff7f2 47%, #eff7f200 74%), url("/wp-content/uploads/2025/05/liposuccion-en-Tunisie-768x480.webp") right 26% center / auto 135% no-repeat, #edf6f1;
}

.medespoir-refonte.home #Subheader .column { display: flex; flex-direction: column; align-items: flex-start; }
.medespoir-refonte.home #Subheader .title { text-align: left; margin-inline: 0; max-width: 15ch; }
.med-hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }

.medespoir-refonte #Content {
  padding-top: clamp(26px, 4vw, 54px);
  color: var(--med-ink);
  font: 400 clamp(16px, 1.25vw, 18px)/1.72 var(--med-font);
  scroll-margin-top: 16px;
}

.medespoir-refonte #Content .the_content_wrapper {
  max-width: 880px;
  margin-inline: auto;
  overflow-wrap: anywhere;
}

.medespoir-refonte #Content .entry-content :is(h2, h3, h4) {
  color: var(--med-ink);
  font-family: var(--med-font);
  line-height: 1.2;
  font-weight: 725;
  letter-spacing: -.025em;
}

.medespoir-refonte #Content .the_content_wrapper h2 { margin-block: 1.45em .55em; font-size: clamp(24px, 3.2vw, 37px); }
.medespoir-refonte #Content .the_content_wrapper h3 { margin-block: 1.1em .45em; font-size: clamp(20px, 2.3vw, 27px); }
.medespoir-refonte #Content .the_content_wrapper p { margin-block: 0 1em; }
.medespoir-refonte #Content .the_content_wrapper a:not(.button) { color: var(--med-brand); text-decoration: underline; text-underline-offset: .2em; }
.medespoir-refonte #Content .the_content_wrapper :is(img, video) { max-width: 100%; height: auto; }
.medespoir-refonte #Content .the_content_wrapper figure { max-width: 100%; }
.medespoir-refonte #Content :is(.wp-block-table, .table-responsive) { max-width: 100%; overflow-x: auto; }
.medespoir-refonte #Content table { overflow-wrap: anywhere; }
.medespoir-refonte #Content :is(th, td) { padding: clamp(6px, 1.3vw, 14px); }
.medespoir-refonte #Content th { background: var(--med-surface); color: var(--med-ink); }
.medespoir-refonte #Content iframe { max-width: 100%; }
.medespoir-refonte #Content iframe[src*="youtube.com/embed/"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.medespoir-refonte #Content iframe[src^="https://app.metocrm.com/web-forms/"] { display: block; width: 100%; border: 1px solid var(--med-border); box-sizing: border-box; background: #f8fcfa; }
.medespoir-refonte #Content .title-iframe { background: none; -webkit-text-fill-color: currentColor; }

.medespoir-refonte #Footer { background: var(--med-dark); color: #dbe8e6; overflow-wrap: anywhere; }
.medespoir-refonte #Footer .widgets_wrapper { padding: clamp(30px, 5vw, 70px) 0 !important; }
.medespoir-refonte #Footer :is(h4, a) { color: #ffffff; }
.medespoir-refonte #Footer a { text-underline-offset: .18em; }
.medespoir-refonte #Footer a:focus-visible { outline-color: #a5d9e5; }
.medespoir-refonte #Footer .footer_copy { border-color: #48656b; }
.medespoir-refonte a.med-whatsapp {
  position: fixed;
  z-index: 25;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 14px #142b3c33;
}
.medespoir-refonte a.med-whatsapp .whatsapp-icon {
  position: static !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
}
.medespoir-refonte a.med-whatsapp .whatsapp-icon img { width: 44px; height: 44px; object-fit: contain; }
.medespoir-refonte .whatsapp-icon,
.medespoir-refonte .whatsapp-icon img { animation: none !important; }
.medespoir-refonte #Footer .footer_copy .column { box-sizing: border-box; padding-right: 56px; }

@media (max-width: 1099px) {
  .med-header-inner { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 66px; gap: 10px; width: min(100% - 36px, 980px); }
  .med-header .med-menu-button { display: flex; justify-content: center; min-width: 54px; border: 1px solid var(--med-border); cursor: pointer; }
  .med-header .med-cta { grid-column: 3; grid-row: 1; }
  .med-header .med-menu-button { grid-column: 2; grid-row: 1; }
  .med-header .med-navigation { display: none; grid-column: 1 / -1; width: 100%; padding: 6px 0 12px; }
  .med-menu-open .med-navigation { display: block; max-height: 65vh; overflow: auto; overscroll-behavior: contain; }
  .med-navigation > .med-nav-list { display: block; }
  .med-navigation > ul > li > .med-submenu { position: static; width: auto; max-height: none; box-shadow: none; }
  .med-navigation .med-nav-link, .med-navigation .med-submenu-toggle:first-child { flex: 1; }
  .med-navigation .med-submenu-toggle:first-child .med-chevron { margin-left: auto; }
}

@media (max-width: 767px) {
  .medespoir-refonte.home #Subheader { background: linear-gradient(125deg, #edf6f1, #f8fbf9); }
  .medespoir-refonte.home #Subheader .title { max-width: 20ch; }
  .med-header .med-cta { min-height: 44px; font-size: 13px; padding-inline: .62rem; }
  .med-brand img { width: min(100%, 188px); }
}

@media (max-width: 420px) {
  .med-header .med-cta { max-width: 92px; text-align: center; padding-block: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .medespoir-refonte :is(.med-header *, .med-skip, .med-hero-actions *) {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Couleurs échantillonnées dans le logo Medespoir. */
body.medespoir-refonte {
  --med-brand: #165ea8;
  --med-ink: #123659;
  --med-muted: #375473;
  --med-dark: #103c68;
  --med-surface: #eaf3fc;
  --med-border: #c8daeb;
  --med-focus: #165ea8;
}
.med-header { border-bottom: 4px solid #165ea8; }
.med-header .med-cta:hover, #Subheader .med-cta:hover { background: #103f70; }
.medespoir-refonte #Subheader {
  position: relative;
  isolation: isolate;
  background: #165ea8;
  border-bottom: 6px solid #34b246;
}
.medespoir-refonte #Subheader .title,
.medespoir-refonte #Subheader .breadcrumbs li,
.medespoir-refonte #Subheader .breadcrumbs li a { color: white; }
.medespoir-refonte.home #Subheader { background: #165ea8; padding-block: clamp(34px,5vw,76px) !important; }
.medespoir-refonte.home #Subheader::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 54%;
  background: url("/wp-content/uploads/2025/05/liposuccion-en-Tunisie-768x480.webp") center 43% / cover no-repeat;
  clip-path: polygon(12% 0,100% 0,100% 100%,0 100%);
}
.medespoir-refonte.home #Subheader .title { max-width: min(17ch,51%); width: auto; }
#Subheader .med-cta { background: #00c000; color: #082908; }
#Subheader .med-cta:hover { background: #66df66; color: #082908; }
#Subheader .med-secondary { background: white; color: #165ea8; }
#Subheader :focus-visible { outline-color: white; }
.medespoir-refonte #Content .the_content_wrapper h2 {
  border-left: 5px solid #34b246;
  padding-left: .48em;
  color: #165ea8;
}
.medespoir-refonte #Content th { background: #165ea8; color: white; }
.medespoir-refonte #Footer { border-top: 5px solid #34b246; }
.med-section-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  max-width: 880px; margin: 0 auto 1.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--med-border);
}
#Content .med-section-links a {
  display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box;
  padding: .45rem .9rem; border: 1px solid #bdd3e9; border-radius: 6px;
  color: #165ea8; background: #eff6fc; text-decoration: none; font-weight: 650;
}
#Content .med-section-links a:hover { background: #165ea8; color: white; }
@media (max-width: 767px) {
  .medespoir-refonte.home #Subheader { padding-bottom: 0 !important; }
  .medespoir-refonte.home #Subheader .title { max-width: 100%; }
  .medespoir-refonte.home #Subheader::before { display: none; }
  .medespoir-refonte.home #Subheader::after {
    content: ""; display: block; position: static; width: 100%; height: clamp(110px,32vw,180px);
    margin: 22px 0 0; background: url("/wp-content/uploads/2025/05/liposuccion-en-Tunisie-768x480.webp") center 45% / cover;
  }
}

/* Lecture large et alternance des sections éditoriales. */
.medespoir-refonte #Content .section_wrapper:has(.med-wide-article) {
  box-sizing: border-box;
  width: min(96%, 1480px);
  max-width: 1480px;
  padding-inline: 0 !important;
}
.medespoir-refonte #Content .the_content_wrapper {
  box-sizing: border-box;
  width: 100%;
  max-width: 1360px;
}
.med-section-links { max-width: none; }
.med-reading-band {
  box-sizing: border-box;
  margin-block: clamp(18px, 2.5vw, 38px);
  padding: clamp(18px, 3.2vw, 50px);
  border: 1px solid var(--med-band-line);
  border-radius: 18px;
  background: var(--med-band-bg);
}
.med-tone-0 { --med-band-bg: #e9f3fd; --med-band-line: #c5dbef; }
.med-tone-1 { --med-band-bg: #edf8ed; --med-band-line: #c9e6cf; }
.med-tone-2 { --med-band-bg: white; --med-band-line: #d1dfec; }
.medespoir-refonte #Content .med-reading-band > :first-child { margin-top: 0; }
.medespoir-refonte #Content .med-reading-band > :last-child { margin-bottom: 0; }
.medespoir-refonte #Content .med-reading-band > h2 { scroll-margin-top: 2rem; }
@media (prefers-reduced-motion: no-preference) {
  .med-band-arrived > :first-child { animation: med-reading-arrival .65s ease-out both; }
  .med-section-links a { transition: transform .18s ease, background-color .18s ease; }
  .med-section-links a:hover { transform: translateY(-2px); }
  @keyframes med-reading-arrival {
    from { transform: translateY(12px); opacity: .75; }
    to { transform: translateY(0); opacity: 1; }
  }
}
@media (max-width: 767px) {
  .medespoir-refonte #Content .section_wrapper:has(.med-wide-article) { width: calc(100% - 24px); }
  .med-reading-band { border-radius: 12px; padding: 16px; }
}
