/* =====================================================================
   DOCUMENTATION — mise en page pro et compacte (page documentation.html uniquement, classe .doc-pro)
   Ordinateur : menu latéral fixe + carte de lecture. Mobile : rubriques en barre défilante.
   doc.css (partagé avec d'autres pages) n'est pas modifié.
   ===================================================================== */

/* Grille de la page : en-tête, menu, contenu */
.doc-pro.doc-page {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-areas:
        "entete entete"
        "menu contenu";
    gap: 18px 24px;
    max-width: calc(1180px + var(--raf-barre, 60px));
    margin: 20px auto 48px !important;
    padding: 0 18px 0 calc(var(--raf-barre, 60px) + 18px);
    box-sizing: border-box;
    font-family: var(--font-family-base);
}

/* En-tête */
.doc-pro .doc-page-header {
    grid-area: entete;
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #e4e6eb;
    text-align: left;
}
.doc-pro .doc-page-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1c2b33;
}
.doc-pro .doc-page-lead {
    margin: 0;
    font-size: 14px;
    color: #65676b;
}

/* Menu latéral des rubriques (fixe pendant la lecture) */
.doc-pro .doc-tabs {
    grid-area: menu;
    position: sticky;
    top: calc(var(--header-total-height, 90px) + 16px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100vh - var(--header-total-height, 90px) - 32px);
    overflow-y: auto;
    margin: 0;
    padding: 0 6px 0 0;
    border: none;
    background: transparent;
    scrollbar-width: thin;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* Recherche dans les rubriques */
.doc-pro .doc-recherche {
    position: relative;
    margin-bottom: 8px;
}
.doc-pro .doc-recherche i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9ca3af;
}
.doc-pro .doc-recherche input {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 30px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #f9fafb;
    font-size: 13px;
    color: #111827;
    box-sizing: border-box;
}
.doc-pro .doc-recherche input:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Une rubrique */
.doc-pro .doc-tabs .tab-option {
    display: block;
    margin: 0;
    padding: 7px 10px;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #1c2b33;
    white-space: normal;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.doc-pro .doc-tabs .tab-option:hover {
    background: #f2f4f6;
    color: #1c2b33;
}
.doc-pro .doc-tabs .tab-option.active {
    border-left-color: #1c2b33;
    background: #1c2b33;
    color: #ffffff;
    font-weight: 600;
}
.doc-pro .doc-tabs .tab-option[hidden] {
    display: none;
}

/* Carte de lecture */
.doc-pro .doc-body {
    grid-area: contenu;
    min-width: 0;
    max-width: 840px;
    margin: 0;
    padding: 24px 28px;
    border: 1px solid #e4e6eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* Typographie du contenu */
.doc-pro .tab-content-section {
    font-size: 14px;
    line-height: 1.6;
    color: #1c2b33;
    text-align: left;
}
.doc-pro .tab-content-section h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e4e6eb;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    color: #1c2b33;
}
.doc-pro .tab-content-section h3 {
    position: relative;
    margin: 22px 0 8px;
    padding-left: 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1c2b33;
}
.doc-pro .tab-content-section h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 2px;
    background: #2563eb;
}
.doc-pro .tab-content-section h4 {
    margin: 16px 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1c2b33;
}
.doc-pro .tab-content-section p {
    margin: 0 0 9px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #1c2b33;
    text-align: left;
}
.doc-pro .tab-content-section strong {
    color: #1c2b33;
    font-weight: 600;
}
.doc-pro .tab-content-section a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.doc-pro .tab-content-section a:hover {
    text-decoration: underline;
}
.doc-pro .tab-content-section ul,
.doc-pro .tab-content-section ol {
    margin: 0 0 10px;
    padding-left: 20px;
}
.doc-pro .tab-content-section li {
    margin-bottom: 4px;
}
.doc-pro .tab-content-section hr {
    margin: 18px 0;
    border: none;
    border-top: 1px solid #f0f2f5;
}

/* Tableaux (ex. tarifs logistique) */
.doc-pro .tab-content-section table {
    width: 100%;
    margin: 8px 0 14px;
    border-collapse: collapse;
    font-size: 13px;
}
.doc-pro .tab-content-section th,
.doc-pro .tab-content-section td {
    padding: 12px 12px;
    border-bottom: 1px solid #e4e6eb;
    text-align: left;
    vertical-align: top;
}
.doc-pro .tab-content-section th {
    background: #ffffff;
    font-weight: 600;
    color: #1c2b33;
    border-bottom-color: #ced0d4;
}
.doc-pro .tab-content-section tr:hover td {
    background: #f7f8fa;
}

/* Tablette : menu plus étroit */
@media (max-width: 1100px) {
    .doc-pro.doc-page {
        grid-template-columns: 210px minmax(0, 1fr);
    }
}

/* Mobile : une colonne, rubriques en barre défilante collée en haut */
@media (max-width: 860px) {
    .doc-pro.doc-page {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "entete"
            "menu"
            "contenu";
        gap: 12px;
        margin: 12px auto 80px !important;
        padding: 0 12px 0 calc(var(--raf-barre, 0px) + 12px);
    }
    .doc-pro .doc-page-title {
        font-size: 19px;
    }
    .doc-pro .doc-tabs {
        top: var(--header-total-height, 90px);
        z-index: 5;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        margin: 0 -12px;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-bottom: 1px solid #eef0f3;
        scrollbar-width: none;
    }
    .doc-pro .doc-tabs::-webkit-scrollbar {
        display: none;
    }
    .doc-pro .doc-recherche {
        flex: 0 0 160px;
        margin: 0;
    }
    .doc-pro .doc-recherche input {
        height: 34px;
    }
    .doc-pro .doc-tabs .tab-option {
        flex: 0 0 auto;
        padding: 7px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #ffffff;
        font-size: 13px;
        white-space: nowrap;
    }
    .doc-pro .doc-tabs .tab-option.active {
        border-color: #1c2b33;
        background: #1c2b33;
        color: #ffffff;
    }
    .doc-pro .doc-body {
        padding: 16px 14px;
        border-radius: 12px;
    }
    .doc-pro .tab-content-section h2 {
        font-size: 16px;
    }
}
