/**
 * Portail marchés — écran split Mali / Côte d'Ivoire
 */
*, *::before, *::after { box-sizing: border-box; }

.gateway-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Manrope', system-ui, sans-serif;
  background: #0f172a;
  color: #fff;
  overflow-x: hidden;
}

.mg-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.mg-top-badge {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  pointer-events: none;
}

.mg-top-badge-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #1a2b42;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.mg-top-badge-inner i {
  color: #f5a623;
}

.mg-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 767.98px) {
  .mg-split {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .mg-top-badge {
    top: 0.65rem;
  }
  .mg-top-badge-inner {
    font-size: 0.62rem;
    padding: 0.35rem 0.75rem;
  }
}

.mg-panel {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  min-height: 50vh;
  border: none;
  outline: none;
}

@media (min-width: 768px) {
  .mg-panel:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }
}

.mg-panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transition: transform 0.55s ease;
}

.mg-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    rgba(0, 0, 0, 0.55) 100%
  );
  transition: background 0.35s ease;
}

.mg-panel--ml .mg-panel-overlay {
  background: linear-gradient(
    180deg,
    rgba(20, 83, 45, 0.25) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

.mg-panel--ci .mg-panel-overlay {
  background: linear-gradient(
    180deg,
    rgba(27, 122, 78, 0.2) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

.mg-panel:hover .mg-panel-bg,
.mg-panel:focus-visible .mg-panel-bg {
  transform: scale(1.08);
}

.mg-panel:hover .mg-panel-overlay,
.mg-panel:focus-visible .mg-panel-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.mg-panel-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.25rem 2rem;
  text-align: center;
}

.mg-flag {
  width: 52px;
  height: 34px;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.mg-flag--ml {
  background: linear-gradient(90deg, #14b53a 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66%);
}

.mg-flag--ci {
  background: linear-gradient(90deg, #f77f00 33.33%, #fff 33.33% 66.66%, #009e60 66.66%);
}

.mg-panel-logo-wrap {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  margin-bottom: 1.25rem;
}

.mg-panel-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(220px, 70vw);
  object-fit: contain;
}

@media (min-width: 768px) {
  .mg-panel-logo {
    height: 58px;
  }
}

.mg-panel-country {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  position: absolute;
  right: clamp(1rem, 4vw, 2.5rem);
  top: 50%;
  translate: 0 -50%;
  max-height: 70%;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .mg-panel-country {
    position: static;
    transform: none;
    writing-mode: horizontal-tb;
    letter-spacing: 0.12em;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
}

.mg-panel-slogan {
  margin: 0 0 1.5rem;
  max-width: 320px;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.mg-enter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
}

.mg-enter-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mg-panel:hover .mg-enter-btn,
.mg-panel:focus-visible .mg-enter-btn {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.95);
  color: #1a2b42;
  border-color: #fff;
}

.mg-enter-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.mg-panel-hint {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  max-width: 280px;
}

.mg-panel:focus-visible {
  outline: 3px solid #ffc70e;
  outline-offset: -3px;
}
