/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ========== COULEURS (from logo) ========== */
:root {
    --blue-dark: #0f2b4a;
    --blue-primary: #1a5276;
    --blue-medium: #2980b9;
    --blue-light: #5dade2;
    --green-primary: #27ae60;
    --green-light: #58d68d;
    --teal: #1abc9c;
    --gradient-main: linear-gradient(135deg, #1a5276 0%, #1abc9c 50%, #27ae60 100%);
    --gradient-subtle: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%);
    --gradient-card: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ========== LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== HEADER / NAV ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: var(--shadow-md); }
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.nav-logo img {
    height: 48px;
    width: auto;
    display: block;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: color 0.2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--teal);
    transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--blue-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    background: var(--gradient-main);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta::after { display: none; }
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
}
.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-800);
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* ========== HERO ========== */
.hero {
    padding: 140px 0 80px;
    background: var(--gradient-subtle);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26,188,156,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(26,82,118,0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--gray-200);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}
.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--blue-dark);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.hero h1 .highlight {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== SEARCH BOX ========== */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    display: flex;
    gap: 8px;
    max-width: 700px;
    margin: 0 auto 24px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}
.search-box:focus-within {
    border-color: var(--blue-light);
}
.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-width: 0;
}
.search-field svg { flex-shrink: 0; color: var(--gray-400); }
.search-field select,
.search-field input {
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gray-800);
    background: transparent;
    width: 100%;
}
.search-field select { cursor: pointer; }
.search-field { position: relative; }
.autocomplete-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 100;
}
.autocomplete-list.visible { display: block; }
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: .95rem;
    color: var(--gray-700);
    transition: background .15s;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--gray-50, #f8fafc);
    color: var(--primary);
}
.autocomplete-item .ac-cp {
    font-size: .8rem;
    color: var(--gray-400);
    margin-left: auto;
}
.autocomplete-item .ac-icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.search-divider {
    width: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}
.search-btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}
.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.35);
}
.hero-devis-link {
    font-size: 0.95rem;
    color: var(--gray-600);
}
.hero-devis-link a {
    color: var(--blue-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--teal);
    padding-bottom: 1px;
    transition: color 0.2s;
}
.hero-devis-link a:hover { color: var(--teal); }

/* ========== TRUST BAR ========== */
.trust-bar {
    padding: 32px 0;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}
.trust-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--gray-600);
}
.trust-item svg { color: var(--green-primary); flex-shrink: 0; }
.trust-item strong { color: var(--blue-dark); }

/* ========== SECTIONS ========== */
.services { padding: 80px 0; background: white; }
.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal);
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--blue-dark);
    line-height: 1.2;
    margin-bottom: 16px;
}
.section-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== SERVICES GRID ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.3s;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-light);
}
.service-card:hover::before { opacity: 1; }
.service-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 10px;
}
.service-card p {
    font-size: 0.93rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 16px;
}
.service-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}
.service-card:hover .service-link { gap: 10px; }

/* ========== COMMENT CA MARCHE ========== */
.how-it-works { padding: 80px 0; background: var(--gradient-subtle); }
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}
.steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 18%;
    right: 18%;
    height: 2px;
    background: var(--gray-200);
}
.step { text-align: center; position: relative; }
.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--blue-primary);
    position: relative;
    z-index: 1;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}
.step:hover .step-number {
    background: var(--teal);
    color: white;
    transform: scale(1.1);
}
.step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 8px;
}
.step p {
    font-size: 0.93rem;
    color: var(--gray-600);
    max-width: 280px;
    margin: 0 auto;
}

/* ========== STATS ========== */
.stats { padding: 60px 0; background: var(--blue-dark); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.stat { text-align: center; }
.stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-value .accent { color: var(--teal); }
.stat-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
}

/* ========== VILLES ========== */
.cities { padding: 80px 0; background: white; }
.cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.city-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-800);
}
.city-card:hover {
    border-color: var(--blue-light);
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.city-card svg { color: var(--teal); flex-shrink: 0; }
.cities-more { text-align: center; }
.cities-more a {
    color: var(--blue-primary);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--teal);
    padding-bottom: 2px;
}

/* ========== DEVIS CTA ========== */
.cta-section { padding: 80px 0; background: var(--gradient-subtle); }
.cta-card {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.cta-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    position: relative;
}
.cta-card p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}
.cta-form {
    display: flex;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}
.cta-form input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}
.cta-form input::placeholder { color: rgba(255,255,255,0.5); }
.cta-form input:focus { border-color: var(--teal); }
.cta-form button {
    padding: 16px 32px;
    background: white;
    color: var(--blue-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cta-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ========== FAQ ========== */
.faq { padding: 80px 0; background: white; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--blue-dark);
    text-align: left;
    gap: 16px;
}
.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--teal);
}
.faq-item.active .faq-question svg { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.faq-item.active .faq-answer { max-height: 300px; }
.faq-answer p {
    padding-bottom: 24px;
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,0.7);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 16px;
}
.footer-logo img {
    height: 40px;
    width: auto;
    filter: brightness(10) saturate(0);
    opacity: 0.9;
}
.footer h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul a {
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer ul a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.footer-bottom a { transition: color 0.2s; }
.footer-bottom a:hover { color: white; }

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

/* Fade in from bottom on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.services-grid .fade-in:nth-child(1) { transition-delay: 0s; }
.services-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.services-grid .fade-in:nth-child(3) { transition-delay: 0.2s; }
.services-grid .fade-in:nth-child(4) { transition-delay: 0.3s; }
.services-grid .fade-in:nth-child(5) { transition-delay: 0.4s; }
.services-grid .fade-in:nth-child(6) { transition-delay: 0.5s; }

.steps .fade-in:nth-child(1) { transition-delay: 0s; }
.steps .fade-in:nth-child(2) { transition-delay: 0.15s; }
.steps .fade-in:nth-child(3) { transition-delay: 0.3s; }

.stats-grid .fade-in:nth-child(1) { transition-delay: 0s; }
.stats-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stats-grid .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stats-grid .fade-in:nth-child(4) { transition-delay: 0.3s; }

/* Hero entrance animation */
.hero-badge {
    animation: heroSlideDown 0.6s ease both;
    animation-delay: 0.1s;
}
.hero h1 {
    animation: heroSlideDown 0.6s ease both;
    animation-delay: 0.25s;
}
.hero-subtitle {
    animation: heroSlideDown 0.6s ease both;
    animation-delay: 0.4s;
}
.search-box {
    animation: heroSlideUp 0.7s ease both;
    animation-delay: 0.55s;
}
.hero-devis-link {
    animation: heroFadeIn 0.6s ease both;
    animation-delay: 0.75s;
}

@keyframes heroSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroSlideUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Floating glow on search box focus */
.search-box:focus-within {
    border-color: var(--blue-light);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(93,173,226,0.15);
}

/* Shimmer on CTA button */
.search-btn,
.nav-cta {
    position: relative;
    overflow: hidden;
}
.search-btn::after,
.nav-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: none;
    animation: shimmer 3s infinite;
    pointer-events: none;
}
@keyframes shimmer {
    0%   { left: -100%; }
    30%  { left: 100%; }
    100% { left: 100%; }
}

/* ========== MOBILE ========== */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .cities-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-mobile-toggle { display: block; }
    .nav-logo img { height: 38px; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        padding: 24px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        gap: 16px;
    }
    .hero { padding: 120px 0 60px; }
    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .search-box { flex-direction: column; padding: 12px; }
    .search-divider { width: 100%; height: 1px; margin: 0; }
    .search-btn { width: 100%; padding: 14px; }
    .services-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; gap: 32px; }
    .steps::before { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 2rem; }
    .cities-grid { grid-template-columns: 1fr; }
    .cta-card { padding: 40px 24px; }
    .cta-card h2 { font-size: 1.6rem; }
    .cta-form { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .section-header h2 { font-size: 1.7rem; }
}
