/* ════════════════════════════════════════════════════════════════════
   _shared/css/mcw_app_base.css
   ════════════════════════════════════════════════════════════════════
   Look de base écosystème MCW (extrait de PQT). À charger APRÈS le
   CSS propre de l'app pour pouvoir surcharger les styles génériques
   (body, h1..h4, em, a, p). Les styles plus spécifiques de l'app
   (ex: `.topbar h1`, `.card-title`) restent inchangés.

   Activé via la classe `mcw-eco-brand-*` sur <body>. Les valeurs de
   couleur (--mcw-bg, --mcw-accent...) viennent de tokens.css +
   brand-*.css, chargés en amont.
   ════════════════════════════════════════════════════════════════════ */

/* ─── Body ────────────────────────────────────────────────────────── */
body[class*="mcw-eco-brand-"] {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.55;
    background: #FAFAF7;           /* fond uniforme identique sur toutes les apps */
    color: #1A1F2E;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Titres ──────────────────────────────────────────────────────── */
body[class*="mcw-eco-brand-"] h1,
body[class*="mcw-eco-brand-"] h2,
body[class*="mcw-eco-brand-"] h3,
body[class*="mcw-eco-brand-"] h4 {
    font-family: 'Cormorant Garamond', 'EB Garamond', 'Fraunces', Georgia, serif;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--mcw-ink, #1A1F2E);
    margin: 0 0 0.5em;
}
body[class*="mcw-eco-brand-"] h1 { font-size: clamp(36px, 5.5vw, 64px); }
body[class*="mcw-eco-brand-"] h2 { font-size: clamp(26px, 3.8vw, 40px); }
body[class*="mcw-eco-brand-"] h3 { font-size: clamp(20px, 2.4vw, 26px); }
body[class*="mcw-eco-brand-"] h4 { font-size: 18px; font-weight: 600; }

body[class*="mcw-eco-brand-"] em {
    font-style: italic;
    color: var(--mcw-eco-accent);
    font-weight: 500;
}

body[class*="mcw-eco-brand-"] p { margin: 0 0 1em; }

/* Ne s'applique QU'AUX liens dans les zones .eco-* (pas aux boutons
   custom des apps existantes, qui gardent leur look propre) */
body[class*="mcw-eco-brand-"] .eco-wrap a:not(.eco-btn),
body[class*="mcw-eco-brand-"] .eco-section a:not(.eco-btn) {
    color: var(--mcw-eco-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
body[class*="mcw-eco-brand-"] .eco-wrap a:not(.eco-btn):hover,
body[class*="mcw-eco-brand-"] .eco-section a:not(.eco-btn):hover {
    border-bottom-color: var(--mcw-eco-accent);
}

/* ─── Layout général ──────────────────────────────────────────────── */
body[class*="mcw-eco-brand-"] .eco-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}
body[class*="mcw-eco-brand-"] .eco-section {
    padding: clamp(48px, 8vw, 100px) 0;
}
body[class*="mcw-eco-brand-"] .eco-section + .eco-section {
    border-top: 1px solid var(--mcw-line-soft, var(--mcw-line));
}

/* ─── Signature mono (eyebrows) ───────────────────────────────────── */
body[class*="mcw-eco-brand-"] .signature-mono {
    font-family: 'DM Mono', 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mcw-eco-accent-deep, var(--mcw-eco-accent));
}

/* ─── Lead text ───────────────────────────────────────────────────── */
body[class*="mcw-eco-brand-"] .eco-lead {
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.55;
    color: var(--mcw-ink-soft, #4A4F60);
    max-width: 720px;
}

/* ─── Cards ───────────────────────────────────────────────────────── */
body[class*="mcw-eco-brand-"] .eco-card {
    background: var(--mcw-surface, #FFF);
    border: 1px solid var(--mcw-line-soft, var(--mcw-line));
    border-radius: 12px;
    padding: clamp(20px, 3vw, 32px);
}
body[class*="mcw-eco-brand-"] .eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

/* ─── CTA (priorité haute sur la règle générique `a`) ────────────── */
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: 14px 28px;
    background: var(--mcw-eco-accent);
    color: #FFFFFF;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 15px;
    border: 0;
    border-bottom: 0;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: background .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(--mcw-eco-accent-deep, var(--mcw-eco-accent));
    color: #FFFFFF;
    border-bottom: 0;
}

/* ─── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    body[class*="mcw-eco-brand-"] a,
    body[class*="mcw-eco-brand-"] .eco-btn { transition: none; }
}
