/* ==========================================================================
   VARIABLES
   ========================================================================== */

:root {
  --color-primary:    #2563eb;
  --color-secondary:  #64748b;
  --color-bg:         #ffffff;
  --color-bg-alt:     #f8fafc;
  --color-text:       #1e293b;
  --color-heading:    #0f172a;
  --color-muted:      #94a3b8;
  --color-border:     #e2e8f0;
  --color-link:       var(--color-primary);
  --color-link-hover: #1d4ed8;

  --font-body:        'Inter', system-ui, -apple-system, sans-serif;
  --font-heading:     'Inter', system-ui, -apple-system, sans-serif;
  --font-size-base:   1rem;
  --font-size-sm:     0.875rem;
  --font-size-lg:     1.125rem;
  --font-size-xl:     1.25rem;
  --font-size-2xl:    1.5rem;
  --font-size-3xl:    1.875rem;
  --font-size-4xl:    2.25rem;
  --line-height-base: 1.6;

  --radius:           6px;
  --radius-lg:        12px;

  --container-width:  1200px;
  --content-width:    800px;
  --spacing-section:  4rem;
  --spacing-card-gap: 1.5rem;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);

  --header-height: 64px;
  --transition:    200ms ease;
}

/* ==========================================================================
   RESET
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover, a:focus {
  color: var(--color-link-hover);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}

/* ==========================================================================
   TYPOGRAPHIE
   ========================================================================== */

/* Inter (sans-serif, variable) */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Poppins (sans-serif) */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-400-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-500-latin-ext.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-600-latin-ext.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-700-latin-ext.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/poppins-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Roboto (sans-serif, variable) */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto/roboto-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto/roboto-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Playfair Display (serif, variable) */
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display/playfair-latin-ext.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display/playfair-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Lora (serif, variable) */
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cormorant Garamond (serif, variable) */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/cormorant-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/cormorant-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/cormorant-latin-ext-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/cormorant-latin-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Dancing Script (script, variable) */
@font-face {
  font-family: 'Dancing Script';
  src: url('../fonts/dancing-script/dancing-script-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Dancing Script';
  src: url('../fonts/dancing-script/dancing-script-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.mgx-container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.mgx-content-wrap {
  max-width: var(--content-width);
  margin-inline: auto;
}

.mgx-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mgx-main {
  flex: 1;
  padding-block: var(--spacing-section);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.mgx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.mgx-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.mgx-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-heading);
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.mgx-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.mgx-logo img {
  max-height: 48px;
  width: auto;
}

.mgx-nav {
  display: flex;
  align-items: center;
}

.mgx-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.mgx-nav__list a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.mgx-nav__list a:hover,
.mgx-nav__list .current-menu-item > a {
  color: var(--color-primary);
}

.mgx-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--color-border);
}

.mgx-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mgx-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mgx-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mgx-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.mgx-footer {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-top: 3rem;
}

.mgx-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.mgx-footer__col-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.mgx-footer__desc {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
}

.mgx-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mgx-footer__nav a {
  font-size: var(--font-size-sm);
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.mgx-footer__nav a:hover {
  color: var(--color-primary);
}

.mgx-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-block: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mgx-footer__copyright {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

.mgx-footer__legal {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.mgx-footer__legal a {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.mgx-footer__legal a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.mgx-loop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-card-gap);
}

.mgx-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.mgx-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mgx-card__image-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.mgx-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.mgx-card:hover .mgx-card__image {
  transform: scale(1.03);
}

.mgx-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
  gap: 0.75rem;
}

.mgx-card__category {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-decoration: none;
}

.mgx-card__category:hover {
  color: var(--color-link-hover);
}

.mgx-card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.mgx-card__title a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color var(--transition);
}

.mgx-card__title a:hover {
  color: var(--color-primary);
}

.mgx-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.mgx-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.mgx-card__meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mgx-card__meta-sep::before {
  content: '·';
}

.mgx-card__link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.mgx-card__link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* ==========================================================================
   ARCHIVE
   ========================================================================== */

.mgx-archive__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.mgx-archive__title {
  font-size: var(--font-size-3xl);
  margin-bottom: 0.5rem;
}

.mgx-archive__desc {
  color: var(--color-secondary);
  font-size: var(--font-size-lg);
}

.mgx-no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-muted);
}

/* ==========================================================================
   SINGLE
   ========================================================================== */

.mgx-single__hero {
  margin-bottom: 2rem;
}

.mgx-single__hero-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.mgx-single__header {
  margin-bottom: 2rem;
}

.mgx-single__category {
  display: inline-flex;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.mgx-single__title {
  font-size: var(--font-size-4xl);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.mgx-single__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  flex-wrap: wrap;
}

.mgx-entry__content {
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-text);
}

.mgx-entry__content h2 { font-size: var(--font-size-2xl); margin: 2rem 0 1rem; }
.mgx-entry__content h3 { font-size: var(--font-size-xl);  margin: 1.75rem 0 0.75rem; }
.mgx-entry__content h4 { font-size: var(--font-size-lg);  margin: 1.5rem 0 0.5rem; }

.mgx-entry__content p  { margin-bottom: 1.25rem; }
.mgx-entry__content ul,
.mgx-entry__content ol { margin-left: 1.5rem; margin-bottom: 1.25rem; list-style: revert; }
.mgx-entry__content li { margin-bottom: 0.4rem; }

.mgx-entry__content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-secondary);
  font-style: italic;
}

.mgx-entry__content img {
  border-radius: var(--radius);
  margin-block: 1.5rem;
}

.mgx-entry__content a {
  text-decoration: underline;
}

.mgx-entry__content code {
  background-color: var(--color-bg-alt);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius);
  font-size: 0.875em;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}

.mgx-entry__content pre {
  background-color: var(--color-heading);
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-block: 1.5rem;
}

.mgx-entry__content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.mgx-single__tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mgx-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--font-size-sm);
  color: var(--color-secondary);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.mgx-tag:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.mgx-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  gap: 1rem;
}

.mgx-pagination a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.mgx-pagination a:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.mgx-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.mgx-breadcrumb a {
  color: var(--color-secondary);
  text-decoration: none;
}

.mgx-breadcrumb a:hover {
  color: var(--color-primary);
}

.mgx-breadcrumb__sep {
  color: var(--color-border);
}

/* ==========================================================================
   FORMULAIRES
   ========================================================================== */

.mgx-search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin-inline: auto;
}

.mgx-search-form input[type="search"] {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-family: inherit;
  background-color: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition);
}

.mgx-search-form input[type="search"]:focus {
  border-color: var(--color-primary);
}

.mgx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--color-primary);
  transition: background-color var(--transition), border-color var(--transition);
}

.mgx-btn:hover {
  background-color: var(--color-link-hover);
  border-color: var(--color-link-hover);
  color: #fff;
  text-decoration: none;
}

/* ==========================================================================
   UTILITAIRES
   ========================================================================== */

.mgx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mgx-text-center { text-align: center; }
.mgx-text-muted  { color: var(--color-muted); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --spacing-section: 2.5rem;
    --header-height: 56px;
  }

  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }

  .mgx-nav-toggle {
    display: flex;
  }

  .mgx-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    display: none;
    box-shadow: var(--shadow-md);
  }

  .mgx-nav.is-open {
    display: block;
  }

  .mgx-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .mgx-nav__list li {
    width: 100%;
  }

  .mgx-nav__list a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-base);
  }

  .mgx-nav__list li:last-child a {
    border-bottom: none;
  }

  .mgx-footer__grid {
    grid-template-columns: 1fr;
  }

  .mgx-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mgx-loop {
    grid-template-columns: 1fr;
  }

  .mgx-single__title {
    font-size: var(--font-size-3xl);
  }

  .mgx-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .mgx-pagination a {
    justify-content: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .mgx-loop {
    grid-template-columns: repeat(2, 1fr);
  }

  .mgx-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
