/*
Theme Name: SideBizStarter
Theme URI: https://sidebizstarter.com
Author: William Legros
Description: Thème custom SideBizStarter - WCAG AA compliant
Version: 2.1.0
Text Domain: sidebizstarter
*/

/* =============================================================================
   DESIGN SYSTEM - BLEU + WCAG AA COMPLIANT
   Contraste minimum 4.5:1 pour le texte, 3:1 pour les grands textes
   ============================================================================= */

:root {
    /* Couleurs principales - Bleu professionnel */
    --brand: #1d4ed8;           /* Bleu - contraste 4.5:1 sur blanc */
    --brand-dark: #1e40af;      /* Bleu foncé - hover */
    --brand-light: #3b82f6;     /* Bleu clair */
    --brand-bg: #eff6ff;        /* Bleu très pâle - backgrounds */
    --brand-bg-dark: #dbeafe;   /* Bleu pâle */
    
    /* Texte - Contrastes vérifiés */
    --text: #111827;            /* Presque noir - contraste 16:1 sur blanc */
    --text-light: #374151;      /* Gris foncé - contraste 10:1 sur blanc */
    --text-muted: #6b7280;      /* Gris - contraste 5.4:1 sur blanc (AA) */
    --text-on-dark: #f3f4f6;    /* Texte sur fond sombre - contraste 15:1 */
    --text-on-brand: #ffffff;   /* Blanc sur brand - contraste 8:1 */
    
    /* Backgrounds */
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-dark: #111827;
    
    /* Bordures */
    --border: #d1d5db;          /* Contraste 1.8:1 - OK pour bordures */
    --border-dark: #9ca3af;
    
    /* États */
    --success: #047857;         /* Vert foncé - contraste 4.5:1 sur blanc */
    --error: #dc2626;           /* Rouge - contraste 4.5:1 sur blanc */
    
    /* Typography */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Layout */
    --max-width: 1200px;
    
    /* Radius */
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    /* Focus - Accessibilité */
    --focus-ring: 0 0 0 3px rgba(29, 78, 216, 0.4);
}

/* =============================================================================
   RESET
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { 
    color: var(--brand); 
    text-decoration: underline; 
    text-underline-offset: 2px;
}
a:hover { color: var(--brand-dark); }
a:focus { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.site-main { min-height: 60vh; }

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: var(--space-4);
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
p { margin-bottom: var(--space-4); }

/* =============================================================================
   BUTTONS - WCAG AA CONTRAST
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn-primary {
    background: var(--brand);
    color: var(--text-on-brand); /* Blanc sur bleu = 8:1 */
}
.btn-primary:hover {
    background: var(--brand-dark);
    color: var(--text-on-brand);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border-dark);
}
.btn-secondary:hover {
    border-color: var(--text);
    background: var(--bg-alt);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-block { width: 100%; }

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

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.site-branding { flex-shrink: 0; }

.site-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
}
.site-title:hover { color: var(--brand); }

.site-description { display: none; }

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.main-navigation ul {
    display: flex;
    gap: var(--space-6);
    list-style: none;
}

.main-navigation a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    padding: var(--space-2) 0;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--brand);
}
.main-navigation a:focus {
    box-shadow: var(--focus-ring);
}

.header-cta {
    margin-left: var(--space-4);
    background: var(--brand) !important;
    color: #ffffff !important;
    padding: var(--space-2) var(--space-6);
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
}
.header-cta:hover {
    background: var(--brand-dark) !important;
    color: #ffffff !important;
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}
.menu-toggle:focus { box-shadow: var(--focus-ring); }
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .header-cta { display: none; }
    .main-navigation {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        padding: var(--space-6);
        transform: translateX(100%);
        transition: transform 0.3s;
        flex-direction: column;
        align-items: flex-start;
    }
    .main-navigation.toggled { transform: translateX(0); }
    .main-navigation ul { flex-direction: column; gap: var(--space-4); }
}

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

.hero {
    background: var(--brand-bg);
    padding: var(--space-16) 0;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: var(--bg);
    color: var(--brand);
    font-size: 0.875rem;
    font-weight: 600;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    margin-bottom: var(--space-6);
}

.text-accent { color: var(--brand); }

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: var(--space-8);
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand);
}
.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* =============================================================================
   LEAD MAGNET
   ============================================================================= */

.lead-magnet-section {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    padding: var(--space-16) 0;
}

.lead-magnet-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

@media (max-width: 768px) {
    .lead-magnet-box { grid-template-columns: 1fr; }
}

.lead-magnet-badge {
    display: inline-block;
    background: var(--brand);
    color: var(--text-on-brand);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.lead-magnet-content h2 {
    color: var(--text-on-dark);
    font-size: 1.625rem;
}

.lead-magnet-content p {
    color: #9ca3af;
}

.lead-magnet-features {
    list-style: none;
}
.lead-magnet-features li {
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
    color: #d1d5db;
    position: relative;
}
.lead-magnet-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.lead-magnet-form {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}

.form-group { margin-bottom: var(--space-4); }
.form-group label {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: var(--space-2);
    color: #d1d5db;
}
.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
}
.form-group input::placeholder { color: #9ca3af; }
.form-group input:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}
.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--brand);
}
.form-checkbox label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}
.form-checkbox a { color: #93c5fd; }

.form-hint {
    font-size: 0.8125rem;
    color: #6b7280;
    text-align: center;
    margin-top: var(--space-3);
}

.form-success { text-align: center; padding: var(--space-8); }
.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--success);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: var(--space-4);
}
.form-success h3 { color: var(--text-on-dark); }
.form-success p { color: #9ca3af; }

/* =============================================================================
   SECTIONS
   ============================================================================= */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}
.section-header h2 { margin: 0; }
.section-subtitle { color: var(--text-light); margin: 0; }
.view-all {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--brand);
}
.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: var(--space-4);
}

/* =============================================================================
   ARTICLES
   ============================================================================= */

.latest-articles {
    padding: var(--space-12) 0;
}

.posts-grid {
    display: grid;
    gap: var(--space-6);
}
.posts-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.post-card:focus-within {
    box-shadow: var(--focus-ring);
}

.post-content { padding: var(--space-6); }

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
    text-decoration: none;
}
.post-category:hover { text-decoration: underline; }

.entry-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-3);
}
.entry-title a { 
    color: var(--text); 
    text-decoration: none;
}
.entry-title a:hover { color: var(--brand); }

.entry-excerpt {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: var(--space-4);
}

.entry-footer {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* =============================================================================
   CATEGORIES
   ============================================================================= */

.categories-section {
    padding: var(--space-12) 0;
    background: var(--bg-alt);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.category-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.category-card:focus {
    box-shadow: var(--focus-ring);
}

.category-card h3 { 
    font-size: 1rem; 
    margin-bottom: var(--space-1); 
    color: var(--text);
}
.category-count { 
    font-size: 0.875rem; 
    color: var(--text-muted); 
}

/* =============================================================================
   TOOLS
   ============================================================================= */

.tools-section {
    padding: var(--space-12) 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.tool-card {
    display: block;
    padding: var(--space-6);
    background: var(--bg-alt);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.tool-card:focus {
    box-shadow: var(--focus-ring);
}

.tool-card-active {
    border-color: var(--brand);
    background: var(--brand-bg);
}
.tool-card-active:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.tool-card-coming { opacity: 0.6; }

.tool-icon {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    color: var(--brand);
}

.tool-card h3 { 
    font-size: 1rem; 
    margin-bottom: var(--space-2); 
    color: var(--text);
}
.tool-card p { 
    font-size: 0.9375rem; 
    color: var(--text-light); 
    margin-bottom: var(--space-3); 
}

.tool-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: var(--border);
    color: var(--text-muted);
}
.tool-badge-ready {
    background: var(--success);
    color: white;
}

.tools-cta { text-align: center; }

/* =============================================================================
   RESOURCES
   ============================================================================= */

.resources-section {
    background: var(--bg-alt);
    padding: var(--space-12) 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.resource-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.resource-card-featured {
    background: var(--brand-bg);
    border-color: var(--brand-light);
}

.resource-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    margin-bottom: var(--space-3);
}

.resource-card h3 { 
    font-size: 1.0625rem; 
    margin-bottom: var(--space-2); 
}
.resource-card p { 
    font-size: 0.9375rem; 
    color: var(--text-light); 
    margin-bottom: var(--space-4); 
}
.resource-coming { 
    font-size: 0.875rem; 
    color: var(--text-muted); 
    font-style: italic; 
}

/* =============================================================================
   NEWSLETTER
   ============================================================================= */

.newsletter-section {
    background: var(--bg-dark);
    padding: var(--space-12) 0;
}

.newsletter-box {
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-on-dark);
}
.newsletter-box h2 { 
    color: var(--text-on-dark); 
    font-size: 1.5rem; 
}
.newsletter-box > p { 
    color: #9ca3af; 
    margin-bottom: var(--space-6); 
}

.newsletter-fields {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
@media (max-width: 480px) {
    .newsletter-fields { flex-direction: column; }
}
.newsletter-fields input[type="email"] {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
}
.newsletter-fields input::placeholder { color: #6b7280; }
.newsletter-fields input:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    text-align: left;
    margin-bottom: var(--space-4);
}
.newsletter-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand);
}
.newsletter-consent label { 
    font-size: 0.875rem; 
    color: #9ca3af; 
}
.newsletter-consent a { color: #93c5fd; }

.newsletter-hint { 
    font-size: 0.875rem; 
    color: #6b7280; 
    margin: 0; 
}

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

.site-footer {
    background: var(--bg-dark);
    color: #9ca3af;
    padding: var(--space-12) 0 var(--space-6);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}
@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-content { grid-template-columns: 1fr; }
}

.footer-brand { max-width: 280px; }
.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-on-dark);
    margin-bottom: var(--space-3);
}
.footer-brand p { font-size: 0.9375rem; line-height: 1.6; }

.footer-links h4 {
    color: var(--text-on-dark);
    font-size: 0.9375rem;
    margin-bottom: var(--space-4);
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: var(--space-2); }
.footer-links a { 
    color: #9ca3af; 
    font-size: 0.9375rem; 
    text-decoration: none;
}
.footer-links a:hover { color: var(--text-on-dark); }
.footer-links a:focus { box-shadow: var(--focus-ring); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: 0.875rem;
}
.footer-legal a { 
    color: #9ca3af; 
    margin-left: var(--space-4); 
    text-decoration: none;
}
.footer-legal a:hover { color: var(--text-on-dark); }

/* =============================================================================
   COOKIE BANNER
   ============================================================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: var(--text-on-dark);
    padding: var(--space-4) var(--space-6);
    z-index: 9999;
    display: none;
}
.cookie-banner.show { display: block; }

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cookie-text { flex: 1; min-width: 280px; }
.cookie-text p { font-size: 0.9375rem; margin: 0; }
.cookie-text a { color: #93c5fd; }

.cookie-buttons { display: flex; gap: var(--space-3); }
.cookie-btn {
    padding: var(--space-2) var(--space-4);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
}
.cookie-btn:focus { box-shadow: var(--focus-ring); }
.cookie-btn-accept { 
    background: var(--brand); 
    color: var(--text-on-brand); 
}
.cookie-btn-accept:hover { background: var(--brand-dark); }
.cookie-btn-refuse {
    background: transparent;
    color: var(--text-on-dark);
    border: 1px solid rgba(255,255,255,0.3);
}
.cookie-btn-refuse:hover { border-color: var(--text-on-dark); }

@media (max-width: 600px) {
    .cookie-content { flex-direction: column; text-align: center; }
    .cookie-buttons { width: 100%; justify-content: center; }
}

/* =============================================================================
   SKIP LINK & ACCESSIBILITY
   ============================================================================= */

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    background: var(--brand);
    color: var(--text-on-brand);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { 
    top: var(--space-4); 
    outline: none;
    box-shadow: var(--focus-ring);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Focus visible for keyboard users */
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* =============================================================================
   TOOL PAGES
   ============================================================================= */

.tool-page {
    padding-bottom: var(--space-16);
}

.tool-header {
    background: var(--brand-bg);
    padding: var(--space-12) 0;
    margin-bottom: var(--space-8);
}

.tool-header h1 {
    margin-bottom: var(--space-2);
}

.tool-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 0;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}
.breadcrumbs a {
    color: var(--text-muted);
}
.breadcrumbs span {
    margin: 0 var(--space-2);
}

.container-narrow {
    max-width: 800px;
}

.tool-content {
    margin-bottom: var(--space-8);
}

/* Tool Form */
.tool-form fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.tool-form legend {
    font-weight: 600;
    color: var(--text);
    padding: 0 var(--space-2);
}

.tool-form .form-group {
    margin-bottom: var(--space-4);
}

.tool-form label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.tool-form input[type="text"],
.tool-form input[type="email"],
.tool-form input[type="url"],
.tool-form input[type="tel"],
.tool-form select,
.tool-form textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
}

.tool-form input:focus,
.tool-form select:focus,
.tool-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
}

.tool-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

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

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-2);
    cursor: pointer;
    transition: border-color 0.2s;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--brand);
}

.radio-label input,
.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
}

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

.form-actions {
    text-align: center;
    padding-top: var(--space-6);
}

.hidden {
    display: none !important;
}

/* Tool Result */
.tool-result {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.result-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.result-actions {
    display: flex;
    gap: var(--space-2);
}

.result-content {
    padding: var(--space-6);
    max-height: 600px;
    overflow-y: auto;
}

.result-content h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    color: var(--brand);
}

.result-content h3 {
    font-size: 1.125rem;
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.result-content p {
    margin-bottom: var(--space-3);
}

.result-notice {
    padding: var(--space-4) var(--space-6);
    background: #fef3c7;
    color: #92400e;
    font-size: 0.875rem;
}

/* Tool Sidebar */
.tool-sidebar {
    margin-top: var(--space-8);
}

.sidebar-box {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}

.sidebar-box h3 {
    font-size: 1rem;
    margin-bottom: var(--space-4);
}

.sidebar-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-box li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-box li:last-child {
    border-bottom: none;
}

.sidebar-box a {
    color: var(--text);
}

.sidebar-box small {
    color: var(--text-muted);
}

/* =============================================================================
   MODAL SYSTEM
   ============================================================================= */

.sbs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
    padding: var(--space-6);
    align-items: flex-start;
    justify-content: center;
}

.sbs-modal.active {
    display: flex;
}

.sbs-modal-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    width: 100%;
    max-width: 600px;
    position: relative;
    margin: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.2s ease-out;
}

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

.sbs-modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.sbs-modal-close:hover {
    background: var(--surface);
    color: var(--text);
}

.sbs-modal-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Form styling inside modals */
.sbs-form .form-group {
    margin-bottom: var(--space-4);
}

.sbs-form label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-1);
    color: var(--text);
}

.sbs-form input[type="text"],
.sbs-form input[type="email"],
.sbs-form input[type="tel"],
.sbs-form textarea,
.sbs-form select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

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

.sbs-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive modal */
@media (max-width: 640px) {
    .sbs-modal {
        padding: var(--space-4);
    }
    
    .sbs-modal-content {
        padding: var(--space-6);
    }
}

/* =============================================================================
   TESTIMONIALS CAROUSEL
   ============================================================================= */

.testimonials-section {
    padding: var(--space-16) 0;
    background: var(--surface);
}

.testimonials-carousel {
    position: relative;
    overflow: hidden;
    margin-top: var(--space-8);
}

.testimonials-track {
    display: flex;
    gap: var(--space-6);
    animation: scroll-testimonials 30s linear infinite;
    width: max-content;
}

.testimonials-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-testimonials {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.testimonial-slide {
    flex: 0 0 400px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.2s;
}

.testimonial-slide:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.testimonial-quote {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 var(--space-4);
    font-style: normal;
}

.testimonial-quote::before {
    content: none;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.testimonial-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text);
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.testimonial-result {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    font-weight: 600;
    font-size: 0.875rem;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius);
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .testimonial-slide {
        flex: 0 0 300px;
    }
    
    .testimonials-track {
        animation-duration: 25s;
    }
}

@media (max-width: 480px) {
    .testimonial-slide {
        flex: 0 0 280px;
        padding: var(--space-4);
    }
    
    .testimonial-author {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================================================
   TOOL TESTIMONIAL (mini testimonial on tool pages)
   ============================================================================= */

.tool-testimonial {
    background: var(--surface);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-6);
    margin: var(--space-6) 0;
}

.tool-testimonial blockquote {
    margin: 0;
    font-style: normal;
}

.tool-testimonial p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0 0 var(--space-3);
}

.tool-testimonial footer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
}

.tool-testimonial strong {
    color: var(--text);
}

.tool-testimonial span {
    color: var(--text-muted);
}

.tool-testimonial span::before {
    content: "·";
    margin-right: var(--space-2);
}
