/* ============================================================
   Pages légales / institutionnelles — habillage "corporate".
   Espace de noms .corp-* : volontairement distinct de l'ancien
   .legal-page (règles héritées dans _Layout.cshtml) pour ne pas
   subir ses bordures/tableaux.
   ============================================================ */

.corp-doc {
    background: #faf9f6;
    color: #26312d;
}

/* ---------- Bandeau ---------- */
.corp-hero {
    background: #173c34;
    border-bottom: 3px solid #b8622f;
}

.corp-hero-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 56px 24px 44px;
}

.corp-crumbs {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 18px;
}

.corp-crumbs a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.corp-crumbs a:hover {
    color: #fff;
}

.corp-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f0b48f;
    margin-bottom: 10px;
}

/* site.css impose un h1 global (couleur foncée, centré, barre ::after) */
.corp-hero h1 {
    color: #fff !important;
    text-align: left !important;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 12px;
}

.corp-hero h1::after,
.corp-body h2::after,
.corp-body h3::after {
    display: none !important;
}

.corp-updated {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    margin: 0;
}

/* ---------- Grille ---------- */
.corp-layout {
    max-width: 1140px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

/* ---------- Colonne latérale ---------- */
.corp-side {
    position: sticky;
    top: 104px;
}

.corp-side-block + .corp-side-block {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e4e0d6;
}

.corp-side-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7b857f;
    margin: 0 0 12px;
}

.corp-toc a,
.corp-docs a {
    display: block;
    padding: 6px 0 6px 12px;
    border-left: 2px solid transparent;
    color: #4d5a54;
    font-size: 0.86rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.corp-toc a:hover,
.corp-docs a:hover {
    color: #173c34;
}

.corp-toc a.is-active {
    color: #173c34;
    font-weight: 600;
    border-left-color: #b8622f;
}

.corp-docs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.corp-docs a.is-current {
    color: #173c34;
    font-weight: 600;
    border-left-color: #173c34;
}

/* ---------- Corps du document ---------- */
.corp-body {
    background: #fff;
    border: 1px solid #e7e3da;
    border-radius: 6px;
    padding: 44px 48px 48px;
}

.corp-body section + section {
    margin-top: 40px;
    padding-top: 36px;
    border-top: 1px solid #efece5;
}

.corp-body h2 {
    color: #173c34 !important;
    text-align: left !important;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 16px;
    scroll-margin-top: 110px;
}

.corp-body h3 {
    color: #26312d !important;
    text-align: left !important;
    font-size: 1rem;
    font-weight: 600;
    margin: 26px 0 10px;
}

.corp-body p,
.corp-body li {
    color: #47524d;
    font-size: 0.95rem;
    line-height: 1.75;
}

.corp-body p {
    margin: 0 0 14px;
}

.corp-body ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.corp-body li {
    margin-bottom: 6px;
}

.corp-body li::marker {
    color: #b8622f;
}

.corp-body a {
    color: #9a4f24;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.corp-body a:hover {
    color: #173c34;
}

/* Encadré d'introduction / avertissement */
.corp-note {
    background: #f4f1ea;
    border-left: 3px solid #173c34;
    padding: 16px 20px;
    margin: 0 0 32px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #38443f;
}

.corp-note.is-warn {
    border-left-color: #b8622f;
    margin: 18px 0 0;
}

.corp-note.is-small {
    font-size: 0.84rem;
    color: #66716b;
}

/* Fiche société (liste de définitions) */
.corp-card {
    border: 1px solid #e7e3da;
    border-radius: 6px;
    margin: 18px 0 6px;
    overflow: hidden;
}

.corp-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.corp-card dt,
.corp-card dd {
    margin: 0;
    padding: 12px 18px;
    font-size: 0.9rem;
    line-height: 1.55;
    border-bottom: 1px solid #efece5;
}

.corp-card dt {
    background: #faf9f6;
    color: #66716b;
    font-weight: 600;
}

.corp-card dd {
    color: #26312d;
}

.corp-card dl > dt:nth-last-of-type(1),
.corp-card dl > dd:nth-last-of-type(1) {
    border-bottom: none;
}

/* Tableaux */
.corp-table-wrap {
    overflow-x: auto;
    margin: 16px 0 18px;
    border: 1px solid #e7e3da;
    border-radius: 6px;
}

.corp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 520px;
}

.corp-table th {
    background: #173c34;
    color: #fff;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 11px 16px;
}

.corp-table td {
    padding: 12px 16px;
    border-top: 1px solid #efece5;
    color: #47524d;
    line-height: 1.55;
    vertical-align: top;
}

.corp-table tbody tr:nth-child(even) td {
    background: #fbfaf7;
}

.corp-table code {
    font-size: 0.82rem;
    color: #173c34;
    background: #f1efe8;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Grille 2 colonnes (finalités du traitement) */
.corp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0 6px;
}

.corp-grid-item {
    border: 1px solid #e7e3da;
    border-radius: 6px;
    padding: 18px 20px;
}

.corp-grid-item h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #173c34;
    margin: 0 0 10px;
}

.corp-grid-item ul {
    margin: 0;
}

.corp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: #173c34;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.corp-btn:hover {
    background: #23574a;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .corp-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 16px 60px;
    }

    .corp-side {
        position: static;
    }

    .corp-toc-block {
        display: none;
    }

    .corp-side-block + .corp-side-block {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .corp-docs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .corp-docs a {
        border: 1px solid #ddd8cc;
        border-radius: 999px;
        padding: 7px 14px;
        background: #fff;
    }

    .corp-docs a.is-current {
        background: #173c34;
        border-color: #173c34;
        color: #fff;
    }

    .corp-body {
        padding: 28px 22px 32px;
    }

    .corp-hero-inner {
        padding: 40px 16px 32px;
    }
}

@media (max-width: 600px) {
    .corp-card dl {
        grid-template-columns: 1fr;
    }

    .corp-card dt {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .corp-card dd {
        padding-top: 2px;
    }

    .corp-grid {
        grid-template-columns: 1fr;
    }
}
