/*
 * Magik Wood — styles du thème.
 * Toutes les couleurs viennent des variables CSS (--paper, --ink, --red-ui…) générées par le thème
 * pour le mode clair et le mode sombre. Aucune couleur n'est écrite en dur ici.
 */

/* 1. Polices hébergées localement (licence SIL OFL, voir assets/fonts) */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --font-display: "Montserrat", "Arial", sans-serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --header-h: 72px;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 26px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(32px, 4vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3vw, 28px); line-height: 1.2; font-weight: 700; }
h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
h4 { font-size: 17px; line-height: 24px; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--red-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0; }
code, kbd, pre { font-family: var(--font-mono); font-size: .92em; }
pre { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); overflow-x: auto; }
::selection { background: var(--red-ui); color: var(--on-red); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mw-skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 1000; background: var(--ink); color: var(--paper); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); }
.mw-skip-link:focus { top: var(--space-4); }
.mw-main:focus { outline: none; }

/* Affichage selon le mode */
.mw-only-dark { display: none !important; }
:root[data-theme="dark"] .mw-only-dark { display: revert !important; }
:root[data-theme="dark"] .mw-only-light { display: none !important; }

/* 3. Mise en page */
.mw-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 768px) { .mw-container { padding-inline: var(--space-6); } }
.mw-narrow { max-width: 780px; }
.mw-section { padding-block: var(--space-12); }
@media (min-width: 1024px) { .mw-section { padding-block: var(--space-16); } }
.mw-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.mw-page-header { margin-bottom: var(--space-8); }
.mw-page-title { margin-bottom: var(--space-3); }
.mw-page-intro { color: var(--ink-muted); font-size: 18px; line-height: 28px; max-width: 65ch; }
.mw-eyebrow { font-family: var(--font-display); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-text); margin-bottom: var(--space-2); }
.mw-meta { font-size: 14px; line-height: 22px; color: var(--ink-muted); margin: 0; }

/* 4. Header */
.mw-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.admin-bar .mw-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mw-header { top: 0; } }
.mw-header-inner { display: flex; align-items: center; gap: var(--space-6); min-height: var(--header-h); }
.mw-logo { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; }
body .mw-logo img.mw-logo-img { height: var(--logo-height); width: auto; max-width: 100%; object-fit: contain; object-position: left center; display: block; }
.mw-nav { flex: 1 1 auto; min-width: 0; }
.mw-menu, .mw-menu ul { list-style: none; margin: 0; padding: 0; }
.mw-menu { display: flex; align-items: center; gap: var(--space-1); }
.mw-menu > li { position: relative; }
.mw-menu a {
  display: block; white-space: nowrap; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; line-height: 20px; color: var(--ink); text-decoration: none;
}
.mw-menu a:hover, .mw-menu .current-menu-item > a, .mw-menu .current-menu-ancestor > a { color: var(--red-text); }
.mw-menu .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px; padding: var(--space-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.mw-menu li:hover > .sub-menu, .mw-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mw-header-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.mw-icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.mw-icon-btn:hover { background: var(--surface-alt); color: var(--ink); }
.mw-cart-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red-ui); color: var(--on-red); font-size: 11px; line-height: 18px; font-weight: 700; text-align: center;
}
.mw-burger { display: none; }
/* Sélecteur de devise (Magik Wood Core) */
.mw-header-actions .mwc-fx summary { min-height: 40px; border-color: transparent; padding: 0 8px; font-size: 13px; letter-spacing: .02em; }
.mw-header-actions .mwc-fx summary:hover, .mw-header-actions .mwc-fx[open] summary { border-color: var(--line); }
@media (max-width: 600px) { .mw-header-actions .mwc-fx summary { min-height: 36px; padding: 0 4px; } .mw-header-actions .mwc-fx summary::after { display: none; } }
@media (max-width: 600px) {
  body .mw-logo img.mw-logo-img { height: auto; max-height: calc(var(--logo-height) * .8); width: 100%; max-width: 180px; }
  .mw-header-actions .mw-toggle { transform: scale(.85); margin-inline: -4px; }
  .mw-header-actions .mw-icon-btn { width: 36px; height: 36px; }
  .mw-announce-inner { padding-right: 36px; font-size: 13px; }
}
.mw-search-panel { border-top: 1px solid var(--line); padding-block: var(--space-4); background: var(--paper); }

@media (max-width: 1023px) {
  .mw-burger { display: inline-grid; }
  .mw-header-inner { gap: var(--space-3); }
  .mw-header-actions { gap: var(--space-1); flex: none; }
  .mw-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 99; background: var(--paper);
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    padding: var(--space-6) var(--space-4); overflow-y: auto; display: none; border-top: 1px solid var(--line);
  }
  .mw-nav.is-open { display: block; }
  .mw-menu { flex-direction: column; align-items: stretch; }
  .mw-menu a { font-size: 18px; line-height: 26px; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mw-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 var(--space-4); background: transparent; }
  body.mw-nav-open { overflow: hidden; }
}

/* 5. Barre d'annonce */
.mw-announce { background: var(--logo-black); color: #fff; font-size: 14px; line-height: 20px; position: relative; overflow: hidden; }
.mw-announce::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: repeating-linear-gradient(-27deg, var(--red) 0 8px, transparent 8px 16px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 85%); mask: linear-gradient(90deg, transparent, #000 85%);
}
.mw-announce-inner { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding-block: var(--space-2); text-align: center; }
.mw-announce a { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.mw-announce a:hover { color: var(--red); }
.mw-announce-timer { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: #fff; background: var(--red-ui); padding: 2px var(--space-2); border-radius: var(--radius-sm); }
.mw-announce-close { position: absolute; right: var(--space-2); top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: #fff; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm); }
.mw-announce-close:hover { background: rgba(255,255,255,.12); }
.mw-announce-close:focus-visible { outline-color: #fff; }

/* 6. Pied de page */
.mw-footer { border-top: 1px solid var(--line); background: var(--surface-alt); margin-top: var(--space-16); color: var(--ink); }
.mw-footer-grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; padding-block: var(--space-12); }
@media (min-width: 768px) { .mw-footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.mw-footer-brand p { color: var(--ink-muted); max-width: 42ch; margin-top: var(--space-4); }
.mw-footer-title { font-size: 14px; line-height: 20px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--space-4); }
.mw-footer-menu, .mw-legal-menu, .mw-contact, .mw-social { list-style: none; margin: 0; padding: 0; }
.mw-footer-menu li + li { margin-top: var(--space-2); }
.mw-footer a { color: var(--ink); text-decoration: none; }
.mw-footer a:hover { color: var(--red-text); }
.mw-contact li { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--ink-muted); }
.mw-contact li + li { margin-top: var(--space-2); }
.mw-contact .mw-icon { flex: none; margin-top: 4px; color: var(--red-text); }
.mw-social { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.mw-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); transition: box-shadow .25s ease, border-color .25s ease, color .25s ease; }
.mw-social a:hover { border-color: var(--red-ui); color: var(--red-text); box-shadow: var(--glow-red-soft); }
.mw-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-6); border-top: 1px solid var(--line); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.mw-footer-bottom p { margin: 0; }
.mw-legal-menu { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.mw-legal-menu a { color: var(--ink-muted); }

/* 7. Contenus */
.mw-prose { font-size: 17px; line-height: 28px; }
.mw-prose > * + * { margin-top: 1em; }
.mw-prose h2 { margin-top: 1.6em; }
.mw-prose h3 { margin-top: 1.4em; }
.mw-prose img { border-radius: var(--radius-md); }
.mw-prose blockquote { margin: 1.5em 0; padding: var(--space-2) 0 var(--space-2) var(--space-6); border-left: 4px solid var(--red-ui); font-size: 19px; line-height: 30px; }
.mw-prose ul, .mw-prose ol { padding-left: 1.3em; }
.mw-prose li::marker { color: var(--red-text); }
.mw-prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.mw-prose th, .mw-prose td { border-bottom: 1px solid var(--line); padding: var(--space-2) var(--space-3); text-align: left; }
.mw-prose-wide { max-width: none; }
.mw-article-header { padding-top: var(--space-12); }
.mw-article-cover { margin-block: var(--space-8); }
.mw-article-cover img { width: 100%; border-radius: var(--radius-lg); }
.mw-article-footer { padding-block: var(--space-8); }
.mw-tags a { display: inline-block; margin: 0 var(--space-1) var(--space-1) 0; padding: 2px var(--space-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink); text-decoration: none; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-6); }
.post-navigation a { font-weight: 700; color: var(--ink); text-decoration: none; }
.post-navigation a:hover { color: var(--red-text); }
.mw-empty { padding: var(--space-12) 0; text-align: center; }
.mw-empty .mw-searchform { margin-inline: auto; }
.mw-404 { text-align: center; }
.mw-404 .mw-page-intro { margin-inline: auto; }
.mw-404 .mw-searchform { margin: var(--space-6) auto; }
.mw-404-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(96px, 18vw, 180px); line-height: 1; letter-spacing: -.04em; margin: 0 0 var(--space-4); color: var(--ink); }
.mw-404-code span { color: var(--red); }
.mw-pagination .nav-links, .woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-12); padding: 0; list-style: none; }
.mw-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); color: var(--ink); font-weight: 700; text-decoration: none; }
.mw-pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mw-pagination a.page-numbers:hover { border-color: var(--red-ui); color: var(--red-text); }
.mw-comments { padding-block: var(--space-8); border-top: 1px solid var(--line); }
.mw-comment-list { list-style: none; padding: 0; }
.mw-comment-list .comment-body { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.mw-comment-list .avatar { border-radius: 50%; }
.mw-comment-list .children { list-style: none; padding-left: var(--space-6); }

/* Formulaires */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"],
input[type="tel"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; max-width: 100%; padding: 10px var(--space-3); font: inherit; font-size: 16px; line-height: 24px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--red-glow); }
label { font-weight: 700; font-size: 14px; line-height: 22px; }
button, input[type="submit"] { font: inherit; }
.mw-searchform { position: relative; display: flex; gap: var(--space-2); max-width: 640px; }
.mw-searchform > .mw-icon { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
.mw-searchform input[type="search"] { padding-left: 40px; }
.mw-searchform .mw-btn { flex: none; }

/* 8. Composants (design system Magik Wood) */
.mw-btn, .wp-block-button__link, input[type="submit"], .comment-form .submit {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 700;
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-md);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--red-ui); color: var(--on-red);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .25s ease, transform .25s ease;
}
.mw-btn-lg { font-size: 17px; line-height: 24px; padding: 14px var(--space-8); }
.mw-btn-primary, .wp-block-button__link { background: var(--red-ui); color: var(--on-red); }
.mw-btn-primary:hover, .wp-block-button__link:hover, input[type="submit"]:hover { color: var(--on-red); }
.mw-btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.mw-btn-secondary:hover { background: var(--ink); color: var(--paper); }
.mw-btn-ghost { background: transparent; color: var(--ink); padding-inline: var(--space-3); }
.mw-btn-ghost:hover { background: var(--surface-alt); color: var(--ink); }
.mw-btn[disabled], .mw-btn.is-disabled { opacity: .45; cursor: not-allowed; }

.mw-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-family: var(--font-display); font-size: 12px; line-height: 16px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); white-space: nowrap;
  background: var(--red-ui); color: var(--on-red);
}
.mw-badge-ink { background: var(--ink); color: var(--paper); }
.mw-badge-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.mw-badge-success { background: transparent; color: var(--success); box-shadow: inset 0 0 0 1px var(--success); }
.mw-badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; animation: mw-blink 1.4s ease-in-out infinite; }

.mw-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-2); font-variant-numeric: tabular-nums; }
.mw-price-now { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 36px; color: var(--ink); letter-spacing: -.01em; }
.mw-price-period, .mw-price-was { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.mw-price-was { text-decoration: line-through; }
.mw-price-save { font-size: 14px; line-height: 22px; font-weight: 700; color: var(--red-text); }

.mw-card {
  display: flex; flex-direction: column; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden;
  position: relative; isolation: isolate;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.mw-card-media { text-decoration: none; position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--logo-black); overflow: hidden; }
.mw-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.mw-card:hover .mw-card-media img { transform: scale(1.04); }
.mw-card-initials { font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 1; color: var(--red); letter-spacing: -.03em; }
.mw-card-badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; z-index: 1; }
.mw-card-body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); flex: 1; }
.mw-card-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; margin: 0; }
.mw-card-title a { color: inherit; text-decoration: none; }
.mw-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.mw-card-title a:hover { color: var(--red-text); }
.mw-card-pitch { font-size: 15px; line-height: 24px; color: var(--ink-muted); margin: 0; }
.mw-stock-row { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 13px; line-height: 20px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.mw-stock-row strong { color: var(--red-text); }
.mw-stock-track { height: 6px; border-radius: var(--radius-sm); background: var(--surface-alt); overflow: hidden; }
.mw-stock-fill { height: 100%; background: var(--red-ui); border-radius: var(--radius-sm); }

.mw-key {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.mw-key code, .mw-key-value { font-family: var(--font-mono); font-size: 16px; line-height: 24px; letter-spacing: .06em; user-select: all; overflow-wrap: anywhere; }

/* Bouton clair / sombre */
.mw-toggle {
  position: relative; display: inline-flex; align-items: center; flex: none; width: 64px; height: 32px; padding: 0;
  border-radius: var(--radius-pill); border: 2px solid var(--ink); background: var(--paper); color: var(--paper); cursor: pointer;
  transition: box-shadow .25s ease, background-color .25s ease;
}
.mw-toggle-knob {
  position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center; transition: transform .25s ease;
}
.mw-toggle-knob .mw-icon { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity .2s ease, transform .3s ease; }
.mw-toggle-knob .mw-icon-moon { fill: currentColor; stroke: none; opacity: 0; transform: rotate(-60deg); }
:root[data-theme="dark"] .mw-toggle-knob { transform: translateX(32px); }
:root[data-theme="dark"] .mw-toggle-knob .mw-icon-sun { opacity: 0; transform: rotate(60deg); }
:root[data-theme="dark"] .mw-toggle-knob .mw-icon-moon { opacity: 1; transform: none; }
.mw-toggle-floating { position: fixed; right: var(--space-4); bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); z-index: 90; padding: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); box-shadow: var(--shadow-pop); }

/* Motif des rayures de la cravate : décor de bandeau, jamais sous du texte */
.mw-stripes { background-image: repeating-linear-gradient(-27deg, var(--red) 0 8px, transparent 8px 16px); }

/* 9. Effets lumineux (désactivables dans Magik Wood → Apparence) */
.mw-glow-on .mw-btn-primary:hover, .mw-glow-on .wp-block-button__link:hover, .mw-glow-on input[type="submit"]:hover,
.mw-glow-on .mw-btn-glow .elementor-button:hover { box-shadow: var(--glow-red); transform: translateY(-1px); }
.mw-glow-on .mw-btn-primary:active { transform: none; box-shadow: none; }
.mw-glow-on .mw-btn-primary::after, .mw-glow-on .wp-block-button__link::after, .mw-glow-on .mw-btn-glow .elementor-button::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .7s ease;
}
.mw-glow-on .mw-btn-glow .elementor-button { position: relative; overflow: hidden; isolation: isolate; transition: box-shadow .25s ease, transform .25s ease; }
.mw-glow-on .mw-btn-primary:hover::after, .mw-glow-on .wp-block-button__link:hover::after, .mw-glow-on .mw-btn-glow .elementor-button:hover::after { transform: translateX(130%); }
.mw-glow-on .mw-btn-secondary:hover { box-shadow: var(--glow-red-soft); }
.mw-glow-on .mw-btn-pulse, .mw-glow-on .mw-btn-pulse-el .elementor-button { animation: mw-pulse 2.4s ease-out infinite; overflow: visible; }
.mw-glow-on .mw-btn-pulse::after { display: none; }
.mw-glow-on .mw-btn-pulse:hover, .mw-glow-on .mw-btn-pulse-el .elementor-button:hover { animation: none; }
.mw-glow-on .mw-toggle:hover { box-shadow: var(--glow-red); }

.mw-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.mw-glow-on .mw-card:hover { box-shadow: var(--shadow-card), var(--glow-red-soft); border-color: var(--red-ui); }
.mw-glow-on .mw-card::before, .mw-glow-on .mw-glow-inner::before, .mw-glow-on .mw-spotlight::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), var(--red-glow), transparent 65%);
  opacity: 0; transition: opacity .3s ease;
}
.mw-spotlight { position: relative; isolation: isolate; }
.mw-glow-on .mw-card:hover::before, .mw-glow-on .mw-glow-inner:hover::before, .mw-glow-on .mw-spotlight:hover::before { opacity: 1; }

/* Cadre lumineux : ajoutez « mw-glow » au conteneur extérieur et « mw-glow-inner » au conteneur intérieur */
@property --mw-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.mw-glow { position: relative; isolation: isolate; padding: 2px !important; border-radius: var(--radius-lg); }
.mw-glow-md { border-radius: var(--radius-md); }
.mw-glow::before, .mw-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--mw-angle), var(--line) 0deg 190deg, var(--red) 290deg, var(--line) 360deg);
}
.mw-glow::before { z-index: -1; }
.mw-glow::after { z-index: -2; filter: blur(18px); opacity: .55; }
.mw-glow-on .mw-glow::before, .mw-glow-on .mw-glow::after { animation: mw-spin 5s linear infinite; }
.mw-glow-off .mw-glow::after { display: none; }
.mw-glow-inner { position: relative; height: 100%; background: var(--surface); color: var(--ink); border-radius: calc(var(--radius-lg) - 2px); }
.mw-glow-md > .mw-glow-inner { border-radius: calc(var(--radius-md) - 2px); }

@keyframes mw-spin { to { --mw-angle: 360deg; } }
@keyframes mw-pulse { 0% { box-shadow: 0 0 0 0 var(--pulse-color); } 70% { box-shadow: 0 0 0 16px var(--pulse-clear); } 100% { box-shadow: 0 0 0 0 var(--pulse-clear); } }
@keyframes mw-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* 10. Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .mw-card:hover, .mw-btn:hover, .mw-btn-primary:hover { transform: none !important; }
  .mw-btn-primary::after, .wp-block-button__link::after, .mw-btn-glow .elementor-button::after { display: none !important; }
  .mw-btn-pulse, .mw-btn-pulse-el .elementor-button, .mw-badge-live::before, .mw-glow::before, .mw-glow::after { animation: none !important; }
  .mw-glow::before, .mw-glow::after { --mw-angle: 45deg; }
  .mw-card:hover .mw-card-media img { transform: none; }
}

/* Plugin « Licences Logiciels » : clés, espace client, téléchargement */
.ll-order-keys { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink); }
.ll-order-keys code, .ll-lic code {
  display: inline-block; font-family: var(--font-mono) !important; font-weight: 500 !important; letter-spacing: .06em !important;
  background: var(--surface-alt); color: var(--ink); padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.ll-lic { background: var(--surface); border-color: var(--line) !important; border-radius: var(--radius-md) !important; color: var(--ink); transition: box-shadow .25s ease, border-color .25s ease; }
.mw-glow-on .ll-lic:hover { border-color: var(--red-ui) !important; box-shadow: var(--glow-red-soft); }
.ll-lic h3 { font-family: var(--font-display); }
.ll-lic small { color: var(--ink-muted); opacity: 1 !important; }
.ll-pc { border-top-color: var(--line) !important; }
.ll-off { color: var(--danger) !important; }
.ll-notice { padding: var(--space-3) var(--space-4); border-left: 4px solid var(--success); background: var(--surface-alt); border-radius: var(--radius-sm); }
.ll-download { background: var(--red-ui) !important; border-color: var(--red-ui) !important; color: var(--on-red) !important; border-radius: var(--radius-md) !important; font-weight: 700; }
.ll-download-meta { color: var(--ink-muted); opacity: 1 !important; }

/* 11. Page de maintenance */
.mw-maint { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6) var(--space-4); text-align: center; }
.mw-maint-box { max-width: 560px; }
body .mw-maint img.mw-logo-img { height: 36px; margin: 0 auto var(--space-8); }
.mw-maint-timer { display: flex; justify-content: center; gap: var(--space-3); margin: var(--space-8) 0; font-variant-numeric: tabular-nums; }
.mw-maint-timer div { min-width: 72px; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.mw-maint-timer strong { display: block; font-family: var(--font-display); font-size: 32px; line-height: 36px; color: var(--ink); }
.mw-maint-timer span { font-size: 13px; color: var(--ink-muted); }
.mw-maint .mw-social { justify-content: center; }
