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

:root {
    --color-text: #1d1d1f;
    --color-text-light: #6e6e73;
    --color-bg: #ffffff;
    --color-bg-light: #f5f5f7;
    --color-bg-dark: #000000;
    --color-accent: #0071e3;
    --color-accent-dark: #0077ED;
    --color-border: #d2d2d7;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* ===== FAQ Hero Banner ===== */
.faq-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1aa8ad 0%, #1a82ad 100%);
}

.faq-hero-content {
    max-width: 1000px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.faq-hero-logo {
    margin-bottom: 32px;
}

.faq-hero-logo img {
    height: 80px;
    width: auto;
}

.faq-hero-title {
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: white;
}

.faq-hero-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Color Wave Decoration ===== */
.color-wave-decoration-left-banner {
    position: absolute;
    top: 20px;
    left: 50px;
    z-index: 1;
    pointer-events: none;
}

.color-wave-decoration-left-banner .color-wave-img {
    width: 120px;
    height: 120px;
    opacity: 1;
}

.color-wave-decoration {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1;
    pointer-events: none;
}

.color-wave-decoration-left {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1;
    pointer-events: none;
}

.color-wave-img {
    width: 80px;
    height: 80px;
    opacity: 1;
}

/* ===== Containers ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Background Colors ===== */
.light-bg {
    background: var(--color-bg-light);
}

.dark-bg {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

/* ===== Text Colors ===== */
.white-text {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

.white-text-light {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* ===== Table of Contents ===== */
.toc-section {
    padding: 80px 20px;
}

.section-title-center {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #00B894 0%, #007AFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.toc-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.toc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.toc-icon {
    font-size: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.toc-icon svg {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.toc-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

/* ===== Barre de recherche FAQ ===== */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: white;
    color: var(--color-text);
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.search-input::placeholder {
    color: var(--color-text-light);
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    pointer-events: none;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border: 1px solid var(--color-border);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.suggestion-item:hover {
    background: var(--color-bg-light);
}

.suggestion-item svg {
    flex-shrink: 0;
    color: var(--color-accent);
}

.suggestion-item span {
    font-size: 15px;
    color: var(--color-text);
    font-weight: 500;
}

/* Scrollbar pour les suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: var(--color-bg-light);
    border-radius: 12px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 12px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

/* ===== FAQ Sections ===== */
.faq-section {
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.faq-content {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.light-bg .faq-item {
    background: white;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.faq-question {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    line-height: 1.3;
}

.light-bg .faq-question {
    color: var(--color-text);
}

.faq-answer {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.light-bg .faq-answer {
    color: var(--color-text);
}

.faq-answer p {
    margin-bottom: 16px;
}

.faq-answer ul,
.faq-answer ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-answer h4 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: white;
}

.light-bg .faq-answer h4 {
    color: var(--color-text);
}

.faq-link {
    color: #4CA2FF;
    text-decoration: underline;
    transition: color 0.2s;
}

.faq-link:hover {
    color: #007AFF;
}

.faq-note {
    background: rgba(113, 216, 138, 0.1);
    border-left: 4px solid #71D88A;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.faq-warning {
    background: rgba(255, 184, 76, 0.1);
    border-left: 4px solid #FFB54C;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

/* ===== Mode Comparison ===== */
.mode-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.mode-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.light-bg .mode-box {
    background: white;
    border: 1px solid var(--color-border);
}

.mode-box h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.light-bg .mode-box h4 {
    color: var(--color-text);
}

.mode-box p {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.light-bg .mode-box p {
    color: var(--color-text);
}

.mode-box ul {
    margin-left: 20px;
    margin-top: 12px;
}

.mode-box li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.light-bg .mode-box li {
    color: var(--color-text-light);
}

/* ===== Formatting Examples ===== */
.formatting-example {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border-left: 4px solid #4CA2FF;
}

.light-bg .formatting-example {
    background: #f9f9f9;
    border-left-color: #007AFF;
}

.formatting-example h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.light-bg .formatting-example h4 {
    color: var(--color-text);
}

.formatting-example code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #FFD700;
}

.light-bg .formatting-example code {
    background: rgba(0, 0, 0, 0.1);
    color: #0066cc;
}

.example-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.light-bg .example-table {
    background: white;
    border: 1px solid var(--color-border);
}

.example-table th,
.example-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-bg .example-table th,
.light-bg .example-table td {
    border-bottom-color: var(--color-border);
}

.example-table th {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.light-bg .example-table th {
    background: var(--color-bg-light);
    color: var(--color-text);
}

/* ===== Badges ===== */
.badge-red {
    color: #FF766E;
    font-weight: 600;
}

.badge-orange {
    color: #FFB54C;
    font-weight: 600;
}

.badge-blue {
    color: #4CA2FF;
    font-weight: 600;
}

.badge-green {
    color: #71D88A;
    font-weight: 600;
}

/* ===== Theme Colors ===== */
.theme-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.theme-color-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 20px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .faq-hero {
        min-height: 50vh;
        padding: 100px 20px 60px;
    }

    .faq-hero-title {
        font-size: 36px;
    }

    .faq-hero-subtitle {
        font-size: 18px;
    }

    .toc-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .faq-item {
        padding: 24px;
    }

    .faq-question {
        font-size: 20px;
    }

    .mode-comparison {
        grid-template-columns: 1fr;
    }

    .color-wave-decoration-left-banner {
        display: none;
    }
}

@media (max-width: 480px) {
    .faq-hero-title {
        font-size: 28px;
    }

    .section-title-center {
        font-size: 32px;
    }

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

    .faq-item {
        padding: 20px;
    }
}

