/* ============================================================
   base.css — Viequilibre

   La palette est relevée sur les boîtes elles-mêmes : le bleu-vert
   des étuis (#008592 en dominante, nuancé #06929D / #039FAB) et le
   navy du logo. Le site porte donc les couleurs que le client a
   déjà en main en pharmacie, au lieu d'une teinte choisie à part.

   Le turquoise clair reste en réserve pour la planche anatomique —
   c'est le seul endroit du site où quelque chose doit briller.
   Direction A par défaut, direction B (beauté) via data-theme="b".
   ============================================================ */

:root, [data-theme="a"] {
  --paper:    #F6F4EF;   /* fond de page, assez dense pour que le blanc ressorte */
  --paper-2:  #EDEBE4;   /* surfaces creuses */
  --teal:     #07909C;   /* la couleur des boîtes : boutons, blocs, accents */
  --teal-2:   #0AA3AF;   /* éclaircie, pour les dégradés */
  --teal-deep:#065C66;   /* blocs pleins, titres sur papier */
  --teal-ink: #04434B;   /* fond le plus sombre */
  --teal-soft:#D9EEF0;   /* pastilles, étiquettes */
  --navy:     #252D77;   /* le navy du logo et des étuis */
  --glow:     #3FE0D4;   /* réservé : organes actifs, points de vie */
  --ink:      #152025;

  --plum:   #6E5A9E;
  --rose:   #C25C84;
  --amber:  #D29A2E;

  --bg:          var(--paper);
  --bg-2:        #FFFFFF;
  --surface:     var(--paper-2);
  --line:        #E2DFD6;
  --line-strong: #C9C4B7;
  --text:        var(--ink);
  --text-soft:   #566268;
  --text-dim:    #8B9499;
  --accent:      var(--teal);
  --accent-vivid:var(--teal-deep);
  --accent-soft: var(--teal-soft);
  --accent-ink:  #FFFFFF;
  --warn:        var(--amber);

  --axe-1: var(--teal);
  --axe-2: var(--plum);
  --axe-3: var(--rose);

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --w-display:    700;
  --track:        -.025em;
  --radius:       18px;
  --radius-lg:    26px;   /* les grands blocs posés sur le papier */
  --radius-sm:    12px;
  --pill:         100px;
  --shadow:       0 1px 2px rgba(6,92,102,.05), 0 8px 22px rgba(6,92,102,.06);
  --shadow-lift:  0 2px 6px rgba(6,92,102,.08), 0 18px 40px rgba(6,92,102,.13);

  --body-tint: #2A4650;

  /* Anciens noms de l'ancienne palette, encore cités dans les autres
     feuilles. On les redirige vers le nouveau monde plutôt que de les
     supprimer : une variable manquante ne casse pas, elle rend la
     règle invalide en silence, et le défaut qui apparaît est pire
     qu'une couleur approximative. */
  --soft:   var(--paper-2);
  --pink:   var(--rose);
  --orange: var(--amber);
  --yellow: var(--amber);
  --green:  var(--teal);
  --blue:   var(--navy);
  --purple: var(--plum);
}

/* Beauté : même architecture, température déplacée vers le rose.
   Le vert reste présent dans la structure pour que la maison se
   reconnaisse d'une page à l'autre. */
[data-theme="b"] {
  --bg:          #F8F3F1;
  --surface:     #F0E7E4;
  --line:        #E5D9D5;
  --line-strong: #D0BFB9;
  --accent:      #B05272;
  --accent-soft: #F6E3E9;
  --warn:        var(--plum);
  --body-tint:   #4E3A42;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }

body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background .6s ease, color .6s ease;
}
a { color: inherit }
img, svg { display: block; max-width: 100% }
::selection { background: var(--teal-soft); color: var(--teal-deep) }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 6px }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto }
@media (max-width: 620px) { .wrap { width: calc(100% - 32px) } }

/* ---------- typographie ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--w-display);
             letter-spacing: var(--track); line-height: 1.12; color: var(--teal-deep) }
h1 { font-size: clamp(32px, 4.3vw, 54px); line-height: 1.08 }
h2 { font-size: clamp(24px, 2.9vw, 36px) }
h3 { font-size: clamp(16.5px, 1.7vw, 20px); line-height: 1.26; letter-spacing: -.015em }
p  { max-width: 68ch }
.lede { font-size: clamp(15px, 1.45vw, 17px); color: var(--text-soft); line-height: 1.7 }
.dim  { color: var(--text-dim) }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .04em }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 60;
       background: color-mix(in srgb, var(--bg) 86%, transparent);
       backdrop-filter: saturate(170%) blur(16px);
       border-bottom: 1px solid var(--line) }
.nav-in { display: flex; align-items: center; gap: 28px; height: 98px }

.logo { display: flex; align-items: center; text-decoration: none; flex: none }
.logo img { width: auto; height: 62px; transition: transform .3s cubic-bezier(.2,.8,.2,1) }
.logo:hover img { transform: scale(1.03) }
@media (max-width: 520px) { .logo img { height: 48px } }

.menu { display: flex; gap: 2px; margin-left: auto; align-items: center }
.menu a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text-soft);
          padding: 9px 15px; border-radius: var(--pill);
          transition: color .25s, background .25s }
.menu a:hover { color: var(--teal-deep); background: var(--teal-soft) }
.menu a[aria-current="page"] { color: var(--teal-deep); background: var(--teal-soft) }

.lang { display: flex; gap: 3px; margin-left: 12px; padding-left: 16px;
        border-left: 1px solid var(--line) }
.lang a { font-size: 11.5px; font-weight: 700; color: var(--text-dim);
          padding: 6px 10px; text-decoration: none; border-radius: var(--pill) }
.lang a:hover { color: var(--teal-deep); background: var(--teal-soft) }
.lang a[aria-current="true"] { color: #fff; background: var(--teal-deep) }

.burger { display: none; margin-left: auto; background: none; border: 0;
          color: var(--ink); cursor: pointer; padding: 8px }
.burger svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2 }

@media (max-width: 960px) {
  .burger { display: block }
  .menu { position: fixed; inset: 98px 0 auto 0; flex-direction: column; gap: 0;
          background: var(--bg-2); border-bottom: 1px solid var(--line);
          padding: 10px 24px 26px; margin: 0; box-shadow: var(--shadow);
          transform: translateY(-8px); opacity: 0; pointer-events: none;
          transition: opacity .26s, transform .26s }
  .menu[data-open="true"] { opacity: 1; transform: none; pointer-events: auto }
  .menu a { padding: 14px 4px; font-size: 15.5px; border-bottom: 1px solid var(--line);
            border-radius: 0 }
  .lang { border: 0; padding: 14px 0 0; margin: 0 }
}

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px;
       font-size: 14.5px; font-weight: 700; text-decoration: none;
       padding: 14px 26px; border-radius: var(--pill); border: 2px solid transparent;
       transition: transform .3s cubic-bezier(.2,.8,.2,1), background .3s,
                   border-color .3s, box-shadow .3s }
.btn-primary { background: var(--teal-deep); color: #fff }
.btn-primary:hover { background: var(--teal-2); transform: translateY(-2px);
                     box-shadow: var(--shadow-lift) }
.btn-ghost { border-color: var(--line-strong); color: var(--teal-deep); background: transparent }
.btn-ghost:hover { border-color: var(--teal-deep); background: var(--teal-deep); color: #fff;
                   transform: translateY(-2px) }
.btn-accent { background: var(--teal); color: #fff }
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift) }

/* sur un bloc sombre, le bouton s'inverse */
.on-dark .btn-primary { background: #fff; color: var(--teal-deep) }
.on-dark .btn-primary:hover { background: var(--teal-soft) }
.on-dark .btn-ghost { border-color: rgba(255,255,255,.4); color: #fff }
.on-dark .btn-ghost:hover { background: #fff; color: var(--teal-deep); border-color: #fff }

/* ---------- badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px;
         font-weight: 600; padding: 8px 17px; border-radius: var(--pill);
         background: var(--teal-soft); color: var(--teal-deep) }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow);
           animation: blink 2.2s ease-in-out infinite }
.on-dark .badge { background: rgba(255,255,255,.12); color: #fff }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 7.5vw, 104px) 0 }
.section-head { max-width: 58ch; margin-bottom: clamp(30px, 4vw, 52px) }
.section-head h2 + p { margin-top: 14px }

/* Les titres de section sont centrés, comme sur la référence : le
   regard descend au centre de la page au lieu de rebondir à gauche. */
.section-head--mid { max-width: 56ch; margin-inline: auto; text-align: center }
.section-head--mid p { margin-inline: auto }

.kicker { font-size: 12.5px; font-weight: 600; color: var(--teal);
          margin-bottom: 12px }
h2 em { font-style: normal; color: var(--teal); font-weight: 700 }

/* ---------- bloc posé sur le papier ----------
   La signature de la mise en page : des pavés arrondis qui flottent
   sur le fond, plutôt que des bandes pleine largeur. */
.block { border-radius: var(--radius-lg); padding: clamp(32px, 4.6vw, 64px) }
.block--forest {
  background: linear-gradient(152deg, var(--teal-deep) 0%, var(--teal-2) 100%);
  color: #fff;
}
.block--sage { background: var(--teal); color: #fff }
.block--paper { background: var(--bg-2); border: 1px solid var(--line) }
.block--forest h1, .block--forest h2, .block--forest h3,
.block--sage h1, .block--sage h2, .block--sage h3 { color: #fff }
.block--forest .lede, .block--sage .lede { color: rgba(255,255,255,.82) }
.block--forest .kicker { color: var(--glow) }
.block--sage .kicker { color: rgba(255,255,255,.85) }

/* bandeau d'annonce, centré */
.band { text-align: center }
.band h2 { margin-bottom: 12px }
.band .lede { max-width: 62ch; margin-inline: auto }

/* ---------- WhatsApp flottant ---------- */
.wa { position: fixed; right: 22px; bottom: 22px; z-index: 70;
      display: flex; align-items: center; gap: 0; height: 58px; padding: 0 16px;
      border-radius: var(--pill); background: #25D366; color: #fff; text-decoration: none;
      box-shadow: 0 4px 14px rgba(37,211,102,.34), 0 14px 34px rgba(26,26,26,.14);
      transition: gap .34s cubic-bezier(.2,.8,.2,1), padding .34s cubic-bezier(.2,.8,.2,1),
                  transform .3s, box-shadow .3s }
.wa svg { width: 27px; height: 27px; fill: currentColor; flex: none }
.wa b { font-size: 14px; font-weight: 700; white-space: nowrap;
        max-width: 0; overflow: hidden; opacity: 0;
        transition: max-width .34s cubic-bezier(.2,.8,.2,1), opacity .26s }
.wa:hover, .wa:focus-visible { gap: 10px; padding-right: 22px; transform: translateY(-3px) }
.wa:hover b, .wa:focus-visible b { max-width: 200px; opacity: 1 }
.wa-ping { position: absolute; inset: 0; border-radius: var(--pill);
           border: 2.5px solid #25D366; animation: waPing 3s ease-out infinite;
           pointer-events: none }
@keyframes waPing { 0% { transform: scale(1); opacity: .5 }
                    70% { transform: scale(1.22); opacity: 0 } 100% { opacity: 0 } }
@media (max-width: 620px) { .wa { right: 16px; bottom: 16px; height: 54px } }

/* ---------- pied de page ---------- */
.foot { padding: 56px 0 34px; background: var(--bg-2); border-top: 1px solid var(--line) }

/* --- hiérarchie de marque : Viequilibre au-dessus, M DISTRA à côté --- */
.foot-brands {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: center; padding-bottom: 40px; margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.fb { display: flex; align-items: center; gap: 22px }
.fb img { width: auto; flex: none }
.fb-main img { height: 88px }
.fb-dist { padding-inline-start: clamp(24px, 4vw, 56px); border-inline-start: 1px solid var(--line) }
.fb-dist img { height: 58px; opacity: .78 }
.fb p { font-size: 13px; color: var(--text-soft); line-height: 1.55; margin: 0; max-width: 30ch }
.fb b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 11.5px;
        letter-spacing: .04em; color: var(--accent); margin-bottom: 5px }
.fb-dist b { color: var(--text-dim) }
@media (max-width: 780px) {
  .foot-brands { grid-template-columns: 1fr; gap: 26px }
  .fb-dist { padding-inline-start: 0; border-inline-start: 0;
             padding-top: 26px; border-top: 1px solid var(--line) }
  .fb-main img { height: 70px }
  .fb-dist img { height: 48px }
}
[data-theme="b"] .foot { background: var(--surface) }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px }
.foot h4 { font-size: 11.5px; font-weight: 800; color: var(--text-dim); margin-bottom: 14px;
           letter-spacing: .04em }
.foot ul { list-style: none; display: grid; gap: 9px }
.foot li a, .foot address { font-size: 14px; color: var(--text-soft);
                            text-decoration: none; font-style: normal; line-height: 1.65 }
.foot li a:hover { color: var(--accent) }
.foot-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
             display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between }
.foot-base p { font-size: 11.5px; color: var(--text-dim); max-width: none }
.foot-base a { color: var(--text-soft) }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important }
  html { scroll-behavior: auto }
}


/* ---------- réseaux sociaux ---------- */
.social { margin-top: 26px }
.social h4 { margin-bottom: 11px }
.social ul { display: flex; gap: 9px; list-style: none }
.social a {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text-soft);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), background .3s,
              color .3s, border-color .3s, box-shadow .3s;
}
.social svg { width: 18px; height: 18px; fill: currentColor }
.social a:hover { transform: translateY(-3px); color: #fff; border-color: transparent;
                  box-shadow: var(--shadow-lift) }
.social li:nth-child(1) a:hover { background: linear-gradient(45deg, #F09433, #DC2743 55%, #BC1888) }
.social li:nth-child(2) a:hover { background: #1877F2 }
.social li:nth-child(3) a:hover { background: var(--ink) }

/* ---------- signature de l'agence ---------- */
.credit { font-size: 11.5px; color: var(--text-dim); margin: 0; width: 100% }
.credit a { color: var(--text-soft); text-decoration: none;
            border-bottom: 1px solid var(--line-strong);
            transition: color .25s, border-color .25s }
.credit a:hover { color: var(--accent); border-color: var(--accent) }
.foot-base { align-items: baseline }

/* ============================================================
   Bandeau d'annonce et menu à déroulants
   ============================================================ */
.annonce {
  background: var(--teal); color: #fff; font-size: 12.5px; font-weight: 600;
  display: flex; justify-content: center; gap: clamp(18px, 4vw, 54px);
  padding: 9px 16px; text-align: center;
}
.annonce span + span { position: relative }
.annonce span + span::before {
  content: ""; position: absolute; inset-inline-start: calc(clamp(18px, 4vw, 54px) / -2);
  top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: rgba(255,255,255,.6);
}
@media (max-width: 760px) { .annonce span:nth-child(n+2) { display: none } }

.nav { background: #fff; border-bottom: 1px solid var(--line) }
.nav-in { height: 84px }
.logo img { height: 54px }
.menu { gap: 4px }
.mm { position: relative }
.mm-btn {
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text);
  background: none; border: 0; cursor: pointer; padding: 12px 16px; border-radius: var(--pill);
  display: inline-flex; align-items: center; gap: 7px; transition: background .2s, color .2s;
}
.mm-btn::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px;
  border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
  transition: transform .25s;
}
.mm:hover .mm-btn, .mm:focus-within .mm-btn, .mm[data-current] .mm-btn { color: var(--teal-deep); background: var(--teal-soft) }
.mm:hover .mm-btn::after, .mm.is-open .mm-btn::after { transform: rotate(225deg); margin-top: 3px }
.mm-panel {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 70;
  min-width: 250px; padding: 12px; display: grid; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1), visibility .2s;
}
/* pont invisible : le curseur ne « tombe » pas entre le bouton et le panneau */
.mm-panel::before { content: ""; position: absolute; inset: -10px 0 auto 0; height: 10px }
.mm:hover .mm-panel, .mm:focus-within .mm-panel, .mm.is-open .mm-panel { opacity: 1; visibility: visible; transform: none }
.mm-2 { grid-template-columns: 1fr 1fr; gap: 6px 22px; min-width: 520px }
.mm-2 > div { display: grid; gap: 2px; align-content: start }
.mm-panel b { font-size: 11.5px; font-weight: 700; color: var(--text-dim); padding: 6px 12px 8px }
.mm-panel a {
  font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; background: none;
}
.mm-panel a:hover { background: var(--teal-soft); color: var(--teal-deep) }
.mm-panel a.mm-all { color: var(--teal); font-weight: 600 }

@media (max-width: 960px) {
  .menu { inset: 84px 0 auto 0 }
  .mm { width: 100% }
  .mm-btn { width: 100%; justify-content: space-between; padding: 15px 4px; border-radius: 0;
            border-bottom: 1px solid var(--line); font-size: 15.5px }
  .mm-panel, .mm-2 { position: static; min-width: 0; grid-template-columns: 1fr; box-shadow: none;
                     border: 0; padding: 4px 0 10px; display: none; opacity: 1; visibility: visible; transform: none }
  .mm.is-open .mm-panel { display: grid }
  .mm:hover .mm-btn { background: none }
}
.section--tight { padding-top: 0 }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 520px)  { .grid-4 { grid-template-columns: 1fr } }

/* menu mobile : il défile dans la hauteur de l'écran au lieu de la dépasser */
@media (max-width: 960px) {
  .menu { max-height: calc(100dvh - 98px); overflow-y: auto; overscroll-behavior: contain }
}

/* ---------- WhatsApp : choix du numéro ---------- */
.wa-pick { position: fixed; right: 22px; bottom: 92px; z-index: 71; display: grid; gap: 8px;
           min-width: 220px; padding: 16px; border-radius: var(--radius);
           background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow-lift) }
.wa-pick[hidden] { display: none }
.wa-pick b { font-size: 13px; color: var(--text-soft); font-weight: 600 }
.wa-pick a { display: block; text-align: center; text-decoration: none; font-weight: 700; font-size: 15px;
             color: #fff; background: #25D366; border-radius: var(--pill); padding: 11px 16px }
.wa-pick a:hover { background: #1EBE5A }
[dir="rtl"] .wa-pick { right: auto; left: 22px }

/* choix du numéro sous « Commander via WhatsApp » */
.wa-pick.is-inline { position: static; margin-top: 10px; min-width: 0; max-width: 320px }
[dir="rtl"] .wa-pick.is-inline { left: auto }
