:root {
    --primary: #1D3D69;
    /* Solvari Navy */
    --primary-light: #2A548E;
    --accent: #4CA137;
    /* Solvari Green */
    --accent-hover: #3E8B2A;
    --success: #4CA137;
    /* Vibrant Green */
    --navy: #1D3D69;
    --bg-light: #F4F4F4;
    --bg-card: #FFFFFF;
    --white: #FFFFFF;
    --text: #203A61; /* Fallback */
    --text-dark: #122138;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    /* Sharper corners for business look */
    --container: 1140px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--white);
    padding: 18px 0;
    border-bottom: 1px solid #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.containerHeader {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.site-name-header {
    transition: font-size 0.3s ease;
}

@media (max-width: 600px) {
    .main-header {
        padding: 12px 0;
    }

    .containerHeader {
        padding: 0 15px;
    }

    .site-name-header {
        font-size: 18px !important;
    }

    .logo img {
        height: 32px !important;
    }
}

.logo {
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.logo span {
    color: var(--primary);
    line-height: 1.1;
    display: inline-block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 24px;
    color: var(--primary);
    text-decoration: none;
    gap: 6px;
}

.logo img {
    height: var(--logo-height, 45px);
    width: auto;
    object-fit: contain;
}

nav a {
    font-weight: 600;
    font-size: 16px;
    color: var(--navy);
}

.cta-mini {
    background: var(--primary);
    color: var(--white) !important;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000;
    position: relative;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--navy);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

/* Mobile Nav Adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        height: 100vh;
        width: 100%;
        text-align: center;
        padding: 2rem;
        position: fixed;
        top: 0;
        right: 0;
        transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        transform: translateX(100%);
        gap: 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .main-nav.active .nav-links {
        transform: translateX(0);
    }

    .main-nav.active .menu-toggle span:first-child {
        transform: translateY(9px) rotate(45deg);
    }

    .main-nav.active .menu-toggle span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .main-nav.active .menu-toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Hero Section */
.hero {
    background: var(--white);
    padding: 100px 0;
    text-align: center;
    color: var(--primary);
    border-bottom: 1px solid #E5E7EB;
    position: relative;
    overflow: visible;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.05;
    pointer-events: none;
    /* Débloque les clics sur le contenu */
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    max-width: 650px;
    margin: 0 auto;
    background: var(--white);
    padding: 6px;
    border-radius: 12px;
    display: flex;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
    border-radius: 8px;
}

.search-box button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Listings */
.page-header {
    padding: 40px 0;
    background: var(--white);
}

.page-header h1 {
    font-size: 32px;
    color: var(--navy);
    font-weight: 800;
}

.supplier-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    padding: 25px;
    gap: 30px;
    align-items: center;
    transition: 0.3s;
}

.supplier-card:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow);
}

.card-logo {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.card-info {
    flex: 1;
}

.card-info h3 {
    font-size: 22px;
    color: var(--navy);
    margin-bottom: 8px;
}

.badge-certified {
    display: inline-block;
    background: rgba(211, 109, 77, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-info p {
    font-size: 15px;
    color: var(--text);
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}

/* SEO Body */
.seo-section {
    padding: 80px 0;
}

.seo-section h2 {
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 25px;
    font-weight: 800;
}

.seo-section p {
    font-size: 17px;
    color: var(--text);
    margin-bottom: 20px;
}

.seo-section ul {
    margin-bottom: 30px;
    list-style: none;
}

.seo-section li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.seo-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

/* Footer */
.main-footer {
    background: var(--navy);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: 0.3s;
}

.footer-col a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

/* Commune Listing on Home */
.commune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.commune-item {
    background: var(--white);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--navy);
    border: 1px solid #eee;
    font-size: 14px;
    transition: 0.2s;
    display: block;
}

.commune-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.extra-commune {
    display: none;
}

.extra-commune.show {
    display: block;
}

/* Supplier Profile Layout */
.supplier-profile-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    margin-top: 50px;
    align-items: start;
}

.supplier-profile-main {
    min-width: 0;
    /* Prevents flex/grid items from overflowing */
}

.supplier-profile-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

.pricing-table th {
    background: var(--navy);
    color: white;
    text-align: left;
    padding: 15px;
}

.pricing-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.certification-box {
    background: #F0F7F7;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.primes-box {
    background: #FFF9F4;
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid var(--primary);
}

/* Header Banners */
.page-header.has-banner,
.hero.has-banner {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    color: white !important;
}

.page-header.has-banner::before,
.hero.has-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--banner-opacity, 0.5));
    z-index: 1;
}

.page-header.has-banner .container,
.hero.has-banner .container {
    position: relative;
    z-index: 2;
}

.page-header.has-banner h1,
.hero.has-banner h1,
.page-header.has-banner p,
.hero.has-banner p {
    color: white !important;
}

.page-header.has-banner .breadcrumb a,
.page-header.has-banner .breadcrumb span {
    color: rgba(255, 255, 255, 0.8) !important;
}

.rating-text {
    color: #64748b;
}

.has-banner .rating-text {
    color: white !important;
}

/* Sidebar Premium Card */
.sidebar-premium-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.04);
    border: 1px solid #eef2f6;
    position: sticky;
    top: 80px;
}

.sidebar-premium-card .card-image-wrap {
    position: relative;
    height: 160px;
}

.sidebar-premium-card .card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-premium-card .image-badge {
    position: absolute;
    bottom: -15px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 10px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 2;
    text-align: center;
}

.sidebar-premium-card .card-body {
    padding: 40px 35px 35px;
}

.sidebar-premium-card h3 {
    font-size: 22px;
    color: var(--primary);
    margin: 0 0 20px 0;
    font-weight: 800;
    line-height: 1.3;
}

.sidebar-premium-card .subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.sidebar-premium-card .steps-list {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.sidebar-premium-card .step-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sidebar-premium-card .step-number {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-premium-card .step-text {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

.sidebar-premium-card .btn-cta {
    display: block;
    width: 100%;
    background: var(--accent);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 17px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
    cursor: pointer;
}

.sidebar-premium-card .btn-cta:hover {
    transform: translateY(-2px);
    background: var(--accent-hover);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-premium-card .card-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .supplier-profile-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .supplier-profile-sidebar {
        position: static;
        width: 100%;
    }
}

/* Featured Cards on Home */
.featured-supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.featured-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Important for equal height in grid */
    transition: 0.3s;
}

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

.featured-card .card-logo {
    margin: 0 auto 20px;
}

.featured-card h3 {
    margin-bottom: 5px;
    color: var(--navy);
}

.featured-card .location {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 15px;
}

.featured-card .description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 25px;
    flex-grow: 1;
    /* Pushes the button to the bottom */
}

.featured-card .btn-primary {
    width: 100%;
}

@media (max-width: 768px) {
    .supplier-card {
        flex-direction: column;
        text-align: center;
    }

    .card-actions {
        width: 100%;
    }

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


/* Commune Content Styling (from CSV HTML) */
.commune-content {
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.8;
}

.commune-content h2 {
    color: var(--primary);
    font-size: 28px;
    margin-top: 50px;
    margin-bottom: 25px;
    font-weight: 800;
    line-height: 1.3;
}

.commune-content h3 {
    color: var(--navy);
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 700;
}

.commune-content p {
    margin-bottom: 20px;
    color: var(--text);
}

.commune-content ul,
.commune-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.commune-content li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.commune-content ul li::marker {
    color: var(--accent);
    font-weight: bold;
}

/* Rich Table Styling for Content */
.commune-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
}

.commune-content th {
    background: var(--navy);
    color: white;
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.commune-content td {
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f6;
    background: white;
    color: var(--text-dark);
    font-size: 15px;
}

.commune-content tr:last-child td {
    border-bottom: none;
}

.commune-content tr:nth-child(even) td {
    background: #f8fafc;
}

.commune-content tr:hover td {
    background: #f1f5f9;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .commune-content h2 {
        font-size: 24px;
        margin-top: 40px;
    }

    .commune-content h3 {
        font-size: 20px;
    }

    .commune-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


/* Modern Commune Grid for Region Page */
.communes-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.commune-card {
    background: var(--white);
    padding: 18px 25px;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(var(--primary-rgb), 0.02);
    text-decoration: none !important;
}

.commune-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.08);
}

.commune-card .commune-name {
    color: var(--navy);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s;
}

.commune-card:hover .commune-name {
    color: var(--primary);
}

.commune-card .commune-arrow {
    color: #cbd5e1;
    transition: all 0.2s;
}

.commune-card:hover .commune-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* --- FORM STYLES (Multi-step) --- */
.rlm-multi-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid #f0f2f5;
    max-width: 600px;
    margin: 40px auto;
}

.step-counter {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.progress-container {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 35px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInForm 0.3s ease;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
}

.form-group input:not([type="checkbox"]), 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #334155;
    transition: all 0.2s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 61, 105, 0.1);
}

.btn-nav-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-prev, .btn-next, .btn-submit-multi {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-prev {
    background: #f1f5f9;
    color: #64748b;
}

.btn-next, .btn-submit-multi {
    background: var(--accent);
    color: white;
}

.btn-next:hover, .btn-submit-multi:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}