/* ============================================
   DESIGN - devisascenseurdemaison.fr
   ============================================ */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-light);
}

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

.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 2rem;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.logo:hover .logo-icon {
    transform: scale(1.08);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-devis {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-devis:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    color: white !important;
}

@keyframes pulse-devis {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.nav-links .btn-devis {
    animation: pulse-devis 2.5s infinite;
}

/* Menu burger mobile */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Barre de recherche */
.search-box {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    box-shadow: var(--shadow-lg);
    outline: none;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}

.search-results.active {
    display: block;
}

.search-results a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.search-results a:last-child {
    border-bottom: none;
}

.search-results a:hover {
    background: #f1f5f9;
}

.search-results .result-cp {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 0.4rem;
}

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ============================================
   GRILLES DE CARTES
   ============================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.card p {
    font-size: 0.9rem;
    color: var(--text-light);
    flex-grow: 1;
}

.card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
}

.card .card-arrow {
    color: var(--primary);
    font-weight: 600;
}

/* Cartes types d'ascenseurs avec icônes SVG */
.card-type {
    text-align: center;
    padding: 2rem 1.5rem;
}

.card-type-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    color: var(--primary);
    background: #eff6ff;
    border-radius: 16px;
    padding: 14px;
    transition: transform 0.3s, background 0.3s;
}

.card-type:hover .card-type-icon {
    transform: scale(1.08);
    background: #dbeafe;
}

.card-type-icon svg {
    width: 100%;
    height: 100%;
}

.card-type h3 {
    color: var(--text);
}

.card-type .prix {
    font-size: 1rem;
}

.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .card-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Cartes de régions */
.card-region {
    border-left: 4px solid var(--primary);
}

/* Cartes de départements */
.card-dept {
    border-left: 4px solid var(--secondary);
}

/* ============================================
   LISTE DE VILLES
   ============================================ */

.ville-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.6rem;
    margin-bottom: 3rem;
}

.ville-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.ville-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
}

.ville-link:hover {
    background: #eff6ff;
    border-color: var(--primary-light);
    color: var(--primary);
}

.ville-link .cp {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* ============================================
   PAGE VILLE - CONTENU
   ============================================ */

.ville-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 3rem 2rem;
}

.ville-header-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.ville-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.ville-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Stats en chiffres */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin: -2rem 0 2rem;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--primary);
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Tableau des prix */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.price-table thead {
    background: var(--primary);
    color: white;
}

.price-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.price-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
}

.price-table tbody tr:hover {
    background: #f8fafc;
}

.price-table .prix {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

/* Bloc aides financières */
.aide-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--success);
}

.aide-card:nth-child(even) {
    border-left-color: var(--secondary);
}

.aide-card:nth-child(3n) {
    border-left-color: var(--accent);
}

.aide-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.aide-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.aide-card .aide-montant {
    font-weight: 700;
    color: var(--success);
}

/* Cartes prestataires */
.presta-card {
    border-left: 4px solid var(--accent);
}

.presta-specialites {
    font-size: 0.8rem !important;
    color: var(--accent) !important;
    font-weight: 600;
    margin-bottom: 0.8rem !important;
    flex-grow: 0 !important;
}

.presta-details {
    flex-grow: 1;
}

.presta-details p {
    margin-bottom: 0.3rem;
    flex-grow: 0;
}

.presta-adresse {
    font-size: 0.85rem !important;
}

.presta-tel {
    font-weight: 600;
    color: var(--primary) !important;
    font-size: 0.95rem !important;
}

.presta-note .stars {
    color: var(--accent);
    font-size: 1rem;
    margin-right: 0.3rem;
}

.presta-avis {
    color: var(--text-light);
    font-weight: 400;
}

.presta-distance {
    background: #fef3c7;
    color: #92400e;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.no-presta {
    background: white;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}

.no-presta p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Bouton contacter sur prestataires */
.btn-contacter {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 0.8rem;
}

.btn-contacter:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    color: white !important;
}

/* Badge confiance style Trustpilot */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    box-shadow: var(--shadow);
}

.trust-stars {
    color: var(--accent);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.trust-score {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
}

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

/* Badge dans le hero */
.hero .trust-badge {
    margin-top: 1.5rem;
}

/* Badge sur page ville */
.trust-badge-ville {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.trust-badge-ville .trust-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    flex-shrink: 0;
}

.trust-badge-ville .trust-info {
    flex-grow: 1;
}

.trust-badge-ville .trust-info h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.trust-badge-ville .trust-info .stars {
    color: var(--accent);
    font-size: 1rem;
    letter-spacing: 1px;
}

.trust-badge-ville .trust-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

.trust-badge-ville + .stats-row {
    margin-top: 1.5rem;
}

/* Page devis dédiée */
.devis-page-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
}

.devis-page-form {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.devis-page-form .trust-badge {
    margin-bottom: 1.5rem;
}

.devis-info-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.2rem;
}

.devis-info-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.devis-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.devis-step p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

.devis-avantages {
    list-style: none;
    padding: 0;
}

.devis-avantages li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text);
}

.devis-avantages li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

@media (max-width: 768px) {
    .devis-page-grid {
        grid-template-columns: 1fr;
    }

    .trust-badge-ville {
        flex-direction: column;
        text-align: center;
    }
}

/* FAQ Accordéon */
.faq-list {
    margin-bottom: 2rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    transition: background 0.15s;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-chevron {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.2rem;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 1000px;
}

/* Bloc devis */
.devis-section {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.devis-section h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.devis-section p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Contenu SEO */
.seo-content {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
    line-height: 1.8;
}

.seo-content h2 {
    font-size: 1.4rem;
    color: var(--text);
    margin: 1.5rem 0 0.8rem;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content p {
    margin-bottom: 1rem;
    color: var(--text);
}

.seo-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.seo-content li {
    margin-bottom: 0.3rem;
}

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

.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

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

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .ville-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .ville-header h1 {
        font-size: 1.5rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .price-table {
        font-size: 0.85rem;
    }

    .price-table th, .price-table td {
        padding: 0.6rem;
    }
}

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

    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BOUTON FLOTTANT DEVIS
   ============================================ */

.floating-devis {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.floating-devis.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.floating-devis a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 0.9rem 1.6rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 6px 24px rgba(30, 64, 175, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.floating-devis a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(30, 64, 175, 0.5);
}

.floating-devis .floating-icon {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .floating-devis {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .floating-devis a {
        justify-content: center;
        width: 100%;
    }

    .ville-grid-3 {
        grid-template-columns: 1fr;
    }
}
