/* ============================================================
   Aquatycia Guides - Styles CSS complémentaires
   Tailwind CSS est le framework principal.
   Ce fichier contient les surcharges spécifiques.
   ============================================================ */

/* ---- Variables ---- */
:root {
    --aqy-primary:   #002b5c;
    --aqy-secondary: #1e5f8f;
    --aqy-accent:    #00a5e0;
    --aqy-light:     #e8f4fb;
}

/* ---- Transitions globales ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ---- Smooth scroll ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Sélection de texte ---- */
::selection {
    background-color: var(--aqy-accent);
    color: #fff;
}

/* ============================================================
   CONTENU GUIDE (guide-content)
   ============================================================ */
.guide-content {
    color: #374151;
    line-height: 1.75;
    font-size: 0.9375rem;
}

.guide-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    scroll-margin-top: 5rem;
}

.guide-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5rem;
}

.guide-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.guide-content p {
    margin-bottom: 1.25rem;
}

.guide-content ul,
.guide-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.guide-content ul {
    list-style-type: disc;
}

.guide-content ol {
    list-style-type: decimal;
}

.guide-content li {
    margin-bottom: 0.4rem;
}

.guide-content li::marker {
    color: var(--aqy-accent);
}

.guide-content a {
    color: var(--aqy-primary);
    text-decoration: underline;
    text-decoration-color: var(--aqy-accent);
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.guide-content a:hover {
    color: var(--aqy-secondary);
}

.guide-content blockquote {
    border-left: 4px solid var(--aqy-accent);
    background: var(--aqy-light);
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: var(--aqy-secondary);
}

.guide-content code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.85em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #dc2626;
}

.guide-content pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.guide-content pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.guide-content table thead tr {
    background: linear-gradient(135deg, var(--aqy-primary) 0%, var(--aqy-secondary) 100%);
    color: white;
}

.guide-content table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.guide-content table tbody tr:hover {
    background: #f8fafc;
}

.guide-content table tbody tr:last-child td {
    border-bottom: none;
}

.guide-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.guide-content hr {
    border: none;
    border-top: 2px solid #f3f4f6;
    margin: 2.5rem 0;
}

/* Boites info/warning/danger dans le contenu */
.guide-content .info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.guide-content .warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.guide-content .danger-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

/* ============================================================
   TABLE DES MATIERES
   ============================================================ */
#toc-nav a,
#toc-sidebar-nav a {
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

#toc-nav a:hover,
#toc-sidebar-nav a:hover {
    color: var(--aqy-primary);
    background: var(--aqy-light);
    border-left-color: var(--aqy-accent);
}

#toc-nav a.toc-active,
#toc-sidebar-nav a.toc-active {
    color: var(--aqy-primary);
    font-weight: 600;
    border-left-color: var(--aqy-primary);
    background: var(--aqy-light);
}

/* Sous-niveaux h3 */
#toc-nav a[data-level="3"],
#toc-sidebar-nav a[data-level="3"] {
    padding-left: 1.25rem;
    font-size: 0.75rem;
}

/* ============================================================
   FAQ ACCORDEON
   ============================================================ */
.faq-toggle[aria-expanded="true"] i.fa-chevron-down,
.faq-toggle.open i.fa-chevron-down {
    transform: rotate(180deg);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease forwards;
}

/* Skeleton loader */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* ============================================================
   RESPONSIVE UTILITAIRES
   ============================================================ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   SEARCH DROPDOWN
   ============================================================ */
.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-item .result-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: var(--aqy-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aqy-primary);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.search-result-item .result-title {
    font-weight: 500;
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.25;
}

.search-result-item .result-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}

.search-no-result {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ============================================================
   SCROLLBAR PERSONNALISEE
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--aqy-secondary);
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    header, footer, aside, #feedback-section, nav[aria-label="Breadcrumb"] {
        display: none !important;
    }
    .guide-content {
        font-size: 12pt;
        color: #000;
    }
    .guide-content a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
