:root {
    --primary-green: #3EAE74;
    --primary-orange: #E24B2D;
    --hover-dark: #2C2C2C;
    --bg-light: #F5F5F5;
    --text-dark: #333333;
}

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

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

/* Top Header */
.top-header {
    background-color: var(--primary-orange);
    color: #FFFFFF;
    padding: 8px 0;
    font-size: 14px;
}

.top-header .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-header a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
}

/* Main Header */
.main-header {
    background-color: var(--primary-green);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-section:hover {
    text-decoration: none;
}

.logo-section img {
    height: 70px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    border-radius: 10px;
}

.logo-section h1 {
    color: #FFFFFF;
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-btn {
    background-color: var(--primary-orange);
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background-color: var(--hover-dark);
    transform: translateY(-1px);
}

.search-btn i {
    font-size: 12px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 0.8;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, #2d8659 100%);
    color: #FFFFFF;
    padding: 80px 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-image {
    flex: 1;
    max-width: 500px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    max-width: 500px;
}

.hero-section .tagline {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-section .tagline strong {
    color: #FFFFFF;
    font-weight: 700;
}

.consulter-badge {
    display: inline-block;
    color: #FFFFFF;
    padding: 4px 16px;
    font-weight: 700;
    margin: 0 8px;
    position: relative;
    z-index: 1;
}

.consulter-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-orange);
    transform: skewX(-10deg);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.hero-disclaimer {
    font-size: 0.85rem;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
}

.hero-cta {
    background-color: var(--primary-orange);
    color: #FFFFFF;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(226, 75, 45, 0.3);
}

.hero-cta:hover {
    background-color: var(--hover-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta-inline {
    background-color: var(--primary-orange);
    color: #FFFFFF;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(226, 75, 45, 0.3);
    margin: 0 5px;
}

.hero-cta-inline:hover {
    background-color: var(--hover-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
    text-decoration: none;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.cta-box h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

.cta-box p {
    margin-bottom: 20px;
}

.cta-box .hero-subtitle {
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.cta-box .hero-disclaimer {
    font-size: 0.8rem;
    margin-top: 10px;
    color: #666;
    line-height: 1.5;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background-color: var(--primary-orange);
    color: #FFFFFF;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s;
}

.cta-button:hover {
    background-color: var(--hover-dark);
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.content-section h2 {
    color: var(--primary-green);
    margin-bottom: 30px;
    font-size: 2rem;
}

.content-section h3 {
    color: var(--text-dark);
    margin: 25px 0 15px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.tarifs-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tarifs-table th,
.tarifs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.tarifs-table th {
    background-color: var(--primary-green);
    color: #FFFFFF;
    font-weight: 600;
}

.tarifs-table tr:hover {
    background-color: #f5f5f5;
}

/* Cities Grid */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.city-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    text-decoration: none;
}

.city-card span {
    color: var(--primary-green);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.city-card .population {
    color: #666;
    font-size: 0.9rem;
}

/* Departments List */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.dept-link {
    background: #FFFFFF;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dept-link:hover {
    background-color: var(--primary-green);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.blog-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--primary-green);
}

.blog-card-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.blog-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s;
}

.blog-card-link:hover {
    gap: 10px;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-green);
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #129F59;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(18, 159, 89, 0.3);
}

/* Blog section specific button */
.blog-section .btn-primary {
    background: var(--primary-orange);
    color: #FFFFFF;
}

.blog-section .btn-primary:hover {
    background: #E64100;
    box-shadow: 0 5px 15px rgba(255, 72, 0, 0.3);
}

@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-image {
        height: 180px;
    }
}

/* Footer */
.footer-info {
    background-color: #f0f0f0;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.main-footer {
    background-color: var(--text-dark);
    color: #FFFFFF;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.7;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-header h3 {
    margin: 0;
    color: var(--primary-green);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-orange);
}

.search-modal-body {
    padding: 30px;
}

.search-input-container {
    position: relative;
}

#citySearchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s;
}

#citySearchInput:focus {
    border-color: var(--primary-green);
}

.search-results {
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    background: white;
}

.department-group {
    border-bottom: 1px solid #f0f0f0;
}

.department-group:last-child {
    border-bottom: none;
}

.department-header {
    background: var(--bg-light);
    padding: 12px 20px;
    font-weight: 600;
    color: var(--primary-green);
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.city-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background-color 0.2s;
    border-bottom: 1px solid #f8f8f8;
}

.city-result:last-child {
    border-bottom: none;
}

.city-result:hover {
    background-color: #f9f9f9;
    text-decoration: none;
    color: var(--primary-green);
}

.city-name {
    font-weight: 500;
    font-size: 15px;
}

.city-pop {
    font-size: 13px;
    color: #666;
}

.no-results,
.search-error {
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-error {
    color: #d9534f;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-btn {
        padding: 8px 16px;
        font-size: 12px;
        gap: 6px;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .search-modal {
        padding-top: 5vh;
    }
    
    .search-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .search-modal-header {
        padding: 20px 20px 15px;
    }
    
    .search-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .search-modal-body {
        padding: 20px;
    }
}

/* Map Container */
#map {
    height: 400px;
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 15px 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-green);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    .top-header .desktop-text {
        display: none;
    }
    
    .top-header .mobile-text {
        display: block;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-image {
        max-width: 100%;
        order: 2;
    }
    
    .hero-text {
        text-align: center;
        order: 1;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .top-header .mobile-text {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Glassmorphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Service titles */
.ser-title {
    position: relative;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.botm-line {
    border: none;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-orange) 100%);
    border-radius: 2px;
}