/* Style pour le conteneur parent */
.region-sidebar-home {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 5px; /* Espace entre les éléments */
    margin-bottom: 5px;
    border-top: 5px solid var(--mediachimie-color);
    padding-top: 5px;
}

/* Style pour les divs enfants directs */
.region-sidebar-home > div {
    flex: 1;
    min-width: 0; /* Empêche le débordement */
    overflow: hidden;
    padding: 0;
    height: 90px;
    box-sizing: border-box;
}

/* Style pour les images */
.region-sidebar-home > div img {
    min-width: 100%;
    height: 90px;
    display: block; /* Élimine l'espace sous l'image */
    overflow: hidden;
}

.home-section {
    font-family: var(--mediachimie-font-titles);
    letter-spacing: var(--mediachimie-font-titles-letter-spacing);
}

.home-section .home-section__title {
    float:left;
    font-size: 42px;
}

/* Surcharge legacy main.css */
.home-section__title::after {
    content: ""
}
.home-section__title,
.home-jeunes .home-section__title /*surcharge à cause de main.css*/{
    padding: 0 20px;
    position: relative;
}

.home-section .home-section__subtitle {
    float:right;
    font-family: var(--mediachimie-font-titles);
    letter-spacing: var(--mediachimie-font-titles-letter-spacing);
    padding: 5px 20px 10px 50px;
    display: inline-block;
    color: var(--mediachimie-color-white);
    border-radius: 0 0 0 80px;
    max-width: fit-content;
    font-size: 32px;
}

.home-section {
    background-color: var(--mediachimie-color-white);
    padding: 0;
    margin-bottom: 40px;
}

.home-section > .home-section__links {
    clear: both;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    padding: 0;
}

.home-section.home-series > .home-section__links {
    grid-template-columns: 1fr;
}

.home-section__link {
    border:0 !important;
    padding: 0 20px;
}

.home-section .home-section__title {
    display: flex;
    align-items: center;
    font-weight: 600;
    line-height: 1.25em;
    margin: 10px 0 20px;
    text-transform: uppercase;
}

.home-section .home-section__title {
    text-decoration: none;
}

.home-section .home-section__title::before {
    content: " ";
    width: 50px;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10px;
}

.home-section.home-series {
    border-top: 5px solid var(--mediachimie-series-color);
}
.home-section.home-series .home-section__title {
    color: var(--mediachimie-series-color);
}
.home-section.home-series .home-section__title::before {
    background-image: url('../../images/pictos/series-fab319.svg');
    background-position-y: 15px;
}
.home-section.home-series .home-section__subtitle {
    background-color: var(--mediachimie-series-color);
}

.home-section.home-metiers {
    border-top: 5px solid var(--mediachimie-metiers-color);
}
.home-section.home-metiers .home-section__title {
    color: var(--mediachimie-metiers-color);
}
.home-section.home-metiers .home-section__title::before {
    background-image: url('../../images/pictos/metiers-07b4bb.svg');
}
.home-section.home-metiers .home-section__subtitle {
    background-color: var(--mediachimie-metiers-color);
}

.home-section.home-enseignants {
    border-top: 5px solid var(--mediachimie-enseignants-color);
}
.home-section.home-enseignants .home-section__title {
    color: var(--mediachimie-enseignants-color)
}
.home-section.home-enseignants .home-section__title::before {
    background-image: url('../../images/pictos/enseignants-de582b.svg');
    background-position-y: 5px;
}
.home-section.home-enseignants .home-section__subtitle {
    background-color: var(--mediachimie-enseignants-color);
}

.home-section.home-mediatheque {
    border-top: 5px solid var(--mediachimie-mediatheque-color);
}
.home-section.home-mediatheque .home-section__title {
    color: var(--mediachimie-mediatheque-color)
}
.home-section.home-mediatheque .home-section__title::before {
    background-image: url('../../images/pictos/mediatheque-b493b2.svg');
    background-position-y: 12px;
}
.home-section.home-mediatheque .home-section__subtitle {
    background-color: var(--mediachimie-mediatheque-color);
}

.home-section.home-colloques {
    border-top: 5px solid var(--mediachimie-colloques-color);
}
.home-section.home-colloques .home-section__title {
    color: var(--mediachimie-colloques-color)
}
.home-section.home-colloques .home-section__title::before {
    background-image: url('../../images/pictos/colloques-143a63.svg');
    background-position-y: 5px;
}
.home-section.home-colloques .home-section__subtitle {
    background-color: var(--mediachimie-colloques-color);
}

.home-section.home-jeunes {
    border-top: 5px solid var(--mediachimie-jeunes-color);
}
.home-section.home-jeunes .home-section__title {
    color: var(--mediachimie-jeunes-color)
}
.home-section.home-jeunes .home-section__title::before {
    background-image: url('../../images/pictos/jeunes-9e4f75.svg');
}
.home-section.home-jeunes .home-section__subtitle {
    background-color: var(--mediachimie-jeunes-color);
}

.home-section > .home-section__links .content {
    position: relative;
    margin: 0;
    padding: 0;
    border-top-right-radius: 80px;
    overflow: hidden;
}

.home-section > .home-section__links .content img {
    width: 100%;
    height: auto;
    display: block;
}

.home-section > .home-section__links .content .text {
    position: absolute;
    width:100%;
    box-sizing: border-box;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: left;
    background-color: rgba(0, 0, 0, 0.35);
    padding: 10px 20px;
    min-height: 100px;
}

.home-section > .home-section__links .content .text.no-alpha {
    background-color: transparent;
}

.home-section > .home-section__links a .content .text ,
.home-section > .home-section__links a:hover .content .text {
    color: white;
    font-size: 32px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1.25em;
}

/** Cas particulier du bloc Colloques */
.home-section.home-colloques > .home-section__links {
    grid-template-columns: 2fr 2fr 2fr 3fr;
}

.home-section.home-colloques > .home-section__links .content {
    border-radius: 0;
}

.home-section.home-colloques > .home-section__links .content img {
    border-radius: 0;
    border:1px solid var(--mediachimie-color-black);
    width: 190px;
}

.home-section.home-colloques > .home-section__links .content .text {
    position: relative;
    text-shadow: none;
    padding: 10px 0 0 0;
}

.home-section.home-colloques > .home-section__links a .content .text,
.home-section.home-colloques > .home-section__links a:hover .content .text {
    color: var(--mediachimie-colloques-color);
    text-transform: none;
    font-size: 20px;
    font-weight: normal;
}

.home-section.home-colloques > .home-section__links a {
    text-decoration: none;
}

.home-section.home-colloques > .home-section__links a:nth-child(4n) {
    display: flex;
    justify-content: center;
    align-items: start;
    text-align: center;
    padding:20px;
}
.home-section.home-colloques > .home-section__links .content .circle {
    border-radius: 150px;
    width:150px;
    height:150px;
    background-color: var(--mediachimie-colloques-color);
}
.home-section.home-colloques > .home-section__links .content .circle .text {
    width: 150px;
    height:150px;
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}
.home-section.home-colloques > .home-section__links a .content .circle .text,
.home-section.home-colloques > .home-section__links a:hover .content .circle .text {
    color: var(--mediachimie-color-white);
    text-transform: uppercase;
}
