@charset "utf-8";
/* =========================================================
   ORGANIGRAMME CIRES
   CSS corrigé et adapté au style institutionnel actuel
========================================================= */

.organigramme-page {
    background: #ffffff;
}

/* =========================
   HERO ORGANIGRAMME
========================= */
.organigramme-hero {
    position: relative;
    padding: 70px 0;
    background:
        linear-gradient(135deg, rgba(37, 50, 70, .96), rgba(29, 41, 57, .94)),
        radial-gradient(circle at top right, rgba(223, 90, 27, .25), transparent 32%);
    overflow: hidden;
    color: #ffffff;
}

.organigramme-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            135deg,
            rgba(255,255,255,.04) 0px,
            rgba(255,255,255,.04) 1px,
            transparent 1px,
            transparent 20px
        );
    pointer-events: none;
}

.organigramme-hero .container {
    position: relative;
    z-index: 2;
}

.organigramme-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #ffffff;
    background: var(--cires-orange, #df5a1b);
    padding: 9px 15px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.organigramme-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 18px;
    letter-spacing: -1.2px;
}

.organigramme-hero p {
    max-width: 820px;
    color: rgba(255,255,255,.82);
    font-size: 16px;
    line-height: 1.85;
    margin: 0;
}

.organigramme-breadcrumb {
    margin-top: 28px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.organigramme-breadcrumb a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
}

.organigramme-breadcrumb a:hover {
    color: #ffffff;
}

.organigramme-breadcrumb span {
    color: var(--cires-orange, #df5a1b);
}

/* =========================
   INTRO / ACTIONS
========================= */
.org-intro-box {
    max-width: 960px;
    margin: 0 auto 34px;
    text-align: center;
}

.org-intro-box p {
    color: #667085;
    font-size: 16px;
    line-height: 1.85;
    margin: 0;
}

.org-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.org-scroll-info {
    display: none;
    text-align: center;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* =========================
   WRAPPER PRINCIPAL
   IMPORTANT : ne pas mettre overflow hidden
========================= */
.org-chart-wrapper {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(37,50,70,.08);
    padding: 34px 22px 36px;
    overflow-x: auto;
    overflow-y: visible;
}

/* Barre de scroll discrète */
.org-chart-wrapper::-webkit-scrollbar {
    height: 9px;
}

.org-chart-wrapper::-webkit-scrollbar-track {
    background: #eef2f7;
}

.org-chart-wrapper::-webkit-scrollbar-thumb {
    background: var(--cires-orange, #df5a1b);
}

/* Diagramme calibré pour ne plus dépasser */
.org-diagram {
    position: relative;
    width: 100%;
    min-width: 1180px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 8px 8px 0;
}

/* =========================
   BOÎTES 3D
========================= */
.org-node {
    position: relative;
    z-index: 5;
    background: #ffffff;
    border: 2px solid var(--cires-navy, #253246);
    color: var(--cires-navy, #253246);
    padding: 17px 18px;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.35;
    font-size: 15px;
    font-weight: 750;
    box-shadow: 6px 6px 0 rgba(37,50,70,.16);
}

.org-node::before {
    content: "";
    position: absolute;
    left: 6px;
    right: -6px;
    top: -6px;
    height: 6px;
    background: #f7f8fa;
    border: 2px solid var(--cires-navy, #253246);
    border-bottom: 0;
    transform: skewX(-45deg);
    transform-origin: bottom left;
}

.org-node::after {
    content: "";
    position: absolute;
    top: -6px;
    right: -6px;
    bottom: 6px;
    width: 6px;
    background: #cfd6df;
    border: 2px solid var(--cires-navy, #253246);
    border-left: 0;
    transform: skewY(-45deg);
    transform-origin: bottom left;
}

.org-node strong {
    font-weight: 900;
    color: var(--cires-navy, #253246);
}

.org-node small {
    display: block;
    color: #4b5563;
    font-size: 14px;
    font-weight: 650;
    margin-top: 3px;
}

/* =========================
   CONSEIL DU CIRES
========================= */
.org-council {
    position: relative;
    width: 280px;
    height: 78px;
    margin: 0 auto 74px;
    border: 2px solid var(--cires-navy, #253246);
    border-radius: 50% / 25%;
    background: #ffffff;
    color: var(--cires-navy, #253246);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 950;
    text-align: center;
    box-shadow: 0 12px 0 rgba(37,50,70,.08);
    z-index: 5;
}

.org-council::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: -2px;
    height: 24px;
    background: #ffffff;
    border: 2px solid var(--cires-navy, #253246);
    border-bottom: 0;
    border-radius: 50%;
}

.org-council span {
    position: relative;
    z-index: 2;
    padding-top: 8px;
}

/* =========================
   CONNECTEURS GÉNÉRAUX
========================= */
.org-vertical-top {
    position: absolute;
    top: 78px;
    left: 50%;
    width: 3px;
    height: 77px;
    transform: translateX(-50%);
    background: var(--cires-navy, #253246);
    z-index: 1;
}

.org-vertical-top::after,
.org-director-down::after,
.org-drop::after,
.org-child-drop::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 13px solid var(--cires-navy, #253246);
}

/* =========================
   RANGÉE DIRECTEUR
========================= */
.org-director-row {
    position: relative;
    display: grid;
    grid-template-columns: 255px 290px 255px;
    justify-content: center;
    align-items: center;
    gap: 70px;
    margin-bottom: 0;
}

.org-director-row::before {
    content: "";
    position: absolute;
    left: 210px;
    right: 210px;
    top: 50%;
    height: 3px;
    background: var(--cires-navy, #253246);
    transform: translateY(-50%);
    z-index: 1;
}

.org-director {
    min-height: 96px;
}

.org-director-down {
    position: relative;
    width: 3px;
    height: 68px;
    background: var(--cires-navy, #253246);
    margin: 0 auto;
    z-index: 1;
}

/* =========================
   BRANCHE VERS DIRECTEURS ADJOINTS
========================= */
.org-big-branch {
    position: relative;
    height: 82px;
    margin: 0 90px;
}

.org-big-branch .org-line {
    position: absolute;
    left: 90px;
    right: 90px;
    top: 30px;
    height: 3px;
    background: var(--cires-navy, #253246);
}

.org-drop {
    position: absolute;
    top: 30px;
    width: 3px;
    height: 52px;
    background: var(--cires-navy, #253246);
}

.org-drop-left {
    left: 90px;
}

.org-drop-right {
    right: 90px;
}

/* =========================
   DIRECTIONS ADJOINTES
========================= */
.org-deputies {
    position: relative;
    display: grid;
    grid-template-columns: 370px 370px;
    justify-content: space-between;
    gap: 0;
    padding: 0 92px;
    margin-bottom: 62px;
}

.org-deputies::before {
    content: "";
    position: absolute;
    left: 300px;
    right: 300px;
    top: 48px;
    height: 3px;
    background: var(--cires-navy, #253246);
    z-index: 1;
}

.org-deputy-node {
    min-height: 105px;
}

/* =========================
   BAS ORGANIGRAMME
========================= */
.org-bottom {
    position: relative;
}

.org-bottom-connectors {
    position: relative;
    height: 88px;
    margin-top: -32px;
}

/* Connecteur sous direction recherche */
.org-left-main-drop {
    position: absolute;
    left: 230px;
    top: -78px;
    width: 3px;
    height: 100px;
    background: var(--cires-navy, #253246);
}

/* Ligne entre unités et cellules */
.org-left-horizontal {
    position: absolute;
    left: 60px;
    top: 22px;
    width: 335px;
    height: 3px;
    background: var(--cires-navy, #253246);
}

.org-child-drop {
    position: absolute;
    top: 22px;
    width: 3px;
    height: 66px;
    background: var(--cires-navy, #253246);
}

/* Positions alignées avec les centres des 4 colonnes */
.org-child-one {
    left: 60px;
}

.org-child-two {
    left: 395px;
}

/* Correction des flèches verticales du bas */
.org-child-three {
    left: 682px;
    top: -87px;
    height: 175px;
}

.org-child-four {
    right: 142px;
    top: -87px;
    height: 175px;
}

/* 
   Grille corrigée.
   Ancien total : 360 + 360 + 320 + 520 + gaps = trop large.
   Nouveau total : 280 + 285 + 250 + 330 + gaps = tient dans 1220px.
*/
.org-bottom-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 280px 285px 250px 330px;
    gap: 21px;
    align-items: stretch;
}

/* =========================
   PANNEAUX
========================= */
.org-panel {
    position: relative;
    z-index: 5;
    background: #ffffff;
    border: 2px solid var(--cires-navy, #253246);
    min-height: 310px;
    padding: 24px 21px;
    box-shadow: 0 12px 28px rgba(37,50,70,.06);
    overflow-wrap: anywhere;
}

.org-panel h3 {
    color: var(--cires-navy, #253246);
    font-size: 14px;
    font-weight: 950;
    text-transform: uppercase;
    text-decoration: underline;
    margin-bottom: 18px;
}

.org-panel ul {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
}

.org-panel li {
    color: #1f2937;
    font-size: 13.8px;
    line-height: 1.45;
    margin-bottom: 9px;
}

.org-support-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.org-admin-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
    align-content: center;
}

.org-service-card {
    border: 2px solid var(--cires-navy, #253246);
    min-height: 66px;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--cires-navy, #253246);
    background: #ffffff;
    font-size: 13.3px;
    font-weight: 800;
    line-height: 1.35;
}

/* =========================
   NOTE
========================= */
.org-note {
    margin-top: 32px;
    background: #ffffff;
    border-left: 5px solid var(--cires-orange, #df5a1b);
    box-shadow: 0 12px 30px rgba(37,50,70,.06);
    padding: 24px 26px;
}

.org-note h3 {
    color: var(--cires-navy, #253246);
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 10px;
}

.org-note p {
    color: #667085;
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
}

/* =========================
   TABLETTES / ÉCRANS MOYENS
========================= */
@media(max-width: 1199.98px) {
    .org-scroll-info {
        display: block;
    }

    .org-chart-wrapper {
        padding: 24px;
        overflow-x: auto;
    }

    .org-diagram {
        min-width: 1180px;
        max-width: 1180px;
    }

    .org-bottom-grid {
        grid-template-columns: 270px 275px 240px 320px;
        gap: 20px;
    }

    .org-panel {
        padding: 22px 19px;
    }

    .org-panel li {
        font-size: 13.5px;
    }
}

/* =========================
   MOBILE : AFFICHAGE VERTICAL
========================= */
@media(max-width: 991.98px) {
    .organigramme-hero {
        padding: 54px 0;
    }

    .org-chart-wrapper {
        overflow-x: visible;
        padding: 22px;
    }

    .org-diagram {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 0;
    }

    .org-vertical-top,
    .org-director-row::before,
    .org-director-down,
    .org-big-branch,
    .org-deputies::before,
    .org-bottom-connectors {
        display: none;
    }

    .org-council {
        width: 100%;
        max-width: 380px;
        margin-bottom: 24px;
    }

    .org-director-row,
    .org-deputies,
    .org-bottom-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0;
        margin-bottom: 18px;
    }

    .org-node,
    .org-panel {
        box-shadow: 5px 5px 0 rgba(37,50,70,.12);
    }

    .org-bottom-grid {
        margin-top: 18px;
    }

    .org-panel {
        min-height: auto;
    }

    .org-admin-services {
        grid-template-columns: 1fr;
    }
}

/* =========================
   PETITS MOBILES
========================= */
@media(max-width: 575.98px) {
    .organigramme-hero h1 {
        font-size: 2rem;
    }

    .organigramme-hero p {
        font-size: 14px;
    }

    .org-chart-wrapper {
        padding: 18px;
    }

    .org-node {
        font-size: 14px;
        padding: 15px;
    }

    .org-node small {
        font-size: 13px;
    }

    .org-panel {
        padding: 22px;
    }

    .org-panel h3 {
        font-size: 13.5px;
    }

    .org-panel li {
        font-size: 14px;
    }

    .org-note {
        padding: 20px;
    }
}

/* =========================
   IMPRESSION
========================= */
@media print {
    .site-header,
    .header-topbar,
    .header-branding,
    .header-navline,
    .organigramme-hero,
    .org-actions,
    .org-scroll-info,
    .footer-sober,
    #backToTop {
        display: none !important;
    }

    body {
        background: #ffffff !important;
    }

    .section-block {
        padding: 0 !important;
    }

    .org-intro-box,
    .section-heading-ird {
        display: none !important;
    }

    .org-chart-wrapper {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .org-diagram {
        width: 1180px !important;
        min-width: 1180px !important;
        max-width: 1180px !important;
        transform: scale(.72);
        transform-origin: top left;
    }

    @page {
        size: A4 landscape;
        margin: 8mm;
    }
}