/* FaxRadar - Global Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary-blue: #2563eb;
    --primary-dark: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

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

/* Header Styles */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

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

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

nav a:hover,
nav a.active {
    color: var(--primary-blue);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: white !important;
    padding: 4rem 1.5rem;
    text-align: center;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white !important;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    color: white !important;
}

.hero ul,
.hero li {
    color: white !important;
}

.hero * {
    color: white;
}

/* Section Styles */
section {
    margin-bottom: 4rem;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.card .badge {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Service Cards */
.service-card {
    background: var(--bg-white);
    border: 2px solid var(--border-gray);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
}

.service-card.featured {
    border-color: var(--primary-blue);
    background: linear-gradient(to bottom, #eff6ff 0%, #ffffff 100%);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.service-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f59e0b;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

thead {
    background: var(--gradient);
    color: white;
}

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

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

tbody tr:hover {
    background: var(--bg-gray);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
}

/* Info Boxes */
.info-box {
    background: var(--light-blue);
    border-left: 4px solid var(--primary-blue);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.info-box h3 {
    color: var(--primary-blue) !important;
    margin-top: 0;
}

.info-box p,
.info-box li {
    color: var(--text-dark) !important;
}

.info-box ul {
    color: var(--text-dark);
}

.info-box strong {
    color: var(--text-dark);
}

/* Steps / Guide */
.steps {
    counter-reset: step;
    margin: 2rem 0;
}

.step {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 2rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.step h3 {
    margin-top: 0;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    margin-top: 4rem;
    padding: 3rem 1.5rem 1.5rem;
}

/* Fix footer inside blockquotes - testimonial attributions should be visible */
blockquote footer {
    background: transparent !important;
    color: var(--text-dark) !important;
    margin-top: 0.5rem !important;
    padding: 0 !important;
    font-style: normal !important;
    font-weight: 600 !important;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Comparison Table Highlight */
.rank-1 {
    background: linear-gradient(to right, #fef3c7, transparent);
    font-weight: 600;
}

/* Tool Cards */
.tool-card {
    background: var(--bg-gray);
    border: 2px dashed var(--border-gray);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    opacity: 0.7;
}

.tool-icon {
    width: 64px;
    height: 64px;
    background: var(--light-blue);
    border-radius: 1rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary-blue);
}

.menu-toggle:hover {
    opacity: 0.7;
}

/* CTA Buttons Container - Better spacing */
.cta-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1.5rem;
    align-items: stretch !important;
}

.cta-buttons .btn {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.875rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Mobile Menu */
    .menu-toggle {
        display: block;
    }
    
    nav {
        width: 100%;
    }
    
    nav ul {
        display: none !important;
        flex-direction: column;
        width: 100%;
        background: var(--bg-white);
        border-top: 1px solid var(--border-gray);
        margin-top: 1rem;
        padding: 1rem 0;
        gap: 0;
    }
    
    nav ul.active {
        display: flex !important;
    }
    
    nav ul li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border-gray);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        font-size: 1rem;
    }
    
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables responsive - Card style on mobile */
    table {
        font-size: 0.875rem;
        border: 0;
    }
    
    table thead {
        display: none; /* Hide table headers on mobile */
    }
    
    table tbody, 
    table tr, 
    table td {
        display: block;
        width: 100%;
    }
    
    table tr {
        margin-bottom: 1.5rem;
        background: var(--bg-white);
        border: 1px solid var(--border-gray);
        border-radius: 0.5rem;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
    }
    
    table td {
        padding: 0.5rem 0 !important;
        border: none !important;
        text-align: left !important;
        position: relative;
        padding-left: 50% !important;
        white-space: normal;
    }
    
    /* Add labels before each cell on mobile */
    table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 700; /* Bold */
        font-size: 0.875rem;
        color: var(--primary-blue);
    }
    
    /* Ensure table cell values are visible on mobile */
    table td {
        color: #333 !important;
    }
    
    /* Removed first/last-child rules that were hiding labels in multi-column tables */
    
    /* CTA Buttons spacing on mobile */
    .cta-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .cta-buttons .btn {
        width: 100% !important;
        min-height: 56px !important;
        font-size: 1rem;
        margin-left: 0 !important;
    }
    
    /* Service cards buttons */
    .service-card .btn {
        width: 100%;
        margin-top: 0.75rem;
        min-height: 48px;
    }
    
    /* Inline buttons group - force column layout on mobile */
    div[style*="display: flex"][style*="flex-wrap"],
    div[style*="display: flex"][style*="gap"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    div[style*="display: flex"] .btn {
        width: 100% !important;
        min-height: 56px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Force any div with text-align center containing buttons */
    div[style*="text-align: center"] .btn + .btn {
        margin-top: 1rem !important;
        margin-left: 0 !important;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 1rem 2rem;
    }
    
    nav ul {
        display: flex !important;
        gap: 1.5rem;
        font-size: 0.9rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .cta-buttons {
        flex-direction: row !important;
        gap: 1rem !important;
    }
    
    .cta-buttons .btn {
        flex: 1 !important;
        min-height: 48px !important;
        width: auto !important;
    }
    
    .menu-toggle {
        display: none !important;
    }
    
    /* Flex containers back to row on tablet */
    div[style*="display: flex"][style*="flex-wrap"],
    div[style*="display: flex"][style*="gap"] {
        flex-direction: row !important;
    }
    
    div[style*="display: flex"] .btn {
        width: auto !important;
        margin-bottom: 0 !important;
    }
    
    /* Tables - restore normal table layout on tablet */
    table {
        display: table !important;
        width: 100%;
    }
    
    table thead {
        display: table-header-group !important;
    }
    
    table tbody {
        display: table-row-group !important;
    }
    
    table tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    table td {
        display: table-cell !important;
        padding: 1rem !important;
        border-bottom: 1px solid var(--border-gray) !important;
        padding-left: 1rem !important;
        width: auto !important;
    }
    
    table td:before {
        display: none !important;
    }
    
    table tbody tr td:first-child,
    table tbody tr td:last-child {
        font-weight: normal !important;
        color: inherit !important;
        padding-left: 1rem !important;
        margin-bottom: 0 !important;
        font-size: inherit !important;
    }
}

/* Desktop - ensure menu is visible */
@media (min-width: 1025px) {
    nav ul {
        display: flex !important;
    }
    
    .menu-toggle {
        display: none !important;
    }
    
    .cta-buttons {
        flex-direction: row !important;
    }
    
    .cta-buttons .btn {
        width: auto !important;
        flex: 1 !important;
    }
    
    /* Flex containers back to row on desktop */
    div[style*="display: flex"][style*="flex-wrap"],
    div[style*="display: flex"][style*="gap"] {
        flex-direction: row !important;
    }
    
    div[style*="display: flex"] .btn {
        width: auto !important;
        margin-bottom: 0 !important;
    }
    
    /* Tables - restore normal table layout on desktop */
    table {
        display: table !important;
        width: 100%;
    }
    
    table thead {
        display: table-header-group !important;
    }
    
    table tbody {
        display: table-row-group !important;
    }
    
    table tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    table td {
        display: table-cell !important;
        padding: 1rem !important;
        border-bottom: 1px solid var(--border-gray) !important;
        width: auto !important;
    }
    
    table td:before {
        display: none !important;
    }
}

/* Blue Background Sections - Text Visibility */
/* Light blue background - dark text */
section[style*="background: var(--light-blue)"],
div[style*="background: var(--light-blue)"],
.blue-bg {
    color: var(--text-dark) !important;
}

section[style*="background: var(--light-blue)"] p,
section[style*="background: var(--light-blue)"] li,
section[style*="background: var(--light-blue)"] ul,
div[style*="background: var(--light-blue)"] p,
div[style*="background: var(--light-blue)"] li,
div[style*="background: var(--light-blue)"] ul,
.blue-bg p,
.blue-bg li,
.blue-bg ul {
    color: var(--text-dark) !important;
}

/* Dark Blue Background - White Text */
section[style*="background: var(--primary-blue)"],
section[style*="background: linear-gradient"],
div[style*="background: linear-gradient"],
.blue-bg-dark {
    color: white !important;
}

section[style*="background: var(--primary-blue)"] p,
section[style*="background: var(--primary-blue)"] li,
section[style*="background: var(--primary-blue)"] ul,
section[style*="background: linear-gradient"] p,
section[style*="background: linear-gradient"] li,
section[style*="background: linear-gradient"] ul,
div[style*="background: linear-gradient"] p,
div[style*="background: linear-gradient"] li,
div[style*="background: linear-gradient"] ul,
.blue-bg-dark p,
.blue-bg-dark li,
.blue-bg-dark ul {
    color: white !important;
}

/* Ensure all child elements in blue backgrounds have correct color */
section[style*="background: var(--light-blue)"] *:not(h1):not(h2):not(h3):not(h4):not(.btn),
div[style*="background: var(--light-blue)"] *:not(h1):not(h2):not(h3):not(h4):not(.btn) {
    color: var(--text-dark);
}

section[style*="background: linear-gradient"] *:not(h1):not(h2):not(h3):not(h4):not(.btn),
div[style*="background: linear-gradient"] *:not(h1):not(h2):not(h3):not(h4):not(.btn) {
    color: white;
}

/* Pros & Cons Cards - Force dark text on light backgrounds */
.service-card[style*="background: linear-gradient(to bottom, #f0fdf4"] ul,
.service-card[style*="background: linear-gradient(to bottom, #f0fdf4"] li,
.service-card[style*="background: linear-gradient(to bottom, #f0fdf4"] strong,
.service-card[style*="background: linear-gradient(to bottom, #fef2f2"] ul,
.service-card[style*="background: linear-gradient(to bottom, #fef2f2"] li,
.service-card[style*="background: linear-gradient(to bottom, #fef2f2"] strong {
    color: var(--text-dark) !important;
}

/* Avantages (Green cards) */
div[style*="border: 2px solid #16a34a"] ul,
div[style*="border: 2px solid #16a34a"] li,
div[style*="border: 2px solid #16a34a"] p,
div[style*="border: 2px solid #16a34a"] strong {
    color: var(--text-dark) !important;
}

/* Inconvénients (Red cards) */
div[style*="border: 2px solid #dc2626"] ul,
div[style*="border: 2px solid #dc2626"] li,
div[style*="border: 2px solid #dc2626"] p,
div[style*="border: 2px solid #dc2626"] strong {
    color: var(--text-dark) !important;
}

/* Info boxes with gradient blue backgrounds */
.info-box[style*="background: linear-gradient(135deg, #eff6ff"] p,
.info-box[style*="background: linear-gradient(135deg, #eff6ff"] strong,
div[style*="background: linear-gradient(135deg, #eff6ff"] p,
div[style*="background: linear-gradient(135deg, #eff6ff"] strong {
    color: var(--text-dark) !important;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

