:root {
    --cmdb-bleu: #007fff;
    --cmdb-vert: #019C00;
    --cmdb-teal: #008080;

    /* Surcharge bootstrap */
    --bs-border-color: #bbbec1; /* Couleur des bordures d'input */
}

header#main-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
header#main-header .site-identity {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem;
    transition: all 0.25s ease-in-out;
    color: inherit;
    text-decoration: none;
}
header#main-header .site-identity img {
    width: 254px;
    max-width: 35vw;
    height: auto;
}
header#main-header.scaled-down .site-identity {
    transform: scale(0.7);
    margin: 0rem;
}
header#main-header #site-title {
    text-transform: uppercase;
    font-size: 1.5em;
    font-weight: bold;
}

header#main-header nav {
    background-color: var(--cmdb-teal);
    padding: 0;
}
header#main-header nav a {
    color: white;
    text-decoration: none;
    padding: 1em;
    transition: all 0.25s ease-in-out;
    font-weight: 600;
}
header#main-header nav a:hover {
    background-color: #00000099;
}
header#main-header nav .navbar-toggler {
    border: none;
    width: 100%;
}
header#main-header nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.img-banner {
    width: 100%;
    background-repeat: no-repeat; 
    background-size: cover; 
    background-position: center;
    color: white;
    margin-bottom: 3em;
}
.img-banner h1 {
    display: inline-block;
    margin: 3.5em 2em 3.5em 0;
    padding: 1.5em 3em;
    background: #000000bb;
}
.img-banner-index {
    width: 100%;
    background-repeat: no-repeat; 
    background-size: cover; 
    background-position: center;
    color: white;
    margin-bottom: 2em;
    max-height: 550px;
    height: 50vh;
}

fieldset {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid grey;
}
legend {
    font-variant: small-caps;
}
legend .detail {
    font-variant: normal;
    font-size: 0.75em;
}
input {
    margin-bottom: 0.75em;
}
select {
    margin-bottom: 0.75em;
}
label {
    font-weight: bold;
    cursor: pointer;
}
.no-bold {
    font-weight: normal;
}
.required {
    color: #cc0000;
}
button.btn {
    margin: 1em 0;
}

/* Surcharge de Select2 */
.select2-container {
    display: block !important;
    color: var(--bs-body-color) !important;
    margin-bottom: 0.75em !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--bs-border-color) !important;
}
.select2-container--open.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #86b7fe !important;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
}
.select2-container--default .select2-search--inline .select2-search__field {
    margin: .375rem .75rem !important;
    font-family: inherit !important;
    height: 1.4em !important;
}
.select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: var(--bs-body-color) !important;
}

h2 {
    display: inline-block;
    background-color: white;
    padding: 0.5em 1em;
    font-size: 2rem;
}
.h2-separateur {
    height: 0.65em;
    margin-top: -2.8em;
    margin-bottom: 3em;
    border-top: 0.25em solid var(--cmdb-bleu);
    border-bottom: 0.25em solid var(--cmdb-vert);
}

.index-texte {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.5em 0;
    font-size: 1.25rem;
    text-align: center;
}
.page-texte {
    min-height: 200px;;
}

a.card {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
    background-color: #00808044;
    border: none;
    margin-bottom: 1.5em;
}
a.card:hover {
    background-color: #00808066;
}
a.card .card-image {
    width: 100%;
    background-repeat: no-repeat; 
    background-size: cover; 
    background-position: center;
    height: 16rem;
    transition: all 0.25s ease-in-out;
    border-radius: var(--bs-card-border-radius) var(--bs-card-border-radius) 0 0;
}
a.card .card-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 1em 0;
}
a.card:hover .card-image {
    filter: brightness(80%);
    -webkit-filter: brightness(80%);
}
a.card .savoir-plus {
    color: var(--bs-secondary-color);
    margin-bottom: 0;
    transition: all 0.25s ease-in-out;
}
a.card:hover .savoir-plus {
    margin-left: 1em;
}
a.card.tout-voir {
    align-self: stretch;
    background-color: #ccc;
    width: 100%;
    transition: all 0.25s ease-in-out;
}
a.card.tout-voir:hover {
    align-self: stretch;
    background-color: #aaa;
    width: 100%;
}
a.card.tout-voir .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    height: 100%;
}
a.card.tout-voir .card-body p {
    font-size: 1.5rem;
    font-variant: small-caps;
    font-weight: lighter;
}

.article-title-bloc {
    display: inline-block;
    margin: 1.5em 0;
    padding: 1.5em 3em;
    background: #000000bb;
    color: white;
}
.article-title-bloc h2 {
    background: none;
    padding: 0;
}
.evenement-date {
    font-size: 1.3rem;
    font-style: italic;
    padding-top: 0.5em;
}
.img-article {
    max-width: 100%;
    margin-bottom: 1.5em;
}
.article-texte {
    font-size: 1.1em;
}

footer {
    background-color: var(--cmdb-teal);
    color:white;
    width: 100%;
    margin-top: 2em;
    padding: 1em;
}
footer a {
    color:inherit;
    text-decoration: underline;
}
footer .credits {
    margin-top: 1em;
    font-size: 0.8em;
    text-align: center;
    font-style: italic;
}


@media (max-width: 768px) { 
    /* Breakpoint Bootstrap md */
    h2 {
        padding: 0.5em;
    }
    a.card.tout-voir .card-body {
        flex-direction: row;
        justify-content: space-around;
    }
    header#main-header.scaled-down .site-identity {
        transform: scale(0.6);
    }
    header#main-header #site-title {
        font-size: 1.25em;
    }
}