/* Mode Panique — sobre, clean, Elementor-friendly */

/* Root */
.mp-root { z-index: 999999; }
.mp-root[data-context="sticky"] { position: fixed; bottom: 18px; }
.mp-root[data-context="sticky"][data-pos="right"] { right: 18px; }
.mp-root[data-context="sticky"][data-pos="left"] { left: 18px; }

/* Shortcode context: inline */
.mp-root[data-context="shortcode"] { position: relative; display: inline-block; }

/* Button */
.mp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  background: #d82020;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  font-weight: 800;
}
.mp-btn .mp-btn-sub { display:block; font-weight: 500; font-size: 12px; opacity: .92; }
.mp-btn-icon { font-size: 18px; line-height: 1; }

/* Overlay + dialog */
.mp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 999998;
}

.mp-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  max-height: min(80vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #111;
  border-radius: 16px;
  z-index: 999999;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.mp-topbar {
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.mp-topbar-title { font-weight: 900; }
.mp-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 10px;
}
.mp-close:hover { background: rgba(0,0,0,.06); }

.mp-body {
  padding: 14px;
  overflow: auto;
  flex: 1 1 auto;
}

/* Mentions légales (bas du popup) */
.mp-legal {
  /* un peu plus d’air en bas + centrage */
  padding: 10px 14px 18px;
  border-top: 1px solid rgba(0,0,0,.08);
  font-size: 11px;
  line-height: 1.25;
  opacity: .65;
  text-align: center;
}
.mp-screen-title { font-weight: 900; font-size: 18px; margin: 0 0 10px; }

/* Small link button (history) */
.mp-link {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 10px;
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
  font-weight: 700;
  opacity: .85;
}
.mp-link:hover { opacity: 1; }

/* Meta */
.mp-meta { display:flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.mp-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
}

/* Grid choices */
.mp-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 420px) {
  .mp-grid { grid-template-columns: 1fr; }
}

.mp-choice {
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  border-radius: 14px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
  line-height: 1.25;
}
.mp-choice:hover { background: rgba(0,0,0,.03); }

/* Card + blocks */
.mp-card {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.mp-block { margin-bottom: 10px; }
.mp-label { font-weight: 900; font-size: 13px; margin-bottom: 4px; }
.mp-text { font-size: 14px; line-height: 1.4; }
.mp-list { margin: 6px 0 0 18px; padding: 0; }
.mp-list li { margin: 4px 0; }

/* Context checkboxes */
.mp-check {
  display:flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.35;
  margin: 10px 0;
}
.mp-check input { margin-top: 2px; }

/* Footer actions */
.mp-footer-actions { margin-top: 12px; display:flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.mp-mini-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  background: rgba(0,0,0,.08);
  font-weight: 900;
  font-size: 13px;
}
.mp-mini-btn:hover { background: rgba(0,0,0,.12); }

/* History list */
.mp-history { list-style: none; padding: 0; margin: 0; }
.mp-history li { margin: 6px 0; }
.mp-history-item {
  width: 100%;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}
.mp-history-item:hover { background: rgba(0,0,0,.03); }
.mp-history-label { display:block; font-weight: 900; font-size: 13px; }
.mp-history-sub { display:block; font-size: 12px; opacity: .75; margin-top: 2px; }

/* Hint */
.mp-hint { margin-top: 10px; font-size: 13px; font-weight: 800; opacity: .85; }

/* Force native hidden */
.mp-root [hidden] { display:none !important; }

/* Popup — titre responsive */
.mp-dialog .mp-topbar-title{
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.15;
  font-weight: 800;
  white-space: normal;
}
.mp-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.mp-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
}

.mp-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.mp-list li { margin: 4px 0; }
.mp-block + .mp-block { margin-top: 10px; }

/* SOS LINGE — hover noir / texte blanc */
.mp-root .mp-btn{
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

/* Survol + clavier (accessibilité) */
.mp-root .mp-btn:hover,
.mp-root .mp-btn:focus-visible{
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Assure que les textes internes suivent bien la couleur */
.mp-root .mp-btn:hover .mp-btn-text,
.mp-root .mp-btn:hover .mp-btn-sub,
.mp-root .mp-btn:focus-visible .mp-btn-text,
.mp-root .mp-btn:focus-visible .mp-btn-sub{
  color: inherit;
}
body .mp-root .mp-btn{
  border-radius: 30px; /* ou 18px, etc. */
}

/* Volume : dégradé léger + ombre socle + ombre douce */
body .mp-root .mp-btn{
  /* dégradé discret (effet bombé) */
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(0,0,0,.10)), #000;

  /* ombre : 1) socle net (volume), 2) ombre diffuse (profondeur) */
  box-shadow:
    0 10px 0 rgba(0,0,0,.28),
    0 18px 30px rgba(0,0,0,.18);

  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease, color .15s ease;
  transform: translateY(0);
}

/* Survol : s’enfonce (socle raccourci + ombre diffuse plus petite) */
body .mp-root .mp-btn:hover,
body .mp-root .mp-btn:focus-visible{
  transform: translateY(3px);
  box-shadow:
    0 7px 0 rgba(0,0,0,.28),
    0 12px 18px rgba(0,0,0,.14);
  background: #000;
  color: #fff;
}

/* Clic : encore plus enfoncé */
body .mp-root .mp-btn:active{
  transform: translateY(5px);
  box-shadow:
    0 5px 0 rgba(0,0,0,.28),
    0 10px 14px rgba(0,0,0,.12);
}
body .mp-root .mp-btn{
  position: relative;
}
body .mp-root .mp-btn::before{
  content:"";
  position:absolute;
  left:10px; right:10px; top:6px;
  height:10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  pointer-events:none;
}
@media (prefers-reduced-motion: reduce){
  body .mp-root .mp-btn{ transition: none; }
}
/* 1) S'assure que l'overlay Elementor de transition passe au-dessus */
.e-page-transition,
.elementor-page-transition,
#elementor-page-transition {
  z-index: 2147483647 !important;
}

/* 2) Z-index du sticky MP (reste haut, mais sous l’overlay Elementor) */
body .mp-root[data-context="sticky"]{
  z-index: 999999; /* OK */
}

/* 3) Et si on déclenche une navigation, on cache MP instantanément */
html.mp-nav .mp-root[data-context="sticky"]{
  display: none !important;
}
body:not(.home) .mp-root[data-context="sticky"]{
  display:none !important;
}
