/*
Theme Name: LAWLvL
Theme URI: https://lawlvl.fr
Author: LAWLvL
Description: Thème sur mesure pour LAWLvL — Infrastructures & Sécurité IT pour Cabinets d'Avocats.
Version: 1.0.0
License: Proprietary
Text Domain: lawlvl
*/

/* ==================== VARIABLES CSS ==================== */
:root {
    --font-mono: 'IBM Plex Mono', monospace;
    --font-display: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0A0F1E;
    --bg-secondary: #1A2332;
    --bg-card: #111827;
    --accent: #06b6d4;
    --accent-hover: #22d3ee;
    --text-primary: #E8ECF1;
    --text-secondary: #8B95A5;
    --text-muted: #4A5568;
    --border: #2A3544;
    --grid-opacity: 0.3;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --accent: #0891b2;
    --accent-hover: #0e7490;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: #e0e0e0;
    --grid-opacity: 0.15;
}

/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: var(--grid-opacity);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ==================== NAVIGATION ==================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo svg {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--accent);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.theme-toggle:hover svg {
    color: var(--bg-primary);
}

/* ==================== SECTIONS ==================== */
section {
    padding: 8rem 0;
    position: relative;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==================== STATS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin: 4rem 0;
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==================== CARDS ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.card ul {
    list-style: none;
    margin-top: 1rem;
}

.card ul li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.card ul li::before {
    content: '→';
    color: var(--accent);
    position: absolute;
    left: 0;
}

/* ==================== ENJEUX SECTION ==================== */
.enjeux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.enjeu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    transition: var(--transition);
}

.enjeu-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 25px 50px rgba(6, 182, 212, 0.2);
}

.enjeu-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* ==================== FAQ ==================== */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--accent);
}

.faq-question {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo svg {
    height: 28px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 1rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    position: fixed;
    right: 2%;
    bottom: 2%;
    width: 450px;
    max-width: 90vw;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    transform: scale(0.9);
    transform-origin: bottom right;
}

.cookie-banner.show {
    display: block;
    animation: cookieFadeIn 0.4s ease-out forwards;
}

@keyframes cookieFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(0.9) translateY(0);
    }
}

.cookie-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cookie-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.cookie-dot:nth-child(1) { background: #FF5F56; }
.cookie-dot:nth-child(2) { background: #FFBD2E; }
.cookie-dot:nth-child(3) { background: #27C93F; }

.cookie-banner h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.cookie-banner p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cookie-btn {
    padding: 0.65rem 1.25rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    font-weight: 500;
}

.cookie-btn-accept {
    background: var(--accent);
    color: var(--bg-primary);
}

.cookie-btn-accept:hover {
    background: var(--accent-hover);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.cookie-btn-decline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==================== ANIMATIONS ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .cookie-banner {
        display: none !important;
    }

    h1 {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    section {
        padding: 4rem 0;
    }
}

/* ==================== IMAGES DE BACKGROUND ==================== */
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    opacity: 0.15;
    pointer-events: none;
}

.image-section {
    position: relative;
    overflow: hidden;
}

.image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

#expertise::before {
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?w=1920&q=80');
}

#guichet::before {
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80');
}

.image-section .container {
    position: relative;
    z-index: 1;
}

/* ==================== LEGAL PAGES ==================== */

.page-hero {
    padding: 8rem 0 3rem;
    background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.4;
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { opacity: 0.4; }

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.legal-content {
    padding: 4rem 0 6rem;
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.legal-sidebar {
    position: sticky;
    top: 100px;
}

.legal-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
}

.legal-toc-title {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.legal-toc ol {
    padding-left: 1.25rem;
    margin: 0;
}

.legal-toc ol li {
    margin-bottom: 0.45rem;
}

.legal-toc ol li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.4;
    transition: color 0.2s;
    display: block;
}

.legal-toc ol li a:hover,
.legal-toc ol li a.active {
    color: var(--accent);
}

.legal-print-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.legal-print-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.legal-body > section {
    margin-bottom: 3.5rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 100px;
}

.legal-body > section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-body h2 {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    line-height: 1.3;
}

.art-num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.75rem;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.legal-body h3 {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.legal-body p {
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 1rem;
}

.legal-body ul,
.legal-body ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    line-height: 1.85;
    margin-bottom: 1rem;
}

.legal-body ul li,
.legal-body ol li {
    margin-bottom: 0.4rem;
}

.legal-highlight {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.legal-highlight .hl-label {
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.legal-table th {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.legal-table td {
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    vertical-align: top;
}

.legal-table tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.025);
}

[data-theme="dark"] .legal-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}

.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.right-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}

.right-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.right-card .right-art {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.72rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.right-card .right-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.right-card p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.legal-contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.legal-contact-box .contact-label {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.legal-contact-box p {
    color: var(--text-secondary);
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.legal-contact-box a {
    color: var(--accent);
    text-decoration: none;
}

.legal-contact-box a:hover { text-decoration: underline; }

/* Expert Profile Layout */
.expert-profile {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    margin: 2.5rem 0 3rem;
}

.expert-photo-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.expert-bio h3 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .expert-profile {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .expert-photo-placeholder {
        aspect-ratio: 1 / 1;
        max-width: 220px;
    }
}

.legal-alert {
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.75;
}

.legal-alert strong {
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .legal-sidebar {
        position: static;
    }

    .legal-toc {
        display: none;
    }
}

@media print {
    #navbar,
    .cookie-banner,
    footer,
    .legal-sidebar { display: none !important; }
    .legal-layout { grid-template-columns: 1fr; }
    .legal-content { padding: 1rem 0; }
    .page-hero { padding: 2rem 0 1rem; }
}

/* ==================== NAVIGATION ACTIVE ====================  */
.nav-links a.nav-active {
    color: var(--accent);
}
.nav-links a.nav-active::after {
    width: 100%;
}

/* ==================== PAGE HERO DESCRIPTION ====================  */
.page-hero-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 700px;
    margin-top: 0.75rem;
}

/* ==================== PAGE RÉFÉRENCES ==================== */

.ref-section {
    padding: 3.5rem 0 6rem;
}

/* Bandeau admin (visible uniquement pour les administrateurs WordPress) */
.ref-admin-bar {
    background: rgba(6, 182, 212, 0.05);
    border: 1px dashed rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ref-admin-bar p {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.ref-admin-bar code {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
}

.ref-admin-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.3rem;
}

.ref-refresh-btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    text-decoration: none;
}

.ref-refresh-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Notification de confirmation */
.ref-notice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.25rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    margin-bottom: 1.5rem;
}

.ref-notice--ok {
    background: rgba(39, 201, 63, 0.07);
    border: 1px solid rgba(39, 201, 63, 0.25);
    color: #27C93F;
}

/* ==================== GRILLE CLIENT ==================== */

.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* Carte client */
.ref-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.ref-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.ref-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.12);
}

.ref-card:hover::before {
    transform: scaleX(1);
}

/* Zone logo */
.ref-logo-area {
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.ref-logo {
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* Balance de la justice (SVG fallback) */
.ref-balance {
    color: var(--accent);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* En-tête carte : nom + badge statut */
.ref-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ref-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s;
}

.ref-name:hover {
    color: var(--accent);
}

/* Badge statut */
.ref-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    font-weight: 500;
    padding: 0.22rem 0.6rem;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.ref-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.ref-status.online {
    background: rgba(39, 201, 63, 0.09);
    border: 1px solid rgba(39, 201, 63, 0.28);
    color: #27C93F;
}

.ref-status.online .ref-status-dot {
    animation: ref-blink 2.2s ease-in-out infinite;
}

@keyframes ref-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}

.ref-status.offline {
    background: rgba(255, 95, 86, 0.07);
    border: 1px solid rgba(255, 95, 86, 0.22);
    color: #FF5F56;
}

.ref-status.unknown {
    background: rgba(139, 149, 165, 0.07);
    border: 1px solid rgba(139, 149, 165, 0.18);
    color: var(--text-muted);
}

/* Description */
.ref-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Bureaux */
.ref-offices-block {
    margin-bottom: 1.4rem;
}

.ref-offices-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.45rem;
}

.ref-offices {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ref-offices li {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.3rem;
    line-height: 1.55;
}

.ref-offices li::before {
    content: '→';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    top: 0.05em;
}

/* Pied de carte */
.ref-card-footer {
    margin-top: auto;
    padding-top: 0.25rem;
}

.ref-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.77rem;
    text-decoration: none;
    padding: 0.52rem 1rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 6px;
    transition: var(--transition-fast);
}

.ref-link:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.ref-no-site {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.77rem;
    padding: 0.52rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: default;
}

/* Responsive */
@media (max-width: 768px) {
    .ref-grid {
        grid-template-columns: 1fr;
    }
    .ref-admin-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media print {
    .ref-admin-bar,
    .ref-notice { display: none !important; }
}

/* ==================== PAGE OUTILS / CALCULATEUR ==================== */

.calc-section { padding: 3rem 0 6rem; }

.calc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
}
.calc-tabs::-webkit-scrollbar { display: none; }

.calc-tab {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.75rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    margin-bottom: -1px;
}
.calc-tab:hover { color: var(--text-primary); }
.calc-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.calc-tab-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
}

.calc-panel { display: none; }
.calc-panel.active { display: block; }

.calc-tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.calc-tool-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 0.5rem;
    max-width: 600px;
}
.calc-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.55rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.calc-reset-btn:hover { border-color: var(--accent); color: var(--accent); }

.calc-progress-wrap { margin-bottom: 2rem; }
.calc-progress-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.calc-progress-pct { color: var(--accent); font-weight: 600; }
.calc-progress-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.calc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
    width: 0%;
}

.calc-questions { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 2rem; }

.calc-q-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1.25rem;
    align-items: start;
}
.calc-q-card.answered { border-color: rgba(6,182,212,0.3); }

.calc-q-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    background: rgba(6,182,212,0.07);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 4px;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
    align-self: center;
}
.calc-q-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
    line-height: 1.4;
}
.calc-q-hint {
    font-family: var(--font-mono);
    font-size: 0.71rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    line-height: 1.5;
}
.calc-answers { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.calc-ans {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.15s;
}
.calc-ans:hover { border-color: var(--accent); color: var(--accent); }
.calc-ans.sel-yes    { background: rgba(39,201,63,0.08);  border-color: #27C93F; color: #27C93F; }
.calc-ans.sel-partial{ background: rgba(255,189,46,0.08); border-color: #FFBD2E; color: #FFBD2E; }
.calc-ans.sel-no     { background: rgba(255,95,86,0.08);  border-color: #FF5F56; color: #FF5F56; }

/* Results */
.calc-results {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 2.5rem;
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease-out;
}
.calc-results.visible { display: block; }

.calc-results-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem 2.5rem;
    align-items: start;
    margin-bottom: 2rem;
}
.calc-gauge-wrap { text-align: center; }
.calc-gauge { width: 140px; height: 140px; display: block; overflow: visible; }
.calc-gauge-bg { fill: none; stroke: var(--border); stroke-width: 9; }
.calc-gauge-arc {
    fill: none;
    stroke: var(--accent);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 0 289.03;
    transform-origin: 70px 70px;
    transform: rotate(-90deg);
    transition: stroke-dasharray 1.2s cubic-bezier(0.4,0,0.2,1), stroke 0.5s ease;
}
.calc-gauge-score {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 26px;
    font-weight: 700;
    fill: var(--text-primary);
}
.calc-gauge-denom { font-family: 'IBM Plex Mono', monospace; font-size: 11px; fill: var(--text-muted); }
.calc-level {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.75rem;
    border: 1px solid currentColor;
}
.calc-results-title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.calc-results-summary { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.5rem; }
.calc-reco-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.6rem;
}
.calc-reco-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.calc-reco-item {
    font-size: 0.86rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.55;
}
.calc-reco-item::before { content:'→'; color: var(--accent); position: absolute; left: 0; font-family: var(--font-mono); font-size: 0.7rem; top: 0.12em; }
.calc-all-ok { font-family: var(--font-mono); font-size: 0.82rem; color: #27C93F; margin-bottom: 1.5rem; }
.calc-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ==================== WIZARD ESTIMATION ==================== */

.wizard-steps-nav {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 0;
}
.wizard-step-item {
    display: flex;
    align-items: center;
    flex: 1;
}
.wizard-step-item:last-child { flex: none; }
.wizard-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all 0.25s;
    flex-shrink: 0;
    position: relative;
}
.wizard-step-dot .wizard-step-lbl {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.wizard-step-dot.active { border-color: var(--accent); background: var(--accent); color: var(--bg-primary); font-weight: 700; }
.wizard-step-dot.active .wizard-step-lbl { color: var(--accent); }
.wizard-step-dot.done { border-color: #27C93F; background: rgba(39,201,63,0.1); color: #27C93F; }
.wizard-step-dot.done .wizard-step-lbl { color: #27C93F; }
.wizard-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 4px; transition: background 0.3s; }
.wizard-step-item.done .wizard-step-line { background: #27C93F; }

.wizard-body { padding-top: 1.5rem; min-height: 260px; }
.wizard-step-content { display: none; animation: fadeInUp 0.3s ease-out; }
.wizard-step-content.active { display: block; }
.wizard-step-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.3rem; }
.wizard-step-sub { font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }

.wizard-option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 0.75rem; margin-bottom: 0.5rem; }
.wizard-option {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.wizard-option:hover { border-color: var(--accent); }
.wizard-option.selected { border-color: var(--accent); background: rgba(6,182,212,0.06); }
.wizard-option-icon { font-size: 1.4rem; margin-bottom: 0.5rem; display: block; }
.wizard-option-label { font-weight: 600; color: var(--text-primary); font-size: 0.88rem; line-height: 1.3; }
.wizard-option-sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

.wizard-domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 0.6rem; margin-bottom: 0.5rem; }
.wizard-domain {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
}
.wizard-domain:hover { border-color: var(--accent); color: var(--text-primary); }
.wizard-domain.selected { border-color: var(--accent); background: rgba(6,182,212,0.06); color: var(--accent); }
.wizard-domain-ico { font-size: 1.1rem; flex-shrink: 0; }
.wizard-check {
    width: 16px; height: 16px;
    border-radius: 3px;
    border: 1px solid var(--border);
    margin-left: auto;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; transition: all 0.15s;
}
.wizard-domain.selected .wizard-check { background: var(--accent); border-color: var(--accent); color: var(--bg-primary); }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.wizard-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.wizard-nav-btns { display: flex; gap: 0.75rem; }

/* Estimation result */
.estim-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 2.5rem;
    animation: fadeInUp 0.4s ease-out;
}
.estim-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}
.estim-range {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.35rem;
}
.estim-range-note { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); margin-bottom: 2rem; }
.estim-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem; margin-bottom: 2rem; }
.estim-col-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 0.5rem; }
.estim-list { list-style: none; padding: 0; margin: 0; }
.estim-list li { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-secondary); padding-left: 1.1rem; position: relative; margin-bottom: 0.3rem; line-height: 1.5; }
.estim-list li::before { content: '→'; color: var(--accent); position: absolute; left: 0; font-size: 0.68rem; }
.estim-disclaimer {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.65;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--border);
    border-radius: 6px;
    margin-bottom: 1.75rem;
}

/* Responsive */
@media (max-width: 900px) {
    .calc-results-grid { grid-template-columns: 1fr; }
    .calc-gauge-wrap { display: flex; align-items: center; gap: 1.5rem; text-align: left; }
    .estim-cols { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 640px) {
    .calc-tab { padding: 0.75rem 1rem; font-size: 0.82rem; }
    .calc-ans { font-size: 0.73rem; padding: 0.38rem 0.7rem; }
    .wizard-option-grid { grid-template-columns: 1fr 1fr; }
    .wizard-domain-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
    .wizard-option-grid { grid-template-columns: 1fr; }
}

/* ==================== BANNIÈRE "BIENTÔT DISPONIBLE" ==================== */

.ref-coming-soon {
    max-width: 640px;
    margin: 2rem auto 4rem;
    text-align: center;
    padding: 4rem 2rem;
}

.ref-cs-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.07);
    border: 1px solid rgba(6, 182, 212, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--accent);
}

.ref-cs-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.ref-cs-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.ref-cs-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.ref-cs-mono {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 1.25rem 1.5rem;
    text-align: left;
    line-height: 1.9;
    display: inline-block;
    width: 100%;
    max-width: 420px;
}

.ref-cs-cursor {
    color: var(--accent);
    margin-right: 0.5rem;
}

.ref-cs-blink {
    animation: ref-blink 1s step-end infinite;
}

@keyframes ref-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
