/**
 * menu-overlay.css — Grand menu overlay « façon SRF » (Jeunes Médecins)
 *
 * Greffé par-dessus le header Kadence (option B). Isolé : préfixe .jm-ov-*.
 * Markup : child-theme/menu-overlay.php   ·   JS : assets/js/menu-overlay.js
 * Palette : tokens.css (--jm-*).
 */

/* ── Déclencheur : burger « menu » fixe, haut-gauche ───────────────────── */
.jm-ov-burger {
  position: fixed;
  top: 48px;
  left: 28px;
  z-index: 1000;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 74px;
  height: 74px;
  padding: 0;
  background: var(--jm-surface, #fff);
  border: 1px solid var(--jm-line, #dfe5ef);
  border-radius: 50%;
  box-shadow: var(--jm-shadow-sm, 0 2px 10px rgba(8,89,142,.07));
  cursor: pointer;
  color: var(--jm-night, #10294f);
}
.jm-ov-burger:hover,
.jm-ov-burger:focus-visible { border-color: var(--jm-blue, #08598E); }

/* Burger injecté DANS la barre Kadence (zone gauche) : position normale,
   il s'aligne via le flex du header. Posée par le JS (.jm-ov-burger--inline). */
.jm-ov-burger--inline {
  position: static;
  top: auto;
  left: auto;
  margin-right: 14px;
  flex: 0 0 auto;
}

.jm-ov-burger-lines { display: flex; flex-direction: column; gap: 4px; }
.jm-ov-burger-lines span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.jm-ov-burger-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: lowercase;
  line-height: 1;
}

/* ── Overlay plein écran ───────────────────────────────────────────────── */
.jm-ov {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: var(--jm-surface, #fff);
  overflow-y: auto;
  padding-top: 18px;
  padding-bottom: 32px;
  padding-left: clamp(18px, 5vw, 64px);
  padding-right: clamp(18px, 5vw, 64px);
}
.jm-ov[hidden] { display: none; }
body.jm-ov-open { overflow: hidden; }

/* Barre haute de l'overlay : logo à gauche, fermeture à droite */
.jm-ov-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.jm-ov-logo img { height: 60px; width: auto; display: block; }
.jm-ov-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
  color: var(--jm-night, #10294f);
  background: var(--jm-bg-page, #f3f4f8);
  border: none;
  border-radius: var(--jm-radius-pill, 999px);
  cursor: pointer;
}
.jm-ov-close:hover { background: var(--jm-line, #dfe5ef); }

/* Grille de colonnes */
.jm-ov-nav { flex: 1; }
.jm-ov-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 30px 32px;
  align-items: start;
  max-width: 1320px;
}
.jm-ov-col { min-width: 0; }
.jm-ov-col--wide { grid-column: span 2; }

/* Titres de colonne + sous-listes */
.jm-ov-h {
  display: block;
  margin-bottom: 14px;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--jm-night, #10294f);
  text-decoration: none;
}
a.jm-ov-h:hover { color: var(--jm-blue, #08598E); }

.jm-ov-sub { list-style: none; margin: 0; padding: 0; }
.jm-ov-sub li { margin: 0 0 10px; }
.jm-ov-sub a {
  color: var(--jm-muted, #5c6678);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.35;
}
.jm-ov-sub a:hover { color: var(--jm-blue, #08598E); text-decoration: underline; }

/* ── Colonne TEASER « Votre Espace » (verrouillée) ─────────────────────── */
.jm-ov-col--locked {
  padding-top: 16px;
  padding-bottom: 18px;
  padding-left: 18px;
  padding-right: 18px;
  background: var(--jm-bg-page, #f3f4f8);
  border: 1px dashed var(--jm-line, #dfe5ef);
  border-radius: var(--jm-radius-md, 12px);
}
.jm-ov-h--locked { color: var(--jm-muted, #5c6678); }

/* Cadenas dessiné en CSS pur (hérite de currentColor) */
.jm-ov-lock {
  display: inline-block;
  position: relative;
  width: 13px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  color: var(--jm-muted, #5c6678);
}
.jm-ov-lock::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 13px; height: 9px;
  border-radius: 2px;
  background: currentColor;
}
.jm-ov-lock::after {
  content: "";
  position: absolute;
  top: 0; left: 3px;
  width: 7px; height: 7px;
  border: 2px solid currentColor;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
}

/* Sous-entrées du teaser : inertes (non cliquables) */
.jm-ov-sub--locked li { margin: 0 0 9px; }
.jm-ov-sub--locked span {
  color: var(--jm-muted, #5c6678);
  font-size: 15px;
  line-height: 1.35;
  opacity: .75;
  cursor: default;
}

/* CTA de déverrouillage (seul élément cliquable du teaser) */
.jm-ov-unlock {
  display: inline-block;
  margin-top: 14px;
  padding-top: 9px;
  padding-bottom: 9px;
  padding-left: 18px;
  padding-right: 18px;
  background: var(--jm-blue, #08598E);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--jm-radius-pill, 999px);
}
.jm-ov-unlock:hover { background: var(--jm-blue-hover, #064d7a); }

/* ── Pied de l'overlay (actions compte / adhésion) ─────────────────────── */
.jm-ov-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: clamp(28px, 5vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--jm-line, #dfe5ef);
}
.jm-ov-foot-link {
  color: var(--jm-night, #10294f);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.jm-ov-foot-link:hover { color: var(--jm-blue, #08598E); text-decoration: underline; }
.jm-ov-foot-cta {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 22px;
  padding-right: 22px;
  background: var(--jm-blue, #08598E);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: var(--jm-radius-pill, 999px);
}
.jm-ov-foot-cta:hover { background: var(--jm-blue-hover, #064d7a); }

/* Lien/bouton Contact poussé à l'extrême droite du pied */
.jm-ov-foot-contact { margin-left: auto; }

/* ── Garde-fou contraste au survol ──────────────────────────────────────
   Le thème parent (Kadence) recolore liens & boutons au :hover, ce qui
   casse le contraste de nos boutons sur fond coloré. On force donc la
   couleur du texte (spécificité .jm-ov + !important pour primer). */
.jm-ov .jm-ov-foot-cta,
.jm-ov .jm-ov-foot-cta:hover,
.jm-ov .jm-ov-foot-cta:focus,
.jm-ov .jm-ov-unlock,
.jm-ov .jm-ov-unlock:hover,
.jm-ov .jm-ov-unlock:focus { color: #fff !important; }

.jm-ov .jm-ov-close {
  color: var(--jm-night, #10294f) !important;
  background: var(--jm-bg-page, #f3f4f8) !important;
}
.jm-ov .jm-ov-close:hover,
.jm-ov .jm-ov-close:focus {
  color: var(--jm-night, #10294f) !important;
  background: var(--jm-line, #dfe5ef) !important;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .jm-ov-col--wide { grid-column: auto; } /* plus de colonne double */
}
@media (max-width: 640px) {
  .jm-ov-burger { top: 16px; left: 14px; }
  .jm-ov-cols { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }
  .jm-ov-logo img { height: 48px; }
  .jm-ov-burger-lines span { width: 20px; }
}
@media (max-width: 420px) {
  .jm-ov-cols { grid-template-columns: 1fr; }
}
