/* ============================================================
   AxessPharma — Magazine viewer PREMIUM (niveau Mogacode)
   ============================================================ */

.ax-magazine-viewer {
  --emv-bg-1: #F6F8F5;        /* fond stage clair (au lieu de noir) */
  --emv-bg-2: #ECF1EA;        /* fond sidebar légèrement plus foncé */
  --emv-paper: #fff;
  --emv-toolbar-bg: #fff;
  --emv-toolbar-text: #181818;
  --emv-accent: #006E96;
  --emv-accent-dark: #005471;
  --emv-spine-shadow: 0 0 36px rgba(0, 0, 0, .25);
  --emv-radius: 18px;
  position: relative;
  width: 100%;
  background: var(--emv-bg-1);
  border: 1px solid #DBE4DC;
  border-radius: var(--emv-radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 60px 1fr 56px;
  grid-template-areas:
    "thumbs toolbar"
    "thumbs stage"
    "thumbs footer";
  height: 86vh;
  min-height: 620px;
  max-height: 1080px;
  user-select: none;
  font-family: "Lato", -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 18px 50px rgba(0,84,113, .08), 0 4px 12px rgba(0, 0, 0, .04);
}
.ax-magazine-viewer.ax-mag-is-fullscreen {
  border-radius: 0;
  height: 100vh;
  max-height: none;
  box-shadow: none;
}
.ax-magazine-viewer.thumbs-hidden {
  grid-template-columns: 0 1fr;
}
.ax-magazine-viewer.thumbs-hidden .ax-magazine-thumbs { display: none; }

/* --- Thumbnails sidebar (fond clair) --- */
.ax-magazine-thumbs {
  grid-area: thumbs;
  background: var(--emv-bg-2);
  border-right: 1px solid #DBE4DC;
  overflow-y: auto;
  padding: 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: #BCC8BD transparent;
}
.ax-magazine-thumbs::-webkit-scrollbar { width: 6px; }
.ax-magazine-thumbs::-webkit-scrollbar-thumb { background: #BCC8BD; border-radius: 3px; }
.ax-magazine-thumbs h4 {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5C6B5E;
  font-weight: 700;
  margin: 0 4px 14px;
}
.ax-magazine-thumb {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}
.ax-magazine-thumb:hover { background: rgba(0,110,150, .06); }
.ax-magazine-thumb.is-current {
  border-color: var(--emv-accent);
  background: rgba(0,110,150, .1);
}
.ax-magazine-thumb canvas,
.ax-magazine-thumb .ax-thumb-placeholder {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 3px;
  aspect-ratio: 5 / 7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.ax-magazine-thumb-label {
  font-size: 0.66rem;
  color: #5C6B5E;
  margin-top: 6px;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.ax-magazine-thumb.is-current .ax-magazine-thumb-label {
  color: var(--emv-accent-dark);
  font-weight: 600;
}

/* --- Toolbar --- */
.ax-magazine-toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--emv-toolbar-bg);
  color: var(--emv-toolbar-text);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  gap: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}
.ax-magazine-toolbar__left,
.ax-magazine-toolbar__right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ax-magazine-toolbar__center {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #181818;
}
.ax-magazine-toolbar__divider {
  width: 1px;
  height: 22px;
  background: rgba(0, 0, 0, .1);
  margin: 0 4px;
}
.ax-mag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  color: #444;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
}
.ax-mag-btn svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  min-height: 22px;
  flex-shrink: 0;
  stroke-width: 1.8;
  display: block;
}
.ax-mag-btn[style*="32px"] svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
}
.ax-mag-btn:hover {
  background: rgba(0,110,150, .12);
  color: var(--emv-accent-dark);
}
.ax-mag-btn[aria-pressed="true"],
.ax-mag-btn.is-active {
  background: var(--emv-accent);
  color: #fff;
}
.ax-mag-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #181818;
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.ax-mag-zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  min-width: 42px;
  text-align: center;
  letter-spacing: 0.02em;
}

/* --- Stage --- */
.ax-magazine-stage {
  grid-area: stage;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}
.ax-magazine-book {
  position: relative;
  perspective: 2400px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35));
}
.ax-magazine-pages {
  display: flex;
  gap: 0;
  height: 100%;
  align-items: stretch;
  justify-content: center;
  position: relative;
  transform-style: preserve-3d;
}

/* Sheets — page rendering */
.ax-mag-sheet {
  background: var(--emv-paper);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  transition: transform .55s cubic-bezier(.45, .15, .35, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.ax-mag-sheet canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
}
/* Realistic page edges shadows */
.ax-mag-sheet--cover {
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .08),
    24px 0 40px -8px rgba(0, 0, 0, .55),
    inset -20px 0 30px -20px rgba(0, 0, 0, .18);
}
.ax-mag-sheet--left {
  border-radius: 5px 0 0 5px;
  transform-origin: right center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .08),
    -8px 0 18px -8px rgba(0, 0, 0, .25),
    inset -22px 0 30px -22px rgba(0, 0, 0, .22);
}
.ax-mag-sheet--right {
  border-radius: 0 5px 5px 0;
  transform-origin: left center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .08),
    8px 0 18px -8px rgba(0, 0, 0, .25),
    inset 22px 0 30px -22px rgba(0, 0, 0, .22);
}
.ax-mag-sheet--single {
  border-radius: 5px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .08),
    0 18px 40px rgba(0, 0, 0, .35),
    inset 0 0 30px -20px rgba(0, 0, 0, .15);
}

/* Spine — central crease between left/right pages */
.ax-magazine-pages--spread::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 14px;
  margin-left: -7px;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(0, 0, 0, .55) 35%,
      rgba(0, 0, 0, .85) 50%,
      rgba(0, 0, 0, .55) 65%,
      transparent 100%);
  z-index: 3;
  pointer-events: none;
  border-radius: 1px;
  box-shadow: 0 0 12px rgba(0, 0, 0, .4);
}

/* Page turn — realistic with shadow + curl */
.ax-mag-turning--next .ax-mag-sheet--right,
.ax-mag-turning--next .ax-mag-sheet--cover {
  animation: ax-flip-next .55s cubic-bezier(.45, .15, .35, 1) forwards;
  z-index: 5;
}
.ax-mag-turning--prev .ax-mag-sheet--left {
  animation: ax-flip-prev .55s cubic-bezier(.45, .15, .35, 1) forwards;
  z-index: 5;
}
@keyframes ax-flip-next {
  0%   { transform: rotateY(0deg); filter: brightness(1) drop-shadow(0 0 0 transparent); }
  50%  { transform: rotateY(-90deg); filter: brightness(.85) drop-shadow(-20px 0 20px rgba(0, 0, 0, .35)); }
  100% { transform: rotateY(-176deg); filter: brightness(.95) drop-shadow(0 0 0 transparent); }
}
@keyframes ax-flip-prev {
  0%   { transform: rotateY(0deg); filter: brightness(1); }
  50%  { transform: rotateY(90deg); filter: brightness(.85) drop-shadow(20px 0 20px rgba(0, 0, 0, .35)); }
  100% { transform: rotateY(176deg); filter: brightness(.95); }
}

/* Loading */
.ax-magazine-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #353535;
  background: var(--emv-bg-1);
  z-index: 5;
  gap: 18px;
}
.ax-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, .08);
  border-top-color: var(--emv-accent);
  animation: ax-spin .9s linear infinite;
}
.ax-magazine-loading p {
  color: #5C6B5E;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }

/* Nav arrows — large, premium */
.ax-mag-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #181818;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  transition: all .25s cubic-bezier(.2, .8, .2, 1);
}
.ax-mag-nav svg { width: 22px; height: 22px; }
.ax-mag-nav:hover {
  background: var(--emv-accent);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 30px rgba(0,110,150, .5);
}
.ax-mag-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.ax-mag-nav:disabled:hover {
  background: rgba(255, 255, 255, .95);
  color: #181818;
  transform: translateY(-50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.ax-mag-nav--prev { left: 24px; }
.ax-mag-nav--next { right: 24px; }

/* Footer — pager + progress */
.ax-magazine-footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  background: #fff;
  color: #353535;
  border-top: 1px solid #DBE4DC;
}
.ax-mag-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5C6B5E;
}
.ax-mag-pager strong {
  color: #181818 !important;
}
.ax-mag-pager input {
  width: 56px;
  text-align: center;
  padding: 6px 8px;
  background: #F6F8F5;
  border: 1px solid #DBE4DC;
  border-radius: 8px;
  color: #353535;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}
.ax-mag-pager input:focus {
  outline: none;
  border-color: var(--emv-accent);
  background: rgba(0,110,150, .08);
}
.ax-mag-progress {
  flex: 1;
  height: 4px;
  background: #E8EFE9;
  border-radius: 99px;
  overflow: hidden;
  max-width: 50%;
  position: relative;
}
.ax-mag-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--emv-accent), #019D6D);
  width: 0;
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(0,110,150, .5);
}
.ax-mag-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Summary panel — drawer top-right (fond clair) */
.ax-magazine-summary {
  position: absolute;
  top: 60px;
  bottom: 56px;
  right: 0;
  width: 340px;
  max-width: 92%;
  background: #fff;
  z-index: 10;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .12);
  transform: translateX(0);
  animation: ax-slide-in .35s cubic-bezier(.2, .8, .2, 1);
  border-left: 1px solid #DBE4DC;
}
.ax-magazine-summary[hidden] { display: none; }
@keyframes ax-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.ax-magazine-summary header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #E8EFE9;
}
.ax-magazine-summary header h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5C6B5E;
}
.ax-magazine-summary header .ax-mag-btn {
  width: 32px;
  height: 32px;
  color: #5C6B5E;
}
.ax-magazine-summary header .ax-mag-btn:hover {
  background: rgba(0,110,150, .1);
  color: var(--emv-accent-dark);
}
.ax-magazine-summary ul {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  overflow-y: auto;
  flex: 1;
}
.ax-magazine-summary ul li button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px;
  transition: all .2s ease;
  color: #353535;
}
.ax-magazine-summary ul li button:hover {
  background: rgba(0,110,150, .08);
  color: var(--emv-accent-dark);
  transform: translateX(4px);
}
.ax-sum-page {
  color: var(--emv-accent-dark);
  font-weight: 700;
  font-size: 11px;
  min-width: 40px;
  background: #DBEEDC;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}
.ax-sum-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1023px) {
  /* Tablet & mobile: single page */
  .ax-magazine-viewer {
    height: 78vh;
    min-height: 500px;
  }
}

@media (max-width: 760px) {
  /* === Layout viewer mobile : lecteur épuré page par page === */
  .ax-magazine-viewer {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
  }

  /* Masquer la sidebar thumbnails (et son toggle ouvert) */
  .ax-magazine-thumbs,
  .ax-magazine-viewer.has-thumbs .ax-magazine-thumbs { display: none !important; }

  /* Toolbar simplifiée : seulement titre + download */
  .ax-magazine-toolbar {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .ax-magazine-toolbar__left { display: none !important; }
  .ax-magazine-toolbar__center {
    flex: 1;
    font-size: 13px;
    text-align: left;
    min-width: 0;
  }
  .ax-mag-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
  /* Right toolbar : on ne garde que download + fullscreen */
  .ax-magazine-toolbar__right [data-ax-mag="single-toggle"],
  .ax-magazine-toolbar__right [data-ax-mag="share"],
  .ax-magazine-toolbar__right [data-ax-mag="print"],
  .ax-magazine-toolbar__right .ax-magazine-toolbar__divider { display: none !important; }
  .ax-magazine-toolbar__right { gap: 4px; }
  .ax-mag-btn { width: 38px; height: 38px; }

  /* Stage : pleine largeur, padding minimal */
  .ax-magazine-stage {
    padding: 12px 8px !important;
    min-height: 60vh;
    position: relative;
  }
  .ax-magazine-book {
    width: 100% !important;
    max-width: 100% !important;
  }
  .ax-magazine-pages {
    justify-content: center;
  }
  .ax-mag-sheet,
  .ax-mag-sheet--single,
  .ax-mag-sheet--left,
  .ax-mag-sheet--right {
    max-width: 100% !important;
  }
  .ax-mag-sheet canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Nav prev/next : flottants gros boutons, vert primary visible */
  .ax-mag-nav {
    width: 46px !important;
    height: 46px !important;
    font-size: 22px;
    background: rgba(0,110,150, 0.92) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    border-radius: 50%;
  }
  .ax-mag-nav:disabled { opacity: 0.35; }
  .ax-mag-nav--prev { left: 8px !important; }
  .ax-mag-nav--next { right: 8px !important; }

  /* Footer : nav simple (prev | page x / total | next + download) */
  .ax-magazine-footer {
    padding: 10px 14px !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  .ax-mag-pager { font-size: 13px; }
  .ax-mag-pager input[type="number"] {
    width: 48px;
    font-size: 14px;
  }
  .ax-mag-footer-actions [data-ax-mag="first"],
  .ax-mag-footer-actions [data-ax-mag="last"] { display: none !important; }
  .ax-mag-progress { height: 3px; }

  /* Summary panel plein écran si jamais utilisé */
  .ax-magazine-summary {
    width: 100% !important;
    top: 56px;
  }
}

/* Très petits écrans : titre tronqué encore plus court */
@media (max-width: 380px) {
  .ax-magazine-toolbar__center { font-size: 12px; }
  .ax-mag-btn { width: 34px; height: 34px; }
}

/* ============================================================
   FAB plein écran — flottant en bas droite du stage
   ============================================================ */
.ax-mag-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 12;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0,110,150, 0.95);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,84,113, 0.35);
  transition: all 0.18s ease;
}
.ax-mag-fab:hover { background: #005471; transform: scale(1.06); }
.ax-mag-fab:active { transform: scale(0.95); }
.ax-mag-fab > * { pointer-events: none; } /* SVG ne catche pas le click */
.ax-mag-fab__close { display: none; }
.ax-mag-pseudo-fullscreen .ax-mag-fab__open,
.ax-mag-is-fullscreen .ax-mag-fab__open { display: none; }
.ax-mag-pseudo-fullscreen .ax-mag-fab__close,
.ax-mag-is-fullscreen .ax-mag-fab__close { display: inline-block; }

/* ============================================================
   PSEUDO-FULLSCREEN (iOS Safari friendly)
   ============================================================ */
.ax-mag-pseudo-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  background: #0a0a0a !important;
  display: flex !important;
  flex-direction: column !important;
}
.ax-mag-pseudo-fullscreen .ax-magazine-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  padding: 0 !important;
}
.ax-mag-pseudo-fullscreen .ax-mag-sheet canvas {
  max-height: calc(100dvh - 120px) !important;
  width: auto !important;
  max-width: 100vw !important;
}
.ax-mag-pseudo-fullscreen .ax-magazine-thumbs { display: none !important; }
body.ax-mag-fs-lock {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}
/* En pseudo-fullscreen, le FAB devient bouton close visible */
.ax-mag-pseudo-fullscreen .ax-mag-fab {
  position: fixed !important;
  background: rgba(255, 255, 255, 0.95);
  color: #0a0a0a;
  top: max(14px, env(safe-area-inset-top, 14px)) !important;
  right: max(14px, env(safe-area-inset-right, 14px)) !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 100000 !important;
  width: 46px !important;
  height: 46px !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45) !important;
}
.ax-mag-pseudo-fullscreen .ax-mag-fab:hover { background: #fff; }
.ax-mag-pseudo-fullscreen .ax-mag-fab:active { transform: scale(0.92); }
/* Adapt toolbar + footer in fullscreen */
.ax-mag-pseudo-fullscreen .ax-magazine-toolbar { background: rgba(0,0,0,0.6); color: #fff; }
.ax-mag-pseudo-fullscreen .ax-magazine-footer { background: rgba(0,0,0,0.7); color: #fff; }

/* ============================================================
   Magazine Banner — copie 1:1 dynaphar.be
   Cover 350px qui dépasse à droite ET en bas (excentré)
   ============================================================ */
.ax-mag-banner {
  position: relative;
  background: linear-gradient(135deg, #006E96 0%, #018f1f 100%);
  color: #fff;
  border-radius: 24px;
  margin: 0;
  /* override section{padding:120px 0} du Premium model 2 */
  padding: 0 !important;
  /* overflow visible pour que la cover déborde */
  overflow: visible;
}

/* Harmoniser espace dessus/dessous : neutraliser le padding-top de la section
   qui suit le wrapper bannière (sinon = 50px wrap + 120px section{} = 170px) */
.ax-mag-banner-wrap + section { padding-top: 0 !important; }
.ax-mag-banner__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 60px;
  display: flex;
  align-items: center;
  position: relative;
}
.ax-mag-banner__text {
  flex: 1;
  max-width: 62%;
}
.ax-mag-banner__title {
  font-family: "Lato", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: -0.015em;
}
.ax-mag-banner__subtitle {
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0 0 18px;
  opacity: .92;
  max-width: 520px;
  color: #fff;
}
.ax-mag-banner .ax-btn-primary,
.ax-mag-banner .ax-btn {
  background: #fff;
  color: #005471;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transition: all .2s ease;
}
.ax-mag-banner .ax-btn-primary::after {
  content: '';
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #005471 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center/12px no-repeat;
  margin-left: 4px;
  transition: transform .25s;
}
.ax-mag-banner .ax-btn-primary:hover {
  background: #005471;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,84,113, .35);
}
.ax-mag-banner .ax-btn-primary:hover::after {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006C2C' stroke-width='2.5'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
  transform: translateX(3px);
}

/* COVER — excentrée, dépasse à droite ET en bas (style dynaphar) */
.ax-mag-banner__cover {
  position: absolute;
  right: 30px;
  top: -40px;
  bottom: -60px;
  width: 250px;
  transform: rotate(-7deg);
  transform-origin: center center;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  z-index: 2;
}
.ax-mag-banner__cover-link {
  display: block;
  height: 100%;
}
.ax-mag-banner__cover:hover {
  transform: rotate(-3deg) scale(1.03);
}
.ax-mag-banner__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  box-shadow:
    0 28px 50px rgba(0, 0, 0, .35),
    0 12px 24px rgba(0, 0, 0, .2),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
  display: block;
}

@media (max-width: 1100px) {
  .ax-mag-banner__cover { width: 280px; right: 30px; top: -30px; bottom: -50px; }
}
@media (max-width: 900px) {
  .ax-mag-banner { margin: 40px 0 60px; }
  .ax-mag-banner__inner {
    flex-direction: column;
    padding: 36px 28px;
    text-align: center;
    min-height: 0;
  }
  .ax-mag-banner__text { max-width: 100%; margin-bottom: 24px; }
  .ax-mag-banner__subtitle { margin-left: auto; margin-right: auto; }
  .ax-mag-banner__cover {
    position: relative;
    width: 180px;
    height: auto;
    right: auto; top: auto; bottom: auto;
    margin: 0 auto -40px;
    transform: rotate(-5deg);
  }
  .ax-mag-banner__cover img { height: auto; }
}

/* ============================================================
   Magazine archive grid
   ============================================================ */
.ax-mag-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin: 30px 0;
}
.ax-mag-archive-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  transition: transform .25s, box-shadow .25s;
  color: inherit;
  text-decoration: none;
}
.ax-mag-archive-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .15);
}
.ax-mag-archive-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.ax-mag-archive-card__body { padding: 16px 18px; }
.ax-mag-archive-card__body h3 {
  margin: 6px 0 0;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: capitalize;
}
