.domcg {
    margin: 0 auto;
    padding: 15px 15px 15px;
}

.domcg:last-child {
    margin-bottom: 0;
}

.domcg p {
    margin-bottom: 0;
    text-align: left;
    line-height: 1.2;
}

.domcg-head {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
}

.domcg-title {
    font-size: 20px;
    font-weight: bold;
}

.domcg-intro {
    font-size: 13px;
    color: #555;
}

/* Ajout automatique du ":" après le titre */
.domcg-intro p::before {
    content: " :";
    margin-left: 4px;
    margin-right: 4px;
    font-weight: bold;
}

.domcg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: flex-start;
    justify-content: flex-start;
}

.domcg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    flex: 1 1 130px;
    color: inherit;
    padding: 4px;
}

.domcg-item--nolink {
    cursor: default;
}

.domcg-icon {
    width: 180px;
    height: 150px;
    object-fit: cover;
    display: block;
    border-radius: 15px 15px 0 0;
}

.domcg-subtitle {
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.domcg-text p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.35;
}

.domcg-gridwrap:not(.is-expanded) .domcg-item:nth-child(n+6) {
    display: none;
}

.domcg-more {
    margin-top: 12px;
    text-align: center;
}

button.domcg-toggle {
    border: none;
    background: transparent;
    text-transform: uppercase;
    text-decoration: underline;
    font-weight: bold;
}

.domcg-carousel {
    position: relative;
}

.domcg-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    display: flex;
}

.domcg-viewport::-webkit-scrollbar {
    display: none;
}

/* Chrome/Safari */

.domcg-track {
    display: flex;
    gap: 16px; /* adapte */
    scroll-snap-type: x mandatory;
    margin: auto;
}

.domcg-arrows {
    display: flex;
    justify-content: center;
}

.domcg-arrow {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    transition: all linear .1s;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.domcg-arrow path {
    fill: #00707a;
}

.domcg-arrow:hover {
    background-color: rgba(221, 236, 238, 0.65);
}

.domcg-arrow--prev {
    left: 101%;
}

.domcg-arrow--next {
    left: 106%;
}

.domcg-arrow[disabled] {
    opacity: .35;
    cursor: default;
    fill: black;
}


.domcg-item.is-hidden {
    display: none !important;
}

#domcg-wrapper.domcg-is-loading {
    opacity: .6;
    pointer-events: none;
}

/* Par défaut : on cache les flèches (sécurité) */
.domcg-carousel .domcg-arrows {
    display: none;
}

.domcg-item-inner {
    position: relative;
}

.domcg-pictogram {
    position: absolute;
    top: 110px;
    right: 12px; /* ou left */
    width: 48px;
    height: auto;
    min-height: 51px;
}

div#domcg-wrapper {
    max-width: 1051px;
    margin: auto;
}

@media (max-width: 1024px) {
    div#domcg-wrapper {
        max-width: 960px;
    }
}

@media (min-width: 769px) {
    .domcg-carousel.has-arrows .domcg-arrows {
        display: flex;
        justify-content: center;
    }

    .domcg-carousel:not(.has-arrows) .domcg-track {
        justify-content: center;
        margin: 0 auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    .domcg-icon {
        width: 160px;
    }

    .domcg-viewport {
        padding: 0 40px;
    }
}


/* ---------- MOBILE ---------- */
/* MOBILE */
@media (max-width: 768px) {

    .domcg-carousel.has-arrows-mobile .domcg-arrows {
        display: flex;
        justify-content: center;
    }

    .domcg-carousel:not(.has-arrows-mobile) .domcg-track {
        justify-content: center;
        margin: 0 auto;
    }

    .domcg {
        padding: 12px 10px;
    }

    .domcg-viewport {
        /* scroll agréable au doigt */
        scroll-snap-type: x mandatory;
    }

    .domcg-item {
        flex: 0 0 auto; /* empêche le shrink chelou */
        width: 72vw; /* 1 carte visible */
        max-width: 230px;
        scroll-snap-align: start;
    }

    .domcg-icon {
        width: 100%;
        height: 140px;
    }

    img.domcg-icon {
        min-width: 177px;
    }

    .domcg-track {
        gap: 12px;
    }

    /* flèches dessous, même style, juste un peu plus compact */
    .domcg-arrows {
        margin-top: 8px;
        gap: 6px;
    }

    .domcg-arrow {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
}

@media (max-width: 426px) {
    .domcg-item {
        max-width: 185px;
    }

    img.domcg-icon {
        min-width: 150px;
    }
}

@media (max-width: 376px) {
    .domcg-item {
        max-width: 155px;
    }
}