:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d9e0e8;
    --primary: #0f62fe;
    --dark: #20252b;
    --error: #d9364f;
    --warning: #d49b00;
    --success: #198754;
    --reason: #7c3aed;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

.container {
    width: 94%;
    max-width: 1800px;
    margin: auto;
}

/* ==========================================================
   Barre de navigation
   ========================================================== */

.topbar {
    position: relative;
    z-index: 20;
    background: var(--dark);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.topbar-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease, transform .2s ease;
}

.brand:hover {
    color: #9ec5ff;
    transform: translateY(-1px);
}

.brand i {
    font-size: 1.15rem;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 1.65rem;
    margin-left: auto;
}

.topnav > a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #d7dce3;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease;
}

.topnav > a:hover {
    color: #fff;
}

/* ==========================================================
   Menu Produits
   ========================================================== */

.nav-products {
    position: relative;
}

.nav-products-trigger {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.5rem;
    padding: .5rem .7rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: #d7dee8;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.nav-products-trigger:hover,
.nav-products.is-open .nav-products-trigger {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav-products-chevron {
    font-size: .72rem;
    transition: transform .18s ease;
}

.nav-products.is-open .nav-products-chevron {
    transform: rotate(180deg);
}

.products-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    width: 290px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #d9e0e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    display: none;
}

.nav-products.is-open .products-menu {
    display: block;
}

.products-menu-item,
.products-menu-disabled {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 9px;
}

.products-menu-item {
    color: #1f2937 !important;
    text-decoration: none;
}

.products-menu-item:hover {
    background: #f5f7fb;
}

.products-menu-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px 10px;
    border-bottom: 1px solid #e4e7ec;
    margin-bottom: 4px;
}

.products-menu-title strong {
    color: #182230;
    font-size: .86rem;
}

.products-menu-title small {
    color: #667085;
    font-size: .72rem;
}

.products-menu-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 9px;
    color: #1f2937;
    cursor: default;
}

.products-menu-status {
    flex: 0 0 auto;
    margin-left: auto;
    padding: .2rem .42rem;
    border-radius: 999px;
    background: #eaf7ef;
    color: #16794a;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1.2;
}

.products-menu-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 16px;
}

.db2-icon {
    color: #0f62fe;
    background: #eaf2ff;
}

.cics-icon {
    color: #7c3aed;
    background: #f1eaff;
}

.mq-icon {
    color: #f97316;
    background: #fff1e8;
}

.future-icon {
    color: #64748b;
    background: #eef2f7;
}

.products-menu-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.products-menu-text strong {
    color: #182230;
    font-size: .95rem;
    line-height: 1.25;
}

.products-menu-text small {
    color: #667085;
    font-size: .78rem;
    line-height: 1.35;
}

.products-menu-divider {
    height: 1px;
    margin: 4px 8px;
    background: #e4e7ec;
}

.products-menu-disabled {
    background: #fafafa;
    color: #667085;
    cursor: default;
}

.products-menu-disabled .products-menu-text strong {
    color: #667085;
}

/* Structure générale */
.page-content {
    padding: 28px 0 48px;
}

.portal-hero,
.module-hero,
.results-header {
    padding: 34px;
    margin-bottom: 22px;
    border: 1px solid #cfe0ff;
    border-radius: 15px;
    background: #eef4ff;
}

.portal-hero h1,
.module-hero h1,
.results-header h1 {
    margin: 5px 0 8px;
    font-size: clamp(34px, 4vw, 54px);
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Recherche universelle */
.portal-intro {
    margin: 0 0 24px;
    color: #475569;
    font-size: 18px;
}

.portal-search-block {
    margin-top: 22px;
}

.portal-search-label {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 17px;
}

.portal-search-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.portal-search-form input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 1px solid #b8c6d9;
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 17px;
    box-shadow: 0 2px 6px rgba(15, 98, 254, 0.06);
}

.portal-search-form input:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(15, 98, 254, 0.15);
}

.portal-search-form button {
    min-width: 138px;
    height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.portal-search-form button:hover {
    filter: brightness(0.96);
}

.portal-search-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.portal-search-examples a {
    padding: 6px 10px;
    border: 1px solid #c7d5ea;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.portal-search-examples a:hover {
    border-color: var(--primary);
    background: #eef4ff;
}

/* Cartes produits */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card,
.panel,
.result-card,
.doc-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-card {
    display: flex;
    min-height: 285px;
    flex-direction: column;
    border-top-width: 5px;
}

.db2-card {
    border-top-color: var(--primary);
}

.cics-card {
    border-top-color: var(--reason);
}

.future-card {
    border-top-color: #64748b;
}

.product-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.product-name {
    font-weight: 800;
}

.status {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ready {
    background: #e8f7ee;
    color: #198754;
}

.building {
    background: #f0e9ff;
    color: #6d28d9;
}

.planned {
    background: #eef2f7;
    color: #64748b;
}

.product-card h2 {
    font-size: 22px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.stats div {
    padding: 13px;
    border-radius: 9px;
    background: #f8fafc;
}

.stats strong {
    display: block;
    font-size: 26px;
}

.stats span {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.tags,
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span,
.chips a {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
}

.open-button {
    display: inline-block;
    margin-top: auto;
    padding: 9px 13px;
    border-radius: 7px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.open-button.secondary {
    background: var(--reason);
}

.open-button.disabled {
    background: #e5e7eb;
    color: #6b7280;
}

/* Modules et résultats */
.module-search {
    display: flex;
    gap: 10px;
    max-width: 1000px;
    margin-top: 22px;
}

.module-search input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
}

.module-search button {
    padding: 11px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.result-card {
    margin-bottom: 14px;
    border-left: 6px solid #64748b;
}

.result-error {
    border-left-color: var(--error);
}

.result-warning {
    border-left-color: var(--warning);
}

.result-success {
    border-left-color: var(--success);
}

.reason-result {
    border-left-color: var(--reason);
}

.result-card a {
    color: inherit;
    text-decoration: none;
}

/* Détails documentation */
.detail-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-head h1 {
    margin: 8px 0;
    font-family: Consolas, monospace;
    font-size: 52px;
}

.detail-head > a {
    align-self: flex-start;
    padding: 10px 16px;
    border: 1px solid #aeb8c4;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    background: #ffffff;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.badge-error {
    background: var(--error);
}

.badge-warning {
    background: #ffc107;
    color: #222222;
}

.badge-success {
    background: var(--success);
}

.badge-info {
    background: #64748b;
}

.badge-reason {
    background: var(--reason);
}

.doc-card {
    margin-bottom: 18px;
}

.doc-card h2 {
    margin-top: 0;
}

.doc-text {
    font-size: 17px;
    line-height: 1.8;
}

.source-line {
    color: var(--muted);
    font-size: 13px;
}

/* Recherche multi-produits */
.universal-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.search-choice-card {
    min-height: 250px;
}

.notice-panel {
    margin-bottom: 18px;
    border-left: 5px solid var(--warning);
}

.notice-panel h2 {
    margin-top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Pied de page */
footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.footer-inner {
    padding: 24px 0;
    color: var(--muted);
    font-size: 13px;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .product-grid,
    .dashboard-grid,
    .universal-choice-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .topnav {
        flex-wrap: wrap;
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .portal-hero,
    .module-hero,
    .results-header {
        padding: 24px;
    }

    .portal-search-form {
        flex-direction: column;
    }

    .portal-search-form button {
        width: 100%;
    }

    .detail-head {
        flex-direction: column;
    }

    .products-menu {
        position: fixed;
        top: auto;
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
        width: auto;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
/* =========================================================
   ASSISTANT z/OS — HARMONISATION BLEUE DES CARTES PRODUITS
   ========================================================= */

:root {
    --assistant-blue: #0f62fe;
    --assistant-blue-dark: #0043ce;
    --assistant-blue-light: #eef4ff;
    --assistant-border: #0f62fe;
}

/* Toutes les cartes utilisent désormais le même cadre bleu */
.product-card,
.product-card.db2-card,
.product-card.cics-card,
.product-card.mq-card,
.product-card.future-card {
    border: 1px solid var(--assistant-border) !important;
    border-top: 3px solid var(--assistant-border) !important;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 98, 254, 0.08);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

/* Effet au survol */
.product-card:hover {
    transform: translateY(-2px);
    border-color: var(--assistant-blue-dark) !important;
    box-shadow: 0 8px 22px rgba(15, 98, 254, 0.14);
}

/* Suppression des anciennes couleurs propres aux produits */
.db2-card,
.cics-card,
.mq-card,
.future-card {
    border-top-color: var(--assistant-blue) !important;
}

/* Toutes les icônes produits passent en bleu */
.product-card .product-icon,
.db2-card .product-icon,
.cics-card .product-icon,
.mq-card .product-icon,
.future-card[data-product="IMS"] .product-icon,
.future-card[data-product="z/OS"] .product-icon,
.future-card[data-product="JES2"] .product-icon,
.future-card[data-product="RACF"] .product-icon,
.future-card[data-product="USS"] .product-icon {
    color: var(--assistant-blue) !important;
    stroke: currentColor;
}

/* Nom du produit */
.product-card .product-name {
    color: #172033;
}

/* Boutons des modules disponibles */
.product-card .open-button,
.product-card .open-button.secondary,
.db2-card .open-button,
.cics-card .open-button,
.mq-card .open-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--assistant-blue);
    border-radius: 6px;
    background: var(--assistant-blue) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.product-card .open-button:hover,
.product-card .open-button.secondary:hover {
    border-color: var(--assistant-blue-dark);
    background: var(--assistant-blue-dark) !important;
    color: #ffffff !important;
}

/* Boutons des modules à venir */
.product-card .open-button.disabled,
.future-card .open-button.disabled {
    border-color: #e2e8f0 !important;
    background: #e9edf3 !important;
    color: #475569 !important;
    cursor: default;
}

/* Blocs statistiques */
.product-card .stats > div {
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #f7f9fc;
}

/* Badge Disponible */
.product-card .status.ready {
    background: #e8f7ed;
    color: #08783e;
}

/* Badge À venir */
.product-card .status.planned {
    background: #edf1f6;
    color: #475569;
}

/* Harmonisation du cadre de la grille */
.product-grid {
    gap: 16px;
}

/* Responsive */
@media (max-width: 720px) {
    .product-card {
        border-top-width: 3px !important;
    }
}
}


/* ==========================================================
   GUIDES / MANUELS — ALIGNEMENT DE REFERENCE
   Le bandeau reste pleine largeur ; seul le contenu principal
   conserve le centrage via .container.
   ========================================================== */

.guide-topbar .container.guide-topbar-inner,
.resource-topbar .container.resource-topbar-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.guide-topbar-inner,
.resource-topbar-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.guide-brand,
.resource-brand {
    margin-left: 0 !important;
}

.guide-back,
.resource-home {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Le corps des guides reste centré, comme sur le modèle validé. */
.guide-main > .container,
.resource-main > .container {
    width: 70% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 1200px) {
    .guide-main > .container,
    .resource-main > .container {
        width: 92% !important;
    }
}

@media (max-width: 680px) {
    .guide-topbar-inner,
    .resource-topbar-inner {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .guide-main > .container,
    .resource-main > .container {
        width: 94% !important;
    }
}
