/* Accounts portal: Bootstrap 5.1 + these few rules (5.1 has no --bs-btn-* nor --bs-link-* variables: plain properties) */
/* Colours of the logo Seal Open Data: dark petrol band, petrol, orange for the main call to action */
:root {
    --comptes-bandeau: #1f4f63;
    --comptes-accent: #36748f;
    --comptes-accent-fonce: #2b5d73;
    --comptes-accent-soft: #e6f0f4;
    --comptes-vif: #e9a23b;
    --comptes-vif-fonce: #d68f26;
    --comptes-vif-texte: #3b2604;
}

a {
    color: var(--comptes-accent-fonce);
}

a:hover {
    color: var(--comptes-bandeau);
}

.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled {
    color: #fff;
    background-color: var(--comptes-accent);
    border-color: var(--comptes-accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-check:focus + .btn-primary {
    color: #fff;
    background-color: var(--comptes-accent-fonce);
    border-color: var(--comptes-accent-fonce);
}

.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary {
    color: #fff;
    background-color: var(--comptes-bandeau);
    border-color: var(--comptes-bandeau);
}

.btn-outline-primary {
    color: var(--comptes-accent-fonce);
    border-color: var(--comptes-accent);
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
    color: #fff;
    background-color: var(--comptes-accent);
    border-color: var(--comptes-accent);
}

.btn-primary:focus,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(54, 116, 143, 0.35);
}

/* Main call to action of the home page */
.btn-vif {
    color: var(--comptes-vif-texte);
    background-color: var(--comptes-vif);
    border-color: var(--comptes-vif);
    font-weight: 500;
}

.btn-vif:hover,
.btn-vif:focus,
.btn-vif:active {
    color: var(--comptes-vif-texte);
    background-color: var(--comptes-vif-fonce);
    border-color: var(--comptes-vif-fonce);
}

.btn-vif:focus {
    box-shadow: 0 0 0 0.25rem rgba(233, 162, 59, 0.4);
}

.nav-pills .nav-link {
    color: var(--comptes-accent-fonce);
}

.nav-pills .nav-link.active {
    background-color: var(--comptes-accent);
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: #9cc3d3;
    box-shadow: 0 0 0 0.25rem rgba(54, 116, 143, 0.25);
}

.form-check-input:checked {
    background-color: var(--comptes-accent);
    border-color: var(--comptes-accent);
}

.marque {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    letter-spacing: 0.01em;
}

.marque strong {
    font-weight: 700;
}

.marque .logo {
    height: 44px;
    width: auto;
    display: block;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f6f7f9;
    font-size: 16px;
}

main {
    flex: 1;
}

.bandeau {
    background: var(--comptes-bandeau);
    padding-top: 6px;
    padding-bottom: 6px;
}

.pied {
    background: #fff;
    border-top: 1px solid #dde2e8;
    color: #5b6875;
    font-size: 14px;
}

.carte {
    background: #fff;
    border: 1px solid #dde2e8;
    border-radius: 10px;
    padding: 24px;
}

.formulaire {
    max-width: 560px;
    margin: 0 auto;
}

.accroche {
    background: var(--comptes-accent-soft);
    border-left: 4px solid var(--comptes-accent);
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
}

pre.config {
    background: #eef1f4;
    border: 1px solid #dde2e8;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Text with a button « Copier » beside it (js/copier.js) */
.copiable {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copiable pre.config {
    flex: 1 1 auto;
    min-width: 0;
}

.copiable .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.captcha-etat {
    font-size: 14px;
    color: #5b6875;
}

/* Field « Votre territoire » (js/territoire.js) */
.territoire {
    position: relative;
}

.territoire-liste {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 2px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.territoire-liste li {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.territoire-liste li small {
    color: #5b6875;
    text-align: right;
}

.territoire-liste li.active small {
    color: inherit;
}

.territoire-liste li.territoire-vide {
    cursor: default;
    color: #5b6875;
}

/* Legal pages (Mentions légales, CGU, Confidentialité) */
.texte-legal {
    max-width: 860px;
}

.texte-legal h2 {
    font-size: 1.15rem;
    margin-top: 1.75rem;
}

.texte-legal h2:first-of-type {
    margin-top: 0;
}

.texte-legal dt {
    font-weight: 600;
}

/* Room of the scrollbar kept on every page: a short page and a long one start at the same place */
html {
    scrollbar-gutter: stable;
}

/* Pages of the connected user (Mon compte, Abonnement, Consommation) */
.menu-compte .nav-link {
    padding: 4px 12px;
}

.page-large {
    max-width: 1100px;
    margin: 0 auto;
}

/* Pages of the connected user (Mon compte, Abonnement, Équipe, Consommation): one width, so that the menu and the title do not move from a page to another */
.page-compte {
    max-width: 960px;
    margin: 0 auto;
}

/* Actions on a member (page Équipe): a details element, no script */
.actions-membre {
    display: inline-block;
    text-align: left;
}

.actions-membre > summary {
    list-style: none;
}

.actions-membre > summary::-webkit-details-marker {
    display: none;
}

/* « Résilier l'abonnement » (page Abonnement): a button opening the confirmation, without the triangle of the details element */
.resilier > summary {
    list-style: none;
}

.resilier > summary::-webkit-details-marker {
    display: none;
}

.actions-contenu {
    position: absolute;
    right: 24px;
    z-index: 5;
    width: 280px;
    margin-top: 4px;
    padding: 12px;
    background: #fff;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.aide-roles dt {
    font-weight: 600;
}

.aide-roles dd {
    margin-bottom: 0.5rem;
}

.grille-droits select {
    min-width: 150px;
}

.zone-danger {
    border-color: #f1c4c4;
}

/* Gauges of the page Consommation */
progress.jauge {
    display: block;
    width: 100%;
    height: 10px;
    margin-top: 6px;
    appearance: none;
    border: none;
    border-radius: 5px;
    background: #e7ebef;
    overflow: hidden;
    accent-color: var(--comptes-accent);
}

progress.jauge::-webkit-progress-bar {
    background: #e7ebef;
}

progress.jauge::-webkit-progress-value {
    background: var(--comptes-accent);
}

progress.jauge::-moz-progress-bar {
    background: var(--comptes-accent);
}

progress.jauge.jauge-haute::-webkit-progress-value {
    background: #d39e00;
}

progress.jauge.jauge-haute::-moz-progress-bar {
    background: #d39e00;
}

progress.jauge.jauge-pleine::-webkit-progress-value {
    background: #c0392b;
}

progress.jauge.jauge-pleine::-moz-progress-bar {
    background: #c0392b;
}

/* Home page (showcase): --domaine = colour of the domain (core.domaine.couleur) */
.vitrine-hero {
    background: #fff;
    border: 1px solid #dde2e8;
    border-radius: 12px;
    padding: 24px 28px;
}

.vitrine-titre {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
}

.vitrine-intro {
    font-size: 1.1rem;
    color: #3d4852;
    margin-bottom: 0;
}

.vitrine-note {
    color: #5b6875;
    font-size: 14px;
}

.vitrine-chiffres {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
}

.vitrine-chiffres > div {
    background: var(--comptes-accent-soft);
    border-radius: 10px;
    padding: 12px 14px;
}

.vitrine-chiffres dt {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--comptes-accent);
    font-variant-numeric: tabular-nums;
}

.vitrine-chiffres dd {
    margin: 6px 0 0;
    color: #3d4852;
}

.vitrine-domaine {
    background: #fff;
    border: 1px solid #dde2e8;
    border-top: 4px solid var(--domaine);
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 15px;
}

.vitrine-sigle {
    background: var(--domaine);
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.vitrine-volumes {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #3d4852;
    font-size: 14px;
}

.vitrine-volumes strong {
    font-variant-numeric: tabular-nums;
}

.vitrine-question p {
    font-weight: 500;
}

.vitrine-puce {
    border: 1px solid var(--domaine);
    color: var(--domaine);
    border-radius: 999px;
    padding: 1px 10px;
    font-size: 13px;
}

@media (max-width: 575px) {
    .vitrine-hero {
        padding: 18px 16px;
    }
}

/* Flow « Comment ça marche » of the home page: sources → product → uses; a row from 992 px, a column below */
.flux {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.flux-etape {
    position: relative;
    border-radius: 10px;
    padding: 18px 18px 14px;
    font-size: 15px;
}

.flux-etape ul {
    margin: 0;
    padding-left: 18px;
    color: #3d4852;
}

.flux-etape li + li {
    margin-top: 4px;
}

.flux-sources {
    background: #fff;
    border: 1px dashed #9cc3d3;
}

.flux-coeur {
    background: var(--comptes-accent-soft);
    border: 2px solid var(--comptes-accent);
}

.flux-coeur h3 {
    color: var(--comptes-bandeau);
}

/* Domains of the socle in the product block: the chips of the questions, on white */
.flux-domaines {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
}

.flux-domaines .vitrine-puce {
    background: #fff;
    text-decoration: none;
    font-size: 12px;
}

.flux-domaines .vitrine-puce:hover {
    background: var(--domaine);
    color: #fff;
}

.flux-numero {
    position: absolute;
    top: -11px;
    left: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--comptes-bandeau);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.flux-usages {
    display: grid;
    gap: 10px;
}

.flux-usage {
    background: #fff;
    border: 1px solid #dde2e8;
    border-top: 3px solid var(--comptes-vif);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
}

.flux-usage p {
    margin-bottom: 4px;
    color: #3d4852;
}

/* Arrow: a line and a chevron, pointing down in a column, right in a row */
.flux-fleche {
    position: relative;
    height: 34px;
    width: 100%;
}

.flux-fleche::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 4px;
    bottom: 6px;
    width: 2px;
    margin-left: -1px;
    background: var(--comptes-accent);
}

.flux-fleche::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-right: 2px solid var(--comptes-accent);
    border-bottom: 2px solid var(--comptes-accent);
    transform: rotate(45deg);
}

/* Feedback loop under the flow: a block with an up arrow in a column, a U arrow from the uses back to the product in a row */
.flux-retour {
    margin-top: 6px;
}

.flux-retour-fleche {
    position: relative;
    height: 34px;
}

.flux-retour-fleche::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 6px;
    bottom: 4px;
    width: 2px;
    margin-left: -1px;
    background: var(--comptes-vif);
}

.flux-retour-fleche::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 5px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-left: 2px solid var(--comptes-vif);
    border-top: 2px solid var(--comptes-vif);
    transform: rotate(45deg);
}

.flux-retour-texte {
    margin: 0;
    background: #fff;
    border: 1px solid #dde2e8;
    border-left: 3px solid var(--comptes-vif);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    color: #3d4852;
}

.flux-retour-texte strong {
    color: #1f2d3a;
}

.flux-retour-numero {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--comptes-vif);
    color: #1f2d3a;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.vitrine-retour {
    border-top: 3px solid var(--comptes-vif);
    font-size: 15px;
}

.vitrine-retour p {
    color: #3d4852;
}

@media (min-width: 992px) {
    .flux {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .flux-sources, .flux-coeur {
        flex: 1 1 0;
        min-width: 0;
    }

    /* The product block takes the height of the row, so that the return arrow reaches it */
    .flux-coeur {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* U arrow: from the middle of the uses (flex 1.4) back to the middle of the product (flex 1), two 40 px arrows between the 3 blocks */
    .flux-retour {
        margin-top: 0;
    }

    .flux-retour-fleche {
        height: 26px;
        margin-left: calc(40px + (100% - 80px) * 1.5 / 3.4);
        margin-right: calc((100% - 80px) * 0.7 / 3.4);
        border: 2px solid var(--comptes-vif);
        border-top: 0;
        border-radius: 0 0 12px 12px;
    }

    .flux-retour-fleche::before {
        display: none;
    }

    .flux-retour-fleche::after {
        left: -1px;
        top: 2px;
        margin-left: -5px;
    }

    .flux-retour-texte {
        max-width: 820px;
        margin: 8px auto 0;
        border: 0;
        background: none;
        padding: 0;
        text-align: center;
    }

    .flux-usages {
        flex: 1.4 1 0;
        min-width: 0;
    }

    .flux-fleche {
        flex: 0 0 40px;
        height: 20px;
    }

    .flux-fleche::before {
        left: 6px;
        right: 8px;
        top: 50%;
        bottom: auto;
        width: auto;
        height: 2px;
        margin: -1px 0 0;
    }

    .flux-fleche::after {
        left: auto;
        right: 7px;
        top: 50%;
        bottom: auto;
        margin: -5px 0 0;
        transform: rotate(-45deg);
    }
}

/* Hidden by default; js/captcha.js shows it */
.d-js {
    display: none;
}

/* Trap field of the contact form, out of sight (robots fill it) */
.piege {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Administration (pages /Admin, role exploitant) */
.tuile-admin {
    color: inherit;
}

.tuile-admin .tuile-valeur {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--comptes-accent);
}

.tuile-alerte {
    border-color: #e9a23b;
}

.tuile-alerte .tuile-valeur {
    color: #b8741a;
}

.demande-admin + .demande-admin {
    border-top: 1px solid #dde2e8;
    margin-top: 16px;
    padding-top: 16px;
}

.message-demande {
    border-left: 3px solid #dde2e8;
    padding-left: 10px;
    white-space: pre-wrap;
}

/* Links that open the Seal portal (or another site) in a new window: icon after the text */
.externe::after {
    content: "";
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-left: 0.35em;
    vertical-align: -0.05em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8.6 2.5a.5.5 0 0 1 .5-.5h4.4a.5.5 0 0 1 .5.5v4.4a.5.5 0 0 1-1 0V3.7L7.4 9.3a.5.5 0 1 1-.7-.7L12.3 3H9.1a.5.5 0 0 1-.5-.5z'/%3E%3Cpath d='M3.5 4A1.5 1.5 0 0 0 2 5.5v7A1.5 1.5 0 0 0 3.5 14h7a1.5 1.5 0 0 0 1.5-1.5V9a.5.5 0 0 0-1 0v3.5a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5H7a.5.5 0 0 0 0-1H3.5z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8.6 2.5a.5.5 0 0 1 .5-.5h4.4a.5.5 0 0 1 .5.5v4.4a.5.5 0 0 1-1 0V3.7L7.4 9.3a.5.5 0 1 1-.7-.7L12.3 3H9.1a.5.5 0 0 1-.5-.5z'/%3E%3Cpath d='M3.5 4A1.5 1.5 0 0 0 2 5.5v7A1.5 1.5 0 0 0 3.5 14h7a1.5 1.5 0 0 0 1.5-1.5V9a.5.5 0 0 0-1 0v3.5a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5H7a.5.5 0 0 0 0-1H3.5z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* « Ouvrir le portail » in the menu: last item, set apart from the pages of the accounts portal */
.portail-menu {
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .portail-menu {
        margin-left: 1rem;
        padding-left: 1rem;
        border-left: 1px solid rgba(255, 255, 255, 0.25);
    }
}

@media (max-width: 767.98px) {
    .portail-menu {
        padding: 0.5rem 0;
    }
}

/* Text links of the home page to the Seal portal: colour of the call to action, darker for the contrast */
.lien-portail {
    color: #9a5b0b;
    font-weight: 600;
}

.lien-portail:hover,
.lien-portail:focus {
    color: #7a4708;
}

/* Page Paliers: « Sans carte bancaire » under the heading Essai Solo */
.badge-sans-carte {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-top: 0.3rem;
    padding: 0.15em 0.6em;
    border-radius: 999px;
    background: #e3f2e6;
    color: #2f6b3a;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.paliers thead th {
    vertical-align: top;
}

/* Page Paliers: one colour per tier (header and light tint of its column) */
.paliers {
    --palier-1: #6c7a89;
    --palier-1-soft: #f3f5f7;
    --palier-2: #2f8f5b;
    --palier-2-soft: #eef7f1;
    --palier-3: var(--comptes-accent);
    --palier-3-soft: var(--comptes-accent-soft);
    --palier-4: var(--comptes-vif);
    --palier-4-soft: #fdf4e6;
    --palier-5: var(--comptes-bandeau);
    --palier-5-soft: #e8eef1;
}

/* Same width for the 5 tier columns: fixed layout driven by the header row
   (row labels 16 %, each tier 16.8 %); min-width keeps the table readable on phones
   (horizontal scroll from .table-responsive) */
.paliers {
    table-layout: fixed;
    min-width: 760px;
}

.paliers thead th {
    width: 16.8%;
}

.paliers thead th:first-child {
    width: 16%;
}

/* Headers: light tint, tier colour for the text and a top band */
.paliers thead th {
    text-align: center;
    border-top: 5px solid transparent;
}

.paliers thead th:first-child {
    background: #fff;
}

.paliers thead th:nth-child(2) { background: #e4e8ec; color: #4f5b67; border-top-color: var(--palier-1); }
.paliers thead th:nth-child(3) { background: #d8eee0; color: #24704a; border-top-color: var(--palier-2); }
.paliers thead th:nth-child(4) { background: #d3e6ee; color: var(--comptes-accent-fonce); border-top-color: var(--palier-3); }
.paliers thead th:nth-child(5) { background: #fbe6c4; color: var(--comptes-vif-texte); border-top-color: var(--palier-4); }
.paliers thead th:nth-child(6) { background: #d6e1e7; color: var(--comptes-bandeau); border-top-color: var(--palier-5); }

.paliers thead .badge-sans-carte {
    background: #fff;
}

.paliers tbody td:nth-child(2) { background: var(--palier-1-soft); }
.paliers tbody td:nth-child(3) { background: var(--palier-2-soft); }
.paliers tbody td:nth-child(4) { background: var(--palier-3-soft); }
.paliers tbody td:nth-child(5) { background: var(--palier-4-soft); }
.paliers tbody td:nth-child(6) { background: var(--palier-5-soft); }

/* Recharges: the cell spanning Solo and Équipe */
.paliers tbody td[colspan="2"] {
    background: linear-gradient(90deg, var(--palier-3-soft), var(--palier-4-soft));
}

.paliers tbody td.palier-organisation {
    background: var(--palier-5-soft);
}

/* Row labels */
.paliers tbody tr > :first-child {
    background: #fff;
    color: var(--comptes-bandeau);
    font-weight: 600;
    vertical-align: middle;
    border-left: 4px solid var(--comptes-accent);
}

.paliers tbody td {
    text-align: center;
    vertical-align: middle;
}

.paliers tbody tr > td:first-child {
    text-align: left;
}

/* Prices: tier colour */
.paliers .ligne-prix td:nth-child(2) strong { color: var(--palier-1); }
.paliers .ligne-prix td:nth-child(3) strong { color: var(--palier-2); }
.paliers .ligne-prix td:nth-child(4) strong { color: var(--palier-3); }
.paliers .ligne-prix td:nth-child(5) strong { color: var(--comptes-vif-texte); }
.paliers .ligne-prix td:nth-child(6) strong { color: var(--palier-5); }

.paliers .ligne-prix strong {
    font-size: 1.05rem;
}

/* Not included */
.paliers td.non {
    color: #9aa3ab;
}

/* Page Améliorations: answer of the exploitant, line breaks kept */
.reponse-avis {
    white-space: pre-line;
}

/* Page Premiers pas: number, title and tier of each recipe on one line */
.pp-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 10px;
}

.pp-tete h2 {
    margin: 0;
}

.pp-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--comptes-accent);
    color: #fff;
    font-weight: 600;
    flex: none;
}

.pp-palier {
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 9px;
    background: #e7f5ec;
    color: #1d6b3a;
}

.pp-palier.pp-compte {
    background: var(--comptes-accent-soft);
    color: var(--comptes-accent-fonce);
}

/* Public pages per territory (Pages/Territoires): /commune/..., directory /communes */
.territoire-entete {
    background: #fff;
    border: 1px solid #dde2e8;
    border-radius: 12px;
    padding: 24px 28px;
}

.territoire-phrase {
    font-size: 1.05rem;
    color: #3d4852;
    margin-bottom: 8px;
}

.territoire-blocs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.territoire-bloc {
    background: #fff;
    border: 1px solid #dde2e8;
    border-top: 4px solid var(--comptes-accent);
    border-radius: 10px;
    padding: 16px 18px;
}

.territoire-chiffres {
    margin: 0;
}

.territoire-chiffres > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    padding: 7px 0;
    border-bottom: 1px solid #eef1f4;
}

.territoire-chiffres > div:last-child {
    border-bottom: 0;
}

.territoire-chiffres dt {
    font-weight: 400;
    color: #3d4852;
    flex: 1 1 55%;
}

.territoire-chiffres dt small {
    color: #5b6875;
}

.territoire-chiffres dd {
    margin: 0;
    text-align: right;
    flex: 1 1 40%;
    font-variant-numeric: tabular-nums;
}

.territoire-comparaison {
    display: block;
    font-size: 13px;
    color: #5b6875;
}

.territoire-source {
    font-size: 12px;
    color: #5b6875;
    margin: 10px 0 0;
}

.territoire-theme {
    display: inline-block;
    background: var(--comptes-accent-soft);
    color: var(--comptes-accent-fonce);
    border-radius: 4px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.territoire-transition th[scope="row"] {
    font-weight: 400;
}

.territoire-transition td {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.territoire-liens {
    columns: 4 200px;
    column-gap: 24px;
    padding-left: 0;
    list-style: none;
}

.territoire-liens li {
    break-inside: avoid;
    padding: 2px 0;
}

.territoire-classement td,
.territoire-classement th {
    font-variant-numeric: tabular-nums;
}

.territoire-classement th[scope="row"] {
    font-weight: 400;
}

.territoire-alerte,
.territoire-classement tr.territoire-alerte > * {
    background: #fdf1df;
}

.territoire-departements {
    columns: 3 240px;
}

@media (max-width: 575.98px) {
    .territoire-entete {
        padding: 18px 16px;
    }

    .territoire-blocs {
        grid-template-columns: 1fr;
    }
}
