/* ==========================================================================
   TONPOTEIMMO — "LE CALCUL CLAIR" DESIGN SYSTEM
   Une app financiere jeune et digitale : blanc net, encre froide, vert
   confiance + ambre humain. Pense pour un premier achat en Ile-de-France,
   pas pour un dossier notarial ni un SaaS indigo generique.
   ========================================================================== */

:root {
    /* Surfaces — blanc net, legerement frais, jamais crème/papier */
    --bg-dark: #F6F8F7;
    --bg-card: rgba(255, 255, 255, 0.96);
    --bg-card-solid: #FFFFFF;
    --border-color: rgba(16, 21, 26, 0.10);
    --border-color-strong: rgba(16, 21, 26, 0.18);
    --border-glow: rgba(99, 102, 241, 0.18);

    /* Encre & texte */
    --text-primary: #10151A;
    --text-secondary: #4A5259;
    --text-muted: #8B939A;

    /* Accents de marque */
    --accent-purple: #6366f1; /* Bleu Indigo — CTA primaire, selections, plan */
    --accent-purple-light: #818cf8;
    --accent-purple-glow: rgba(99, 102, 241, 0.3);
    --accent-yellow: #E08A2E; /* Ambre — accent secondaire, chaleur humaine */
    --accent-yellow-glow: rgba(224, 138, 46, 0.4);

    /* Etats (fonctionnels, jamais decoratifs) */
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-warning: #E08A2E;
    --color-warning-bg: rgba(224, 138, 46, 0.1);
    --color-danger: #D14343;
    --color-danger-bg: rgba(209, 67, 67, 0.1);

    /* Typographie — un display avec du caractere + un grotesque tres lisible,
       jamais Inter/Outfit ni Bricolage Grotesque/mono */
    --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
    --font-sans: 'Hanken Grotesk', 'Inter', sans-serif;
    --font-mono: 'Hanken Grotesk', 'Inter', sans-serif;

    /* Gabarit — coins genereux, langage app digitale plutot que plan/dossier */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Ombres — douces et neutres, jamais de glow colore */
    --shadow-sm: 0 1px 2px rgba(16, 21, 26, 0.04);
    --shadow-md: 0 8px 24px rgba(16, 21, 26, 0.07);
    --shadow-lg: 0 20px 48px rgba(16, 21, 26, 0.10);

    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Alias de compatibilite utilises par les sections partagees (SEO, FAQ,
       "a propos", iceberg) sur toutes les pages qui chargent ce fichier. */
    --primary-color: var(--accent-purple);
    --primary-light: var(--accent-purple-light);
    --text-color: var(--text-primary);
    --bg-glass: var(--bg-card);
    --accent-gradient: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
    --color-error: var(--color-danger);
    --font-body: var(--font-sans);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Base resets & scrollbars */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    min-height: 100vh;
    position: relative;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Background animated mesh gradient */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(14, 122, 92, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(224, 138, 46, 0.05) 0%, transparent 45%),
        #F6F8F7;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
    padding-top: max(0.75rem, env(safe-area-inset-top));
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--accent-yellow);
    filter: drop-shadow(0 0 8px var(--accent-yellow-glow));
    animation: pulse 2s infinite alternate;
}

.accent-text {
    color: var(--accent-yellow);
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-sans);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-link:focus-visible,
.mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(14, 122, 92, 0.35);
    outline-offset: 3px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--accent-purple);
    background: rgba(14, 122, 92, 0.1);
}

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

.main-content {
    max-width: 1300px;
    margin: 0 auto 2rem auto;
    padding: 0 1.5rem;
}

.simulator-container {
    max-width: 950px;
    margin: 0 auto;
}

.pane-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pane-header h1,
.pane-header h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0;
}

.pane-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.badge {
    background: transparent;
    border: 1px solid var(--border-color-strong);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-accent {
    background: transparent;
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
}

/* "Dossier" panel style — hairline border, near-flat, paper surface */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-md);
}


/* ==========================================================================
   HERO — landing, benefice-oriented, un seul CTA
   ========================================================================== */

.hero-section {
    padding: 2.5rem 0 3.5rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--accent-purple);
    background: var(--color-success-bg);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-wrap: balance;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.hero-sub {
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 46ch;
    margin: 0 0 1.75rem;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-cta-row .hero-cta {
    width: auto;
    font-size: 1.05rem;
    padding: 1rem 2rem;
}

.hero-cta-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-trust-strip strong {
    color: var(--text-primary);
}

.hero-preview-card {
    position: relative;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.hero-preview-tag {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: rgba(16, 21, 26, 0.04);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
}

.hero-preview-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-preview-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-preview-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--text-primary);
}

.hero-preview-value.small {
    font-size: 1.35rem;
}

.hero-preview-unit {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.hero-preview-row {
    display: flex;
    gap: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.hero-preview-substat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.hero-preview-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-success);
    background: var(--color-success-bg);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
}

.hero-preview-badge i {
    width: 16px;
    height: 16px;
}

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .hero-preview {
        max-width: 420px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem 0 2rem;
    }

    .hero-title {
        font-size: clamp(1.6rem, 6.5vw, 2rem);
    }

    .hero-sub {
        font-size: 1rem;
        max-width: none;
    }

    .hero-cta-row .hero-cta {
        width: 100%;
        text-align: center;
    }

    .hero-cta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta-note {
        text-align: center;
    }

    .hero-trust-strip {
        gap: 0.5rem 1.1rem;
        font-size: 0.85rem;
    }

    .hero-preview-value {
        font-size: 2rem;
    }
}

/* ==========================================================================
   SIMULATOR PANE
   ========================================================================== */

.simulator-pane {
    min-width: 0; /* Prevents overflow issues in grid */
}

.simulator-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.5rem;
}

.sim-inputs-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sim-inputs-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Property Type Selector */
.property-type-selector {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.property-type-selector input[type="radio"] {
    display: none;
}

.type-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    line-height: 1.2;
}

.type-surface {
    font-size: 0.7rem;
    font-weight: 500;
    font-family: var(--font-sans);
    opacity: 0.7;
}

.property-type-selector input[type="radio"]:checked + .type-btn {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-purple-glow);
}

.property-type-selector input[type="radio"]:checked + .type-btn .type-surface {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9);
}

/* Segmented Pills for 1-Tap Mobile Selection */
.segmented-pills {
    display: flex;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.segmented-pill-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.segmented-pill-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.segmented-pill-btn.active {
    background: var(--accent-purple);
    color: #ffffff;
    border-color: var(--accent-purple);
    box-shadow: 0 2px 8px var(--accent-purple-glow);
}

/* Input Styles */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-val-badge {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent-yellow);
    background: rgba(224, 138, 46, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(224, 138, 46, 0.2);
}

.input-val-badge.badge-blue {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}

/* Range input styling */
.range-container input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

.range-container input[type=range]:focus {
    outline: none;
}

.range-container input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    border: none;
}

.range-container input[type=range]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1), 0 0 0 4px rgba(14, 122, 92, 0.1);
    transition: var(--transition-smooth);
}

.range-container input[type=range]:active::-webkit-slider-thumb {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple-glow), 0 0 0 6px rgba(14, 122, 92, 0.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Form Row Grid */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group-half {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 0.4rem;
    min-width: 0;
}

.input-group-half label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group-half select, .input-group-half input {
    background: rgba(255, 255, 255, 1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    appearance: none;
    margin-top: auto;
    -webkit-appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Fix dropdown arrow for selects since we removed native appearance */
.input-group-half select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23475569%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

.input-group-half select option {
    background-color: #fff;
    color: var(--text-primary);
    padding: 0.5rem;
}

.input-group-half select:focus, .input-group-half input:focus {
    border-color: var(--accent-purple);
    background: #FFFFFF;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 0 0 3px rgba(14, 122, 92, 0.15);
}

/* Capacity Display Box */
.capacity-box {
    background: rgba(14, 122, 92, 0.04);
    border: 1px solid rgba(14, 122, 92, 0.15);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.5rem;
    text-align: center;
}

.cap-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.cap-val {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: none;
    margin-bottom: 0.5rem;
}

.cap-breakdown {
    display: flex;
    justify-content: space-around;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.cap-breakdown span {
    font-weight: 700;
    color: var(--text-primary);
}

.cap-notes {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.ptz-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--color-success);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.ptz-badge {
    background: rgba(14, 122, 92, 0.15);
    border: 1px solid rgba(14, 122, 92, 0.3);
    color: var(--color-success);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    animation: popIn 0.4s ease-out;
}

.ptz-badge i {
    width: 16px;
    height: 16px;
}

.green-text {
    color: var(--color-success) !important;
}

/* ==========================================================================
   INTERACTIVE MAP
   ========================================================================== */

.sim-results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.map-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    width: 100%;
}

.map-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    width: 100%;
    margin-bottom: 1rem;
}

/* Bassins de Vie Selector Bar */
.bassin-selector-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0.75rem;
    width: 100%;
}

.bassin-pill {
    border: 1px solid var(--border-color-strong, #D6DFDB);
    background: rgba(16, 21, 26, 0.04);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body, sans-serif);
    color: var(--text-secondary, #5C6F66);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.bassin-pill:hover {
    background: rgba(16, 21, 26, 0.08);
    color: var(--text-primary, #10151A);
}

.bassin-pill.active {
    background: var(--primary-color, #10151A);
    color: #FFFFFF;
    border-color: var(--primary-color, #10151A);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-wrapper {
    width: 100%;
    max-width: 380px;
    height: 310px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-strong);
    background:
        repeating-linear-gradient(0deg, rgba(16, 21, 26, 0.035) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(90deg, rgba(16, 21, 26, 0.035) 0 1px, transparent 1px 24px),
        var(--bg-card-solid);
}

/* Plan corner marks — echoes a surveyor's drawing sheet */
.map-wrapper::before,
.map-wrapper::after,
.map-card {
    box-sizing: border-box;
}

.map-wrapper::before,
.map-wrapper::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--accent-purple);
    opacity: 0.6;
    pointer-events: none;
    z-index: 2;
}

.map-wrapper::before {
    top: 6px;
    left: 6px;
    border-right: none;
    border-bottom: none;
}

.map-wrapper::after {
    bottom: 6px;
    right: 6px;
    border-left: none;
    border-top: none;
}

/* Fullscreen Map Controls & Mode */
.btn-fullscreen-map {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.btn-fullscreen-map:hover {
    background: #FFFFFF;
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-close-fullscreen {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: var(--text-primary);
    color: #ffffff;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
}

.btn-close-fullscreen:hover {
    background: var(--accent-purple);
    transform: scale(1.03);
}

.btn-close-fullscreen:active {
    transform: scale(0.97);
}

.map-card.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0.75rem 1rem 1.5rem 1rem !important;
    background: #F8FAFC !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-shadow: none !important;
    animation: fadeInFullscreen 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-card.fullscreen .map-card-header {
    padding-right: 110px;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

.map-card.fullscreen .map-card-header h2 {
    color: var(--text-primary, #0F172A) !important;
    font-size: 1.1rem !important;
}

.map-card.fullscreen .btn-close-fullscreen {
    display: inline-flex !important;
}

.map-card.fullscreen .btn-fullscreen-map {
    display: none !important;
}

.map-card.fullscreen .map-wrapper {
    width: 100% !important;
    height: 52vh !important;
    min-height: 280px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    background: #FFFFFF !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color, #E2E8F0) !important;
    box-shadow: var(--shadow-sm) !important;
}

.map-card.fullscreen #dept-hero-image {
    display: none !important;
}

/* Encart d'information en plein écran (uniquement sur les cartes de communes/départements) */
.map-card.fullscreen #city-info-card {
    margin-top: 0.75rem !important;
    flex-shrink: 0 !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s ease;
}

/* Quand aucune commune n'est sélectionnée : masquer "Aperçu du département" et laisser un espace vide / zone réservée */
.map-card.fullscreen #city-info-card:not(.has-selection) {
    background: #FFFFFF !important;
    border: 1px dashed rgba(99, 102, 241, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 0.5rem 1rem !important;
    box-shadow: var(--shadow-sm) !important;
}

.map-card.fullscreen #city-info-card:not(.has-selection) #selected-city-name,
.map-card.fullscreen #city-info-card:not(.has-selection) #selected-city-code,
.map-card.fullscreen #city-info-card:not(.has-selection) .info-grid {
    display: none !important;
}

.map-card.fullscreen #city-info-card:not(.has-selection)::after {
    content: "📍 Sélectionnez une commune sur la carte pour afficher ses informations";
    color: var(--text-secondary, #64748B);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* Quand une commune est sélectionnée : afficher la fiche d'information complète */
.map-card.fullscreen #city-info-card.has-selection {
    display: block !important;
    background: #FFFFFF !important;
    border: 1px solid var(--border-color-strong, #CBD5E1) !important;
    padding: 1rem 1.25rem !important;
    max-height: 38vh !important;
    overflow-y: auto !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
}

@keyframes fadeInFullscreen {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Centroid Text Label on SVG Map */
.map-city-centroid-label {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 11.5px;
    fill: #1A2B3C;
    pointer-events: none;
    paint-order: stroke fill;
    stroke: #FFFFFF;
    stroke-width: 3.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s ease;
}

.city-path.selected {
    stroke: var(--primary-color, #1A5235) !important;
    stroke-width: 2.5px !important;
    filter: drop-shadow(0 0 6px rgba(26, 82, 53, 0.4));
}

.idf-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    cursor: grab;
    pointer-events: all;
}

.idf-svg:active {
    cursor: grabbing;
}

/* SVG Path Map Styles — a fine cadastral plan, not a rounded status blob */
.map-dept {
    fill: rgba(14, 122, 92, 0.03);
    stroke: rgba(14, 122, 92, 0.35);
    stroke-width: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Map Color Codes depending on affordability */
.map-dept.affordable {
    fill: rgba(14, 122, 92, 0.15);
    stroke: var(--color-success);
}
.map-dept.affordable:hover {
    fill: rgba(14, 122, 92, 0.32);
    stroke-width: 1.5;
}

.map-dept.stretch {
    fill: rgba(224, 138, 46, 0.15);
    stroke: var(--color-warning);
}
.map-dept.stretch:hover {
    fill: rgba(224, 138, 46, 0.32);
    stroke-width: 1.5;
}

.map-dept.unaffordable {
    fill: rgba(209, 67, 67, 0.1);
    stroke: var(--color-danger);
}
.map-dept.unaffordable:hover {
    fill: rgba(209, 67, 67, 0.25);
    stroke-width: 1.5;
}

.map-dept.selected {
    stroke-width: 3;
    stroke: var(--accent-purple) !important;
}

.city-path { touch-action: manipulation; }
.city-path:focus, .map-dept:focus { outline: none; }
.city-path:focus-visible, .map-dept:focus-visible { outline: none; stroke: var(--accent-purple) !important; stroke-width: 3px !important; }

/* Labels on map — set like a surveyor's plan annotation */
.map-label {
    fill: var(--text-primary);
    font-size: 8px;
    font-weight: 600;
    font-family: var(--font-mono);
    pointer-events: none;
    text-anchor: middle;
    letter-spacing: 0;
}

.map-label.label-75 { font-size: 6px; }

/* Legend */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.green { background: var(--color-success); }
.legend-dot.yellow { background: var(--color-warning); }
.legend-dot.red { background: var(--color-danger); }

/* ==========================================================================
   DEPARTMENT INFO CARD
   ========================================================================== */

.info-card {
    padding: 1.25rem;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.info-dept-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.info-dept-num {
    background: rgba(16, 21, 26, 0.06);
    color: var(--text-primary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
}

.info-dept-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.status-badge.status-affordable {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(14, 122, 92, 0.3);
}

.status-badge.status-stretch {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid rgba(224, 138, 46, 0.3);
}

.status-badge.status-unaffordable {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid rgba(209, 67, 67, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.stat-val {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
}

.red-text { color: var(--color-danger); }
.green-text { color: var(--color-success); }
.orange-text { color: var(--color-warning); }

.stat-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.info-recommendation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    background: rgba(99, 102, 241, 0.04);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.825rem;
    line-height: 1.4;
    color: var(--text-secondary);
    border: 1px dashed rgba(99, 102, 241, 0.25);
}

.rec-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent-purple);
    margin-top: 2px;
}

/* ==========================================================================
   DEPARTMENTS SUMMARY SECTION
   ========================================================================== */

.depts-summary-section {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.depts-summary-section h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
}

.depts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.dept-summary-card {
    padding: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.dept-summary-card.active {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(14, 122, 92, 0.1);
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-dept-num {
    background: rgba(16, 21, 26, 0.06);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
}

.card-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.card-status-dot.status-dot-affordable { background: var(--color-success); }
.card-status-dot.status-dot-stretch { background: var(--color-warning); }
.card-status-dot.status-dot-unaffordable { background: var(--color-danger); }

.card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.card-price {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.card-gap {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
   LEAD GENERATION (MODAL & CTAs)
   ========================================================================== */

.global-lead-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.dept-cta-container {
    margin-top: 1.25rem;
}

.btn-primary, .btn-secondary, .btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    outline: none;
    position: relative;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #4f46e5;
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--accent-yellow);
}

.btn-primary:active {
    background: #4338ca;
    color: #fff;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Outline CTA — for actions offered alongside a primary CTA. Keeps the brand
   purple as a signal without competing with the one solid purple action on
   screen. */
.btn-outline {
    background: #FFFFFF;
    color: var(--accent-purple);
    border: 1.5px solid var(--accent-purple);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.06);
    box-shadow: none;
}

.w-100 {
    width: 100%;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 21, 26, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #FFFFFF;
    max-width: 450px;
    width: 100%;
    border-radius: var(--radius-lg);
    position: relative;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.modal-icon-container {
    width: 60px;
    height: 60px;
    background: rgba(14, 122, 92, 0.1);
    color: var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.modal-icon-container i {
    width: 28px;
    height: 28px;
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    border-color: var(--accent-purple);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(14, 122, 92, 0.15);
}

.lead-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.4s ease;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--color-success-bg);
    color: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.success-icon i {
    width: 32px;
    height: 32px;
}

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

.app-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ANIMATIONS KEYFRAMES
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 6px var(--accent-yellow-glow)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 14px var(--accent-yellow-glow)); }
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(224, 138, 46, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(224, 138, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 138, 46, 0); }
}

@keyframes popIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   RATP BADGES & SEO GRID (NEW PREMIUM DESIGN)
   ========================================================================== */

.ratp-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-family: var(--font-display);
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.ratp-badge-icon.large {
    width: 48px;
    height: 48px;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.seo-grid-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.seo-grid-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.ratp-station:hover .ratp-dot {
    transform: scale(1.35);
    box-shadow: 0 0 0 6px white, 0 0 15px rgba(0,0,0,0.25) !important;
    z-index: 10;
}
.ratp-station:hover .ratp-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.ratp-station {
    transition: all 0.3s ease;
}
.ratp-line {
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tiktok-pane {
        max-width: 450px;
        margin: 0 auto;
        width: 100%;
    }
    
    .depts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-header {
        padding-bottom: 0.5rem;
    }

    .header-container {
        min-height: 52px;
        padding: 0 1rem;
    }

    .logo {
        max-width: calc(100% - 58px);
    }

    .pane-section {
        gap: 0;
    }
    
    .pane-header {
        display: block !important;
        text-align: left;
        margin-bottom: 1rem;
    }

    .pane-header h1,
    .pane-header h2 {
        font-size: clamp(1.45rem, 6vw, 1.8rem);
        line-height: 1.2;
        text-wrap: balance;
    }

    .pane-header p {
        font-size: 1rem;
        line-height: 1.55;
    }

    .process-section {
        margin: 2rem 0 !important;
    }

    .seo-faq-section,
    .about-expert-section,
    .iceberg-section {
        margin-top: 2rem !important;
        padding: 1.5rem !important;
    }

    .simulator-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        margin-top: 1rem;
    }
    
    .sim-inputs-card, .sim-results-container {
        min-width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .header-container {
        flex-direction: row;
        justify-content: flex-start;
        position: relative;
    }

    .mobile-menu-toggle {
        display: block !important;
        min-width: 44px;
        min-height: 44px;
        border-radius: var(--radius-sm);
        touch-action: manipulation;
    }
    
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0.75rem;
        width: calc(100% - 1.5rem);
        background: #FFFFFF;
        padding: 0.5rem;
        box-shadow: 0 12px 28px rgba(16, 21, 26, 0.13);
        border-radius: var(--radius-md);
        z-index: 150;
        border: 1px solid var(--border-color);
        /* Isolates this dropdown into its own compositing layer — without it, the
           sticky + backdrop-filter header above causes the header's blur to leak
           through this panel's background on some engines, making page text behind
           it visible through what should be an opaque menu. */
        isolation: isolate;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-scrim {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(16, 21, 26, 0.32);
        /* Must stay below .app-header's z-index (100): .app-header is
           position:sticky with its own z-index, so it forms its own stacking
           context. A scrim z-index higher than the header's paints over the
           ENTIRE header — including the open dropdown and toggle button,
           whose z-index only applies within that context — silently
           swallowing every tap on the mobile menu. */
        z-index: 90;
        border: 0;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-scrim.active {
        display: block;
    }

    .main-nav .nav-link {
        width: 100%;
        padding: 0.65rem 0.75rem;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .glass-panel {
        padding: 1.25rem;
    }

    .cap-breakdown {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .property-type-selector {
        flex-wrap: wrap;
        gap: 0.35rem;
        padding: 0.35rem;
    }
    
    .type-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-height: 52px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .input-group-half select,
    .input-group-half input {
        min-height: 48px;
        font-size: 1rem;
    }

    .range-container input[type=range] {
        min-height: 44px;
    }

    .map-wrapper {
        max-width: min(100%, 380px);
        height: auto;
        aspect-ratio: 1.225 / 1;
    }

    .map-legend {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.65rem 1rem;
    }

    /* Quick Profile Shortcuts on Mobile & Desktop */
    .quick-profile-section {
        background: rgba(34, 58, 86, 0.04);
        border: 1px solid rgba(34, 58, 86, 0.12);
        border-radius: var(--radius-md);
        padding: 0.85rem 1rem;
        margin-bottom: 1.25rem;
    }
    .quick-profile-title {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--accent-purple);
        display: flex;
        align-items: center;
        gap: 0.35rem;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .quick-profile-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .quick-profile-card {
        background: #FFFFFF;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 0.5rem 0.4rem;
        text-align: center;
        cursor: pointer;
        transition: var(--transition-smooth);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
    }
    .quick-profile-card:hover, .quick-profile-card.selected {
        border-color: var(--accent-purple);
        background: rgba(99, 102, 241, 0.05);
        transform: translateY(-1px);
    }
    .quick-profile-name {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--text-primary);
    }
    .quick-profile-detail {
        font-size: 0.72rem;
        color: var(--text-secondary);
        font-family: var(--font-mono);
    }

    .mobile-progress {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin: 0 0 1.25rem;
        position: sticky;
        top: 0;
        z-index: 800;
        background: var(--bg-dark);
        padding: 0.5rem 0;
    }

    .mobile-progress .mobile-tab-btn {
        min-height: 48px;
        white-space: nowrap;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: #FFFFFF;
        color: var(--text-secondary);
        padding: 0.65rem 0.85rem;
        font: 700 0.88rem var(--font-body);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        box-shadow: var(--shadow-sm);
        cursor: pointer;
        transition: var(--transition-smooth);
    }

    .mobile-progress .mobile-tab-btn[aria-current="step"],
    .mobile-progress .mobile-tab-btn.active,
    .mobile-progress .mobile-tab-btn:active {
        color: #FFFFFF;
        background: var(--accent-purple);
        border-color: var(--accent-purple);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    }

    .mobile-progress .tab-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.2);
        color: #FFFFFF;
        font-family: var(--font-mono);
    }

    .mobile-step-action { display: flex; margin: 1.25rem 0 0; min-height: 52px; }
    .mobile-secondary-action { margin-top: 1rem !important; }

    .mobile-disclosure { margin: 0 0 1rem; }
    .mobile-disclosure summary {
        min-height: 52px;
        display: flex;
        align-items: center;
        cursor: pointer;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 0 1rem;
        color: var(--text-primary);
        font-family: var(--font-display);
        font-weight: 700;
        list-style: none;
    }
    .mobile-disclosure summary::-webkit-details-marker { display: none; }
    .mobile-disclosure summary::after { content: '+'; margin-left: auto; color: var(--accent-purple); font-size: 1.35rem; }
    .mobile-disclosure[open] summary { margin-bottom: 0.75rem; }
    .mobile-disclosure[open] summary::after { content: '−'; }
    .map-disclosure .map-card { padding: 1.125rem; }
    .sim-results-container .info-card { order: 0; }
    .idf-svg { touch-action: manipulation; }
    .map-load-error { color: var(--color-danger); font-size: 0.875rem; }
    body:has(.mobile-budget-bar:not([hidden])) { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
    .mobile-budget-bar {
        position: fixed;
        z-index: 900;
        right: 0;
        bottom: 0;
        left: 0;
        min-height: 64px;
        padding: 0.65rem max(1rem, env(safe-area-inset-right)) calc(0.65rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color-strong);
        box-shadow: 0 -10px 28px rgba(16, 21, 26, 0.12);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }
    .mobile-bar-info {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
    }
    .mobile-bar-label {
        font-size: 0.72rem;
        color: var(--text-secondary);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    .mobile-bar-values {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .mobile-bar-amount {
        color: var(--text-primary);
        font: 800 1.25rem var(--font-mono);
        letter-spacing: -0.5px;
    }
    .mobile-bar-ptz-tag {
        display: inline-flex;
        align-items: center;
        gap: 0.2rem;
        font-size: 0.68rem;
        font-weight: 700;
        background: var(--color-success-bg);
        color: var(--color-success);
        padding: 0.15rem 0.45rem;
        border-radius: var(--radius-sm);
    }
    .mobile-bar-subtext {
        font-size: 0.74rem;
        color: var(--accent-purple);
        font-weight: 600;
    }
    .mobile-bar-btn {
        min-height: 48px;
        border: 0;
        border-radius: var(--radius-sm);
        background: var(--accent-purple);
        color: #ffffff;
        padding: 0.6rem 1.1rem;
        font: 700 0.88rem var(--font-body);
        display: flex;
        align-items: center;
        gap: 0.35rem;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
        transition: var(--transition-smooth);
    }
    .mobile-bar-btn:active {
        transform: scale(0.96);
    }
    .tooltip-container { cursor: pointer; }
    .tooltip-container .tooltip-text { position: static; visibility: visible; opacity: 1; display: none; transform: none; width: auto; margin: .5rem 0 0; pointer-events: auto; }
    .tooltip-container:focus-within .tooltip-text, .tooltip-container:has([aria-expanded="true"]) .tooltip-text, .tooltip-container:active .tooltip-text { display: block; }
    .modal-overlay, #premium-lead-modal { align-items: flex-end !important; padding: 0 !important; }
    .modal-content, #premium-lead-modal > div { width: 100% !important; max-width: none !important; max-height: min(86dvh, 720px); overflow-y: auto !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; padding: 2rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)) !important; }
    .modal-close, #premium-lead-modal button[aria-label="Fermer la fenêtre"] { width: 44px !important; height: 44px !important; }
}

.mobile-progress, .mobile-step-action, .mobile-budget-bar, .visually-hidden { display: none; }
.mobile-disclosure { display: block; }
.mobile-disclosure > summary { display: none; }
.mobile-progress { display: none !important; }
@media (max-width: 767px) { .mobile-disclosure { display: block; } .mobile-disclosure > summary { display: flex; } .mobile-step-action { display: flex; } }
@media (hover: none) { .btn-primary:active, .btn-secondary:active, .type-btn:active { transform: scale(.98); } }

@media (max-width: 480px) {
    .main-content {
        padding: 0 1rem max(1.5rem, env(safe-area-inset-bottom));
    }
    
    .depts-grid {
        grid-template-columns: 1fr;
    }
    
    .phone-frame {
        width: 100%;
        height: 540px;
    }

    .pane-header h1 {
        font-size: 1.3rem;
    }

    .cap-val {
        font-size: 1.5rem;
    }

    .btn-primary, .btn-secondary {
        font-size: 0.95rem;
        padding: 0.75rem;
        min-height: 48px;
    }

    .glass-panel {
        padding: 1.125rem;
        border-radius: var(--radius-md);
    }

    .info-header,
    .face-off-delta-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (pointer: coarse) {
    .nav-link,
    .type-btn,
    .btn-primary,
    .btn-secondary,
    button,
    select,
    input:not([type="hidden"]) {
        touch-action: manipulation;
    }

    .glass-panel:hover,
    .seo-grid-button:hover {
        transform: none;
    }
}

/* ==========================================================================
   SEO FAQ Section
   ========================================================================== */
.seo-faq-section {
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding: 3rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.seo-faq-section h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.8);
}

.faq-item h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.faq-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   FAQ Accordion (faq.html)
   ========================================================================== */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-accordion-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-accordion-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.faq-accordion-header:hover {
    color: var(--primary-color);
}

.faq-accordion-header svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-accordion-item.active .faq-accordion-header svg {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion-content-inner {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    border-top: 1px solid transparent;
}

.faq-accordion-item.active .faq-accordion-content-inner {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1.5rem;
}

/* About Expert Section */
.about-expert-section {
    margin-top: 4rem;
    padding: 3rem;
    border-radius: var(--radius-xl);
    display: flex;
    gap: 3rem;
    align-items: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(241, 238, 230, 0.95));
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.about-expert-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--accent-gradient);
    opacity: 0.1;
    filter: blur(40px);
    border-radius: 50%;
}

.expert-content {
    flex: 1;
    z-index: 1;
}

.expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--accent-purple);
    border: 1px solid var(--accent-purple);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.expert-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.expert-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.expert-text:last-of-type {
    margin-bottom: 2rem;
}

.expert-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.expert-visual {
    flex: 0 0 350px;
    position: relative;
    z-index: 1;
}

.expert-visual-card {
    background: #FFFFFF;
    padding: 0.5rem;
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.expert-photo-placeholder {
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expert-shield {
    width: 100px;
    height: 100px;
    color: var(--accent-purple);
    opacity: 0.8;
}

.expert-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 2rem 1.5rem 1.5rem;
}

.expert-name {
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
}

.expert-role {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.trust-badge-floating {
    position: absolute;
    bottom: -18px;
    left: 1rem;
    background: #FFFFFF;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid var(--border-color-strong);
}

.trust-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.trust-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.trust-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive Expert Section */
@media (max-width: 992px) {
    .about-expert-section {
        flex-direction: column;
        padding: 2rem;
    }
    .expert-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
    }
    /* This is a trust-building secondary section, not the page's main task —
       it should never out-weigh .hero-title, which caps at 2rem on mobile. */
    .expert-title {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }
}

@media (max-width: 640px) {
    /* The department links wrap at their natural (unequal) text width,
       which reads as a ragged, disorganized list on a narrow screen —
       force a clean 2-column grid instead. */
    .dept-links-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem !important;
    }
    .dept-links-grid .dept-link-chip {
        padding: 0.75rem 0.5rem !important;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .expert-stats {
        grid-template-columns: 1fr;
    }

    /* At this width the card is narrow enough that a bottom-left floating
       badge overlaps the name/role caption burned into the photo. Move it
       to the top-right corner, clear of that text. */
    .trust-badge-floating {
        bottom: auto;
        top: -14px;
        left: auto;
        right: 1rem;
    }
}

/* --- COMPARATIF ICEBERG TABLE --- */
.iceberg-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}
.iceberg-table-container {
    overflow-x: auto;
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}
.iceberg-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.iceberg-table th, .iceberg-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.iceberg-table th {
    background: rgba(241, 238, 230, 0.6);
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.iceberg-table .col-neuf {
    background: rgba(14, 122, 92, 0.05);
    border-left: 2px solid var(--color-success);
}
.iceberg-table .col-ancien {
    background: rgba(209, 67, 67, 0.05);
    border-left: 2px solid var(--color-error);
}
.iceberg-table tr:last-child td {
    border-bottom: none;
}
.iceberg-icon-success {
    color: var(--color-success);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.iceberg-icon-error {
    color: var(--color-error);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.iceberg-cta {
    margin-top: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    color: white;
}
.iceberg-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
}
.iceberg-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}
.iceberg-cta .btn-white {
    background: #FFFFFF;
    color: var(--primary-color);
    border: none;
}
.iceberg-cta .btn-white:hover {
    background: #F6F8F7;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* --- FAQ ACCORDIONS --- */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}
.faq-category {
    margin-bottom: 3rem;
}
.faq-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item.active {
    border-color: var(--primary-light);
    box-shadow: 0 4px 15px rgba(14, 122, 92, 0.1);
}
.faq-question {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.5);
}
.faq-question:hover {
    background: rgba(241, 238, 230, 0.85);
}
.faq-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}
.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}
.faq-item.active .faq-answer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    max-height: 500px; /* arbitrary large max-height for animation */
    opacity: 1;
}


/* Tooltips */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    cursor: help;
    vertical-align: middle;
}

.tooltip-container .tooltip-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.tooltip-container:hover .tooltip-icon {
    color: var(--accent-purple);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 220px;
    background-color: #10151A;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: normal;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #10151A transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container.active-mobile .tooltip-text,
.tooltip-container.active-tooltip .tooltip-text {
    visibility: visible !important;
    opacity: 1 !important;
    bottom: 125%;
}

.header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* --- Process Section --- */
.process-section {
    margin: 5rem 0;
    text-align: center;
}

.process-section h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.process-section p.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

.process-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--accent-purple);
    border-radius: var(--radius-md);
    padding: 2.25rem 1.75rem 1.75rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition-smooth);
    text-align: left;
}

.process-card:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-md);
}

.process-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
}

.process-icon-wrapper i {
    width: 20px !important;
    height: 20px !important;
}

.process-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.process-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    opacity: 1;
    position: absolute;
    top: 1.5rem;
    right: 1.75rem;
    line-height: 1;
}

.process-number::before {
    content: "0";
}

.process-number::after {
    content: " / 03";
}

.process-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
    margin: 0;
}

/* --- Smart Popup --- */
.smart-popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(16, 21, 26, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.smart-popup-overlay.show {
    display: flex;
    opacity: 1;
}

.smart-popup-content {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-popup-overlay.show .smart-popup-content {
    transform: translateY(0) scale(1);
}

.smart-popup-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.smart-popup-close:hover {
    color: var(--primary-color);
}

.smart-popup-icon {
    width: 72px; height: 72px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-purple);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.smart-popup-content h3 {
    font-size: 1.8rem;
    font-family: var(--font-display);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.smart-popup-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.smart-popup-actions {
    display: flex; flex-direction: column; gap: 1rem;
}

.btn-secondary-link {
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.95rem;
    cursor: pointer;
    background: none; border: none;
}

.btn-secondary-link:hover {
    color: var(--primary-color);
}

/* --- SEO Section --- */
.seo-section {
    margin: 4rem 0;
    padding: 3rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.seo-section h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.seo-section h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.seo-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.seo-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .seo-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    .seo-section h2 {
        font-size: 1.6rem;
    }
    .seo-section h3 {
        font-size: 1.2rem;
    }
}







/* Transport Badges */
.transports-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }
.badge-transport { display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; font-family: var(--font-display); border-radius: 6px; padding: 2px 8px; min-width: 28px; height: 28px; color: white; background-color: #333; }
.badge-rer-a { background-color: #E3051C; }
.badge-rer-b { background-color: #5291CE; }
.badge-rer-c { background-color: #FFCE00; color: #000; }
.badge-rer-d { background-color: #00814F; }
.badge-rer-e { background-color: #C04191; }
.badge-metro { background-color: #000; }
.badge-metro-1 { background-color: #FFBE00; color: #000; }
.badge-metro-2 { background-color: #0055C8; }
.badge-metro-3 { background-color: #6E9419; }
.badge-metro-3bis { background-color: #6ECCD4; color: #000; }
.badge-metro-4 { background-color: #B10886; }
.badge-metro-5 { background-color: #E4822B; }
.badge-metro-6 { background-color: #7DBA7E; }
.badge-metro-7 { background-color: #E79BB5; color: #000; }
.badge-metro-7bis { background-color: #7DBA7E; color: #000; }
.badge-metro-8 { background-color: #C9A1CB; color: #000; }
.badge-metro-9 { background-color: #CDCC29; color: #000; }
.badge-metro-10 { background-color: #DE8A27; }
.badge-metro-11 { background-color: #714C27; }
.badge-metro-12 { background-color: #00814F; }
.badge-metro-13 { background-color: #6ECCD4; color: #000; }
.badge-metro-14 { background-color: #652F8C; }
.badge-metro-15 { background-color: #B90A4A; }
.badge-metro-16 { background-color: #F3A4BA; color: #000; }
.badge-metro-17 { background-color: #D5C900; color: #000; }
.badge-metro-18 { background-color: #00A88F; }
.badge-transilien { background-color: #8B8B8B; }
.badge-trans-h { background-color: #794A2D; }
.badge-trans-j { background-color: #BDB92C; color: #000; }
.badge-trans-k { background-color: #B1B045; color: #000; }
.badge-trans-l { background-color: #6C66AF; }
.badge-trans-n { background-color: #00A68A; }
.badge-trans-p { background-color: #ECA300; color: #000; }
.badge-trans-r { background-color: #E293B3; color: #000; }
.badge-trans-u { background-color: #C90062; }
.badge-tram { background-color: #000; border: 2px solid #ccc; color: #fff; border-radius: 50%; width: 28px; height: 28px; padding: 0; min-width: 0; }
.badge-tram-1 { background-color: #0064B0; border-color: #0064B0; }
.badge-tram-2 { background-color: #C90062; border-color: #C90062; }
.badge-tram-3a { background-color: #F3A411; border-color: #F3A411; color: #000; }
.badge-tram-3b { background-color: #008C5A; border-color: #008C5A; }
.badge-tram-4 { background-color: #E99E25; border-color: #E99E25; color: #000; }
.badge-tram-5 { background-color: #6C66AF; border-color: #6C66AF; }
.badge-tram-6 { background-color: #E3051C; border-color: #E3051C; }
.badge-tram-7 { background-color: #794A2D; border-color: #794A2D; }
.badge-tram-8 { background-color: #A1A825; border-color: #A1A825; color: #000; }
.badge-tram-9 { background-color: #0055C8; border-color: #0055C8; }
.badge-tram-10 { background-color: #AEB226; border-color: #AEB226; color: #000; }
.badge-tram-11 { background-color: #F3A411; border-color: #F3A411; color: #000; }
.badge-tram-12 { background-color: #E293B3; border-color: #E293B3; color: #000; }
.badge-tram-13 { background-color: #794A2D; border-color: #794A2D; }

.badge-future {
    opacity: 0.8;
    border: 2px dashed rgba(0,0,0,0.3) !important;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.2) 5px, rgba(255,255,255,0.2) 10px);
}


/* --- Modal Lead Gen Styles --- */
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        @keyframes fadeSlideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        .step-btn {
            display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.2rem;
            background: #F6F8F7; border: 1px solid var(--border-color-strong); border-radius: var(--radius-sm);
            cursor: pointer; text-align: left; font-size: 1.1rem;
            font-weight: 600; color: var(--text-primary); transition: var(--transition-smooth);
        }
        .step-btn:hover {
            border-color: var(--primary-color); background: #EAF0EA;
        }

        .premium-card {
            display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.25rem;
            background: #FFFFFF; border: 1px solid var(--border-color-strong); border-radius: var(--radius-md);
            cursor: pointer; text-align: left; transition: var(--transition-smooth);
            box-shadow: var(--shadow-sm);
        }
        .premium-card:hover {
            border-color: var(--primary-color); background: #F6F8F7;
            box-shadow: var(--shadow-md);
        }
        .premium-card .card-icon {
            display: flex; align-items: center; justify-content: center;
            width: 48px; height: 48px; border-radius: var(--radius-sm);
            background: #E6E4D8; color: var(--primary-color);
        }
        .premium-card .card-content { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
        .premium-card .card-content strong { font-size: 1.15rem; color: var(--text-primary); font-family: var(--font-display); font-weight: 700; }
        .premium-card .card-content span { font-size: 0.95rem; color: var(--text-secondary); }
        .premium-card .card-arrow { color: #B9AF98; transition: transform 0.2s; }
        .premium-card:hover .card-arrow { transform: translateX(5px); color: var(--primary-color); }

/* Department result: keep the affordability gap unmissable without obscuring advice. */
.dept-card--priority {
    padding: 1.4rem;
    border-radius: var(--radius-md);
}

.dept-card--priority .info-grid {
    gap: 0.75rem;
}

.dept-card--priority .info-stat:last-child {
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--color-danger, #D14343) 8.1%, white);
}

.dept-card--priority .info-stat:last-child .stat-val {
    font: 700 clamp(1.45rem, 3vw, 1.9rem)/1 var(--font-mono);
}

/* ==========================================================================
   INTERACTIVE SIMULATOR INPUT ENHANCEMENTS (HYBRID TRI-MODE)
   ========================================================================== */

.value-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stepper-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-strong);
    background: #FFFFFF;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: var(--transition-smooth);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.stepper-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: #F6F8F7;
}

.stepper-btn:active {
    transform: scale(0.92);
    background: rgba(99, 102, 241, 0.1);
}

.editable-badge {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: var(--transition-smooth);
    border: 1px dashed transparent;
}

.editable-badge:hover,
.editable-badge:focus-visible {
    border-color: var(--accent-purple);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.editable-badge::after {
    content: " ✎";
    font-size: 0.75em;
    opacity: 0.6;
    margin-left: 2px;
}

.badge-input-edit {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    background: #FFFFFF;
    border: 2px solid var(--accent-purple);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.5rem;
    width: 110px;
    text-align: right;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Preset pills row */
.preset-pills-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.preset-pill-label {
    font-size: 0.75rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 0.2rem;
}

.preset-pill {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    touch-action: manipulation;
    min-height: 32px;
}

.preset-pill:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: rgba(99, 102, 241, 0.04);
}

.preset-pill:active {
    transform: scale(0.95);
    background: rgba(99, 102, 241, 0.12);
}

@media (max-width: 480px) {
    .stepper-btn {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }
    
    .preset-pill {
        padding: 0.35rem 0.75rem;
        font-size: 0.82rem;
        min-height: 36px;
    }
}

.budget-to-map-transition,
.budget-to-map-transition h3,
.budget-to-map-transition::after,
.budget-to-map-transition::before {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    box-shadow: none !important;
}

