/* =============================================
   GÉNÉRATEUR DOCUMENTS LÉGAUX - 1001Web.ca
   Version 8.5 - style.css
   Tooltips, Juridiction, Multi-pays, WPBakery Export
   ============================================= */

/* Variables CSS - Mode Sombre (défaut) */
:root {
    --primary: #697BE6;
    --secondary: #9253AC;
    --primary-dark: #5a6bd4;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(30, 30, 56, 0.9);
    --bg-card-hover: rgba(37, 37, 69, 0.95);
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.2);
    --success: #4caf50;
    --success-light: #8bc34a;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --green: #4ade80;
    --yellow: #fbbf24;
    --orange: #f97316;
    --cyan: #22d3ee;
    --red: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.3s ease;
}

/* Mode Clair */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text-light: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --border-subtle: rgba(100, 116, 139, 0.1);
    --border-light: rgba(100, 116, 139, 0.2);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
}

[data-theme="light"] .title {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .card-header {
    background: rgba(241, 245, 249, 0.5);
}

[data-theme="light"] .card-title {
    color: #1e293b;
}

[data-theme="light"] .form-input {
    background: rgba(241, 245, 249, 0.8);
    color: #1e293b;
}

[data-theme="light"] .output-area {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
}

[data-theme="light"] .scan-card {
    background: rgba(255, 255, 255, 0.95);
}

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

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
}

.app-container {
    min-height: 100vh;
    padding: 1.5rem;
}

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

/* =============================================
   HEADER
   ============================================= */
.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-2px);
}

.logo-img {
    height: 140px;
    width: auto;
    transition: opacity 0.3s ease;
}

/* Logo sombre (outline noir) visible en mode sombre par défaut */
.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

/* Mode clair : afficher logo avec texte foncé */
[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

/* Mobile : logo plus petit */
@media (max-width: 600px) {
    .logo-img {
        height: 100px;
    }
}

@media (max-width: 400px) {
    .logo-img {
        height: 80px;
    }
}

.title {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

[data-theme="light"] .title {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 400;
}

.compliance-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(105, 123, 230, 0.1);
    border: 1px solid rgba(105, 123, 230, 0.25);
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    transition: all var(--transition);
}

.compliance-badge:hover {
    background: rgba(105, 123, 230, 0.15);
    transform: translateY(-1px);
}

.compliance-badge i {
    color: var(--success);
}

.compliance-badge.new-badge {
    background: rgba(146, 83, 172, 0.1);
    border-color: rgba(146, 83, 172, 0.25);
    color: var(--secondary);
    animation: pulse 2s infinite;
}

.compliance-badge.new-badge i {
    color: var(--secondary);
}

.compliance-badge.ai-highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    animation: pulse-green 2s infinite;
}

.compliance-badge.ai-highlight i {
    color: #10b981;
}

@keyframes pulse-green {
    0%, 100% { 
        opacity: 1; 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3);
    }
    50% { 
        opacity: 0.9; 
        box-shadow: 0 0 10px 2px rgba(16, 185, 129, 0.2);
    }
}

[data-theme="light"] .compliance-badge {
    background: rgba(105, 123, 230, 0.08);
}

[data-theme="light"] .compliance-badge.ai-highlight {
    background: rgba(16, 185, 129, 0.1);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =============================================
   CHOICE SECTION (Initial)
   ============================================= */
.choice-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    padding: 2rem 0;
}

.choice-container {
    max-width: 750px;
    width: 100%;
    text-align: center;
}

.choice-header {
    margin-bottom: 2rem;
}

.choice-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.choice-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.choice-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

.choice-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 650px) {
    .choice-cards {
        grid-template-columns: 1fr;
    }
}

.choice-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-light);
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    position: relative;
    font-family: inherit;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .choice-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(100, 116, 139, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.choice-card:hover {
    transform: translateY(-4px);
}

.choice-card:first-child:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(105, 123, 230, 0.25);
}

[data-theme="light"] .choice-card:first-child:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(105, 123, 230, 0.15);
}

.choice-card:last-child:hover {
    border-color: var(--secondary);
    box-shadow: 0 15px 40px rgba(146, 83, 172, 0.25);
}

[data-theme="light"] .choice-card:last-child:hover {
    border-color: var(--secondary);
    box-shadow: 0 15px 40px rgba(146, 83, 172, 0.15);
}

.choice-card-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.choice-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

[data-theme="light"] .choice-card-title {
    color: #1e293b;
}

.choice-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

[data-theme="light"] .choice-card-desc {
    color: #64748b;
}

.choice-card-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

[data-theme="light"] .choice-card-features {
    color: #64748b;
}

.choice-card-features span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.choice-card-features i {
    color: var(--success);
    font-size: 0.7rem;
}

[data-theme="light"] .choice-card-features i {
    color: var(--success);
}

.choice-card-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.875rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(105, 123, 230, 0.4);
}

[data-theme="light"] .choice-card-badge {
    box-shadow: 0 4px 15px rgba(105, 123, 230, 0.3);
}

/* =============================================
   SCAN SECTION
   ============================================= */
.scan-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem 0;
}

.scan-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-light);
    padding: 2.5rem 3rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

[data-theme="light"] .scan-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.back-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-light);
}

[data-theme="light"] .back-btn {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

[data-theme="light"] .back-btn:hover {
    background: rgba(100, 116, 139, 0.2);
    color: #334155;
}

/* Bouton retour dans la section principale */
.back-btn-main {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(147, 83, 172, 0.1) 0%, rgba(105, 123, 230, 0.1) 100%);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.back-btn-main:hover {
    background: linear-gradient(135deg, rgba(147, 83, 172, 0.2) 0%, rgba(105, 123, 230, 0.2) 100%);
    color: var(--primary);
    transform: translateX(-3px);
}

[data-theme="light"] .back-btn-main {
    background: linear-gradient(135deg, rgba(147, 83, 172, 0.08) 0%, rgba(105, 123, 230, 0.08) 100%);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="light"] .back-btn-main:hover {
    background: linear-gradient(135deg, rgba(147, 83, 172, 0.15) 0%, rgba(105, 123, 230, 0.15) 100%);
}

.scan-card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 2s ease infinite;
    line-height: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.scan-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

[data-theme="light"] .scan-card-title {
    color: #1e293b;
}

.scan-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .scan-card-subtitle {
    color: #64748b;
}

/* Nouveau design du formulaire de scan */
.scan-form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.scan-input-full {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

[data-theme="light"] .scan-input-full {
    background: rgba(241, 245, 249, 0.8);
    color: #1e293b;
    border-color: #e2e8f0;
}

.scan-input-full:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
}

.scan-input-full::placeholder {
    color: var(--text-dim);
}

.scan-main-btn-full {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all var(--transition);
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(105, 123, 230, 0.3);
}

.scan-main-btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(105, 123, 230, 0.4);
}

.scan-main-btn-full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.scan-main-btn-full.scanning {
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    animation: pulse-scan 1.5s ease-in-out infinite;
}

@keyframes pulse-scan {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Ancien styles conservés pour compatibilité */
.scan-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.scan-input {
    flex: 1 1 300px;
    min-width: 250px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

[data-theme="light"] .scan-input {
    background: rgba(241, 245, 249, 0.8);
    color: #1e293b;
}

.scan-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
}

.scan-input::placeholder {
    color: var(--text-dim);
}

.scan-main-btn {
    padding: 1rem 1.5rem;
    min-width: 180px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(105, 123, 230, 0.3);
}

.scan-main-btn.scanning {
    min-width: 200px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.scan-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(105, 123, 230, 0.4);
}

.scan-main-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.scan-main-btn.scanning {
    background: linear-gradient(135deg, var(--orange), var(--yellow));
}

.scan-main-btn.scanning i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Badge AI */
.ai-badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: pulse-ai 2s ease-in-out infinite;
}

.ai-badge i {
    font-size: 0.9rem;
}

@keyframes pulse-ai {
    0%, 100% { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(16, 185, 129, 0.5); }
}

[data-theme="light"] .ai-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.scan-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.scan-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.scan-feature i {
    font-size: 1.25rem;
    color: var(--primary);
}

[data-theme="light"] .scan-feature i {
    color: var(--primary);
}

/* =============================================
   THEME SWITCHER
   ============================================= */
.theme-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
}

.theme-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.1);
    border-color: var(--yellow);
    color: var(--yellow);
}

/* =============================================
   TABS
   ============================================= */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.4rem;
    border-radius: 0.875rem;
    border: 1px solid var(--border-subtle);
}

[data-theme="light"] .tabs {
    background: rgba(241, 245, 249, 0.8);
}

.tab {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.625rem;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab:hover {
    color: var(--text-light);
    background: rgba(148, 163, 184, 0.1);
}

.tab.active {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

/* =============================================
   MAIN GRID
   ============================================= */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .title { font-size: 1.75rem; }
    .app-container { padding: 1rem; }
    .tab { font-size: 0.85rem; padding: 0.75rem 0.875rem; }
    .scan-card { padding: 2rem 1.5rem; }
    .scan-input-group { flex-direction: column; }
    .scan-main-btn { width: 100%; justify-content: center; }
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: rgba(15, 15, 30, 0.3);
}

[data-theme="light"] .card-header {
    background: rgba(241, 245, 249, 0.5);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.card-title {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    flex: 1;
}

[data-theme="light"] .card-title {
    color: #1e293b;
}

.rescan-btn {
    padding: 0.4rem 0.75rem;
    background: rgba(105, 123, 230, 0.15);
    border: 1px solid rgba(105, 123, 230, 0.3);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all var(--transition);
    font-family: inherit;
}

.rescan-btn:hover {
    background: rgba(105, 123, 230, 0.25);
    transform: translateY(-1px);
}

[data-theme="light"] .rescan-btn {
    background: rgba(105, 123, 230, 0.1);
}

.card-body {
    padding: 1.25rem;
    max-height: none; /* Supprimé pour permettre aux tooltips de s'afficher */
    overflow: visible; /* Permettre aux tooltips de dépasser */
}

/* Scrollbar pour le contenu long - appliqué à la card entière si nécessaire */
.card {
    max-height: 80vh;
    overflow-y: auto;
}

.card::-webkit-scrollbar {
    width: 5px;
}

.card::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}

.card::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.875rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.form-group {
    margin-bottom: 0.875rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

[data-theme="light"] .form-label {
    color: #475569;
}

.auto-filled-badge {
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--cyan);
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 500;
    margin-left: auto;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    color: #f8fafc;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
    color: var(--text-dim);
}

.form-input.auto-filled {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.05);
}

/* =============================================
   SÉLECTEUR DE JURIDICTION - Version 3.3 FINAL
   ============================================= */
.jurisdiction-section {
    background: linear-gradient(135deg, rgba(105, 123, 230, 0.08) 0%, rgba(146, 83, 172, 0.05) 100%);
    border: 1px solid rgba(105, 123, 230, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.jurisdiction-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* SELECT JURIDICTION - Style complet qui override tout */
#jurisdictionSelect {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    margin: 0;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #f1f5f9;
    background-color: #1e293b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#jurisdictionSelect:hover {
    border-color: rgba(105, 123, 230, 0.5);
}

#jurisdictionSelect:focus {
    outline: none;
    border-color: #697BE6;
    box-shadow: 0 0 0 3px rgba(105, 123, 230, 0.2);
}

#jurisdictionSelect option {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 10px;
}

/* Mode clair pour le select juridiction */
[data-theme="light"] #jurisdictionSelect {
    background-color: #ffffff;
    color: #1e293b;
    border-color: rgba(100, 116, 139, 0.3);
}

[data-theme="light"] #jurisdictionSelect option {
    background-color: #ffffff;
    color: #1e293b;
}

/* Classe générique form-select pour autres selects */
.form-select:not(#jurisdictionSelect) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.jurisdiction-info-box {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.jurisdiction-info-laws,
.jurisdiction-info-authority {
    margin-bottom: 0.35rem;
}

.jurisdiction-info-laws:last-child,
.jurisdiction-info-authority:last-child {
    margin-bottom: 0;
}

.jurisdiction-info-box strong {
    color: var(--text-light);
    font-weight: 500;
}

[data-theme="light"] .jurisdiction-section {
    background: linear-gradient(135deg, rgba(105, 123, 230, 0.1) 0%, rgba(146, 83, 172, 0.05) 100%);
    border-color: rgba(105, 123, 230, 0.25);
}

[data-theme="light"] .jurisdiction-info-box {
    background: rgba(0, 0, 0, 0.02);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Header mobile */
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .compliance-badges {
        gap: 0.5rem;
    }
    
    .compliance-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Cards mobile */
    .card-header {
        padding: 0.875rem 1rem;
        gap: 0.625rem;
    }
    
    .card-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tabs mobile */
    .tabs {
        gap: 0.25rem;
    }
    
    .tab {
        font-size: 0.8rem;
        padding: 0.625rem 0.75rem;
    }
    
    /* Form elements mobile */
    .form-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.8rem;
    }
    
    /* Buttons mobile */
    .generate-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    /* Output area mobile */
    .output-area {
        font-size: 0.85rem;
        padding: 1rem;
        max-height: 350px;
    }
    
    /* Scan card mobile */
    .scan-card {
        padding: 1.5rem 1rem;
    }
    
    .scan-url-input {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .scan-main-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Choice cards mobile */
    .choice-cards {
        gap: 1rem;
    }
    
    .choice-card {
        padding: 1.5rem 1rem;
    }
    
    .choice-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .choice-card-title {
        font-size: 1.1rem;
    }
}

/* =============================================
   TOOLTIPS - Version 3.1 (CSS pur, sans JS)
   ============================================= */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.tooltip-trigger {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    cursor: help;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.tooltip-trigger:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(105, 123, 230, 0.4);
}

/* Tooltip affiché EN BAS par défaut */
.tooltip-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: normal;
    width: 260px;
    max-width: 300px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(105, 123, 230, 0.3);
    line-height: 1.5;
    pointer-events: none;
}

/* Flèche pointant vers le haut */
.tooltip-content::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #1e293b;
}

/* Affichage au hover ET au focus */
.tooltip-wrapper:hover .tooltip-content,
.tooltip-wrapper:focus-within .tooltip-content,
.tooltip-trigger:hover + .tooltip-content,
.tooltip-trigger:focus + .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Ajustement si trop à gauche */
.tooltip-content.tooltip-right {
    left: auto;
    right: -10px;
    transform: none;
}

.tooltip-content.tooltip-right::before {
    left: auto;
    right: 15px;
    transform: none;
}

/* Ajustement si trop à droite */
.tooltip-content.tooltip-left {
    left: -10px;
    right: auto;
    transform: none;
}

.tooltip-content.tooltip-left::before {
    left: 15px;
    right: auto;
    transform: none;
}

/* Mode clair */
[data-theme="light"] .tooltip-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f1f5f9;
}

[data-theme="light"] .tooltip-content::before {
    border-bottom-color: #1e293b;
}

/* Mobile */
@media (max-width: 768px) {
    .tooltip-content {
        width: 200px;
        max-width: 80vw;
        font-size: 0.75rem;
        padding: 0.6rem 0.8rem;
        position: fixed;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        top: auto;
        bottom: 20px;
    }
    
    .tooltip-content::before {
        display: none;
    }
}

/* =============================================
   CHECKBOXES
   ============================================= */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

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

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
}

.checkbox-item.detected {
    border-color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    animation: highlight 0.5s ease;
}

@keyframes highlight {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    user-select: none;
}

/* =============================================
   SWITCHES
   ============================================= */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 0.5rem;
}

.switch-row:last-child {
    border-bottom: none;
}

.switch-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    flex: 1;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 24px;
    transition: 0.3s;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .switch-slider {
    background: linear-gradient(135deg, var(--blue), var(--purple));
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

/* =============================================
   GENERATE BUTTON
   ============================================= */
.generate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition);
    margin-top: 1rem;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(105, 123, 230, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(105, 123, 230, 0.5);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =============================================
   OUTPUT AREA
   ============================================= */
.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-dim);
}

.output-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.output-area {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    color: #94a3b8;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.action-btn.copy {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.action-btn.copy:hover {
    background: rgba(59, 130, 246, 0.25);
}

.action-btn.copy.copied {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--green);
}

.action-btn.download {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.action-btn.download:hover {
    background: rgba(139, 92, 246, 0.25);
}

.action-btn.word {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #3b82f6;
}

.action-btn.word:hover {
    background: rgba(37, 99, 235, 0.25);
}

.action-btn.pdf {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.action-btn.pdf:hover {
    background: rgba(239, 68, 68, 0.25);
}

.action-btn.wpbakery {
    background: rgba(0, 115, 170, 0.15);
    border: 1px solid rgba(0, 115, 170, 0.35);
    color: #29b6d8;
}

.action-btn.wpbakery:hover {
    background: rgba(0, 115, 170, 0.28);
}

/* =============================================
   FLOATING BUTTONS
   ============================================= */
.floating-buttons {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    z-index: 1000;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    position: relative;
    color: white;
    text-decoration: none;
}

.floating-btn.back {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.floating-btn.guide {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
}

.floating-btn.about {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.floating-btn.top {
    background: linear-gradient(135deg, var(--success), #22c55e);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    order: 4;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(105, 123, 230, 0.4);
}

.floating-btn-label {
    position: absolute;
    right: calc(100% + 12px);
    background: #1e293b;
    color: #f1f5f9;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.floating-btn:hover .floating-btn-label {
    opacity: 1;
    transform: translateX(0);
}

.floating-btn.top.visible {
    opacity: 1;
    visibility: visible;
}
}

/* Boutons flottants - Responsive Mobile */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }
    
    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .floating-btn-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        bottom: 0.75rem;
        right: 0.75rem;
        gap: 0.4rem;
    }
    
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
}

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

.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    max-width: 550px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-content.modal-large {
    max-width: 700px;
    max-height: 85vh;
}

[data-theme="light"] .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(100, 116, 139, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.5);
    flex-shrink: 0;
}

[data-theme="light"] .modal-header {
    background: rgba(241, 245, 249, 0.5);
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

[data-theme="light"] .modal-title {
    color: #1e293b;
}

.modal-icon {
    font-size: 1.3rem;
}

.modal-close {
    background: rgba(148, 163, 184, 0.1);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.3);
    flex-shrink: 0;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-btn.secondary {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}

.modal-btn.secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-light);
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--green), #22c55e);
    border: none;
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.modal-section {
    margin-bottom: 1.25rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-list {
    list-style: none;
    padding: 0;
}

.modal-list li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.825rem;
    color: var(--text-muted);
}

.modal-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--blue);
}

.modal-list.check li::before {
    content: '✓';
    color: var(--green);
}

.modal-list.warning li::before {
    content: '⚠';
    color: var(--yellow);
}

.modal-tip {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--blue);
    padding: 0.625rem 0.875rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.625rem;
}

.modal-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #fcd34d;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.modal-warning-icon {
    font-size: 1.1rem;
}

/* =============================================
   SCAN RESULTS MODAL SPECIFIC
   ============================================= */
.scan-results-summary {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

[data-theme="light"] .scan-results-summary {
    background: rgba(8, 145, 178, 0.08);
    border-color: rgba(8, 145, 178, 0.2);
}

.scan-summary-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.scan-summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

[data-theme="light"] .scan-summary-title {
    color: #1e293b;
}

.scan-summary-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

[data-theme="light"] .scan-summary-subtitle {
    color: #64748b;
}

/* v8.3 — Conteneur du widget anti-robots Cloudflare Turnstile */
.turnstile-container {
    display: flex;
    justify-content: center;
    margin-top: 0.9rem;
    min-height: 0;
}
.turnstile-container:empty {
    display: none;
}

/* v8.5 — Analyse par IA sur demande */
.ai-access {
    width: 100%;
    max-width: 640px;
    margin: 1.25rem auto 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    text-align: left;
}
.ai-access-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.ai-access-title i { color: var(--primary); margin-right: 0.35rem; }
.ai-access-help,
.ai-access-privacy {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem;
}
.ai-access-privacy { font-size: 0.72rem; margin: 0.75rem 0 0; color: var(--text-dim); }
.ai-access-privacy a { color: var(--primary); }
.ai-access-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0.6rem 0 0.3rem;
}
.ai-access-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    box-sizing: border-box;
}
.ai-access-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.ai-access-row { display: flex; gap: 0.5rem; align-items: stretch; }
.ai-access-row .ai-access-input { flex: 1; }
.ai-access-check {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.55rem 0 0;
    cursor: pointer;
    line-height: 1.4;
}
.ai-access-check input { margin-top: 0.15rem; flex-shrink: 0; }
.ai-access-btn {
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.ai-access-row .ai-access-btn { margin-top: 0; }
.ai-access-btn:hover { background: var(--primary-dark); }
.ai-access-btn:disabled { opacity: 0.6; cursor: wait; }
.ai-access-active {
    font-size: 0.85rem;
    color: var(--success);
    padding: 0.5rem 0;
}
.ai-access-msg {
    font-size: 0.8rem;
    margin: 0.6rem 0 0;
    min-height: 1em;
    color: var(--text-light);
}
.ai-access-msg.is-error { color: var(--error); }
.ai-access-msg.is-ok { color: var(--success); }
/* Champ piège anti-robots : hors écran, jamais visible pour un humain */
.ai-access-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
@media (max-width: 480px) {
    .ai-access-row { flex-direction: column; }
}

/* v8.2 — Indicateur honnête de la méthode de détection (IA vs motifs) */
.scan-summary-method {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    opacity: 0.85;
}

.scan-summary-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.scan-stat {
    text-align: center;
}

.scan-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
}

[data-theme="light"] .scan-stat-value {
    color: #0891b2;
}

.scan-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="light"] .scan-stat-label {
    color: #64748b;
}

/* =============================================
   JURIDICTION DÉTECTÉE - v8.0
   ============================================= */
.scan-jurisdiction-detected {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, rgba(105, 123, 230, 0.15) 0%, rgba(146, 83, 172, 0.1) 100%);
    border: 1px solid rgba(105, 123, 230, 0.3);
    border-radius: var(--radius-md);
}

.scan-jurisdiction-flag {
    font-size: 2rem;
    line-height: 1;
}

.scan-jurisdiction-info {
    flex: 1;
}

.scan-jurisdiction-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.scan-jurisdiction-laws {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.scan-jurisdiction-confidence {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--cyan) 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Styles pour la section juridiction dans les détails */
.scan-detail-jurisdiction {
    border-color: rgba(105, 123, 230, 0.3);
}

.scan-detail-jurisdiction .scan-detail-header {
    background: linear-gradient(135deg, rgba(105, 123, 230, 0.2) 0%, rgba(146, 83, 172, 0.1) 100%);
}

.scan-detail-badge {
    margin-left: auto;
    padding: 0.2rem 0.5rem;
    background: rgba(74, 222, 128, 0.2);
    color: var(--green);
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.jurisdiction-card {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.jurisdiction-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.jurisdiction-flag {
    font-size: 2.5rem;
    line-height: 1;
}

.jurisdiction-details {
    flex: 1;
}

.jurisdiction-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
}

.jurisdiction-laws {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.jurisdiction-authority {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.jurisdiction-note {
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.jurisdiction-note i {
    color: var(--blue);
    margin-top: 0.1rem;
}

/* Badge de confiance dans les valeurs détectées */
.confidence-tag {
    margin-left: 0.5rem;
    padding: 0.1rem 0.35rem;
    background: rgba(74, 222, 128, 0.15);
    color: var(--green);
    font-size: 0.65rem;
    font-weight: 500;
    border-radius: 0.2rem;
}

/* Services par catégorie */
.scan-services-category {
    margin-bottom: 0.75rem;
}

.scan-services-category:last-child {
    margin-bottom: 0;
}

.scan-services-category-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.scan-results-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scan-detail-section {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    overflow: hidden;
}

[data-theme="light"] .scan-detail-section {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(100, 116, 139, 0.15);
}

.scan-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .scan-detail-header {
    background: rgba(226, 232, 240, 0.5);
}

.scan-detail-icon {
    font-size: 1.1rem;
}

.scan-detail-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    flex: 1;
}

[data-theme="light"] .scan-detail-title {
    color: #1e293b;
}

.scan-detail-count {
    background: rgba(34, 211, 238, 0.2);
    color: var(--cyan);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
}

[data-theme="light"] .scan-detail-count {
    background: rgba(8, 145, 178, 0.15);
    color: #0891b2;
}

.scan-detail-body {
    padding: 0.75rem 1rem;
}

.scan-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.scan-detail-item:last-child {
    border-bottom: none;
}

.scan-detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

[data-theme="light"] .scan-detail-label {
    color: #475569;
}

.scan-detail-value {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

[data-theme="light"] .scan-detail-value {
    color: #1e293b;
}

.scan-detail-value.detected {
    color: #059669;
    font-weight: 600;
}

[data-theme="light"] .scan-detail-value.detected {
    color: #047857;
}

.scan-detail-value.not-found {
    color: var(--text-dim);
    font-style: italic;
}

[data-theme="light"] .scan-detail-value.not-found {
    color: #94a3b8;
}

.scan-services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.scan-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.7rem;
    background: rgba(5, 150, 105, 0.15);
    border: 1px solid rgba(5, 150, 105, 0.3);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 500;
}

.scan-service-chip i {
    font-size: 0.6rem;
}

[data-theme="light"] .scan-service-chip {
    background: rgba(4, 120, 87, 0.1);
    border-color: rgba(4, 120, 87, 0.25);
    color: #047857;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-dim);
    font-size: 0.75rem;
}

.footer a {
    color: #60a5fa;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-warning {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--yellow);
}

.footer-version {
    margin-top: 0.3rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.7;
    letter-spacing: 0.02em;
}

.version {
    position: fixed;
    bottom: 12px;
    left: 12px;
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 1;
    font-weight: 600;
    background: var(--bg-card);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    z-index: 50;
    letter-spacing: 0.03em;
    border: 1px solid var(--border-subtle);
    z-index: 100;
}

[data-theme="light"] .version {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

/* =============================================
   V6.0 - NEW FORM SECTIONS
   ============================================= */
#digitalServicesSection .form-input,
#digitalServicesSection .section-title {
    color: var(--text-light);
}

.output-area h1 {
    font-size: 1rem !important;
}
.output-area h2 {
    font-size: 0.88rem !important;
}
.output-area p, .output-area li {
    font-size: 0.82rem !important;
    line-height: 1.65;
}
