.c212-bourse {
    --c212-bo-accent: #c92b30;
    --c212-bo-accent-dark: #8e1d21;
    --c212-bo-text: #181818;
    --c212-bo-muted: #6b7280;
    --c212-bo-border: #e5e7eb;
    --c212-bo-bg: #ffffff;
    --c212-bo-soft: #f8f8f8;
    --c212-bo-green: #0f8d52;
    --c212-bo-red: #c92b30;
    color: var(--c212-bo-text);
}

.c212-bourse a {
    color: inherit;
}

.c212-bourse .matin-bourse {
    background: var(--c212-bo-bg);
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.c212-bourse .matin-bourse *,
.c212-bourse .matin-bourse *::before,
.c212-bourse .matin-bourse *::after {
    box-sizing: border-box;
}

.c212-bourse .matin-bourse .container,
.c212-bourse .matin-bourse .col-lg-12,
.c212-bourse .matin-bourse .col-md-12,
.c212-bourse .matin-bourse .col-sm-12,
.c212-bourse .matin-bourse .col-12 {
    width: 100%;
}

.c212-bourse .matin-bourse .container {
    max-width: none;
    margin: 0;
    padding: 0 20px;
}

.c212-bourse .matin-bourse .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.c212-bourse .matin-bourse .row > [class*="col-"],
.c212-bourse .matin-bourse .row > [class*=" col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.c212-bourse .matin-bourse .col-12,
.c212-bourse .matin-bourse .col-lg-12,
.c212-bourse .matin-bourse .col-md-12,
.c212-bourse .matin-bourse .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.c212-bourse .matin-bourse .col-lg-8,
.c212-bourse .matin-bourse .col-sm-8,
.c212-bourse .matin-bourse .col-8,
.c212-bourse .matin-bourse .col-xs-8 {
    flex: 0 0 50%;
    max-width: 50%;
}

.c212-bourse .matin-bourse .col-lg-4,
.c212-bourse .matin-bourse .col-sm-4,
.c212-bourse .matin-bourse .col-4,
.c212-bourse .matin-bourse .col-xs-4 {
    flex: 0 0 25%;
    max-width: 25%;
}

.c212-bourse .matin-bourse .col-lg-5,
.c212-bourse .matin-bourse .col-sm-5 {
    flex: 0 0 41.6667%;
    max-width: 41.6667%;
}

.c212-bourse .matin-bourse .col-lg-3,
.c212-bourse .matin-bourse .col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.c212-bourse .matin-bourse .col-sm-6,
.c212-bourse .matin-bourse .col-md-6,
.c212-bourse .matin-bourse .col-lg-6,
.c212-bourse .matin-bourse .col-xs-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.c212-bourse .matin-bourse .col-md-2 {
    flex: 0 0 16.6667%;
    max-width: 16.6667%;
}

.c212-bourse .matin-bourse .col-xs-16,
.c212-bourse .matin-bourse .col-sm-16 {
    flex: 0 0 50%;
    max-width: 50%;
}

.c212-bourse .matin-bourse .paddingDefault {
    padding: 0;
}

.c212-bourse .matin-bourse .title {
    display: none;
}

.c212-bourse .matin-bourse h1,
.c212-bourse .matin-bourse h2,
.c212-bourse .matin-bourse h3,
.c212-bourse .matin-bourse h4,
.c212-bourse .matin-bourse h5,
.c212-bourse .matin-bourse legend {
    margin: 0;
    color: var(--c212-bo-text);
    line-height: 1.3;
}

.c212-bourse .matin-bourse h1 {
    font-size: 1.9rem;
    font-weight: 800;
    padding: 24px 0 10px;
}

.c212-bourse .matin-bourse h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 24px 0 12px;
}

.c212-bourse .matin-bourse h3 {
    font-size: 1rem;
    font-weight: 700;
}

.c212-bourse .matin-bourse h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

.c212-bourse .matin-bourse h5,
.c212-bourse .matin-bourse .title-large {
    color: var(--c212-bo-muted);
    font-size: 0.96rem;
    font-weight: 600;
}

.c212-bourse .matin-bourse .indicesbourse {
    padding: 18px 0 14px;
    background: #fafafa;
}

.c212-bourse .matin-bourse .indicesbourse .col-lg-3,
.c212-bourse .matin-bourse .indicesbourse .col-6 {
    flex: 0 0 20%;
    max-width: 20%;
    margin-bottom: 12px;
}

.c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-lg-3,
.c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-6 {
    display: grid;
    grid-template-rows: minmax(44px, auto) auto;
    min-height: 126px;
    padding: 14px 16px;
    border: 1px solid var(--c212-bo-border);
    border-radius: 8px;
    background: #fff;
}

.c212-bourse .matin-bourse .indicesbourse > .container > .row {
    gap: 12px;
    margin-left: 0;
    margin-right: 0;
}

.c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-lg-3,
.c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-6 {
    flex-basis: calc(20% - 10px);
    max-width: calc(20% - 10px);
}

.c212-bourse .matin-bourse .indicesbourse a {
    display: block;
    text-decoration: none;
}

.c212-bourse .matin-bourse .indicesbourse .hvr-pop {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.c212-bourse .matin-bourse .indicesbourse h3 {
    min-height: 40px;
    font-size: 0.95rem;
    line-height: 1.25;
}

.c212-bourse .matin-bourse .indicesbourse .row {
    align-items: end;
    margin-left: 0;
    margin-right: 0;
}

.c212-bourse .matin-bourse .indicesbourse .pts {
    margin: 14px 0 4px;
    color: var(--c212-bo-text);
    font-size: 1.1rem;
    font-weight: 800;
}

.c212-bourse .matin-bourse .indicesbourse p {
    margin-bottom: 0;
}

.c212-bourse .matin-bourse .indiceIcone {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.c212-bourse .matin-bourse .green {
    color: var(--c212-bo-green) !important;
}

.c212-bourse .matin-bourse .red {
    color: var(--c212-bo-red) !important;
}

.c212-bourse .matin-bourse #news-bar {
    padding: 8px 0;
    background: #161616;
    color: #fff;
    overflow: hidden;
}

.c212-bourse .matin-bourse .marquee1 {
    overflow: hidden;
    white-space: nowrap;
}

.c212-bourse .matin-bourse .marquee-content1 {
    display: inline-flex;
    align-items: center;
    gap: 34px;
    min-width: 100%;
    animation: c212-bo-marquee 115s linear infinite;
    will-change: transform;
}

.c212-bourse .matin-bourse .marquee1:hover .marquee-content1 {
    animation-play-state: paused;
}

.c212-bourse .matin-bourse .article {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}

.c212-bourse .matin-bourse .article a {
    color: inherit;
    text-decoration: none;
}

.c212-bourse .matin-bourse .ste {
    font-weight: 700;
}

.c212-bourse .matin-bourse .separator {
    opacity: 0.5;
}

.c212-bourse .matin-bourse .btn-globaltags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 20px 6px;
}

.c212-bourse .matin-bourse .btn-globaltags .btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(201, 43, 48, 0.18);
    background: rgba(201, 43, 48, 0.05);
    color: var(--c212-bo-accent);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.c212-bourse .matin-bourse article.card {
    margin: 0;
    padding: 0 20px 24px;
    background: transparent;
    border: 0;
}

.c212-bourse .matin-bourse .table-responsive {
    overflow-x: auto;
    width: 100%;
    border: 1px solid var(--c212-bo-border);
    border-radius: 12px;
    background: #fff;
}

.c212-bourse .matin-bourse table {
    width: 100%;
    border-collapse: collapse;
}

/* Only force min-width on wide data tables that need horizontal scroll */
.c212-bourse .matin-bourse .valeurs-table table,
.c212-bourse .matin-bourse .table-responsive table {
    min-width: 680px;
}

.c212-bourse .matin-bourse th,
.c212-bourse .matin-bourse td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--c212-bo-border);
    text-align: left;
    vertical-align: top;
}

.c212-bourse .matin-bourse thead th,
.c212-bourse .matin-bourse .titleboursetab,
.c212-bourse .matin-bourse .titlestable th,
.c212-bourse .matin-bourse tr.titlestable th {
    background: #f8f8f8;
    color: var(--c212-bo-text);
    font-weight: 800;
}

.c212-bourse .matin-bourse tbody tr:last-child td {
    border-bottom: 0;
}

.c212-bourse .matin-bourse .create {
    display: none;
    margin: 14px 0 18px;
    padding: 18px;
    border: 1px solid var(--c212-bo-border);
    border-radius: 12px;
    background: var(--c212-bo-soft);
}

.c212-bourse .matin-bourse .create.is-open {
    display: block;
}

.c212-bourse .matin-bourse .form-group,
.c212-bourse .matin-bourse .form-group-one {
    margin-bottom: 16px;
}

.c212-bourse .matin-bourse label {
    display: block;
    margin-bottom: 8px;
    color: var(--c212-bo-text);
    font-weight: 700;
}

.c212-bourse .matin-bourse input,
.c212-bourse .matin-bourse select,
.c212-bourse .matin-bourse button {
    font: inherit;
}

.c212-bourse .matin-bourse input[type="date"],
.c212-bourse .matin-bourse select,
.c212-bourse .matin-bourse .form-control {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: var(--c212-bo-text);
}

.c212-bourse .matin-bourse .btn,
.c212-bourse .matin-bourse button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--c212-bo-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.c212-bourse .matin-bourse .btn:hover,
.c212-bourse .matin-bourse button:hover {
    background: var(--c212-bo-accent-dark);
}

.c212-bourse .matin-bourse #btn {
    margin: 8px 0 0 auto;
}

.c212-bourse .matin-bourse #transactionSubmitBtn {
    width: 100%;
    min-width: 52px;
}

.c212-bourse .matin-bourse .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.c212-bourse .matin-bourse .nav-item {
    margin: 0;
}

.c212-bourse .matin-bourse .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--c212-bo-border);
    border-radius: 999px;
    background: #fff;
    color: var(--c212-bo-text);
    font-weight: 700;
    text-decoration: none;
}

.c212-bourse .matin-bourse .nav-item.active .nav-link {
    border-color: var(--c212-bo-accent);
    background: var(--c212-bo-accent);
    color: #fff;
}

.c212-bourse .matin-bourse .tab-pane {
    display: none;
}

.c212-bourse .matin-bourse .tab-pane.active {
    display: block;
}

.c212-bourse .matin-bourse .img-logo,
.c212-bourse .matin-bourse .img-logo2 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 4px;
}

.c212-bourse .matin-bourse .img-logo img,
.c212-bourse .matin-bourse .img-logo2 img {
    display: block;
    max-width: 160px;
    max-height: 60px;
    object-fit: contain;
}

.c212-bourse .matin-bourse .infocours {
    display: grid;
    gap: 12px;
}

.c212-bourse .matin-bourse .infocours .a,
.c212-bourse .matin-bourse .infocours .b {
    padding: 12px 14px;
    border: 1px solid var(--c212-bo-border);
    border-radius: 12px;
    background: #fff;
}

/* Inside a societeinlist card, no double border */
.c212-bourse .matin-bourse .societeinlist .infocours .a,
.c212-bourse .matin-bourse .societeinlist .infocours .b {
    border: 0;
    border-radius: 0;
    padding: 6px 0;
    background: transparent;
}

.c212-bourse .matin-bourse .infocours ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.c212-bourse .matin-bourse .infocours li + li {
    margin-top: 6px;
    font-size: 1.05rem;
    font-weight: 800;
}

.c212-bourse .matin-bourse .marchebloc {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--c212-bo-border);
    border-radius: 12px;
    background: #fff;
}

.c212-bourse .matin-bourse .marchebloc p {
    margin: 0 0 6px;
}

.c212-bourse .matin-bourse .societeinlist {
    display: grid;
    grid-template-columns: 180px 220px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--c212-bo-border);
    border-radius: 12px;
    background: #fff;
}

.c212-bourse .matin-bourse .societeinlist .infos p {
    margin: 0 0 8px;
}

.c212-bourse .matin-bourse .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.c212-bourse .matin-bourse .pagination .page-link,
.c212-bourse .matin-bourse .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--c212-bo-border);
    background: #fff;
    text-decoration: none;
    font-weight: 700;
}

.c212-bourse .matin-bourse .float-right,
.c212-bourse .matin-bourse .pull-right {
    float: none !important;
    margin-left: auto;
}

/* Toutes les sociétés button — own row, centered on mobile */
.c212-bourse .matin-bourse h2.test {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.c212-bourse .matin-bourse h2.test .float-right {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.c212-bourse .matin-bourse hr {
    width: 100%;
    margin: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--c212-bo-border);
}

.c212-bourse .matin-bourse .d-none {
    display: none !important;
}

.c212-bourse .matin-bourse .visible-lg-block,
.c212-bourse .matin-bourse .visible-md-block,
.c212-bourse .matin-bourse .d-sm-block {
    display: inline-flex !important;
}

/* Company detail header — space between infocours boxes and name/sector below */
.c212-bourse .matin-bourse .col-sm-3 + .col-sm-3 + .col-sm-6,
.c212-bourse .matin-bourse .col-sm-6 h4:first-child {
    margin-top: 0;
}

.c212-bourse .matin-bourse .col-lg-12 > .row > .col-sm-6 {
    padding-top: 12px;
}

bt-space tables need scroll since they have no table-responsive wrapper */
.c212-bourse .matin-bourse .bt-space {
    overflow-x: auto;
}

@keyframes c212-bo-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 1140px) {
    .c212-bourse .matin-bourse .indicesbourse .col-lg-3,
    .c212-bourse .matin-bourse .indicesbourse .col-6 {
        flex: 0 0 calc(33.3333% - 8px);
        max-width: calc(33.3333% - 8px);
    }

    .c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-lg-3,
    .c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-6 {
        flex-basis: calc(33.3333% - 8px);
        max-width: calc(33.3333% - 8px);
    }

    .c212-bourse .matin-bourse .societeinlist {
        grid-template-columns: 150px 180px 1fr;
    }
}

@media (max-width: 860px) {
    .c212-bourse .matin-bourse .container,
    .c212-bourse .matin-bourse article.card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .c212-bourse .matin-bourse .indicesbourse .col-lg-3,
    .c212-bourse .matin-bourse .indicesbourse .col-6,
    .c212-bourse .matin-bourse .col-lg-5,
    .c212-bourse .matin-bourse .col-sm-5,
    .c212-bourse .matin-bourse .col-sm-6,
    .c212-bourse .matin-bourse .col-md-6,
    .c212-bourse .matin-bourse .col-lg-6,
    .c212-bourse .matin-bourse .col-sm-4,
    .c212-bourse .matin-bourse .col-lg-4,
    .c212-bourse .matin-bourse .col-md-2,
    .c212-bourse .matin-bourse .col-xs-16 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-lg-3,
    .c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-6 {
        flex-basis: calc(50% - 6px);
        max-width: calc(50% - 6px);
    }

    /* col-sm-6 index detail tables — small 2-col tables, need to scroll if content wide */
    .c212-bourse .matin-bourse .col-lg-3.col-sm-6,
    .c212-bourse .matin-bourse .col-sm-6 {
        overflow-x: auto;
    }

    .c212-bourse .matin-bourse .societeinlist {
        grid-template-columns: 1fr;
    }

    .c212-bourse .matin-bourse .img-logo,
    .c212-bourse .matin-bourse .img-logo2 {
        min-height: 50px;
    }

    .c212-bourse .matin-bourse .marquee-content1 {
        gap: 18px;
        animation-duration: 140s;
    }
}

@media (max-width: 640px) {
    .c212-bourse .matin-bourse {
        border-radius: 12px;
    }

    .c212-bourse .matin-bourse h1 {
        font-size: 1.3rem;
    }

    .c212-bourse .matin-bourse h2 {
        font-size: 1.05rem;
        margin: 16px 0 8px;
    }

    .c212-bourse .matin-bourse .btn-globaltags {
        padding-left: 16px;
        padding-right: 16px;
    }

    .c212-bourse .matin-bourse .btn-globaltags .btn {
        width: 100%;
        justify-content: center;
    }

    /* Nav tabs: smaller pills that wrap neatly */
    .c212-bourse .matin-bourse .nav-tabs {
        gap: 6px;
        margin: 12px 0;
    }

    .c212-bourse .matin-bourse .nav-link {
        padding: 0 10px;
        min-height: 34px;
        font-size: 0.82rem;
    }

    /* Ticker — keep animation running on mobile */
    .c212-bourse .matin-bourse .marquee1 {
        overflow: hidden;
    }

    .c212-bourse .matin-bourse .marquee-content1 {
        animation-duration: 80s;
    }

    /* Index indicator cards — keep 2-per-row on mobile */
    .c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-lg-3,
    .c212-bourse .matin-bourse .indicesbourse > .container > .row > .col-6 {
        flex-basis: calc(50% - 6px);
        max-width: calc(50% - 6px);
        min-height: 100px;
    }

    .c212-bourse .matin-bourse .indicesbourse h3 {
        font-size: 0.78rem;
        min-height: 32px;
    }

    .c212-bourse .matin-bourse .indicesbourse .pts {
        font-size: 0.92rem;
        margin-top: 8px;
        white-space: nowrap;
    }

    /* On mobile, hide arrow icon column and give value column full width */
    .c212-bourse .matin-bourse .indicesbourse .indiceIcone {
        display: none;
    }

    .c212-bourse .matin-bourse .indicesbourse .col-8,
    .c212-bourse .matin-bourse .indicesbourse .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Transactions form: stack fields */
    .c212-bourse .matin-bourse .create {
        padding: 14px;
    }

    .c212-bourse .matin-bourse .create .row {
        flex-direction: column;
    }

    .c212-bourse .matin-bourse .create .col-lg-5,
    .c212-bourse .matin-bourse .create .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Company detail — Cours and Variation side by side */
    .c212-bourse .matin-bourse .infocours {
        grid-template-columns: 1fr 1fr;
    }

    /* Logo full width and centered, infocours below */
    .c212-bourse .matin-bourse .col-sm-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .c212-bourse .matin-bourse .img-logo2,
    .c212-bourse .matin-bourse .img-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
    }

    /* Tables in bt-space / index detail sections auto-scroll */
    .c212-bourse .matin-bourse .bt-space,
    .c212-bourse .matin-bourse .col-lg-3.col-sm-6,
    .c212-bourse .matin-bourse .col-sm-6 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Visible helpers — hide lg/md-only blocks on small mobile */
    .c212-bourse .matin-bourse .visible-md-block {
        display: none !important;
    }

    /* Show globaltags links (hidden by Bootstrap d-none d-sm-block) */
    .c212-bourse .matin-bourse .btn-globaltags {
        display: flex !important;
        flex-wrap: wrap;
    }
}
