/* ============================================
   Outils CODIR — Styles dedies
   Page listing + Single fiche V2
   ============================================ */

/* --- Filtres --- */
.outils-filter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 8px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-family: 'Poppins', sans-serif;
}

.outils-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

.outils-filter.active {
    background: #ffde59;
    color: #02040a;
    border-color: #ffde59;
}

/* --- Cartes : animation filtrage --- */
.outils-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.outils-card.hidden {
    display: none;
}

/* --- FAQ accordeon --- */
.outils-faq-item[open] .outils-faq-icon {
    transform: rotate(45deg);
}

.outils-faq-item summary::-webkit-details-marker {
    display: none;
}

.outils-faq-item summary::marker {
    display: none;
    content: '';
}

/* --- Scroll smooth vers ancre --- */
html {
    scroll-behavior: smooth;
}

/* --- Grid pattern overlay (optionnel) --- */
.outils-grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 55px 55px;
}


/* ============================================
   SINGLE FICHE OUTIL V2 — Sections visuelles
   ============================================ */

/* --- Section body (contenu sous chaque H2) --- */
.outil-section-body {
    font-family: 'Poppins', sans-serif;
    color: #cbd5e1;
    font-size: 1.0625rem;
    line-height: 1.85;
}

/* --- Intro (contenu avant le 1er H2) --- */
.outil-intro {
    font-size: 1.15rem;
    color: #94a3b8;
    font-weight: 300;
    line-height: 1.8;
}

.outil-intro p:first-child {
    font-size: 1.25rem;
    color: #cbd5e1;
    font-weight: 400;
}

/* --- H3 : sous-titres a l'interieur des sections --- */
.outil-section-body h3 {
    color: #ffde59;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- H4 : sous-sous-titres --- */
.outil-section-body h4 {
    color: #3b82f6;
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

/* --- H5 : petits titres --- */
.outil-section-body h5 {
    color: #F8FAFC;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Paragraphes --- */
.outil-section-body p {
    margin-bottom: 1.25rem;
}

.outil-section-body strong {
    color: #F8FAFC;
    font-weight: 700;
}

.outil-section-body em {
    color: #94a3b8;
    font-style: italic;
}

/* --- Listes non-ordonnees --- */
.outil-section-body ul {
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style: none;
}

.outil-section-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
}

.outil-section-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background: #ffde59;
    border-radius: 50%;
}

/* --- Listes ordonnees --- */
.outil-section-body ol {
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style: none;
    counter-reset: outil-counter;
}

.outil-section-body ol li {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.75rem;
    counter-increment: outil-counter;
}

.outil-section-body ol li::before {
    content: counter(outil-counter) '.';
    position: absolute;
    left: 0;
    color: #ffde59;
    font-weight: 900;
    font-size: 0.95rem;
    min-width: 1.75rem;
}

/* --- Listes imbriquees --- */
.outil-section-body ul ul,
.outil-section-body ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.outil-section-body ul ul li::before {
    width: 4px;
    height: 4px;
    background: #3b82f6;
    top: 0.8em;
}

/* --- Blockquotes --- */
.outil-section-body blockquote {
    border-left: 3px solid #ffde59;
    background: rgba(255, 222, 89, 0.05);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    color: #F8FAFC;
    font-style: italic;
    font-size: 1.05rem;
}

.outil-section-body blockquote p:last-child {
    margin-bottom: 0;
}

/* --- Code / exemples de formulation --- */
.outil-section-body code {
    background: rgba(31, 58, 139, 0.25);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.outil-section-body pre {
    background: rgba(31, 58, 139, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.outil-section-body pre code {
    background: transparent;
    padding: 0;
}

/* --- Liens --- */
.outil-section-body a {
    color: #ffde59;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.outil-section-body a:hover {
    color: #F8FAFC;
}

/* --- Separateurs --- */
.outil-section-body hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 2rem 0;
}

/* --- Tables (si presentes dans le contenu) --- */
.outil-section-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.outil-section-body th {
    background: rgba(31, 58, 139, 0.2);
    color: #F8FAFC;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(255, 222, 89, 0.2);
}

.outil-section-body td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.outil-section-body tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* --- Images dans le contenu --- */
.outil-section-body img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

/* --- TOC active link --- */
.outil-toc-link.\!text-white,
.outil-toc-link-float.\!text-white {
    color: #F8FAFC !important;
}

.outil-toc-link.\!bg-white\/10,
.outil-toc-link-float.\!bg-white\/10 {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .outil-section-body {
        font-size: 1rem;
    }
    .outil-section-body h3 {
        font-size: 1.05rem;
    }
    .outil-section-body blockquote {
        padding: 1rem 1.25rem;
    }
}


/* ============================================
   PRINT — Fond blanc, noir, propre
   ============================================ */
@media print {

    /* --- Masquer les elements inutiles --- */
    .no-print,
    #outil-toc-section,
    #outil-floating-toc,
    .insuffle-ticker,
    header,
    footer,
    nav,
    .site-header,
    .site-footer {
        display: none !important;
    }

    /* --- Afficher le pied de page print --- */
    .print-footer {
        display: block !important;
    }

    /* --- Reset fond & couleurs --- */
    * {
        color-adjust: exact;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body,
    main,
    .outil-page,
    .outil-content-section,
    section {
        background: #fff !important;
        color: #1a1a1a !important;
    }

    .outil-page {
        overflow: visible !important;
    }

    /* --- Hero : simplifie sur fond blanc --- */
    .outil-hero-section {
        background: #fff !important;
        padding-top: 0 !important;
        padding-bottom: 1.5rem !important;
        min-height: auto !important;
    }

    .outil-hero-section .absolute {
        display: none !important;
    }

    .outil-hero-section h1 {
        color: #000 !important;
        font-size: 28pt !important;
        margin-bottom: 0.5rem !important;
    }

    .outil-hero-section p {
        color: #444 !important;
    }

    /* --- Meta badges en print --- */
    .outil-hero-section .inline-flex {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
    }

    .outil-hero-section .inline-flex span {
        color: #333 !important;
    }

    .outil-hero-section .inline-flex svg {
        color: #666 !important;
    }

    /* --- Sections contenu --- */
    .outil-content-section {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        border-bottom: 1px solid #e5e5e5 !important;
        page-break-inside: avoid;
    }

    /* --- Section headers --- */
    .outil-content-section .flex-shrink-0 {
        background: #f0f4ff !important;
        border: 1px solid #c7d2fe !important;
    }

    .outil-content-section .flex-shrink-0 svg {
        color: #1f3a8b !important;
    }

    .outil-content-section h2 {
        color: #000 !important;
        font-size: 18pt !important;
    }

    /* --- Body content --- */
    .outil-section-body {
        color: #333 !important;
        font-size: 11pt !important;
        line-height: 1.7 !important;
        padding-left: 0 !important;
    }

    .outil-section-body strong {
        color: #000 !important;
    }

    .outil-section-body em {
        color: #555 !important;
    }

    .outil-section-body h3 {
        color: #1f3a8b !important;
        font-size: 13pt !important;
        text-transform: none !important;
        page-break-after: avoid;
    }

    .outil-section-body h4 {
        color: #333 !important;
        font-size: 12pt !important;
        page-break-after: avoid;
    }

    /* --- Listes print --- */
    .outil-section-body ul li::before {
        background: #1f3a8b !important;
    }

    .outil-section-body ol li::before {
        color: #1f3a8b !important;
    }

    .outil-section-body ul li,
    .outil-section-body ol li {
        color: #333 !important;
    }

    /* --- Blockquotes print --- */
    .outil-section-body blockquote {
        border-left-color: #1f3a8b !important;
        background: #f8f9fc !important;
        color: #333 !important;
    }

    /* --- Code print --- */
    .outil-section-body code {
        background: #f5f5f5 !important;
        color: #1f3a8b !important;
    }

    /* --- Liens : afficher l'URL --- */
    .outil-section-body a {
        color: #1f3a8b !important;
        text-decoration: underline !important;
    }

    .outil-section-body a::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #888;
        font-weight: 400;
    }

    .outil-section-body a[href^="#"]::after,
    .outil-section-body a[href^="javascript"]::after {
        content: "";
    }

    /* --- Tables print --- */
    .outil-section-body table {
        border: 1px solid #ddd !important;
    }

    .outil-section-body th {
        background: #f0f4ff !important;
        color: #000 !important;
        border-bottom: 2px solid #1f3a8b !important;
    }

    .outil-section-body td {
        border-bottom: 1px solid #e5e5e5 !important;
        color: #333 !important;
    }

    /* --- Separateurs print --- */
    .outil-section-body hr {
        background: #ddd !important;
    }

    /* --- Intro print --- */
    .outil-intro {
        color: #555 !important;
    }

    .outil-intro p:first-child {
        color: #333 !important;
    }

    /* --- Pas de coupure dans les sections --- */
    .outil-content-section {
        page-break-inside: avoid;
    }

    h2, h3, h4 {
        page-break-after: avoid;
    }

    /* --- Images print --- */
    .outil-section-body img {
        max-width: 100% !important;
        border-radius: 0 !important;
    }

    /* --- Taille page --- */
    @page {
        margin: 1.5cm 2cm;
        size: A4;
    }
}
