/* ==========================================================================
   1. STYLES GÉNÉRAUX & TYPOGRAPHIE
   ========================================================================== */
body {
    color: #0a6eb4;
    font-size: 1.125rem;
    line-height: 1.5;
}

h2 {
    margin: 0 0 1.25rem 0;
    padding: 1rem 0 0 0;
    color: var(--primary);
    font-family: 'Geologica', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    padding: 1rem 0 0 0;
    color: var(--primary);
    font-family: 'Geologica', sans-serif;
    font-size: 1.625rem;
    font-weight: 600;
    line-height: 1.2;
}

h4 {
    padding: 1rem 0 0 0;
    color: #0066a1;
    font-family: 'Geologica', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: justify;
}

p {
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    color: #0a6eb4;
    text-align: justify;
}

hr {
    clear: both;
    margin: 1rem 0;
    border: 0.09rem solid #ffffff !important;
    background-color: #ffffff !important;
}

ul li, 
ol li {
    margin: 0.375rem 0;
    list-style-position: outside;
    line-height: 1.5;
    color: #0a6eb4;
    text-align: left;
}

/* ==========================================================================
   2. FORMULAIRES & TABLEAUX
   ========================================================================== */
input, 
select, 
textarea {
    width: 100%;
    transition: 0.18s ease-out;
    vertical-align: bottom;
    border: 0.25rem solid var(--primary-damped);
    border-radius: 0.4375rem;
    outline: none;
    background: #1038e026;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: bold;
    line-height: 1.5;
}

.form-item label {
    display: inline-block;
    margin-bottom: 0.625rem;
    padding: 0 0.625rem;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: normal;
}

table {
    margin: 0.9375rem 0;
    border-collapse: separate;
    border-top: 0.0625rem solid #d6dbdd;
    border-left: 0.0625rem solid var(--primary-vivid-25);
    border-right: 0;
    border-bottom: 0;
}

td, 
th {
    padding: 0.625rem 0.9375rem;
    text-align: left;
    border-top: 0;
    border-left: 0;
    border-right: 0.0625rem solid var(--primary-vivid-25);
    border-bottom: 0.0625rem solid var(--primary-vivid-25);
}

td {
    background-color: #ddd;
}

th {
    background: #75757575;
    font-weight: bold;
}

/* ==========================================================================
   3. EN-TÊTE & HERO (SANS ESPACES SUPERFLUS)
   ========================================================================== */
#hero .block-page-title-block h1 {
    margin: 0;
    padding: 2.125rem 1.25rem;
    color: #fff;
    font-size: 3rem;
    background: #1379a7;
}

#header p,
#header div {
    line-height: 1.1 !important;
    margin: 0 0 0 0;
    padding: 0 !important;
}

#header h2 {
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 0 5px 0 !important;
}

#header .block-system-branding-block a.logo .title,
#header .block-system-branding-block a.logo .title .site-name,
#header .block-system-branding-block a.logo .title .site-slogan {
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 0 !important;
}



/* ==========================================================================
   4. BARRES LATÉRALES (TEXTES PLEINE LARGEUR & STYLE EN CREUX)
   ========================================================================== */
.sidebar .block {
    margin-bottom: 0;
}

.region-sidebar-first,
.region-sidebar-second,
#sidebar-first,
#sidebar-second {
    box-sizing: border-box !important;
}

/* Forcer tous les éléments internes à occuper 100% de la largeur du bloc */
.region-sidebar-first *,
.region-sidebar-second * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

.region-sidebar-first h3,
.region-sidebar-second h3 {
    margin: 0;
    padding: 0;
    width: 100% !important;
    color: #757575;
    font-family: 'Geologica', sans-serif;
    font-size: 1.2rem;
    text-align: left;
}

.region-sidebar-first h4,
.region-sidebar-second h4 {
    margin: 0 0 0.2rem 0;
    padding: 1rem 0 0 0;
    width: 100% !important;
    color: #757575;
    font-family: 'Geologica', sans-serif;
    font-size: 1.375rem;
    font-weight: 300;
    line-height: 1.1;
    text-align: left;
}

.region-sidebar-first p,
.region-sidebar-second p {
    margin: 0.375rem 0;
    padding: 0;
    width: 100% !important;
    color: #757575;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
}

.region-sidebar-first ul li, 
.region-sidebar-second ul li, 
.region-sidebar-first ol li, 
.region-sidebar-second ol li {
    margin: 0 0 0.375rem 0;
    padding: 0;
    width: 100% !important;
    color: #757575;
    font-size: 1rem;
    line-height: 1.5;
    list-style-position: outside;
    text-align: left;
}

.region-sidebar-first ul, 
.region-sidebar-second ul, 
.region-sidebar-first ol, 
.region-sidebar-second ol {
    margin: 0 0 1rem 0;
    padding: 0.125rem 0 0.125rem 0.9375rem;
    width: 100% !important;
}

.region-sidebar-first hr,
.region-sidebar-second hr {
    border-color: #ffffff !important;
    background-color: #ffffff !important;
}

.region-sidebar-first a,
.region-sidebar-second a,
.region-sidebar-first a:visited,
.region-sidebar-second a:active {
    text-decoration: none;
    color: #757575;
}

.region-sidebar-first a:hover,
.region-sidebar-second a:hover {
    color: #aaa;
    transition: color 0.3s ease;
}

/* ==========================================================================
   5. PIED DE PAGE
   ========================================================================== */
#footer .block-menu {
    padding-bottom: 0;
}

#footer .block .field p {
    margin: 0;
    line-height: 1.6;
    color: #fff;
}

#footer .block-menu ul.menu li a {
    display: block;
    padding: 0.2rem 0 0.3rem 0;
    text-decoration: none;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: bolder;
}

#footer .block-menu ul.menu li a:hover {
    color: #fff;
}

/* ==========================================================================
   6. RESPONSIVE / MEDIA QUERY (ÉCRANS ≥ 850PX)
   ========================================================================== */
@media (min-width: 850px) {
    #center {
        overflow: hidden;
        padding: 1rem 0;
    }

    #center, 
    #center .region-center {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 1.5rem;
    }

    #center.two-sidebars .region-center {
        display: grid;
        grid-template-columns: 13.75rem 1fr 13.75rem;
        gap: 10px;
    }

    /* Barres latérales : Largeur 20% + Effet en creux */
    .region-sidebar-first,
    .region-sidebar-second,
    #sidebar-first,
    #sidebar-second {
        flex: 0 0 20% !important;
        width: 20% !important;
        max-width: 20% !important;
        min-width: 20% !important;
        box-sizing: border-box !important;
        background-color: #d2e7f6;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #d0d7de;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
		width: 100% !important;
		max-width: 100% !important;
		text-align: left !important;
    }

    /* Zone centrale : Effet en relief */
    #center .region-content,
    .region-content {
        flex: 1 !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        background-color: #eeeeee;
        padding: 15px;
        border-radius: 10px;
        border: 1px solid rgba(10, 110, 180, 0.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    /* En-tête / Logo desktop */
    #header .block-system-branding-block {
        margin: 0 auto 0 0;
    }

    #header .block-system-branding-block a.logo {
        display: flex;
        padding: 0.5em 0 0 0;
        text-decoration: none;
    }

    #header .block-system-branding-block a.logo .image {
        display: block;
        padding-right: 1.125rem;
    }

    #header .block-system-branding-block a.logo .image img {
        width: auto;
        height: 10.5rem;
    }

    #header .block-system-branding-block a.logo .title {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    #header .block-system-branding-block a.logo .title .site-name {
        display: block;
        color: var(--primary-dark);
        font-family: 'Geologica', sans-serif;
        font-size: 2.5rem;
        font-weight: 600;
    }

    #header .block-system-branding-block a.logo .title .site-slogan {
        position: relative;
        top: -0.3125rem;
        display: block;
        color: var(--primary-dark);
        font-family: 'Geologica', sans-serif;
        font-size: 1.68rem;
        font-weight: 100;
    }

    /* Menu de navigation desktop */
    #menu .block-menu ul.menu > li > a, 
    #menu .block-menu ul.menu > li > span {
        display: block;
        margin: 0;
        padding: 0 1.2rem;
        text-align: center;
        white-space: nowrap;
        text-decoration: none;
        color: var(--white);
        font-family: 'Geologica', sans-serif;
        font-size: 1.125rem;
        font-weight: 500;
        line-height: 4.1875rem;
    }

    /* Pied de page desktop */
    #footer {
        padding: 1rem 0 0 0;
    }

    #copyright {
        padding: 0;
    }

    #copyright .region {
        display: flex;
        justify-content: center;
        padding-top: 0;
    }
}