/* ===== HEADER ===== */
.container-header {
    z-index: 10;
    background-color: var(--cassiopeia-color-primary);
    background-image: linear-gradient(89deg, #006bb8 28%, #17239e 139%);
    position: relative;
    box-shadow: inset 0 3px 3px #ff8a0f;
}

/* ===== FOOTER ===== */
.footer {
    color: #fff;
    background-color: var(--cassiopeia-color-primary);
    background-image: linear-gradient(89deg, #006bb8 28%, #17239e 139%);
    margin-top: 1em;
}

/* ===== LINKS ===== */
a {
    color: #565859;
}
a:hover {
    color: #0058ff;
}
a:not([class]) {
    text-decoration: none;
}

/* ===== HEADINGS ===== */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-family: var(--cassiopeia-font-family-headings, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-weight: normal;
}

/* === Harmonisation des tailles de titres (version adoucie) === */
h1, .h1 {
    font-size: 1.40rem; /* Titre principal */
    font-weight: 500;   /* Moins gras, plus harmonieux */
    margin-bottom: 0.6em;
}

h2, .h2 {
    font-size: 1.35rem; /* Sous-titre */
    font-weight: 500;
    margin-top: 1.35em;
    margin-bottom: 0.5em;
}

h3, .h3 {
    font-size: 1.2rem;  /* Sous-sous-titre */
    font-weight: 500;
    margin-top: 0.6em;
    margin-bottom: 0.4em;
    text-align: left;
}

h4, .h4 {
    font-size: 1.0rem;  /* Sous-sous-sous-titre */
    font-weight: 500;
    margin-top: 0.6em;
    margin-bottom: 0.3em;
    /*text-align: left; */
}

/* Centrer uniquement les titres des modules latéraux */
.sidebar-left h3,
.sidebar-right h3,
.moduletable h3 {
    text-align: center;
}

/* ===== LAYOUT & CARDS ===== */
.metismenu.mod-menu .metismenu-item {
    flex-wrap: wrap;
    align-items: center;
    padding: .5em 0.6em;
    font-size: 1.1rem;
    line-height: 1.5;
    display: flex;
}

.card {
    --card-spacer-y: 1rem;
    --card-spacer-x: 1rem;
    --card-title-spacer-y: .5rem;
    --card-border-width: var(--border-width);
    --card-border-color: #dfe3e7;
    --card-border-radius: var(--border-radius);
    --card-inner-border-radius: calc(var(--border-radius) - (var(--border-width)));
    --card-cap-padding-y: .5rem;
    --card-cap-padding-x: 1rem;
    --card-cap-bg: rgba(var(--body-color-rgb), .03);
    --card-cap-color: rgba(var(--body-color-rgb), .63);
    --card-bg: rgba(var(--body-color-rgb), .01);
    --card-group-margin: .5em;
    color: var(--body-color);
    word-wrap: break-word;
    box-shadow: 1px 1px 2px 2px #f0f0f0;
}

.card-header {
    padding: var(--card-cap-padding-y) var(--card-cap-padding-x);
    color: #fff;
    background-color: #006bb8;
    border-bottom: var(--card-border-width) solid var(--card-border-color);
    margin-bottom: 0;
}

/* ===== BODY TEXT ===== */
body {
    font-family: var(--body-font-family);
    font-size: var(--body-font-size);
    font-weight: var(--body-font-weight);
    line-height: var(--body-line-height);
    color: #414446;
    text-align: var(--body-text-align);
    -webkit-text-size-adjust: 100%;
}

/* ===== MISC ===== */
.text-muted {
    color: #6a7783bf !important;
}

.mod-list {
    padding-inline-start: inherit;
    list-style: inherit;
}

.blog-item .item-image {
    margin-top: 3px;
    margin-bottom: 15px;
    overflow: hidden;
    text-align: center;
}

figure {
    margin: 0 0 2em;
    text-align: center;
}

.shadow-lg {
    box-shadow: 0 0 0rem 0px #0000002d !important;
}
/* === Correction titres RTL (articles arabes) === */
html[dir="rtl"] h3,
html[dir="rtl"] .article-content h3 {
  text-align: right !important;
  direction: rtl !important;
}
/* === Correction : titres des modules centrés même en arabe === */
html[dir="rtl"] .sidebar-left h3,
html[dir="rtl"] .sidebar-right h3,
html[dir="rtl"] .moduletable h3 {
    text-align: center !important;
}
/* ===== BLOCKQUOTE ===== */
blockquote {
    margin: 1.2em 1.5em;
    padding: 0.8em 1em;
    border-left: 4px solid #006bb8;
    background: #f5f7fa;
    font-style: italic;
    color: #333;
    border-radius: 4px;
}

blockquote p {
    margin: 0;
}

html[dir="rtl"] blockquote {
    border-left: none;
    border-right: 4px solid #006bb8;
    text-align: right;
}