/* ============================================
   M-DIAG — Design System Modern
   ============================================ */

:root {
    /* Primaire — vert M-diag (identité de marque) */
    --md-primary: #16A34A;
    --md-primary-dark: #15803D;
    --md-primary-darker: #166534;
    --md-primary-light: #D1FAE0;
    --md-primary-50: #F0FDF4;

    /* Accent orange — réservé aux CTA principaux (action) */
    --md-accent: #EA580C;
    --md-accent-dark: #C2410C;
    --md-accent-light: #FED7AA;
    --md-accent-50: #FFF7ED;

    /* Eco = primaire (alias pour les composants métier DPE/énergie) */
    --md-eco: #16A34A;
    --md-eco-dark: #15803D;
    --md-eco-darker: #166534;
    --md-eco-light: #D1FAE0;
    --md-eco-50: #F0FDF4;

    /* Compat */
    --md-fluo: #4ADE80;
    --md-fluo-bright: #22DD7A;

    --md-dark: #1A202C;
    --md-text: #2D3748;
    --md-text-muted: #718096;
    --md-border: #E2E8F0;
    --md-border-strong: #CBD5E0;
    --md-bg: #FFFFFF;
    --md-bg-alt: #F7FAFC;
    --md-bg-soft: #EDF2F7;
    --md-success: #38A169;
    --md-danger: #E53E3E;
    --md-info: #3182CE;
    --md-warning: #DD6B20;

    /* Radius — angles plus institutionnels */
    --md-radius: 6px;
    --md-radius-sm: 4px;
    --md-radius-lg: 10px;

    --md-shadow-sm: 0 1px 2px rgba(26, 32, 44, 0.04);
    --md-shadow: 0 4px 6px -1px rgba(26, 32, 44, 0.08), 0 2px 4px -2px rgba(26, 32, 44, 0.04);
    --md-shadow-lg: 0 10px 15px -3px rgba(26, 32, 44, 0.08), 0 4px 6px -4px rgba(26, 32, 44, 0.04);

    --md-font: 'Inter', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --md-font-display: 'IBM Plex Sans', 'Inter', sans-serif;
}

/* Reset & base */
.md-page,
.md-page * {
    box-sizing: border-box;
}

.md-page {
    font-family: var(--md-font);
    color: var(--md-text);
    background: var(--md-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

.md-page h1, .md-page h2, .md-page h3, .md-page h4, .md-page h5, .md-page h6 {
    font-family: var(--md-font-display);
    color: var(--md-dark);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

.md-page h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); letter-spacing: -0.02em; }

.md-highlight {
    position: relative;
    display: inline-block;
    color: var(--md-primary-darker);
    z-index: 1;
}
.md-highlight::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 4px;
    background: var(--md-primary);
    border-radius: 2px;
}
.md-page h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); letter-spacing: -0.01em; }
.md-page h3 { font-size: 1.375rem; }
.md-page h4 { font-size: 1.125rem; }

.md-page p { margin: 0 0 1rem; }
.md-page a { color: var(--md-primary); text-decoration: none; transition: color 0.15s; }
.md-page a:hover,
.md-page a:focus,
.md-page a:active { color: var(--md-primary-dark); text-decoration: none; }
.md-page .md-prose a { text-decoration: underline; }
.md-page .md-prose a:hover { text-decoration: none; color: var(--md-primary-dark); }

/* Container */
.md-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============ HEADER ============ */
.md-header {
    background: white;
    border-bottom: 1px solid var(--md-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--md-shadow-sm);
}

.md-topbar {
    background: var(--md-dark);
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.md-topbar a { color: white; }
.md-topbar a:hover { color: var(--md-primary-light); text-decoration: none; }

.md-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.md-topbar-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.md-topbar-info span { display: inline-flex; align-items: center; gap: 0.4rem; }

.md-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.md-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}
.md-logo:hover { text-decoration: none; }
.md-logo-img {
    height: 64px;
    width: auto;
    display: block;
    object-fit: contain;
}
.md-logo-img-footer {
    height: 72px;
    width: auto;
    display: block;
    object-fit: contain;
}
@media (max-width: 600px) { .md-logo-img { height: 56px; } }

.md-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.md-nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    margin: 0; padding: 0;
}

.md-nav-links a {
    color: var(--md-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
}

.md-nav-links a:hover { color: var(--md-primary); text-decoration: none; }
.md-nav-links a.active { color: var(--md-primary); }
.md-nav-links a.active::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
    height: 2px; background: var(--md-primary); border-radius: 2px;
}

.md-nav-item-mega { position: relative; }
.md-mega-menu {
    position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
    background: white;
    border-radius: var(--md-radius-lg);
    box-shadow: var(--md-shadow-lg);
    border: 1px solid var(--md-border);
    padding: 1.5rem 2rem;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}
.md-mega-menu::before {
    content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 16px; height: 16px; background: white;
    border-top: 1px solid var(--md-border); border-left: 1px solid var(--md-border);
}
.md-nav-item-mega:hover .md-mega-menu,
.md-nav-item-mega:focus-within .md-mega-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.md-mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.md-mega-title { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--md-text-muted); margin-bottom: 0.75rem; font-weight: 700; }
.md-mega-menu ul { list-style: none; padding: 0; margin: 0; }
.md-mega-menu ul li a { display: block; padding: 0.4rem 0; color: var(--md-text); font-size: 0.92rem; font-weight: 500; }
.md-mega-menu ul li a { transition: color 0.15s, padding-left 0.15s; }
.md-mega-menu ul li a:hover { color: var(--md-primary); padding-left: 4px; text-decoration: none; }
.md-nav-mega-trigger { cursor: pointer; }
@media (max-width: 991px) {
    .md-mega-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0.5rem 0 0.5rem 1rem; min-width: 0; background: transparent; }
    .md-mega-menu::before { display: none; }
    .md-mega-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ============ BUTTONS — Premium System ============ */
.md-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 0;
    white-space: nowrap;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
    position: relative;
    user-select: none;
    font-family: var(--md-font);
    text-align: center;
    visibility: visible;
    opacity: 1;
    text-indent: 0;
    overflow: visible;
    text-shadow: none;
    text-transform: none;
}
.md-btn:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}
.md-btn:active { transform: scale(0.98); }
.md-btn svg { width: 18px; height: 18px; }

/* Primary — vert M-diag (identité) */
.md-btn-primary {
    background: linear-gradient(180deg, #1AAE51 0%, var(--md-primary) 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.08);
}
.md-btn-primary:hover {
    background: linear-gradient(180deg, var(--md-primary) 0%, var(--md-primary-dark) 100%);
    color: #FFFFFF !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 4px 14px rgba(22, 163, 74, 0.32);
    transform: translateY(-1px);
}
.md-btn-primary:active {
    transform: translateY(0);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Accent orange — pour CTA exceptionnel (urgence, conversion forte) */
.md-btn-accent {
    background: linear-gradient(180deg, #F2691A 0%, var(--md-accent) 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.08);
}
.md-btn-accent:hover {
    background: linear-gradient(180deg, var(--md-accent) 0%, var(--md-accent-dark) 100%);
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.32);
    transform: translateY(-1px);
}

/* Secondary — neutral, professional */
.md-btn-secondary {
    background: white;
    color: var(--md-dark) !important;
    box-shadow:
        inset 0 0 0 1px var(--md-border-strong),
        0 1px 2px rgba(0, 0, 0, 0.04);
}
.md-btn-secondary:hover {
    background: var(--md-bg-alt);
    color: var(--md-dark) !important;
    box-shadow:
        inset 0 0 0 1px var(--md-text-muted),
        0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* Outline — navy border, white bg (action secondaire / téléphone) */
.md-btn-outline {
    background: white;
    color: var(--md-primary) !important;
    box-shadow: inset 0 0 0 1.5px var(--md-primary);
}
.md-btn-outline:hover {
    background: var(--md-primary-50);
    color: var(--md-primary-dark) !important;
    box-shadow: inset 0 0 0 1.5px var(--md-primary-dark);
    transform: translateY(-1px);
}

/* Dark — for dark backgrounds */
.md-btn-dark {
    background: linear-gradient(180deg, #2D3748 0%, var(--md-dark) 100%);
    color: #FFFFFF !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.12);
}
.md-btn-dark:hover {
    background: linear-gradient(180deg, var(--md-dark) 0%, #000 100%);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Ghost — minimal, for tertiary actions */
.md-btn-ghost {
    background: transparent;
    color: var(--md-text) !important;
}
.md-btn-ghost:hover {
    background: var(--md-bg-alt);
    color: var(--md-dark) !important;
}

/* Sizes */
.md-btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; border-radius: 8px; }
.md-btn-sm svg { width: 14px; height: 14px; }
.md-btn-lg { padding: 0.95rem 1.85rem; font-size: 1rem; border-radius: 12px; }
.md-btn-lg svg { width: 20px; height: 20px; }
.md-btn-xl { padding: 1.1rem 2.25rem; font-size: 1.05rem; border-radius: 14px; font-weight: 700; }
.md-btn-xl svg { width: 22px; height: 22px; }

.md-btn-block { display: flex; width: 100%; }
.md-btn-icon { padding-left: 0.85rem; padding-right: 0.85rem; }
.md-btn-icon svg { width: 18px; height: 18px; }

/* Button group */
.md-btn-group { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }

/* ============ MOBILE TOGGLE (Hamburger animé) ============ */
.md-mobile-toggle {
    display: none;
    background: none; border: 0;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    z-index: 110;
    position: relative;
}
.md-mobile-toggle:hover { background: var(--md-bg-alt); }
.md-hamburger {
    width: 22px; height: 16px;
    position: relative;
    display: block;
}
.md-hamburger span {
    position: absolute; left: 0;
    width: 22px; height: 2px;
    background: var(--md-dark);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.md-hamburger span:nth-child(1) { top: 0; }
.md-hamburger span:nth-child(2) { top: 7px; }
.md-hamburger span:nth-child(3) { top: 14px; }

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

.md-mobile-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 105;
    opacity: 0;
    transition: opacity 0.3s;
}
.md-mobile-backdrop.is-active { display: block; opacity: 1; }

@media (max-width: 991px) {
    .md-mobile-toggle { display: flex; }

    .md-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 88vw; max-width: 380px;
        height: 100vh; height: 100dvh;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(15, 23, 42, 0.15);
        overflow-y: auto;
        z-index: 108;
        -webkit-overflow-scrolling: touch;
    }
    .md-nav.open { right: 0; }
    body.md-no-scroll { overflow: hidden; }

    /* Drawer header (logo + close) */
    .md-nav::before {
        content: '';
        display: block;
        height: 80px;
        flex-shrink: 0;
        background: var(--md-dark);
    }
    .md-nav-drawer-head {
        position: absolute; top: 0; left: 0; right: 0;
        height: 80px;
        display: flex; align-items: center; justify-content: space-between;
        padding: 0 1.25rem;
        z-index: 2;
    }

    /* Liens */
    .md-nav-links {
        list-style: none;
        margin: 0;
        padding: 0.5rem 0;
        flex-direction: column;
        gap: 0;
        flex: 1;
    }
    .md-nav-links > li {
        border-bottom: 1px solid var(--md-bg-alt);
    }
    .md-nav-links > li > a {
        display: flex; align-items: center; justify-content: space-between;
        padding: 1.05rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        color: var(--md-dark);
        text-decoration: none;
        transition: background 0.15s;
    }
    .md-nav-links > li > a:hover,
    .md-nav-links > li > a:focus { background: var(--md-bg-alt); }

    /* Mega-menu en accordéon */
    .md-nav-item-mega .md-nav-mega-trigger {
        position: relative;
    }
    .md-nav-item-mega .md-nav-mega-trigger::after {
        content: '';
        width: 8px; height: 8px;
        border-right: 2px solid var(--md-text-muted);
        border-bottom: 2px solid var(--md-text-muted);
        transform: rotate(45deg);
        margin-left: auto;
        transition: transform 0.2s;
    }
    .md-nav-item-mega.is-open .md-nav-mega-trigger::after {
        transform: rotate(225deg);
    }
    .md-nav-mega-trigger {
        cursor: pointer;
    }

    .md-mega-menu {
        display: none;
        position: static !important;
        transform: none !important;
        background: var(--md-bg-alt);
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0.5rem 0 1rem;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        z-index: auto;
    }
    .md-mega-menu::before { display: none; }
    .md-nav-item-mega.is-open .md-mega-menu { display: block; }
    .md-nav-item-mega:hover .md-mega-menu,
    .md-nav-item-mega:focus-within .md-mega-menu { display: none; } /* annuler hover */
    .md-nav-item-mega.is-open:hover .md-mega-menu,
    .md-nav-item-mega.is-open:focus-within .md-mega-menu { display: block; }

    .md-mega-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1.5rem;
    }
    .md-mega-title {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    .md-mega-menu ul li a {
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
        border-radius: 6px;
    }
    .md-mega-menu ul li a:hover {
        padding-left: 0.75rem;
        background: white;
    }

    /* CTA bottom */
    .md-nav-cta {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        padding: 1.25rem 1.5rem 1.5rem;
        border-top: 1px solid var(--md-border);
        background: white;
        position: sticky;
        bottom: 0;
        box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.05);
    }
    .md-nav-cta .md-btn {
        width: 100%;
        padding: 0.95rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============ HERO ============ */
.md-hero {
    background: white;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--md-border);
}

.md-hero-inner { position: relative; z-index: 1; }

.md-hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 991px) { .md-hero-grid { grid-template-columns: 1fr; } }

.md-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--md-primary-dark);
    padding: 0;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.md-eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 3px;
    background: var(--md-fluo);
    margin-right: 0.5rem;
    border-radius: 2px;
}

.md-hero h1 { margin-bottom: 1rem; }
.md-hero-lead { font-size: 1.15rem; color: var(--md-text-muted); margin-bottom: 1.5rem; max-width: 600px; }

.md-hero-meta {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin: 1.5rem 0;
}

.md-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    background: white;
    border: 1px solid var(--md-border);
    color: var(--md-text);
}
.md-badge-success { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.md-badge-danger  { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.md-badge-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
.md-badge-warning { background: #FFFBEB; border-color: #FDE68A; color: #B45309; }

.md-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.md-hero-trust {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    margin-top: 2rem; padding-top: 1.5rem;
    border-top: 1px solid var(--md-border);
    color: var(--md-text-muted); font-size: 0.9rem;
}
.md-hero-trust strong { color: var(--md-dark); display: block; font-size: 1.5rem; font-family: var(--md-font-display); }

.md-hero-card {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 2rem;
    box-shadow: var(--md-shadow-lg);
}
.md-hero-card .md-icon-circle {
    width: 64px; height: 64px;
    background: var(--md-primary-light);
    border-radius: var(--md-radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--md-primary-dark); font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

/* ============ BREADCRUMB ============ */
.md-breadcrumb-nav { background: var(--md-bg-alt); padding: 0.75rem 0; border-bottom: 1px solid var(--md-border); }
.md-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; list-style: none; padding: 0; margin: 0; gap: 0.5rem; font-size: 0.85rem; }
.md-breadcrumb a { color: var(--md-text-muted); }
.md-breadcrumb a:hover { color: var(--md-primary); }
.md-breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 0.5rem; color: var(--md-border); }
.md-breadcrumb li:last-child { color: var(--md-dark); font-weight: 500; }

/* ============ SECTIONS ============ */
.md-section { padding: 4rem 0; }
.md-section-alt { background: var(--md-bg-alt); }
.md-section-dark { background: var(--md-dark); color: white; }
.md-section-dark h1, .md-section-dark h2, .md-section-dark h3 { color: white; }

.md-section-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.md-section-head .md-eyebrow { background: transparent; color: var(--md-primary-dark); justify-content: center; }
.md-section-head .md-eyebrow::after {
    content: '';
    display: inline-block;
    width: 28px; height: 3px;
    background: var(--md-fluo);
    margin-left: 0.5rem;
    border-radius: 2px;
}

/* ============ CARDS ============ */
.md-grid { display: grid; gap: 1.5rem; }
.md-grid-2 { grid-template-columns: repeat(2, 1fr); }
.md-grid-3 { grid-template-columns: repeat(3, 1fr); }
.md-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991px) { .md-grid-3, .md-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .md-grid-2, .md-grid-3, .md-grid-4 { grid-template-columns: 1fr; } }

.md-card {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 1.75rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
    height: 100%;
    display: flex; flex-direction: column;
}
.md-card:hover { border-color: var(--md-border-strong); box-shadow: var(--md-shadow); }
.md-card-link { color: inherit; text-decoration: none; display: block; }
.md-card-link:hover { color: inherit; text-decoration: none; }

.md-card-icon {
    width: 56px; height: 56px;
    background: var(--md-primary-light);
    color: var(--md-primary-dark);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.md-diag-icon-wrap {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--md-primary-50) 0%, var(--md-primary-light) 100%);
    border: 1px solid var(--md-primary-light);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--md-primary-darker);
    overflow: hidden;
}
.md-diag-icon-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.6), transparent 60%);
    pointer-events: none;
}
.md-diag-icon-wrap img,
.md-diag-icon-wrap svg { width: 52px; height: 52px; object-fit: contain; position: relative; z-index: 1; }
.md-card:hover .md-diag-icon-wrap {
    background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%);
    border-color: var(--md-primary);
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 8px 20px -4px rgba(22, 163, 74, 0.35);
}
.md-card:hover .md-diag-icon-wrap img { filter: brightness(0) invert(1); }
.md-card-arrow { color: var(--md-primary); font-weight: 700; transition: transform 0.15s; }
.md-card:hover .md-card-arrow { transform: translateX(4px); color: var(--md-primary-darker); }

/* ============ DIAGNOSTIC CARDS (premium home grid) ============ */
.md-diag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 991px) { .md-diag-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .md-diag-grid { grid-template-columns: 1fr; } }

.md-diag-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 1.5rem 1.5rem 0;
    text-decoration: none;
    color: var(--md-text);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.md-diag-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--md-fluo);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}
.md-diag-card:hover {
    border-color: var(--md-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(22, 163, 74, 0.18);
    text-decoration: none;
    color: var(--md-text);
}
.md-diag-card:hover::before { transform: scaleX(1); }

.md-diag-card.is-popular {
    border-color: var(--md-primary);
    box-shadow: 0 4px 12px -2px rgba(22, 163, 74, 0.12);
}
.md-diag-card.is-popular::before { transform: scaleX(1); }
.md-diag-card-badge {
    position: absolute;
    top: 0.85rem; right: 0.85rem;
    background: var(--md-fluo);
    color: var(--md-dark);
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
}

.md-diag-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.md-diag-card-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--md-primary-50) 0%, var(--md-primary-light) 100%);
    border: 1px solid var(--md-primary-light);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--md-primary-darker);
    position: relative;
    overflow: hidden;
}
.md-diag-card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.6), transparent 60%);
    pointer-events: none;
}
.md-diag-card-icon img,
.md-diag-card-icon svg { width: 44px; height: 44px; object-fit: contain; position: relative; z-index: 1; }
.md-diag-card:hover .md-diag-card-icon {
    transform: scale(1.08) rotate(-2deg);
    background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%);
    color: white;
    box-shadow: 0 8px 20px -4px rgba(22, 163, 74, 0.4);
}
.md-diag-card:hover .md-diag-card-icon img { filter: brightness(0) invert(1); }

.md-diag-card-tags {
    display: flex; gap: 0.3rem; flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 0.2rem;
}
.md-diag-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.md-diag-tag-sale { background: #FEE2E2; color: #B91C1C; }
.md-diag-tag-rent { background: #DBEAFE; color: #1E40AF; }

.md-diag-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: var(--md-dark);
    font-family: var(--md-font-display);
}
.md-diag-card-desc {
    color: var(--md-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 1rem;
    flex-grow: 1;
}
.md-diag-card-meta {
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--md-border);
}
.md-diag-card-validity {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--md-text-muted);
    font-weight: 500;
}
.md-diag-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background: var(--md-bg-alt);
    border-top: 1px solid var(--md-border);
}
.md-diag-card-footer small {
    display: block;
    font-size: 0.7rem;
    color: var(--md-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.md-diag-card-footer strong {
    display: block;
    font-size: 1.5rem;
    color: var(--md-primary-dark);
    font-family: var(--md-font-display);
    font-weight: 800;
    line-height: 1;
}
.md-diag-card-cta {
    color: var(--md-primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    transition: gap 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.md-diag-card:hover .md-diag-card-cta { gap: 0.7rem; }

/* Conversion landing page */
.md-hero-conversion { padding: 3rem 0 2rem; background: var(--md-bg-alt); border-bottom: 1px solid var(--md-border); }
.md-hero-conversion .md-hero-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }

/* Hero Home v2 — produit-first, mockup avec stickers */
.md-hero-home {
    padding: 4.5rem 0 4rem;
    background:
        radial-gradient(1200px 500px at 90% -10%, rgba(22, 163, 74, 0.08), transparent 60%),
        radial-gradient(900px 400px at 0% 110%, rgba(74, 222, 128, 0.06), transparent 60%),
        white;
    position: relative;
    overflow: hidden;
}
.md-hero-home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 991px) { .md-hero-home-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.md-hero-phone {
    display: flex; align-items: center; gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--md-bg-alt);
    border-left: 4px solid var(--md-fluo);
    border-radius: var(--md-radius-sm);
}
.md-hero-phone span { color: var(--md-text-muted); font-size: 0.95rem; }
.md-hero-phone a { font-size: 1.35rem; font-weight: 700; color: var(--md-dark); text-decoration: none; font-family: var(--md-font-display); }
.md-hero-phone a:hover { color: var(--md-primary-dark); text-decoration: none; }

.md-hero-quickform {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    box-shadow: var(--md-shadow-lg);
    overflow: hidden;
}
.md-hero-quickform-head {
    background: var(--md-dark);
    color: white;
    padding: 1.75rem;
    text-align: center;
}
.md-hero-quickform-head h2 { color: white; font-size: 1.5rem; margin: 0 0 0.25rem; }
.md-hero-quickform-head p { color: rgba(255,255,255,0.75); margin: 0; font-size: 0.95rem; }

.md-hero-quickform-body { padding: 1.75rem; }
.md-hero-quickform-label { display: block; margin-bottom: 1.25rem; }
.md-hero-quickform-label span { display: block; font-weight: 600; font-size: 0.85rem; color: var(--md-dark); margin-bottom: 0.5rem; }
.md-hero-quickform-label input {
    width: 100%; padding: 1.1rem 1.25rem;
    border: 2px solid var(--md-border); border-radius: var(--md-radius-sm);
    font-size: 1.75rem; font-family: var(--md-font-display);
    text-align: center; letter-spacing: 0.2em; font-weight: 700;
    color: var(--md-dark); background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.md-hero-quickform-label input:focus { outline: none; border-color: var(--md-primary); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.md-hero-quickform-error {
    background: #FFF5F5; border: 1px solid #FEB2B2; color: #C53030;
    padding: 0.75rem 1rem; border-radius: var(--md-radius-sm);
    font-size: 0.9rem; margin-bottom: 1rem;
}
.md-hero-quickform-note { text-align: center; margin: 1rem 0 0; font-size: 0.85rem; color: var(--md-text-muted); }
.md-hero-quickform-trust {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--md-border);
    background: var(--md-bg-alt);
}
.md-hero-quickform-trust > div { padding: 1rem; text-align: center; border-right: 1px solid var(--md-border); }
.md-hero-quickform-trust > div:last-child { border-right: 0; }
.md-hero-quickform-trust strong { display: block; font-size: 1.25rem; color: var(--md-dark); font-family: var(--md-font-display); font-weight: 800; }
.md-hero-quickform-trust span { font-size: 0.75rem; color: var(--md-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.md-hero-checklist { list-style: none; padding: 0; margin: 1.5rem 0; }
.md-hero-checklist li { padding: 0.5rem 0; font-size: 1rem; color: var(--md-text); font-weight: 500; }

.md-lead-form {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    box-shadow: var(--md-shadow-lg);
    overflow: hidden;
    position: sticky; top: 90px;
}
.md-lead-form-head {
    background: var(--md-dark);
    color: white;
    padding: 1.75rem 1.75rem 2rem;
    text-align: center;
}
.md-lead-form-head h3 { color: white; margin: 0.5rem 0; line-height: 1.2; }
.md-lead-form-head p { margin: 0; opacity: 0.85; font-size: 0.9rem; }
.md-lead-form-pill {
    display: inline-block;
    background: var(--md-fluo);
    color: var(--md-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.md-lead-form-body { padding: 1.5rem 1.75rem 1.75rem; }
.md-lead-field { display: block; margin-bottom: 1rem; }
.md-lead-field span { display: block; font-size: 0.85rem; font-weight: 600; color: var(--md-dark); margin-bottom: 0.4rem; }
.md-lead-field input {
    width: 100%; padding: 0.75rem 1rem;
    border: 2px solid var(--md-border); border-radius: 8px;
    font-size: 1rem; font-family: inherit; color: var(--md-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}
.md-lead-field input:focus { outline: none; border-color: var(--md-primary); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.md-lead-form-note { text-align: center; margin: 0.75rem 0 0; font-size: 0.8rem; color: var(--md-text-muted); }

.md-trust-bar {
    margin-top: 3rem;
    background: white;
    border-radius: var(--md-radius);
    padding: 1.5rem;
    box-shadow: var(--md-shadow);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1rem;
}
.md-trust-bar > div { text-align: center; min-width: 90px; }
.md-trust-bar strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--md-primary-dark); font-family: var(--md-font-display); }
.md-trust-bar span { font-size: 0.8rem; color: var(--md-text-muted); }

.md-inline-cta {
    background: var(--md-bg-alt);
    border: 1px solid var(--md-border);
    border-left: 4px solid var(--md-primary);
    border-radius: var(--md-radius-sm);
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.md-inline-cta strong { color: var(--md-dark); font-size: 1.05rem; flex: 1 1 60%; }
.md-inline-cta span { color: var(--md-text-muted); font-size: 0.9rem; flex: 1 1 100%; margin-top: -0.5rem; }
.md-inline-cta .md-btn { flex: 0 0 auto; }

.md-pricing-card {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 1.5rem;
}
.md-pricing-head small { color: var(--md-text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.md-pricing-amount { font-size: 1.1rem; color: var(--md-text-muted); margin-top: 0.4rem; }
.md-pricing-amount strong { font-size: 1.75rem; color: var(--md-primary-dark); font-family: var(--md-font-display); }

.md-step-num {
    width: 56px; height: 56px;
    background: var(--md-primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800; font-family: var(--md-font-display);
    margin: 0 auto 1rem;
    position: relative;
}
.md-step-num::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px dashed var(--md-fluo);
    border-radius: 50%;
    opacity: 0.6;
}

@media (max-width: 991px) {
    .md-hero-conversion .md-hero-grid { grid-template-columns: 1fr; }
    .md-lead-form { position: static; }
}

.md-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.md-card-text { color: var(--md-text-muted); font-size: 0.92rem; flex-grow: 1; }
.md-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 1rem; padding-top: 1rem;
    border-top: 1px solid var(--md-border);
    font-size: 0.9rem;
}
.md-card-price { font-weight: 700; color: var(--md-primary); }

/* ============ SIDEBAR / TRUST CARD ============ */
.md-sidebar {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 1.75rem;
    position: sticky; top: 100px;
    box-shadow: var(--md-shadow);
}
.md-sidebar h3 { color: var(--md-dark); }
.md-trust-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.md-trust-list li { padding: 0.5rem 0; display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.md-trust-list li::before { content: '✓'; color: var(--md-eco); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }

/* ============ ARTICLE / PROSE ============ */
.md-prose { max-width: 760px; line-height: 1.75; }
.md-prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--md-primary-light); }
.md-prose h3 { margin-top: 2rem; }
.md-prose ul, .md-prose ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.md-prose li { margin-bottom: 0.5rem; }
.md-prose blockquote { border-left: 4px solid var(--md-primary); padding: 0.5rem 0 0.5rem 1.25rem; color: var(--md-text-muted); font-style: italic; margin: 1.5rem 0; }
.md-prose strong { color: var(--md-dark); }

/* Two-column layout */
.md-with-sidebar { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
@media (max-width: 991px) { .md-with-sidebar { grid-template-columns: 1fr; } .md-sidebar { position: static; } }

/* ============ FAQ ============ */
.md-faq { max-width: 860px; margin: 0 auto; }
.md-faq-item {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.md-faq-question {
    width: 100%; text-align: left;
    background: none; border: none;
    padding: 1.25rem 1.5rem;
    font-size: 1rem; font-weight: 600;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--md-dark);
    gap: 1rem;
}
.md-faq-question:hover { background: var(--md-bg-alt); }
.md-faq-question::after { content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--md-primary); transition: transform 0.2s; }
.md-faq-item.open .md-faq-question::after { content: '−'; }
.md-faq-answer { padding: 0 1.5rem 1.25rem; color: var(--md-text-muted); display: none; }
.md-faq-item.open .md-faq-answer { display: block; }

/* ============ CTA BANNER ============ */
.md-cta-banner {
    background: var(--md-dark);
    color: white;
    padding: 3.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.md-cta-banner-inner { position: relative; }
.md-cta-banner h2 { color: white; margin-bottom: 0.75rem; }
.md-cta-banner p { color: rgba(255,255,255,0.75); margin-bottom: 1.75rem; font-size: 1.05rem; }
.md-cta-banner .md-btn-outline { background: transparent; color: white; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4); }
.md-cta-banner .md-btn-outline:hover { background: white; color: var(--md-dark); box-shadow: inset 0 0 0 2px white; }

/* ============ INTERNAL LINKS ============ */
.md-link-cluster { background: var(--md-bg-alt); padding: 3rem 0; }
.md-link-cluster h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--md-text-muted); margin-bottom: 1rem; }
.md-link-list { list-style: none; padding: 0; margin: 0; columns: 1; }
.md-link-list li { padding: 0.4rem 0; }
.md-link-list a { color: var(--md-text); font-size: 0.95rem; }
.md-link-list a:hover { color: var(--md-primary); }
.md-link-list small { color: var(--md-text-muted); }

/* ============ FOOTER ============ */
.md-footer { background: var(--md-dark); color: rgba(255,255,255,0.75); padding: 4rem 0 1.5rem; font-size: 0.93rem; }
.md-footer h4 { color: white; font-size: 1rem; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.md-footer a { color: rgba(255,255,255,0.75); }
.md-footer a:hover { color: white; text-decoration: none; }
.md-footer ul { list-style: none; padding: 0; margin: 0; }
.md-footer ul li { margin-bottom: 0.5rem; }
.md-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (max-width: 991px) { .md-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (max-width: 600px) { .md-footer-grid { grid-template-columns: 1fr; } }
.md-footer-about p { margin-bottom: 1rem; }
.md-footer-contact { margin-top: 1rem; }
.md-footer-contact div { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.5rem; }
.md-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ============ DPE/diag visual ============ */
.md-diag-visual { font-size: 5rem; line-height: 1; text-align: center; }

/* Sticky mobile CTA */
.md-sticky-mobile {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white; padding: 0.75rem; gap: 0.5rem;
    border-top: 1px solid var(--md-border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    z-index: 99;
}
.md-sticky-mobile .md-btn { flex: 1; }
@media (max-width: 768px) { .md-sticky-mobile { display: flex; } body { padding-bottom: 80px; } }

/* Pagination */
.md-pagination { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.md-pagination a, .md-pagination span { padding: 0.5rem 0.85rem; border-radius: 8px; border: 1px solid var(--md-border); color: var(--md-text); text-decoration: none; font-size: 0.9rem; }
.md-pagination a:hover { border-color: var(--md-primary); color: var(--md-primary); text-decoration: none; }
.md-pagination .active { background: var(--md-primary); color: white; border-color: var(--md-primary); }
.md-pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ============================================
   ICÔNES MÉTIER (line stroke, neutres techniques)
   ============================================ */
.md-icon {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.md-icon-lg { width: 32px; height: 32px; }
.md-icon-sm { width: 18px; height: 18px; }

/* Carte feature avec icône métier — badge gradient cohérent avec les cards diagnostics */
.md-card-icon-metier {
    --g-from: #6EE7A0;
    --g-to: #16A34A;
    width: 56px; height: 56px;
    border-radius: 14px;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--g-from), var(--g-to));
    border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow:
        0 8px 18px -8px color-mix(in oklab, var(--g-to) 55%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.30),
        inset 0 -2px 5px rgba(0,0,0,0.10);
    transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.md-card-icon-metier .md-icon { width: 26px; height: 26px; color: inherit; }
.md-card-icon-metier .md-icon path,
.md-card-icon-metier .md-icon circle,
.md-card-icon-metier .md-icon rect { stroke: currentColor; }
.md-card:hover .md-card-icon-metier {
    transform: translateY(-2px) rotate(-3deg) scale(1.04);
}
.md-card-icon-metier.is-eco {
    --g-from: #34D399;
    --g-to: #0D9488;
}
.md-card-icon-metier.is-accent {
    --g-from: #FBBF24;
    --g-to: #F97316;
}
@media (prefers-reduced-motion: reduce) {
    .md-card-icon-metier { transition: none !important; }
    .md-card:hover .md-card-icon-metier { transform: none !important; }
}

/* ============================================
   BANDEAU CRÉDIBILITÉ — COFRAC, RC pro, n° certif
   ============================================ */
.md-credibility {
    background: linear-gradient(180deg, var(--md-dark) 0%, #0F1620 100%);
    color: rgba(255, 255, 255, 0.92);
    padding: 1.6rem 0;
    font-size: 0.88rem;
    border-bottom: 3px solid var(--md-fluo);
}
.md-credibility-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
    align-items: center;
}
@media (max-width: 991px) { .md-credibility-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (max-width: 600px) { .md-credibility-grid { grid-template-columns: 1fr; } }
.md-credibility-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    line-height: 1.35;
}
.md-credibility-item .md-icon {
    flex-shrink: 0;
    width: 42px; height: 42px;
    padding: 9px;
    box-sizing: border-box;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    border-radius: 12px;
    box-shadow:
        0 8px 18px -8px color-mix(in oklab, var(--g-to, #16A34A) 55%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.28),
        inset 0 -2px 4px rgba(0,0,0,0.10);
    transition: transform 280ms cubic-bezier(.2,.7,.2,1);
    overflow: visible;
}
.md-credibility-item:hover .md-icon {
    transform: translateY(-2px) rotate(-3deg) scale(1.05);
}
.md-credibility-item:nth-child(1) { --g-from: #6EE7A0; --g-to: #16A34A; }
.md-credibility-item:nth-child(2) { --g-from: #38BDF8; --g-to: #0284C7; }
.md-credibility-item:nth-child(3) { --g-from: #FBBF24; --g-to: #F97316; }
.md-credibility-item:nth-child(4) { --g-from: #C084FC; --g-to: #7E22CE; }
.md-credibility-item strong {
    display: block;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}
.md-credibility-item span {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    margin-top: 1px;
}
@media (prefers-reduced-motion: reduce) {
    .md-credibility-item .md-icon { transition: none !important; }
    .md-credibility-item:hover .md-icon { transform: none !important; }
}

/* ============================================
   ÉTIQUETTE DPE STYLISÉE (visuel métier hero)
   ============================================ */
.md-dpe-label {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 1.25rem;
    box-shadow: var(--md-shadow);
    max-width: 320px;
    font-family: var(--md-font);
}
.md-dpe-label-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--md-text-muted);
    margin-bottom: 0.75rem;
}
.md-dpe-scale {
    display: grid; gap: 3px;
}
.md-dpe-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    height: 22px;
    padding: 0 0.5rem;
    border-radius: 2px;
    position: relative;
}
.md-dpe-row.is-current::after {
    content: '';
    position: absolute;
    right: -8px; top: 50%;
    width: 0; height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--md-dark);
    transform: translateY(-50%);
}
.md-dpe-row.is-current { box-shadow: 0 0 0 2px var(--md-dark); z-index: 1; }
.md-dpe-row span:last-child { font-size: 0.72rem; opacity: 0.85; }
.md-dpe-A { background: #00A651; width: 35%; }
.md-dpe-B { background: #50B848; width: 45%; }
.md-dpe-C { background: #AFCA0B; width: 55%; color: #1F2937; }
.md-dpe-D { background: #FFF200; width: 65%; color: #1F2937; }
.md-dpe-E { background: #FDB913; width: 75%; color: #1F2937; }
.md-dpe-F { background: #F37021; width: 85%; }
.md-dpe-G { background: #ED1C24; width: 100%; }

/* ============================================
   HERO — visuel terrain (slot photo + étiquette)
   ============================================ */
.md-hero-visual {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.md-hero-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: var(--md-primary-darker);
    background-image:
        linear-gradient(135deg, rgba(22,101,52,0.45) 0%, rgba(22,101,52,0.85) 100%),
        url('/assets/images/hero/diagnostiqueur-terrain.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--md-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--md-shadow-lg);
    min-height: 420px;
}
.md-hero-photo-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem;
}
.md-hero-photo-overlay {
    position: absolute;
    left: 1rem; right: 1rem; bottom: 1rem;
    background: rgba(26, 32, 44, 0.78);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.85rem 1rem;
    border-radius: var(--md-radius-sm);
    font-size: 0.85rem;
    border-left: 3px solid var(--md-fluo);
}
.md-hero-photo-overlay strong { display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }
.md-hero-dpe-floating {
    position: absolute;
    right: -1.5rem; bottom: -1.5rem;
    z-index: 2;
}
@media (max-width: 991px) {
    .md-hero-dpe-floating { position: static; margin-top: 1rem; }
}

/* Hero with quickform : grid 3 cols (texte / form / visuel) en md, 2 cols en sm */
.md-hero-home-grid-three {
    display: grid;
    grid-template-columns: 1.1fr 380px;
    gap: 3rem;
    align-items: stretch;
}
@media (max-width: 991px) {
    .md-hero-home-grid-three { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================
   HERO V2 — produit-first (mockup + form inline + social proof)
   ============================================ */

/* Eyebrow chip — sobre, sans animation */
.md-hero-pill {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.45rem 0.95rem;
    border-radius: 100px;
    background: var(--md-primary-50);
    border: 1px solid var(--md-primary-light);
    color: var(--md-primary-darker);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.005em;
}
.md-hero-pill .md-pill-dot {
    width: 7px; height: 7px;
    background: var(--md-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Form inline horizontal (CP + bouton) — bien plus compact que la card */
.md-hero-inline-form {
    margin-top: 2rem;
    max-width: 560px;
}
.md-hero-inline-form-row {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border: 1px solid var(--md-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px -10px rgba(22, 163, 74, 0.20), 0 1px 3px rgba(0,0,0,0.05);
}
.md-hero-inline-form-row input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 0.95rem 1.1rem;
    border: 0;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-dark);
    letter-spacing: 0.04em;
    font-family: var(--md-font);
    -webkit-appearance: none;
    appearance: none;
}
.md-hero-inline-form-row input[type="text"] { letter-spacing: 0.04em; }
.md-hero-inline-form-row input[type="tel"] { letter-spacing: 0.02em; }
.md-hero-inline-form-row input[type="email"] { letter-spacing: 0; }
.md-hero-inline-form-row input:focus { outline: none; }
.md-hero-inline-form-row input::placeholder {
    color: var(--md-text-muted);
    font-weight: 500;
    letter-spacing: 0;
}
.md-hero-inline-form-row .md-btn {
    padding: 0.95rem 1.5rem;
    flex-shrink: 0;
    border-radius: 10px;
}
.md-hero-inline-form-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.85rem;
    font-size: 0.83rem;
    color: var(--md-text-muted);
    flex-wrap: wrap;
}
.md-hero-inline-form-meta span {
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.md-hero-inline-form-meta svg { color: var(--md-primary); }
.md-hero-inline-form-error {
    background: #FFF5F5; border: 1px solid #FEB2B2; color: #C53030;
    padding: 0.6rem 0.85rem; border-radius: 8px;
    font-size: 0.85rem; margin-bottom: 0.75rem;
}
@media (max-width: 600px) {
    .md-hero-inline-form-row { flex-direction: column; padding: 0.6rem; }
    .md-hero-inline-form-row input[type="text"] { text-align: center; font-size: 1.5rem; letter-spacing: 0.2em; padding: 0.85rem; }
    .md-hero-inline-form-row .md-btn { width: 100%; }
}

/* Trust chips — petits badges en ligne sous le form */
.md-trust-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.md-trust-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.85rem 0.35rem 0.4rem;
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--md-dark, #1A202C);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 200ms, box-shadow 200ms, transform 200ms cubic-bezier(.2,.7,.2,1);
}
.md-trust-chip:hover {
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 4px 12px -4px rgba(22, 163, 74, 0.18);
    transform: translateY(-1px);
}
.md-trust-chip svg {
    width: 14px; height: 14px;
    color: #FFFFFF;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
    box-sizing: border-box;
    padding: 5px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    box-shadow:
        0 4px 10px -4px color-mix(in oklab, var(--g-to, #16A34A) 60%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.30);
    overflow: visible;
}
.md-trust-chip:nth-child(1) { --g-from: #6EE7A0; --g-to: #16A34A; }
.md-trust-chip:nth-child(2) { --g-from: #38BDF8; --g-to: #0284C7; }
.md-trust-chip:nth-child(3) { --g-from: #FBBF24; --g-to: #F97316; }
.md-trust-chip:nth-child(4) { --g-from: #C084FC; --g-to: #7E22CE; }
.md-trust-chip:nth-child(5) { --g-from: #F472B6; --g-to: #BE185D; }
@media (prefers-reduced-motion: reduce) {
    .md-trust-chip { transition: none !important; }
    .md-trust-chip:hover { transform: none !important; }
}

/* Social proof — note Google + chiffre clé (sobre, institutionnel) */
.md-hero-social {
    display: flex; align-items: center; gap: 1.25rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--md-border);
    flex-wrap: wrap;
}
.md-hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.md-hero-rating .md-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #F59E0B;
}
.md-hero-rating .md-stars svg {
    width: 16px; height: 16px;
    fill: currentColor;
    stroke: none;
}
.md-hero-rating strong {
    font-size: 0.95rem;
    color: var(--md-dark);
    font-weight: 700;
}
.md-hero-rating-meta {
    font-size: 0.85rem;
    color: var(--md-text-muted);
    font-weight: 500;
}
.md-hero-social-sep {
    width: 1px;
    height: 24px;
    background: var(--md-border);
}
.md-hero-social-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--md-dark);
    font-weight: 700;
    line-height: 1.2;
}
.md-hero-social-text span {
    display: block;
    font-size: 0.82rem;
    color: var(--md-text-muted);
    line-height: 1.3;
}
@media (max-width: 600px) {
    .md-hero-social { gap: 1rem; }
    .md-hero-social-sep { display: none; }
}

/* ===== Mockup produit (étiquette DPE + stickers flottants) ===== */
.md-hero-mockup {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.md-hero-mockup-frame {
    position: relative;
    width: 100%;
    max-width: 460px;
}
.md-hero-mockup-shadow {
    position: absolute;
    left: 8%; right: 8%;
    bottom: -20px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(22, 101, 52, 0.25) 0%, transparent 70%);
    filter: blur(6px);
    z-index: 0;
}
.md-hero-mockup-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow:
        0 24px 48px -16px rgba(20, 50, 30, 0.22),
        0 12px 24px -12px rgba(20, 50, 30, 0.14),
        0 1px 2px rgba(0,0,0,0.04);
    transform: rotate(-0.6deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.md-hero-mockup:hover .md-hero-mockup-img {
    transform: rotate(0deg);
}

/* Stickers — institutionnels, sans animation, presque alignés */
.md-sticker {
    position: absolute;
    z-index: 3;
    background: white;
    padding: 0.7rem 0.95rem;
    border-radius: 10px;
    box-shadow:
        0 10px 20px -8px rgba(20, 50, 30, 0.18),
        0 2px 4px rgba(0, 0, 0, 0.06);
    display: flex; align-items: center; gap: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--md-dark);
    line-height: 1.25;
    border: 1px solid rgba(0,0,0,0.04);
}
.md-sticker strong { display: block; font-weight: 700; font-size: 0.88rem; color: var(--md-dark); }
.md-sticker small { display: block; color: var(--md-text-muted); font-weight: 500; font-size: 0.74rem; margin-top: 1px; }
.md-sticker-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.md-sticker-icon svg { width: 19px; height: 19px; }

.md-sticker-1 {
    top: -12px; left: -28px;
    transform: rotate(-1deg);
}
.md-sticker-1 .md-sticker-icon { background: var(--md-primary); color: white; }

.md-sticker-2 {
    top: 42%; right: -36px;
    transform: rotate(1deg);
}
.md-sticker-2 .md-sticker-icon { background: var(--md-dark); color: var(--md-fluo); }

.md-sticker-3 {
    bottom: 18px; left: -36px;
    transform: rotate(-1deg);
}
.md-sticker-3 .md-sticker-icon { background: var(--md-primary-50); color: var(--md-primary-darker); border: 1px solid var(--md-primary-light); }

@media (max-width: 991px) {
    .md-hero-mockup { padding: 2rem 1rem; }
    .md-hero-mockup-img { transform: none; max-width: 380px; margin: 0 auto; }
    .md-sticker-1, .md-sticker-2, .md-sticker-3 { transform: none; }
    .md-sticker-1 { left: 0; top: 0; }
    .md-sticker-2 { right: 0; top: 38%; }
    .md-sticker-3 { left: 0; bottom: 0; }
}
@media (max-width: 600px) {
    .md-sticker { font-size: 0.78rem; padding: 0.55rem 0.75rem; }
    .md-sticker-icon { width: 30px; height: 30px; }
    .md-sticker-icon svg { width: 16px; height: 16px; }
    .md-sticker strong { font-size: 0.82rem; }
    .md-sticker small { font-size: 0.7rem; }
}

/* Liste checklist hero (icône check stroke au lieu d'emoji ✓) */
.md-hero-checklist { list-style: none; padding: 0; margin: 1.5rem 0; }
.md-hero-checklist li {
    display: flex; align-items: flex-start; gap: 0.6rem;
    padding: 0.45rem 0;
    font-size: 0.96rem;
    color: var(--md-text);
}
.md-hero-checklist li svg { flex-shrink: 0; color: var(--md-primary); margin-top: 0.2rem; }

/* ============================================
   PAGE HERO — version compacte pour les pages secondaires
   ============================================ */
.md-page-hero {
    background:
        radial-gradient(900px 350px at 90% -10%, rgba(22, 163, 74, 0.06), transparent 60%),
        white;
    padding: 3.5rem 0 2.75rem;
    border-bottom: 1px solid var(--md-border);
}
.md-page-hero h1 {
    font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
    margin: 0 0 0.75rem;
}
.md-page-hero p.lead {
    font-size: 1.05rem;
    color: var(--md-text-muted);
    max-width: 720px;
    margin: 0 0 1.5rem;
}
.md-page-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ============================================
   PROGRESS BAR FUNNEL — sobre et institutionnelle
   ============================================ */
.md-funnel-progress {
    background: white;
    border-bottom: 1px solid var(--md-border);
    padding: 1rem 0;
}
.md-funnel-progress-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.md-funnel-progress-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--md-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}
.md-funnel-progress-bar {
    flex: 1;
    min-width: 180px;
    height: 6px;
    background: var(--md-bg-soft);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}
.md-funnel-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--md-primary) 0%, var(--md-fluo-bright) 100%);
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.md-funnel-progress-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--md-dark);
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

/* Étapes funnel — choix radio cards */
.md-funnel-step { padding: 3rem 0 4rem; background: var(--md-bg-alt); }
.md-funnel-step-card {
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    padding: 2.5rem;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: var(--md-shadow);
}
@media (max-width: 600px) {
    .md-funnel-step { padding: 2rem 0 3rem; }
    .md-funnel-step-card { padding: 1.5rem; }
}
.md-funnel-step-head { text-align: center; margin-bottom: 2rem; }
.md-funnel-step-head h1, .md-funnel-step-head h2 {
    font-size: clamp(1.4rem, 2vw + 0.8rem, 1.85rem);
    margin: 0.5rem 0 0.5rem;
}
.md-funnel-step-head p {
    color: var(--md-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.md-choice-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}
.md-choice-grid.md-choice-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .md-choice-grid.md-choice-grid-2 { grid-template-columns: 1fr; } }
.md-choice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: white;
    border: 1.5px solid var(--md-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    text-align: left;
    font: inherit;
    color: var(--md-text);
    width: 100%;
}
.md-choice:hover {
    border-color: var(--md-primary);
    background: var(--md-primary-50);
    box-shadow: 0 4px 12px -4px rgba(22, 163, 74, 0.18);
}
.md-choice:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}
.md-choice.is-selected {
    border-color: var(--md-primary);
    background: var(--md-primary-50);
}
.md-choice-icon {
    width: 44px; height: 44px;
    background: var(--md-primary-50);
    border: 1px solid var(--md-primary-light);
    border-radius: 10px;
    color: var(--md-primary-dark);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.md-choice-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.md-choice-body { flex: 1; min-width: 0; }
.md-choice-body strong { display: block; font-weight: 700; font-size: 1rem; color: var(--md-dark); }
.md-choice-body small { display: block; font-size: 0.85rem; color: var(--md-text-muted); margin-top: 2px; }
.md-choice-arrow {
    color: var(--md-text-muted);
    transition: transform 0.15s, color 0.15s;
    flex-shrink: 0;
}
.md-choice:hover .md-choice-arrow { color: var(--md-primary); transform: translateX(3px); }

.md-funnel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.md-funnel-trust {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.82rem;
    color: var(--md-text-muted);
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.md-funnel-trust svg { color: var(--md-primary); width: 14px; height: 14px; }

/* ============================================
   TIMELINE post-conversion (page thanks)
   ============================================ */
.md-timeline {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    position: relative;
}
.md-timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--md-border);
    z-index: 0;
}
.md-timeline-item {
    position: relative;
    padding-left: 56px;
    padding-bottom: 1.5rem;
}
.md-timeline-item:last-child { padding-bottom: 0; }
.md-timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px; height: 40px;
    background: white;
    border: 2px solid var(--md-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--md-text-muted);
    z-index: 1;
}
.md-timeline-marker svg { width: 20px; height: 20px; }
.md-timeline-item.is-done .md-timeline-marker {
    background: var(--md-primary);
    border-color: var(--md-primary);
    color: white;
}
.md-timeline-item.is-current .md-timeline-marker {
    background: white;
    border-color: var(--md-primary);
    color: var(--md-primary);
    box-shadow: 0 0 0 4px var(--md-primary-light);
}
.md-timeline-item h3, .md-timeline-item h4 {
    font-size: 1rem;
    margin: 0 0 0.25rem;
    color: var(--md-dark);
}
.md-timeline-item p {
    font-size: 0.9rem;
    color: var(--md-text-muted);
    margin: 0;
}
.md-timeline-time {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--md-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--md-primary-50);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

/* ============================================
   PROCESS SECTION — 3 étapes avec illustrations
   (utilisée sur seo/city-diagnostic.blade.php)
   ============================================ */
.md-process-section {
    background: var(--md-dark);
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.md-process-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 0% 0%, rgba(22, 163, 74, 0.10), transparent 60%),
        radial-gradient(700px 350px at 100% 100%, rgba(74, 222, 128, 0.06), transparent 60%);
    pointer-events: none;
}
.md-process-section .md-section-head {
    color: white;
    position: relative;
    z-index: 1;
}
.md-process-section .md-section-head h2 { color: white; }
.md-process-section .md-section-head .md-eyebrow {
    color: var(--md-fluo);
}
.md-process-section .md-section-head .md-eyebrow::before,
.md-process-section .md-section-head .md-eyebrow::after {
    background: var(--md-fluo);
}
.md-process-section .md-section-head p {
    color: rgba(255, 255, 255, 0.7) !important;
}
.md-process-subtitle {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.7em;
    font-weight: 600;
    color: var(--md-fluo, #4ADE80);
    letter-spacing: 0.02em;
}

.md-process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}
.md-process-grid::before {
    content: "";
    position: absolute;
    top: 56px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.35) 15%, rgba(74, 222, 128, 0.35) 85%, transparent);
    z-index: 0;
    pointer-events: none;
}
@media (max-width: 991px) {
    .md-process-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .md-process-grid::before { display: none; }
}

.md-process-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--md-radius-lg);
    padding: 1.75rem 1.5rem 1.75rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 320ms cubic-bezier(.2,.7,.2,1), border-color 320ms, box-shadow 320ms, background 320ms;
    z-index: 1;
}
.md-process-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.5), rgba(22, 163, 74, 0.0) 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 320ms;
    pointer-events: none;
}
.md-process-card:hover {
    transform: translateY(-6px);
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 24px 48px -16px rgba(0,0,0,0.45), 0 0 0 1px rgba(74,222,128,0.15) inset;
}
.md-process-card:hover::before { opacity: 1; }

.md-process-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.md-process-card-num {
    font-family: 'IBM Plex Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2.25rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
    position: relative;
}
.md-process-card-num::after {
    content: "";
    position: absolute;
    left: 0; right: -8px; bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, var(--md-fluo, #4ADE80), transparent);
    border-radius: 2px;
    opacity: 0.6;
}

.md-process-card-icon {
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(74, 222, 128, 0.10);
    color: var(--md-fluo, #4ADE80);
    border: 1px solid rgba(74, 222, 128, 0.20);
    transition: background 320ms, color 320ms, transform 320ms cubic-bezier(.2,.7,.2,1), border-color 320ms;
}
.md-process-card-icon svg { width: 24px; height: 24px; }
.md-process-card:hover .md-process-card-icon {
    background: linear-gradient(135deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    color: var(--md-dark, #1A202C);
    border-color: transparent;
    transform: rotate(-6deg) scale(1.05);
    box-shadow: 0 8px 20px -6px rgba(74, 222, 128, 0.5);
}

.md-process-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.md-process-card-body h3 {
    font-size: 1.15rem;
    margin: 0;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.md-process-card-body p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .md-process-card,
    .md-process-card-icon,
    .md-process-card::before { transition: none !important; }
    .md-process-card:hover { transform: none !important; }
    .md-process-card:hover .md-process-card-icon { transform: none !important; }
}

/* ============================================
   CITY MAP — carte SVG unique par ville (E-E-A-T)
   ============================================ */
.md-citymap {
    margin: 0;
    padding: 0;
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    overflow: hidden;
    box-shadow: var(--md-shadow);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
}
@media (max-width: 768px) {
    .md-citymap { grid-template-columns: 1fr; }
}
.md-citymap-svg {
    width: 100%;
    height: auto;
    display: block;
    background: #F0FDF4;
}
.md-citymap-caption {
    padding: 1.5rem 1.75rem 1.75rem;
    border-left: 1px solid var(--md-border);
    display: flex;
    flex-direction: column;
}
@media (max-width: 768px) {
    .md-citymap-caption { border-left: 0; border-top: 1px solid var(--md-border); padding: 1.25rem; }
}
.md-citymap-caption h3 {
    font-size: 1.05rem;
    margin: 0 0 0.6rem;
    color: var(--md-dark);
    line-height: 1.25;
}
.md-citymap-caption p {
    font-size: 0.88rem;
    color: var(--md-text-muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}
.md-citymap-caption p strong { color: var(--md-dark); font-weight: 700; }
.md-citymap-neighbors-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    font-size: 0.86rem;
}
.md-citymap-neighbors-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0.65rem;
    background: var(--md-bg-alt);
    border-radius: 6px;
    border-left: 2px solid var(--md-primary-light);
    transition: border-color 0.15s, background 0.15s;
}
.md-citymap-neighbors-list li:hover {
    border-left-color: var(--md-primary);
    background: var(--md-primary-50);
}
.md-citymap-neighbors-list a {
    font-weight: 600;
    color: var(--md-dark);
}
.md-citymap-neighbors-list a:hover { color: var(--md-primary-darker); }
.md-citymap-neighbors-list span { font-weight: 600; color: var(--md-text-muted); }
.md-citymap-neighbors-list small {
    color: var(--md-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* ============================================
   FORM INPUTS — design system (md-input, md-checkbox)
   ============================================ */
.md-input,
.md-textarea,
.md-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--md-font);
    color: var(--md-dark);
    background: white;
    border: 1.5px solid var(--md-border);
    border-radius: var(--md-radius);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.md-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.md-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 5l3 3 3-3'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.md-input:hover,
.md-textarea:hover,
.md-select:hover { border-color: var(--md-border-strong); }
.md-input:focus,
.md-textarea:focus,
.md-select:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    background: white;
}
.md-input:disabled,
.md-textarea:disabled,
.md-select:disabled { background: var(--md-bg-soft); color: var(--md-text-muted); cursor: not-allowed; }
.md-input.is-error,
.md-textarea.is-error { border-color: var(--md-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.md-input::placeholder,
.md-textarea::placeholder { color: var(--md-text-muted); opacity: 1; }

/* Input avec icône à gauche */
.md-input-group { position: relative; }
.md-input-group .md-input { padding-left: 2.75rem; }
.md-input-group-icon {
    position: absolute;
    left: 0.95rem; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--md-text-muted);
    pointer-events: none;
}

/* Field label wrapper */
.md-field { display: block; margin-bottom: 1rem; }
.md-field-label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--md-dark); margin-bottom: 0.4rem; }
.md-field-help { display: block; font-size: 0.78rem; color: var(--md-text-muted); margin-top: 0.35rem; }
.md-field-error { display: block; font-size: 0.82rem; color: var(--md-danger); margin-top: 0.35rem; font-weight: 500; }

/* Checkbox custom */
.md-checkbox { display: inline-flex; align-items: center; gap: 0.55rem; cursor: pointer; user-select: none; font-size: 0.92rem; color: var(--md-text); }
.md-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--md-border-strong);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    margin: 0;
    display: inline-grid;
    place-content: center;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.md-checkbox input[type="checkbox"]::before {
    content: '';
    width: 10px; height: 10px;
    background: white;
    transform: scale(0);
    transition: transform 0.1s;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.md-checkbox input[type="checkbox"]:checked {
    background: var(--md-primary);
    border-color: var(--md-primary);
}
.md-checkbox input[type="checkbox"]:checked::before { transform: scale(1); }
.md-checkbox input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }

/* ============================================
   KEY STATS — chips d'information rapide
   sous le form (durée validité, prix, obligation)
   ============================================ */
.md-diag-keystats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}
.md-diag-keystat {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.95rem;
    background: white;
    border: 1px solid var(--md-border);
    border-left: 3px solid var(--md-primary);
    border-radius: 6px;
    flex: 1 1 auto;
    min-width: 140px;
}
.md-diag-keystat svg {
    width: 20px; height: 20px;
    color: var(--md-primary);
    flex-shrink: 0;
}
.md-diag-keystat strong {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--md-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}
.md-diag-keystat span {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--md-dark);
    margin-top: 2px;
    line-height: 1.2;
}

/* ============================================
   MOCKUP FALLBACK — rapport conforme stylisé
   pour les diagnostics sans visuel SVG dédié
   ============================================ */
.md-mockup-fallback {
    width: 100%;
    aspect-ratio: 460 / 600;
    background: white;
    border: 1px solid #E5EAF0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.md-mockup-fallback-head {
    background: linear-gradient(135deg, #1AAE51 0%, #15803D 100%);
    color: white;
    padding: 1.75rem 2rem 2rem;
}
.md-mockup-fallback-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}
.md-mockup-fallback-title {
    font-family: 'IBM Plex Sans', 'Inter', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.md-mockup-fallback-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    text-align: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(22, 163, 74, 0.06), transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(74, 222, 128, 0.05), transparent 60%);
}
.md-mockup-fallback-icon {
    width: 96px;
    height: 96px;
    color: var(--md-primary);
    opacity: 0.5;
}
.md-mockup-fallback-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    background: var(--md-primary-50);
    border: 2px solid var(--md-primary);
    border-radius: 100px;
    color: var(--md-primary-darker);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.md-mockup-fallback-status svg {
    width: 18px; height: 18px;
}
.md-mockup-fallback-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    width: 100%;
    max-width: 320px;
    margin-top: 0.5rem;
}
.md-mockup-fallback-meta > div {
    text-align: left;
    padding: 0.5rem 0;
    border-top: 1px dashed var(--md-border);
}
.md-mockup-fallback-meta span {
    display: block;
    font-size: 0.7rem;
    color: var(--md-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.md-mockup-fallback-meta strong {
    display: block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--md-dark);
    margin-top: 2px;
}
.md-mockup-fallback-footer {
    background: #F7FAFC;
    border-top: 1px solid var(--md-border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--md-text-muted);
    font-weight: 600;
}
.md-mockup-fallback-brand {
    background: var(--md-primary);
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* ============================================
   AVIS GOOGLE / Social proof bar (réutilisable)
   ============================================ */
.md-social-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid var(--md-border);
    border-radius: 10px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.md-social-bar-rating { display: inline-flex; align-items: center; gap: 0.5rem; }
.md-social-bar-rating .md-stars { display: inline-flex; gap: 1px; color: #F59E0B; }
.md-social-bar-rating .md-stars svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.md-social-bar-rating strong { font-size: 0.92rem; color: var(--md-dark); font-weight: 700; }
.md-social-bar-rating span { font-size: 0.82rem; color: var(--md-text-muted); }
.md-social-bar-sep { width: 1px; height: 22px; background: var(--md-border); }
.md-social-bar-stat strong { display: block; font-weight: 700; font-size: 0.92rem; color: var(--md-dark); }
.md-social-bar-stat span { display: block; font-size: 0.78rem; color: var(--md-text-muted); }

/* ============================================
   PROOF BAR — barre unifiée (rating + stats)
   ============================================ */
.md-proof-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    padding: 1.25rem 1.75rem;
    margin-top: 2rem;
    background: white;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    box-shadow: var(--md-shadow-sm);
}
.md-proof-bar-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}
.md-proof-bar-rating .md-stars {
    display: inline-flex;
    gap: 2px;
    color: #F59E0B;
}
.md-proof-bar-rating .md-stars svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}
.md-proof-bar-rating-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--md-dark);
    line-height: 1.1;
}
.md-proof-bar-rating-text span {
    display: block;
    font-size: 0.78rem;
    color: var(--md-text-muted);
}
.md-proof-bar-sep {
    width: 1px;
    height: 30px;
    background: var(--md-border);
}
.md-proof-bar-stat strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--md-primary-dark);
    font-family: var(--md-font-display);
    line-height: 1.1;
}
.md-proof-bar-stat span {
    display: block;
    font-size: 0.78rem;
    color: var(--md-text-muted);
    margin-top: 2px;
}
@media (max-width: 767px) {
    .md-proof-bar { gap: 0.75rem 1.25rem; padding: 1rem 1.25rem; }
    .md-proof-bar-sep { display: none; }
    .md-proof-bar-rating { width: 100%; justify-content: center; padding-bottom: 0.5rem; border-bottom: 1px solid var(--md-border); }
}

/* ============================================
   REPORT SECTION — "Le rapport remis"
   ============================================ */
.md-report-section {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--md-primary-50) 100%);
    padding: 4.5rem 0 5rem;
}
.md-report-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 4rem;
    align-items: center;
}
@media (max-width: 991px) {
    .md-report-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.md-report-text .md-eyebrow { margin-bottom: 1rem; }
.md-report-text h2 {
    font-size: clamp(1.6rem, 2.4vw + 0.5rem, 2.25rem);
    margin-bottom: 1rem;
}
.md-report-lead {
    font-size: 1.05rem;
    color: var(--md-text);
    margin-bottom: 1.75rem;
    max-width: 540px;
}
.md-report-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
}
@media (max-width: 600px) {
    .md-report-points { grid-template-columns: 1fr; }
}
.md-report-points li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}
.md-report-points li > svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--md-primary);
    margin-top: 2px;
}
.md-report-points li strong {
    display: block;
    color: var(--md-dark);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}
.md-report-points li span {
    display: block;
    color: var(--md-text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
    line-height: 1.4;
}

.md-report-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.md-report-frame {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow:
        0 24px 60px -20px rgba(15, 80, 40, 0.25),
        0 6px 16px -4px rgba(15, 80, 40, 0.10);
    border: 1px solid var(--md-border);
    position: relative;
    max-width: 460px;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.md-report-frame:hover { transform: translateY(-4px); }
.md-report-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}
.md-report-frame::before {
    content: 'Aperçu rapport';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 12px -2px rgba(22, 163, 74, 0.45);
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
}
.md-report-frame-icon::before,
.md-report-frame-fallback::before { display: none; }
.md-report-frame-icon {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 360px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--md-primary-50) 100%);
}
.md-report-frame-icon img { width: 60%; }
.md-report-frame-fallback {
    aspect-ratio: 1 / 1;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.md-report-frame-fallback svg { width: 60%; height: auto; }
.md-report-frame-caption {
    text-align: center;
}
.md-report-frame-caption strong {
    display: block;
    font-size: 1.1rem;
    color: var(--md-dark);
    font-weight: 700;
}
.md-report-frame-caption span {
    display: block;
    font-size: 0.85rem;
    color: var(--md-text-muted);
    margin-top: 2px;
}


/* ============================================
   DIAGNOSTIC CARD v2 — gradient icon badge
   ============================================ */
.md-dc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 820px) { .md-dc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .md-dc-grid { grid-template-columns: 1fr; } }

.md-dc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    padding: 2rem 1.5rem 1.75rem;
    color: var(--md-text);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.08);
    transition: transform 280ms cubic-bezier(.2,.7,.2,1), box-shadow 280ms, border-color 280ms;
    position: relative;
    overflow: hidden;
}
.md-dc-card::after {
    content: "";
    position: absolute;
    inset: auto auto -40% -40%;
    width: 220px; height: 220px;
    background: radial-gradient(circle, var(--g-from, transparent) 0%, transparent 60%);
    opacity: 0.08;
    pointer-events: none;
    transition: opacity 280ms;
}
.md-dc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05), 0 20px 40px -16px rgba(15, 23, 42, 0.18);
    border-color: rgba(15, 23, 42, 0.10);
    color: var(--md-text);
    text-decoration: none;
}
.md-dc-card:hover::after { opacity: 0.18; }

.md-dc-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    box-shadow:
        0 10px 22px -8px color-mix(in oklab, var(--g-to, #16A34A) 60%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.35),
        inset 0 -2px 6px rgba(0,0,0,0.10);
    margin-bottom: 1.5rem;
    transition: transform 320ms cubic-bezier(.2,.7,.2,1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.md-dc-icon svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}
.md-dc-card:hover .md-dc-icon {
    transform: translateY(-2px) rotate(-3deg) scale(1.04);
}

.md-dc-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--md-dark, #1A202C);
    margin: 0 0 0.6rem;
    font-family: var(--md-font-display);
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}
.md-dc-desc {
    color: var(--md-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
    position: relative;
    z-index: 1;
}
.md-dc-subtitle {
    display: inline-block;
    margin: -0.35rem 0 0.6rem;
    padding: 0.15rem 0.55rem;
    background: linear-gradient(135deg, rgba(74,222,128,0.10), rgba(22,163,74,0.04));
    color: var(--md-primary-dark, #15803D);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}
.md-dc-card--with-footer { padding-bottom: 0; }
.md-dc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.85rem 0 0;
    border-top: 1px dashed rgba(15, 23, 42, 0.10);
    position: relative;
    z-index: 1;
}
.md-dc-card--with-footer .md-dc-footer { padding-bottom: 1rem; }
.md-dc-price { display: inline-flex; align-items: baseline; gap: 0.3rem; }
.md-dc-price small { color: var(--md-text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.md-dc-price strong { color: var(--md-primary-dark, #15803D); font-size: 1.15rem; font-weight: 800; font-family: var(--md-font-display); line-height: 1; }
.md-dc-arrow {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--md-primary-dark);
    background: rgba(22, 163, 74, 0.08);
    font-weight: 700;
    transition: background 220ms, color 220ms, transform 220ms cubic-bezier(.2,.7,.2,1);
}
.md-dc-card:hover .md-dc-arrow {
    background: linear-gradient(135deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    color: white;
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .md-dc-card, .md-dc-icon, .md-dc-card::after, .md-dc-arrow { transition: none !important; }
    .md-dc-card:hover { transform: none !important; }
    .md-dc-card:hover .md-dc-icon { transform: none !important; }
    .md-dc-card:hover .md-dc-arrow { transform: none !important; }
}

/* ============================================
   FEATURE CARD — "Pourquoi M-diag" (left-aligned)
   ============================================ */
.md-fc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 991px) { .md-fc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .md-fc-grid { grid-template-columns: 1fr; } }

.md-fc-card {
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    padding: 1.75rem 1.5rem 1.6rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -14px rgba(15, 23, 42, 0.10);
    transition: transform 280ms cubic-bezier(.2,.7,.2,1), box-shadow 280ms, border-color 280ms;
    position: relative;
    overflow: hidden;
}
.md-fc-card::after {
    content: "";
    position: absolute;
    inset: -40% -40% auto auto;
    width: 200px; height: 200px;
    background: radial-gradient(circle, var(--g-from, transparent) 0%, transparent 60%);
    opacity: 0.08;
    pointer-events: none;
    transition: opacity 280ms;
}
.md-fc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05), 0 20px 40px -16px rgba(15, 23, 42, 0.18);
    border-color: rgba(15, 23, 42, 0.10);
}
.md-fc-card:hover::after { opacity: 0.18; }

.md-fc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 14px;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    box-shadow:
        0 8px 18px -8px color-mix(in oklab, var(--g-to, #16A34A) 60%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.35),
        inset 0 -2px 5px rgba(0,0,0,0.10);
    margin-bottom: 1.15rem;
    transition: transform 320ms cubic-bezier(.2,.7,.2,1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.md-fc-icon svg {
    width: 26px; height: 26px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}
.md-fc-card:hover .md-fc-icon {
    transform: translateY(-2px) rotate(-3deg) scale(1.04);
}

.md-fc-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--md-dark, #1A202C);
    margin: 0 0 0.6rem;
    font-family: var(--md-font-display);
    letter-spacing: -0.01em;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}
.md-fc-card p {
    color: var(--md-text-muted);
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .md-fc-card, .md-fc-icon, .md-fc-card::after { transition: none !important; }
    .md-fc-card:hover { transform: none !important; }
    .md-fc-card:hover .md-fc-icon { transform: none !important; }
}

/* ============================================
   MEET THE EXPERT — section diagnostiqueur photo
   ============================================ */
.md-meet-expert {
    background:
        radial-gradient(900px 500px at 100% 0%, rgba(22, 163, 74, 0.06), transparent 60%),
        radial-gradient(700px 400px at 0% 100%, rgba(74, 222, 128, 0.05), transparent 60%),
        var(--md-bg, #FFFFFF);
    overflow: hidden;
}

.md-meet-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
    gap: 4.5rem;
    align-items: center;
}
@media (max-width: 991px) {
    .md-meet-grid { grid-template-columns: 1fr; gap: 3.5rem; }
}

/* PHOTO column */
.md-meet-photo-wrap {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.md-meet-photo-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #C8E6C9 0%, #94C181 100%);
    box-shadow:
        0 30px 60px -20px rgba(15, 80, 40, 0.25),
        0 8px 16px -8px rgba(15, 80, 40, 0.15);
    aspect-ratio: 4 / 5;
}
.md-meet-photo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.18), transparent 60%);
    pointer-events: none;
    z-index: 1;
}
.md-meet-photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Floating elements */
.md-meet-float {
    position: absolute;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    box-shadow:
        0 16px 32px -12px rgba(15, 23, 42, 0.18),
        0 4px 8px -4px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    z-index: 3;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.md-meet-float-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; min-width: 0; }
.md-meet-float-text strong { color: var(--md-dark, #1A202C); font-weight: 700; font-size: 0.92rem; white-space: nowrap; }
.md-meet-float-text small { color: var(--md-text-muted); font-size: 0.74rem; white-space: nowrap; }

.md-meet-float-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 14px -6px color-mix(in oklab, var(--g-to, #16A34A) 60%, transparent),
                inset 0 1px 0 rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.md-meet-float-icon svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }

/* Cofrac badge — top-right, slightly rotated */
.md-meet-float-cofrac {
    top: -14px;
    right: -22px;
    transform: rotate(3deg);
    animation: md-meet-bob1 6s ease-in-out infinite;
}

/* Rating — bottom-left */
.md-meet-float-rating {
    bottom: 24px;
    left: -28px;
    transform: rotate(-2deg);
    animation: md-meet-bob2 7s ease-in-out infinite;
}
.md-meet-rating-stars { display: inline-flex; gap: 1px; }
.md-meet-rating-stars svg { width: 14px; height: 14px; fill: #F59E0B; }

/* Bubble — middle-right */
.md-meet-float-bubble {
    top: 42%;
    right: -36px;
    background: var(--md-dark, #1A202C);
    color: #FFFFFF;
    border-radius: 999px;
    padding: 0.5rem 0.95rem 0.5rem 0.6rem;
    font-size: 0.85rem;
    box-shadow:
        0 14px 30px -10px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(255,255,255,0.05) inset;
    transform: rotate(2deg);
    animation: md-meet-bob3 5.5s ease-in-out infinite;
}
.md-meet-float-bubble strong { color: var(--md-fluo, #4ADE80); font-weight: 700; }
.md-meet-bubble-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--md-fluo, #4ADE80);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
    animation: md-meet-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes md-meet-bob1 { 0%,100% { transform: translateY(0) rotate(3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes md-meet-bob2 { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(-2deg); } }
@keyframes md-meet-bob3 { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes md-meet-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.3); } }

/* CONTENT column */
.md-meet-content { max-width: 560px; }
.md-meet-content .md-eyebrow { color: var(--md-primary); }
.md-meet-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.15;
    margin: 0.5rem 0 1.25rem;
    letter-spacing: -0.015em;
    color: var(--md-dark);
}
.md-meet-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--md-text);
    margin: 0 0 2rem;
}

.md-meet-facts {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.md-meet-facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
}
.md-meet-fact-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 11px;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow:
        0 6px 14px -8px color-mix(in oklab, var(--g-to, #16A34A) 55%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.30),
        inset 0 -2px 4px rgba(0,0,0,0.10);
}
.md-meet-fact-icon svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12)); }
.md-meet-facts li > div { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
.md-meet-facts li strong { color: var(--md-dark); font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.md-meet-facts li small { color: var(--md-text-muted); font-size: 0.85rem; line-height: 1.5; margin-top: 2px; }

.md-meet-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.md-meet-cta .md-btn-primary {
    box-shadow: 0 12px 30px -10px rgba(22, 163, 74, 0.5);
    transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms;
}
.md-meet-cta .md-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -12px rgba(22, 163, 74, 0.65); }

@media (max-width: 600px) {
    .md-meet-photo-wrap { max-width: 360px; }
    .md-meet-float-cofrac { right: -8px; top: -10px; }
    .md-meet-float-rating { left: -10px; bottom: 16px; }
    .md-meet-float-bubble { right: -14px; top: 38%; font-size: 0.78rem; padding: 0.4rem 0.8rem 0.4rem 0.5rem; }
    .md-meet-content { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .md-meet-float-cofrac, .md-meet-float-rating, .md-meet-float-bubble, .md-meet-bubble-dot,
    .md-meet-cta .md-btn-primary { animation: none !important; transition: none !important; }
    .md-meet-cta .md-btn-primary:hover { transform: none !important; }
}

/* ============================================
   MEGA-MENU ZONES — départements + top villes
   ============================================ */
.md-mega-menu--zones {
    min-width: min(780px, calc(100vw - 32px));
    max-width: 820px;
    padding: 1.1rem 1.25rem 0.85rem;
}

.md-mega-zones-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.md-mega-zones-head svg {
    width: 16px; height: 16px;
    color: var(--md-primary);
    flex-shrink: 0;
}
.md-mega-zones-head strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--md-dark);
    letter-spacing: -0.005em;
}

.md-mega-zones-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
}

.md-mega-zones-col { min-width: 0; }

.md-mega-zones-deptname {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--md-dark);
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    text-decoration: none;
    transition: color 200ms ease, border-color 200ms ease;
    line-height: 1.2;
    border-bottom: 2px solid rgba(74, 222, 128, 0.25);
    letter-spacing: -0.01em;
}
.md-mega-zones-deptname:hover {
    color: var(--md-primary);
    border-bottom-color: var(--md-primary);
    text-decoration: none;
}
.md-mega-zones-deptname span {
    color: var(--md-primary-dark, #15803D);
    font-weight: 700;
    font-size: 0.78rem;
    margin-left: 4px;
    background: rgba(74, 222, 128, 0.10);
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: 1px;
}

.md-mega-zones-cities {
    list-style: none;
    padding: 0 4px 0 0;
    margin: 0;
    max-height: 168px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--md-primary) rgba(15, 23, 42, 0.06);
}
.md-mega-zones-cities::-webkit-scrollbar { width: 4px; }
.md-mega-zones-cities::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 999px;
}
.md-mega-zones-cities::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    border-radius: 999px;
}
.md-mega-zones-cities li a {
    display: block;
    padding: 0.18rem 0;
    color: var(--md-text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    transition: color 150ms ease, padding-left 150ms ease;
}
.md-mega-zones-cities li a:hover {
    color: var(--md-primary);
    padding-left: 3px;
    text-decoration: none;
}

.md-mega-zones-all {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    width: 100%;
    color: var(--md-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: gap 200ms ease, color 200ms ease;
}
.md-mega-zones-all:hover {
    gap: 0.55rem;
    color: var(--md-primary-dark, #15803D);
    text-decoration: none;
}
.md-mega-zones-all span { transition: transform 200ms ease; }
.md-mega-zones-all:hover span { transform: translateX(3px); }

@media (max-width: 1100px) {
    .md-mega-menu--zones { min-width: min(700px, calc(100vw - 32px)); max-width: 740px; }
}

@media (max-width: 991px) {
    .md-mega-menu--zones {
        min-width: 0;
        max-width: none;
        padding: 0.5rem 0 0.5rem 1rem;
    }
    .md-mega-zones-head { display: none; }
    .md-mega-zones-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem 1rem;
    }
    .md-mega-zones-col { padding: 0.3rem 0; }
    .md-mega-zones-deptname { margin-bottom: 0; font-size: 0.95rem; display: block; }
    .md-mega-zones-deptname span { margin-left: 4px; }
    /* Mobile : on n'affiche QUE les départements + le lien 'voir toutes les zones' */
    .md-mega-zones-cities { display: none; }
    .md-mega-zones-all {
        margin-top: 0.85rem;
        padding-top: 0.85rem;
        font-weight: 700;
    }
}
@media (max-width: 480px) {
    .md-mega-zones-grid { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ============================================
   QUOTE WIZARD — formulaire de devis multi-étapes
   ============================================ */
.md-quote-shell {
    background:
        radial-gradient(800px 400px at 50% 0%, rgba(74, 222, 128, 0.06), transparent 60%),
        linear-gradient(180deg, #FAFCFB 0%, #FFFFFF 60%);
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 200px);
}
.md-quote-inner { margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

/* === Stepper === */
.md-q-stepper {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.md-q-step { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; min-width: 0; }
.md-q-step-bar {
    width: 100%; height: 4px; border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    transition: background 320ms ease;
}
.md-q-step.is-current .md-q-step-bar {
    background: linear-gradient(90deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    box-shadow: 0 4px 12px -4px rgba(22, 163, 74, 0.4);
}
.md-q-step.is-done .md-q-step-bar {
    background: linear-gradient(90deg, #6EE7A0, #16A34A);
}
.md-q-step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--md-text-muted);
    text-transform: capitalize;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.md-q-step.is-current .md-q-step-label { color: var(--md-primary, #16A34A); font-weight: 700; }
.md-q-step.is-done .md-q-step-label { color: var(--md-primary-dark, #15803D); }
.md-q-step-check { color: var(--md-primary); font-weight: 800; }
@media (max-width: 720px) {
    .md-q-step-label { font-size: 0.68rem; }
}

/* === Recap chips === */
.md-q-chips {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.md-q-chip {
    padding: 0.3rem 0.85rem;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--md-dark, #1A202C);
}

/* === Head === */
.md-q-head { text-align: center; margin: 0 auto 2rem; max-width: 620px; }
.md-q-title {
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--md-dark, #1A202C);
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem;
    text-wrap: balance;
}
.md-q-subtitle { color: var(--md-text-muted); font-size: 0.98rem; line-height: 1.5; margin: 0; }

/* === Body === */
.md-q-body { margin-bottom: 2.5rem; }
.md-q-form { display: contents; }
.md-q-errors {
    background: #FEF2F2; border: 1px solid #FECACA;
    color: #B91C1C; padding: 0.85rem 1rem;
    border-radius: 12px; margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

/* === Choices (radio cards) === */
.md-q-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    max-width: 720px;
    margin: 0 auto;
}
@media (max-width: 600px) { .md-q-choices { grid-template-columns: 1fr; } }
.md-q-choice { cursor: pointer; }
.md-q-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.md-q-choice-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.3rem;
    background: white;
    border: 2px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    transition: all 220ms cubic-bezier(.2,.7,.2,1);
    position: relative;
    height: 100%;
}
.md-q-choice-icon {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 14px -6px color-mix(in oklab, var(--g-to, #16A34A) 55%, transparent), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.md-q-choice-icon svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.md-q-choice-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.md-q-choice-text strong { font-size: 1rem; color: var(--md-dark, #1A202C); font-weight: 700; }
.md-q-choice-text small { color: var(--md-text-muted); font-size: 0.85rem; margin-top: 2px; }
.md-q-choice-tick {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.10);
    color: var(--md-primary);
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 220ms, background 220ms;
    flex-shrink: 0;
}
.md-q-choice-tick svg { width: 14px; height: 14px; }
.md-q-choice:hover .md-q-choice-card {
    border-color: rgba(74, 222, 128, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -14px rgba(22, 163, 74, 0.25);
}
.md-q-choice:hover .md-q-choice-icon { transform: scale(1.05) rotate(-3deg); }
.md-q-choice input:checked + .md-q-choice-card {
    border-color: var(--md-primary, #16A34A);
    background: linear-gradient(135deg, rgba(74,222,128,0.06), white 60%);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.md-q-choice input:checked + .md-q-choice-card .md-q-choice-tick {
    opacity: 1;
    background: linear-gradient(135deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    color: white;
}

/* === Inputs === */
.md-q-input {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border: 2px solid rgba(15, 23, 42, 0.10);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--md-dark);
    background: white;
    transition: border-color 200ms, box-shadow 200ms;
}
.md-q-input:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}
.md-q-number-wrap { position: relative; max-width: 320px; margin: 0 auto; }
.md-q-input-number { font-size: 1.25rem; text-align: center; font-weight: 700; }
.md-q-input-suffix {
    position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
    color: var(--md-text-muted); font-weight: 700; pointer-events: none;
}
.md-q-pc-wrap { display: flex; justify-content: center; }
.md-q-input-pc {
    max-width: 280px;
    font-size: 1.6rem; text-align: center; font-weight: 800;
    letter-spacing: 0.18em;
    font-family: var(--md-font-display);
}

/* === Contact fields === */
.md-q-fields { display: grid; gap: 1rem; max-width: 520px; margin: 0 auto; }
.md-q-field { display: flex; flex-direction: column; gap: 0.4rem; }
.md-q-field-label { font-weight: 600; font-size: 0.88rem; color: var(--md-dark); }
.md-q-field-label small { color: var(--md-text-muted); font-weight: 400; margin-left: 4px; }
.md-q-field-input { position: relative; display: flex; align-items: center; }
.md-q-field-icon {
    position: absolute;
    left: 8px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px -4px color-mix(in oklab, var(--g-to, #16A34A) 50%, transparent);
    z-index: 1;
}
.md-q-field-icon svg { width: 16px; height: 16px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.md-q-field-input .md-q-input { padding-left: 50px; }

/* === Final choice cards === */
.md-q-final {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 760px; margin: 0 auto;
}
@media (max-width: 720px) { .md-q-final { grid-template-columns: 1fr; } }
.md-q-final-card {
    display: flex; flex-direction: column; gap: 0.6rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    cursor: pointer;
    transition: all 240ms cubic-bezier(.2,.7,.2,1);
    position: relative;
}
.md-q-final-card input { position: absolute; opacity: 0; }
.md-q-final-card strong { color: var(--md-dark); font-size: 1.1rem; font-weight: 700; }
.md-q-final-card small { color: var(--md-text-muted); font-size: 0.9rem; line-height: 1.45; }
.md-q-final-card ul {
    list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.4rem;
}
.md-q-final-card ul li {
    color: var(--md-text); font-size: 0.88rem; padding-left: 22px; position: relative;
}
.md-q-final-card ul li::before {
    content: "✓"; position: absolute; left: 4px; color: var(--md-primary); font-weight: 800;
}
.md-q-final-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--g-from), var(--g-to));
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px -8px color-mix(in oklab, var(--g-to, #16A34A) 55%, transparent), inset 0 1px 0 rgba(255,255,255,0.3);
    margin-bottom: 0.4rem;
}
.md-q-final-icon svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.md-q-final-card:hover {
    transform: translateY(-3px);
    border-color: rgba(74, 222, 128, 0.5);
    box-shadow: 0 18px 36px -16px rgba(22, 163, 74, 0.25);
}
.md-q-final-card input:checked ~ * { /* dummy */ }
.md-q-final-card:has(input:checked) {
    border-color: var(--md-primary);
    background: linear-gradient(180deg, rgba(74,222,128,0.05), white 60%);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* === Actions === */
.md-q-actions {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
    max-width: 720px; margin: 0 auto;
}
.md-q-back {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: 1.5px solid rgba(15, 23, 42, 0.12);
    color: var(--md-dark);
    font-weight: 700;
    background: white;
    transition: all 180ms;
}
.md-q-back:hover { border-color: var(--md-dark); transform: translateX(-2px); text-decoration: none; }
.md-q-next {
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
    box-shadow: 0 10px 26px -10px rgba(22, 163, 74, 0.55);
    transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.md-q-next:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(22, 163, 74, 0.7); }
.md-q-next svg { transition: transform 220ms; }
.md-q-next:hover svg { transform: translateX(3px); }

/* === Footer reassurance === */
.md-q-foot {
    margin-top: 2.5rem;
    display: flex; flex-direction: column; gap: 0.6rem;
    align-items: center;
    color: var(--md-text-muted);
    font-size: 0.88rem;
}
.md-q-foot-row { display: inline-flex; align-items: center; gap: 0.55rem; }
.md-q-foot-row strong { color: var(--md-dark); font-weight: 700; }
.md-q-foot-icon {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--g-from, #6EE7A0), var(--g-to, #16A34A));
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px -4px color-mix(in oklab, var(--g-to, #16A34A) 50%, transparent);
    flex-shrink: 0;
}
.md-q-foot-icon svg { width: 14px; height: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }

/* ============================================
   QUOTE — étape "diagnostics" avec sticky panel
   ============================================ */
.md-q-diags {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
@media (max-width: 991px) { .md-q-diags { grid-template-columns: 1fr; } }

.md-q-diags-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}
@media (max-width: 720px) { .md-q-diags-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .md-q-diags-grid { grid-template-columns: 1fr; } }

.md-q-diag-card {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: 1.2rem 0.85rem 1rem;
    background: white;
    border: 2px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: all 220ms cubic-bezier(.2,.7,.2,1);
}
.md-q-diag-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.md-q-diag-tag {
    position: absolute; top: 8px; left: 8px;
    padding: 0.15rem 0.5rem;
    background: rgba(74, 222, 128, 0.15);
    color: var(--md-primary-dark, #15803D);
    border-radius: 999px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
}
.md-q-diag-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--g-from), var(--g-to));
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px -8px color-mix(in oklab, var(--g-to, #16A34A) 55%, transparent), inset 0 1px 0 rgba(255,255,255,0.3);
    margin-bottom: 0.7rem;
    transition: transform 240ms cubic-bezier(.2,.7,.2,1);
}
.md-q-diag-icon svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.md-q-diag-name { font-weight: 700; color: var(--md-dark); font-size: 0.95rem; }
.md-q-diag-tick {
    position: absolute; top: 8px; right: 8px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.10);
    color: var(--md-primary);
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 220ms, background 220ms, transform 220ms;
}
.md-q-diag-tick svg { width: 12px; height: 12px; }
.md-q-diag-card:hover { transform: translateY(-3px); border-color: rgba(74,222,128,0.45); box-shadow: 0 14px 28px -14px rgba(22, 163, 74, 0.22); }
.md-q-diag-card:hover .md-q-diag-icon { transform: scale(1.05) rotate(-3deg); }
.md-q-diag-card:has(input:checked) {
    border-color: var(--md-primary);
    background: linear-gradient(160deg, rgba(74,222,128,0.06), white 60%);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.md-q-diag-card:has(input:checked) .md-q-diag-tick {
    opacity: 1;
    background: linear-gradient(135deg, var(--md-fluo, #4ADE80), var(--md-primary, #16A34A));
    color: white;
    transform: scale(1.1);
}

/* === Recap panel === */
.md-q-recap {
    position: sticky; top: 100px;
    padding: 1.5rem;
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 32px -16px rgba(15, 23, 42, 0.10);
}
.md-q-recap-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.md-q-recap-head strong { font-size: 1.1rem; color: var(--md-dark); font-weight: 700; }
.md-q-recap-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--g-from), var(--g-to));
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 14px -6px color-mix(in oklab, var(--g-to, #6D28D9) 55%, transparent);
}
.md-q-recap-icon svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }

.md-q-recap-price {
    background: linear-gradient(135deg, rgba(167,139,250,0.07), rgba(74,222,128,0.05));
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.1rem;
}
.md-q-recap-promo {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0.6rem;
    background: rgba(74, 222, 128, 0.12);
    border-radius: 999px;
}
.md-q-recap-promo-label { font-size: 0.72rem; font-weight: 700; color: var(--md-primary-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.md-q-recap-promo-value { font-size: 0.88rem; font-weight: 800; color: var(--md-primary-dark); }
.md-q-recap-total-line { display: flex; justify-content: space-between; align-items: baseline; }
.md-q-recap-total-label { font-size: 0.78rem; color: var(--md-text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.md-q-recap-total-old { font-size: 0.92rem; color: var(--md-text-muted); text-decoration: line-through; }
.md-q-recap-total {
    font-family: 'IBM Plex Sans', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--md-primary-dark);
    letter-spacing: -0.03em;
    text-align: right;
    margin-top: 0.2rem;
}
.md-q-recap-total span { font-size: 1.4rem; margin-left: 2px; }

.md-q-recap-meta { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.md-q-recap-meta li {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
    font-size: 0.88rem;
}
.md-q-recap-meta li:last-child { border-bottom: 0; }
.md-q-recap-meta li span { color: var(--md-text-muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; font-weight: 600; }
.md-q-recap-meta li strong { color: var(--md-dark); font-weight: 700; }

.md-q-recap-trust { display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.85rem; border-top: 1px solid rgba(15, 23, 42, 0.08); }
.md-q-recap-trust span { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--md-text-muted); font-size: 0.82rem; font-weight: 500; }
.md-q-recap-trust span svg { color: var(--md-primary); }

@media (prefers-reduced-motion: reduce) {
    .md-q-step-bar, .md-q-choice-card, .md-q-choice-icon, .md-q-final-card,
    .md-q-diag-card, .md-q-diag-icon, .md-q-next, .md-q-back, .md-q-back svg, .md-q-next svg { transition: none !important; }
    .md-q-choice:hover .md-q-choice-card, .md-q-final-card:hover, .md-q-diag-card:hover { transform: none !important; }
    .md-q-choice:hover .md-q-choice-icon, .md-q-diag-card:hover .md-q-diag-icon { transform: none !important; }
}
