/* ════════════════════════════════════════════════════════════════════
   _shared/css/mcw_chrome.css · v4
   ════════════════════════════════════════════════════════════════════
   Design system écosystème MCW : header, drawer, contenu app, footer.
   Le CSS REMPLACE les chromes custom des apps — pas un ajout en plus.
   Couleur d'accent par sous-marque via classe sur <body>.
   ════════════════════════════════════════════════════════════════════ */

:root {
    /* Neutres */
    --eco-bg-page:    #FAFAF7;
    --eco-bg-card:    #FFFFFF;
    --eco-bg-soft:    #F4F2EC;
    --eco-line:       #E8E5DC;
    --eco-line-soft:  #F0EEE6;
    --eco-footer-bg:  #1A1F2E;
    --eco-footer-fg:  #C9CCD4;
    --eco-footer-fg-strong: #FFFFFF;
    --eco-footer-line: #2E3548;

    --eco-ink:       #1A1F2E;
    --eco-ink-soft:  #5A5E6B;
    --eco-ink-muted: #9A9FAB;

    /* Accents */
    --eco-vucko:      #3D6BB5;
    --eco-artdevivre: #4F8C66;
    --eco-vallejo:    #C56F2C;
    --eco-accent: var(--eco-ink);

    /* Typo */
    --eco-font-serif: 'Cormorant Garamond', Georgia, serif;
    --eco-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --eco-font-mono:  'DM Mono', ui-monospace, monospace;

    /* Espacements */
    --eco-s-1: 4px; --eco-s-2: 8px; --eco-s-3: 12px; --eco-s-4: 16px;
    --eco-s-5: 24px; --eco-s-6: 32px; --eco-s-7: 48px; --eco-s-8: 64px;

    /* Radius */
    --eco-r-sm: 6px; --eco-r: 10px; --eco-r-lg: 14px; --eco-r-pill: 999px;
}

.mcw-eco-brand-vucko      { --eco-accent: var(--eco-vucko); }
.mcw-eco-brand-artdevivre { --eco-accent: var(--eco-artdevivre); }
.mcw-eco-brand-vallejo    { --eco-accent: var(--eco-vallejo); }

/* ─── Body de base (uniforme partout) ─────────────────────────────── */
body[class*="mcw-eco-brand-"] {
    margin: 0;
    padding: 0;
    font-family: var(--eco-font-sans);
    font-size: 16px;
    line-height: 1.55;
    background: var(--eco-bg-page);
    color: var(--eco-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════ */
.eco-header {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 var(--eco-s-5);
    background: var(--eco-bg-page);
    border-bottom: 1px solid var(--eco-line);
    font-family: var(--eco-font-sans);
    color: var(--eco-ink);
}
.eco-header__burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: transparent; border: 0; cursor: pointer;
    border-radius: var(--eco-r-sm); color: var(--eco-ink);
    margin-right: var(--eco-s-2);
    padding: 0;
    flex-shrink: 0;
}
.eco-header__burger:hover { background: rgba(0,0,0,0.04); }
.eco-header__burger:focus-visible { outline: 2px solid var(--eco-accent); outline-offset: 2px; }
.eco-header__burger svg { width: 28px; height: 28px; display: block; }

.eco-header__title {
    display: flex; align-items: center; gap: var(--eco-s-3);
    text-decoration: none; color: var(--eco-ink);
    flex: 1; min-width: 0;
}
.eco-header__title .applogo {
    width: 32px; height: 32px;
    border-radius: var(--eco-r-sm);
    object-fit: contain;
    background: var(--eco-bg-card);
    border: 1px solid var(--eco-line);
    padding: 3px;
    flex-shrink: 0;
}
.eco-header__title .text {
    display: flex; flex-direction: column;
    min-width: 0;
}
.eco-header__title .name {
    font-family: var(--eco-font-serif);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--eco-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eco-header__title .name em { font-style: italic; color: var(--eco-accent); }
.eco-header__title .sub {
    font-family: var(--eco-font-mono);
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--eco-accent);
}

.eco-header__me {
    display: flex; align-items: center; gap: var(--eco-s-2);
    color: var(--eco-ink); text-decoration: none;
    font-weight: 500; font-size: 14px;
    padding: 6px 10px;
    border-radius: var(--eco-r-pill);
    transition: background 0.15s;
}
.eco-header__me:hover { background: rgba(0,0,0,0.04); }
.eco-header__me .avatar-logo {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #FFF;
    border: 1px solid var(--eco-line);
    padding: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.eco-accent {
    height: 3px; width: 100%;
    background: var(--eco-accent);
}

/* ════════════════════════════════════════════════════════════════════
   DRAWER (menu burger)
   ════════════════════════════════════════════════════════════════════ */
.mcw-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(26,31,46,0);
    pointer-events: none;
    transition: background 0.25s ease;
    z-index: 50;
}
.mcw-drawer-open .mcw-drawer-backdrop {
    background: rgba(26,31,46,0.45);
    pointer-events: auto;
}
/* ─── Drawer éditorial premium ─────────────────────────────── */
.mcw-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 340px;
    max-width: 88%;
    background: #FAFAF7;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.85, 0.3, 1);
    box-shadow: 4px 0 32px rgba(26,31,46,0.18);
    z-index: 60;
    display: flex;
    flex-direction: column;
    font-family: var(--eco-font-sans);
    overflow-y: auto;
}
.mcw-drawer-open .mcw-drawer { transform: translateX(0); }
.mcw-drawer__head {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 28px 24px 22px;
    border-bottom: 1px solid var(--eco-line);
}
.mcw-drawer__head-title {
    display: flex; align-items: center; gap: 14px; min-width: 0;
}
.mcw-drawer__brand-logo {
    width: 40px; height: 40px;
    object-fit: contain;
    border-radius: var(--eco-r-sm);
    flex-shrink: 0;
}
.mcw-drawer__title {
    font-family: var(--eco-font-serif);
    font-size: 22px; font-weight: 500;
    margin: 0; color: var(--eco-ink);
    line-height: 1.15;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcw-drawer__close {
    width: 32px; height: 32px;
    background: transparent; border: 0; cursor: pointer;
    color: var(--eco-ink-muted); border-radius: 50%;
    font-size: 0; line-height: 0;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.mcw-drawer__close::before {
    content: '×';
    font-family: var(--eco-font-serif);
    font-size: 24px; font-weight: 300;
    line-height: 1;
}
.mcw-drawer__close:hover { color: var(--eco-ink); background: rgba(26,31,46,0.05); }

.mcw-drawer__section { padding: 22px 24px 8px; }
.mcw-drawer__label {
    font-family: var(--eco-font-mono);
    font-size: 10px; letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--eco-ink-muted);
    margin: 0 0 14px;
    font-weight: 500;
}
.mcw-drawer__label--accent { color: var(--eco-accent); }

.mcw-drawer__nav {
    display: flex; flex-direction: column;
    margin: 0; padding: 0;
    list-style: none;
}
.mcw-drawer__nav li { margin: 0; position: relative; }
/* (2026-06-30) Sous-titre de groupe dans le menu app (additif) */
.mcw-drawer__nav li.mcw-drawer__subhead {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--eco-muted, #9a948a);
    padding: 12px 4px 4px; margin-top: 2px;
}
.mcw-drawer__nav li.mcw-drawer__subhead:first-child { padding-top: 2px; }
/* (2026-06-30) Barre de navigation mobile (bas) — <768px, opt-in par app via mcw_eco_bottomnav() */
.mcw-bottomnav, .mcw-bottomnav-spacer { display: none; }
@media (max-width: 767px) {
  .mcw-bottomnav-spacer { display: block; height: 62px; }
  .mcw-bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(255,255,255,0.97);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--eco-line, #E8DFCE);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mcw-bottomnav__tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--eco-muted, #8a8a80); font-size: 9.5px; padding: 4px 2px;
  }
  .mcw-bottomnav__tab .ic { font-size: 19px; line-height: 1; }
  .mcw-bottomnav__tab.is-active { color: var(--eco-accent, #1F3D32); font-weight: 600; }
}
.mcw-drawer__nav a {
    display: block;
    padding: 11px 0 11px 14px;
    color: var(--eco-ink);
    text-decoration: none;
    font-family: var(--eco-font-serif);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
    border-left: 1px solid transparent;
    transition: padding-left 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.mcw-drawer__nav a:hover {
    padding-left: 20px;
    color: var(--eco-accent);
    border-left-color: var(--eco-accent);
}
.mcw-drawer__nav a.is-active {
    color: var(--eco-accent);
    font-style: italic;
    font-weight: 500;
    border-left-color: var(--eco-accent);
}
.mcw-drawer__sep {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--eco-line) 20%, var(--eco-line) 80%, transparent);
    margin: 14px 24px;
}
.mcw-drawer__footer {
    margin-top: auto;
    padding: 22px 24px 24px;
    border-top: 1px solid var(--eco-line);
    font-family: var(--eco-font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: var(--eco-ink-soft);
    background: transparent;
    letter-spacing: 0;
}

/* ════════════════════════════════════════════════════════════════════
   CONTENU APP — composants partagés (opt-in via classes .eco-*)
   ════════════════════════════════════════════════════════════════════ */
body[class*="mcw-eco-brand-"] .eco-content {
    background: var(--eco-bg-page);
    padding: var(--eco-s-8) var(--eco-s-6) var(--eco-s-8);
}
body[class*="mcw-eco-brand-"] .eco-wrap {
    max-width: 980px; margin: 0 auto;
}
body[class*="mcw-eco-brand-"] .eco-section + .eco-section {
    margin-top: var(--eco-s-8);
}

body[class*="mcw-eco-brand-"] .eco-eyebrow {
    font-family: var(--eco-font-mono);
    font-size: 11px; letter-spacing: 0.22em;
    text-transform: uppercase;
    display: block; margin-bottom: var(--eco-s-3);
    color: var(--eco-accent);
}

body[class*="mcw-eco-brand-"] h1.eco,
body[class*="mcw-eco-brand-"] h2.eco,
body[class*="mcw-eco-brand-"] h3.eco {
    font-family: var(--eco-font-serif);
    font-weight: 500;
    line-height: 1.1;
    color: var(--eco-ink);
    margin: 0 0 var(--eco-s-4);
}
body[class*="mcw-eco-brand-"] h1.eco { font-size: clamp(36px, 5vw, 52px); }
body[class*="mcw-eco-brand-"] h2.eco { font-size: clamp(26px, 3.5vw, 36px); }
body[class*="mcw-eco-brand-"] h3.eco { font-size: clamp(20px, 2.4vw, 24px); }
body[class*="mcw-eco-brand-"] h1.eco em,
body[class*="mcw-eco-brand-"] h2.eco em,
body[class*="mcw-eco-brand-"] h3.eco em {
    font-style: italic;
    color: var(--eco-accent);
}

body[class*="mcw-eco-brand-"] .eco-lead {
    font-size: clamp(16px, 1.6vw, 18px);
    color: var(--eco-ink-soft);
    max-width: 680px;
    margin: 0 0 var(--eco-s-5);
}

body[class*="mcw-eco-brand-"] .eco-meta {
    font-family: var(--eco-font-mono);
    font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--eco-ink-muted);
    margin: var(--eco-s-3) 0 0;
}

/* Boutons */
body[class*="mcw-eco-brand-"] .eco-btn,
body[class*="mcw-eco-brand-"] a.eco-btn,
body[class*="mcw-eco-brand-"] button.eco-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--eco-ink);
    color: #FFF;
    font-family: var(--eco-font-sans);
    font-weight: 600;
    font-size: 14px;
    border: 0;
    border-radius: var(--eco-r-pill);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}
body[class*="mcw-eco-brand-"] .eco-btn:hover,
body[class*="mcw-eco-brand-"] a.eco-btn:hover,
body[class*="mcw-eco-brand-"] button.eco-btn:hover {
    background: var(--eco-accent);
    color: #FFF;
}
body[class*="mcw-eco-brand-"] .eco-btn-ghost {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: var(--eco-ink);
    font-family: var(--eco-font-sans);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--eco-ink);
    border-radius: var(--eco-r-pill);
    cursor: pointer;
    text-decoration: none;
}

/* Cards */
body[class*="mcw-eco-brand-"] .eco-card {
    background: var(--eco-bg-card);
    border: 1px solid var(--eco-line);
    border-radius: var(--eco-r-lg);
    padding: var(--eco-s-5);
    transition: border-color 0.15s, transform 0.15s;
}
body[class*="mcw-eco-brand-"] .eco-card:hover {
    transform: translateY(-2px);
    border-color: var(--eco-accent);
}
body[class*="mcw-eco-brand-"] .eco-card__num {
    font-family: var(--eco-font-mono);
    font-size: 11px; letter-spacing: 0.2em;
    color: var(--eco-ink-muted);
    display: block; margin-bottom: var(--eco-s-2);
}
body[class*="mcw-eco-brand-"] .eco-card__title {
    font-family: var(--eco-font-serif);
    font-size: 21px; font-weight: 500;
    margin: 0 0 var(--eco-s-2);
    color: var(--eco-ink);
}
body[class*="mcw-eco-brand-"] .eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--eco-s-4);
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */
.eco-footer {
    background: var(--eco-footer-bg);
    color: var(--eco-footer-fg);
    padding: var(--eco-s-6) var(--eco-s-6) var(--eco-s-5);
    font-size: 13px;
    font-family: var(--eco-font-sans);
    line-height: 1.55;
}
.eco-footer__wrap { max-width: 980px; margin: 0 auto; }
.eco-footer__brand {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: var(--eco-s-4);
    flex-wrap: wrap;
}
.eco-footer__brand .logo {
    width: 28px; height: 28px;
    object-fit: contain;
    background: #FFF;
    border-radius: var(--eco-r-sm);
    padding: 3px;
    flex-shrink: 0;
}
.eco-footer__brand .title {
    font-family: var(--eco-font-serif);
    font-size: 20px; font-weight: 500;
    color: var(--eco-footer-fg-strong);
}
.eco-footer__brand .title .sep {
    margin: 0 8px;
    color: var(--eco-ink-muted);
}
.eco-footer__brand .title .brand-name {
    color: var(--eco-accent);
}
.eco-footer__nav {
    display: flex; gap: var(--eco-s-5);
    flex-wrap: wrap;
    margin-bottom: var(--eco-s-4);
}
.eco-footer__nav a {
    color: var(--eco-footer-fg);
    text-decoration: none;
}
.eco-footer__nav a:hover {
    color: var(--eco-footer-fg-strong);
    text-decoration: underline;
}
.eco-footer__tiny {
    border-top: 1px solid var(--eco-footer-line);
    padding-top: var(--eco-s-3);
    font-family: var(--eco-font-mono);
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--eco-ink-muted);
}

/* ─── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .eco-header__burger,
    .eco-header__me,
    .mcw-drawer,
    .mcw-drawer-backdrop,
    .mcw-drawer__nav a,
    .eco-card,
    .eco-btn { transition: none; }
}

/* ─── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .eco-header { padding: 0 var(--eco-s-3); }
    .eco-header__title .sub { display: none; }
    .eco-header__me .me-text { display: none; }
    .eco-footer { padding: var(--eco-s-5) var(--eco-s-4) var(--eco-s-4); }
    .eco-footer__nav { gap: var(--eco-s-3); }
}

/* ─── Skip-link accessibilité (visually-hidden par défaut) ──────────
   Ajouté 2026-05-27. Tout HTML utilisant <a class="skip-link"> aura
   un lien d'accessibilité caché visuellement mais visible au focus
   clavier (Tab). Bénéfice pour TOUTES les apps de l'écosystème. */
.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus,
.skip-link:focus-visible {
    position: fixed;
    left: 8px;
    top: 8px;
    width: auto;
    height: auto;
    z-index: 9999;
    padding: 10px 16px;
    background: var(--eco-ink, #1A1F2E);
    color: #FFFFFF;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ─── Badge Beta (inline dans le nom de l'app) ─────────────────────── */
.eco-beta-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 7px;
    padding: 1px 7px;
    font-size: 10px;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #92600A;
    background: #FEF3C7;
    border: 1px solid #F59E0B55;
    border-radius: 99px;
    line-height: 1.6;
    vertical-align: middle;
    white-space: nowrap;
}

/* ─── Bandeau Beta (sous le header) ────────────────────────────────── */
.eco-beta-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 20px;
    background: #FFFBEB;
    border-bottom: 1px solid #F59E0B40;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #78350F;
    text-align: center;
    line-height: 1.4;
}
.eco-beta-banner__text {
    flex-shrink: 1;
}
.eco-beta-banner__cta {
    display: inline-block;
    flex-shrink: 0;
    padding: 4px 13px;
    font-size: 12px;
    font-weight: 500;
    color: #92600A;
    background: #FEF3C7;
    border: 1px solid #F59E0B80;
    border-radius: 99px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.eco-beta-banner__cta:hover {
    background: #FDE68A;
    border-color: #F59E0B;
}

@media (prefers-reduced-motion: reduce) {
    .eco-beta-banner__cta { transition: none; }
}
