/* ============================================================================
   Website template by freewebsitetemplates.com (Manes Winchester — Law Firm)
   Adapté intégralement pour BCP Reporting — Gouvernance & Portefeuille Projets IT
   Palette Authentique :
   - Vert Olive / Sauge Header : #58614e
   - Vert Mousse Foncé Bordures / Footer : #4e5944
   - Vert Sauge Clair : #728063 / #b8c6ac
   - Or Sablé / Parchemin : #e5d798 / #c4b26b
   - Fond Crème / Pierre : #e2e2e2 / #d9d9d9 / #f4f5f2
   - Typographie : "Times New Roman", Times, Georgia, serif & Arial, Helvetica, sans-serif
   ============================================================================ */

* {
    box-sizing: border-box;
}

body {
    background-color: #e2e2e2;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 22px;
    color: #525252;
    margin: 0;
    padding: 0;
}

img {
    border: 0;
    display: block;
    max-width: 100%;
}

.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

.clearfix {
    display: block;
    width: 1180px;
    max-width: 96%;
    margin: 0 auto;
}

/* ------------------------------ HEADER ------------------------------ */
#header {
    background-color: #58614e;
    border-bottom: 1px solid #ffffff;
    box-shadow: inset 0 -4px 0 #4e5944;
    padding: 26px 0 0;
}

#header > .clearfix {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 18px;
}

#header .logo {
    float: left;
    margin-bottom: 6px;
}

#header .logo a {
    display: inline-block;
    text-decoration: none;
}

/* Barre supérieure RBAC dans le Header */
.header-rbac-bar {
    background-color: #464e3e;
    border-bottom: 1px solid #68735d;
    padding: 7px 0;
    margin-top: -26px;
    margin-bottom: 18px;
    font-size: 12px;
    color: #dce3d5;
}

.header-rbac-bar .clearfix {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Navigation Principale style Manes Winchester */
.navigation {
    float: right;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.navigation li {
    float: left;
    margin-left: 14px;
    position: relative;
}

.navigation li:first-child {
    margin-left: 0;
}

.navigation li a {
    color: #b8c6ac;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 14px;
    font-weight: bold;
    line-height: 24px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease-in-out;
}

.navigation li a:hover,
.navigation li.active > a {
    color: #fff8c7;
    border-bottom: 2px solid #e5d798;
}

.navigation li .nav-badge-count {
    background: #3f4638;
    color: #e5d798;
    border: 1px solid #728063;
    font-family: Arial, sans-serif;
    font-size: 10px;
    padding: 0 5px;
    line-height: 16px;
    border-radius: 2px;
}

/* ------------------------------ CONTENTS ------------------------------ */
#contents {
    background-color: #e9eae6;
    background-image: linear-gradient(180deg, #d8dad4 0px, #e9eae6 120px, #e2e2e2 100%);
    min-height: 680px;
    padding-bottom: 44px;
    border-bottom: 1px solid #ffffff;
}

#contents > .clearfix {
    padding-top: 28px;
}

/* Typographie des Titres comme dans le Template */
h1 {
    color: #4e5944;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 29px;
    font-weight: normal;
    line-height: 34px;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    color: #58614e;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 20px;
    font-weight: normal;
    line-height: 26px;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

h3, .panel-title, .project-card-title, .copil-project-title {
    color: #4e5944;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 19px;
    font-weight: bold;
    line-height: 24px;
    margin: 0 0 8px;
}

h4 {
    color: #58614e;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    margin: 0 0 8px;
    text-transform: uppercase;
}

p {
    color: #555555;
    font-size: 13px;
    line-height: 22px;
    margin: 0 0 14px;
}

p a {
    color: #4e5944;
    text-decoration: underline;
}

/* ------------------------------ ADBOX (HERO BANNER) ------------------------------ */
#adbox {
    background-color: #dadcd5;
    border-bottom: 1px solid #ffffff;
    padding: 24px 0 28px;
    box-shadow: inset 0 -1px 0 #c5c8be;
}

#adbox .clearfix {
    background-color: #4e5944;
    border: 6px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
    justify-content: space-between;
    padding: 0;
}

#adbox img {
    width: 594px;
    max-width: 55%;
    height: auto;
    object-fit: cover;
    border-left: 4px solid #ffffff;
}

#adbox .detail {
    flex: 1;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #4e5944 0%, #58614e 100%);
    color: #ffffff;
}

#adbox .detail h1 {
    color: #ffffff;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 32px;
    line-height: 38px;
    text-transform: none;
    margin: 0 0 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

#adbox .detail p {
    color: #e5ebd9;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 20px;
    line-height: 28px;
    margin: 0 0 18px;
}

/* ------------------------------ HIGHLIGHT & TESTIMONIAL ------------------------------ */
.highlight {
    background-color: #eeeeee;
    border-bottom: 1px solid #ffffff;
    box-shadow: inset 0 -1px 0 #cccccc;
    padding: 26px 0;
}

.highlight .clearfix {
    position: relative;
}

.highlight .testimonial {
    float: right;
    width: 340px;
    margin-left: 32px;
    padding-left: 28px;
    border-left: 1px dotted #a8afa0;
}

.highlight .testimonial h2 {
    color: #58614e;
    font-size: 19px;
    margin-bottom: 8px;
}

.highlight .testimonial p {
    font-style: italic;
    color: #626262;
    margin-bottom: 6px;
}

.highlight .testimonial span {
    display: block;
    text-align: right;
    font-weight: bold;
    color: #4e5944;
    font-size: 12px;
}

/* ------------------------------ FEATURED (4 COLONNES + FRAMES) ------------------------------ */
.featured {
    padding: 30px 0 10px;
}

.featured > h2 {
    width: 1180px;
    max-width: 96%;
    margin: 0 auto 18px;
    color: #4e5944;
    font-size: 21px;
    border-bottom: 1px dotted #a8afa0;
    padding-bottom: 8px;
}

.featured ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.featured ul li {
    background: transparent;
}

/* Cadres photos du template : .frame1, .frame2, .frame4 */
.frame1, .frame2, .frame4 {
    background-color: #ffffff;
    padding: 6px;
    border: 1px solid #c9ccc4;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.14);
    margin-bottom: 12px;
    display: inline-block;
}

.frame1 {
    width: 100%;
}

.frame1 .box, .frame2 .box, .frame4 .box {
    border: 1px solid #dcded8;
    overflow: hidden;
    background: #4e5944;
}

.frame1 .box img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.frame2 {
    width: 100%;
    margin-bottom: 22px;
}

.frame2 .box img {
    width: 100%;
    height: auto;
}

.frame4 {
    float: left;
    margin-right: 16px;
    margin-bottom: 8px;
}

/* Boutons style ".more" & ".subscribe" du template */
a.more, .btn, input[type="submit"], button.btn {
    background-color: #58614e;
    background-image: linear-gradient(180deg, #68735d 0%, #4e5944 100%);
    border: 1px solid #3f4837;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 13px;
    font-weight: bold;
    line-height: 22px;
    padding: 4px 14px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

a.more:hover, .btn:hover, input[type="submit"]:hover {
    background-color: #4e5944;
    background-image: linear-gradient(180deg, #4e5944 0%, #373f30 100%);
    color: #fff8c7;
}

.btn-accent {
    background-color: #7c6832;
    background-image: linear-gradient(180deg, #967f3e 0%, #6b5929 100%);
    border-color: #52431d;
}

.btn-secondary {
    background-color: #728063;
    background-image: linear-gradient(180deg, #829172 0%, #5c6850 100%);
    border-color: #4b5541;
}

.btn-sm {
    padding: 3px 10px;
    font-size: 11.5px;
}

/* ------------------------------ SIDEBAR + MAIN (2 COLONNES DU TEMPLATE) ------------------------------ */
.template-two-cols {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-top: 10px;
}

.sidebar {
    width: 285px;
    flex-shrink: 0;
    border-right: 1px dotted #a8afa0;
    padding-right: 22px;
}

.sidebar > div {
    border-bottom: 1px dotted #a8afa0;
    margin-bottom: 22px;
    padding-bottom: 18px;
}

.sidebar > div:last-child {
    border-bottom: none;
}

.sidebar h2 {
    color: #4e5944;
    font-size: 18px;
    margin-bottom: 12px;
}

.sidebar ul.contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar ul.contact li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.sidebar ul.contact li::before {
    content: "▪";
    position: absolute;
    left: 4px;
    top: 0;
    color: #4e5944;
    font-size: 16px;
}

.sidebar ul.contact li em {
    color: #4e5944;
    font-style: normal;
    font-weight: bold;
    display: block;
}

.main {
    flex: 1;
    min-width: 0;
}

/* ------------------------------ NEWS LIST & LAWYERS SECTIONS ------------------------------ */
ul.news {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.news li {
    background-color: #f7f8f5;
    border: 1px solid #cfd3c9;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    overflow: hidden;
}

ul.news li > .box {
    float: left;
    background: #ffffff;
    padding: 5px;
    border: 1px solid #c9ccc4;
    margin-right: 20px;
    margin-bottom: 6px;
}

ul.news li p.info {
    font-size: 11.5px;
    color: #728063;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

ul.news li p.info .author {
    color: #4e5944;
    font-weight: bold;
}

/* ------------------------------ COMPOSANTS MÉTIERS ADAPTÉS AU STYLE TEMPLATE ------------------------------ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    background-color: #f7f8f5;
    border: 1px solid #c5c9be;
    border-top: 4px solid #4e5944;
    padding: 16px 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.kpi-card.kpi-accent { border-top-color: #8c7638; }
.kpi-card.kpi-emerald { border-top-color: #58614e; }
.kpi-card.kpi-warning { border-top-color: #8c3b30; }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px dotted #c5c9be;
    padding-bottom: 6px;
}

.kpi-label {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 13px;
    font-weight: bold;
    color: #4e5944;
    text-transform: uppercase;
}

.kpi-tag {
    font-size: 10.5px;
    font-weight: bold;
    background: #e2e5dc;
    color: #4e5944;
    padding: 1px 7px;
    border: 1px solid #c5c9be;
}

.kpi-value {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 25px;
    font-weight: bold;
    color: #363e2f;
    margin: 8px 0;
}

.kpi-value small {
    font-size: 14px;
    color: #6b7362;
}

.kpi-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #626262;
    padding-top: 6px;
    border-top: 1px dotted #d2d6cc;
}

/* Cartes & Panneaux style Cadre Classique */
.panel-card, .toolbar-card, .project-card, .copil-report-card {
    background-color: #f7f8f5;
    border: 1px solid #c5c9be;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.panel-header {
    border-bottom: 1px dotted #9da692;
    padding-bottom: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: #6b7362;
    font-style: italic;
}

.grid-2-cols, .projects-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

/* Tables de données style Cabinet / Registre Officiel */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px solid #c5c9be;
}

.data-table th {
    background-color: #58614e;
    color: #ffffff;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 12.5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border: 1px solid #4e5944;
    text-align: left;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px dotted #c5c9be;
    border-right: 1px solid #eceee8;
    font-size: 12.5px;
    color: #4a4a4a;
    vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f5f6f2;
}

.data-table tbody tr:hover {
    background-color: #ebeee6;
}

.cell-primary {
    font-weight: bold;
    color: #363e2f;
}

.cell-sub {
    font-size: 11.5px;
    color: #6b7362;
}

.code-pill {
    display: inline-block;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    font-weight: bold;
    background: #e6eadf;
    color: #3f4837;
    border: 1px solid #9da692;
    padding: 1px 6px;
    margin-right: 5px;
}

.link-strong {
    color: #4e5944;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
}

.link-strong:hover {
    text-decoration: underline;
    color: #2c3327;
}

/* Badges Météo & Statuts harmonisés à la palette Sauge / Or / Terre */
.rag-pill, .status-badge, .prio-badge, .tag-method {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid transparent;
}

.rag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.rag-vert, .badge-success {
    background: #dfe8d5;
    color: #354726;
    border-color: #a3b88c;
}
.rag-vert .rag-dot { background: #46692b; }

.rag-ambre, .badge-warning, .prio-haute {
    background: #f5ebd1;
    color: #735716;
    border-color: #d4bc7d;
}
.rag-ambre .rag-dot { background: #b58921; }

.rag-rouge, .badge-danger, .prio-critique {
    background: #f2dad7;
    color: #7d261c;
    border-color: #cfa09b;
}
.rag-rouge .rag-dot { background: #a83225; }

.badge-info, .prio-normale {
    background: #e3e8de;
    color: #3f4837;
    border-color: #b2bda8;
}

.badge-neutral, .prio-basse, .tag-method {
    background: #eaebe6;
    color: #525252;
    border-color: #c5c8be;
}

/* Barres de Progression */
.progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-val {
    font-weight: bold;
    font-size: 12px;
    color: #4e5944;
    min-width: 34px;
}

.progress-bar-bg {
    flex: 1;
    height: 9px;
    background: #dadcd5;
    border: 1px solid #b8bdb0;
}

.progress-bar-fill {
    height: 100%;
    background: #58614e;
}
.fill-success { background: #58614e; }
.fill-accent { background: #728063; }
.fill-warning { background: #b08d32; }
.fill-danger { background: #9e3b2e; }

/* Programmes & Flash Feed */
.programme-list, .flash-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.programme-item, .flash-card {
    background: #ffffff;
    border: 1px solid #cfd3c9;
    padding: 12px 14px;
}

.programme-top, .programme-foot, .flash-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.flash-border-vert { border-left: 4px solid #58614e; }
.flash-border-ambre { border-left: 4px solid #b08d32; }
.flash-border-rouge { border-left: 4px solid #9e3b2e; }

.flash-arbitrage, .mitigation-box {
    background: #f5f1e3;
    border: 1px solid #d4c494;
    padding: 8px 10px;
    font-size: 12px;
    color: #5c4b1b;
    margin-top: 6px;
}

/* Formulaires style ".message" du Template */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.filter-group, .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 160px;
}

.filter-group label, .form-group label, form.message label {
    color: #4e5944;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 13px;
    font-weight: bold;
}

.form-control, form.message input[type="text"], form.message textarea {
    background-color: #ffffff;
    border: 1px solid #b5baa9;
    padding: 6px 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #454545;
}

.form-control:focus {
    outline: none;
    border-color: #4e5944;
    background-color: #fcfcfa;
}

.filter-actions, .inline-update-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Cartes Projets */
.project-card-top, .project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.project-card-footer {
    border-top: 1px dotted #a8afa0;
    padding-top: 12px;
    margin-top: 12px;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #d4d8ce;
    padding: 10px;
    margin: 10px 0;
}

.meta-label {
    display: block;
    font-size: 10.5px;
    color: #728063;
    text-transform: uppercase;
    font-weight: bold;
}

.meta-val {
    font-size: 12.5px;
    font-weight: bold;
    color: #3f4837;
}

.project-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
}

.project-quick-links {
    display: flex;
    gap: 10px;
}

.btn-link {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-weight: bold;
    color: #4e5944;
    text-transform: uppercase;
    font-size: 12px;
}

/* Gantt */
.gantt-Scale-header, .gantt-row {
    display: flex;
    border: 1px solid #cfd3c9;
    border-top: none;
    background: #ffffff;
    align-items: center;
}

.gantt-Scale-header {
    background: #58614e;
    color: #ffffff;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-weight: bold;
    border-top: 1px solid #4e5944;
}

.gantt-label-col {
    width: 320px;
    flex-shrink: 0;
    padding: 8px 12px;
    border-right: 1px dotted #a8afa0;
}

.gantt-timeline-col {
    flex: 1;
    position: relative;
    padding: 10px;
}

.gantt-months {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    text-align: center;
    font-size: 11px;
}

.gantt-bar-track {
    position: relative;
    height: 22px;
    background: #e9ece4;
    border: 1px solid #c5c9be;
}

.gantt-bar {
    position: absolute;
    top: 1px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    font-size: 10.5px;
    font-weight: bold;
    color: #ffffff;
}
.gantt-bar-vert { background: #58614e; }
.gantt-bar-ambre { background: #b08d32; }
.gantt-bar-rouge { background: #9e3b2e; }
.gantt-bar-progress {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.25);
}
.gantt-bar-text { position: relative; z-index: 2; }
.gantt-today-line {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: #9e3b2e;
    z-index: 3;
}

/* Rapports COPIL & Matrice RAID */
.copil-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 1px dotted #9da692;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.week-pill {
    background: #4e5944;
    color: #e5d798;
    font-family: "Times New Roman", serif;
    font-weight: bold;
    padding: 2px 8px;
    font-size: 12px;
}

.copil-weather-matrix {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.weather-box {
    background: #ffffff;
    border: 1px solid #c5c9be;
    padding: 6px 10px;
    text-align: center;
    font-size: 11px;
}

.copil-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.copil-section {
    background: #ffffff;
    border: 1px solid #cfd3c9;
    padding: 12px;
}

.copil-section-alert {
    background: #faf6eb;
    border-color: #d4c494;
}

.raid-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 20px;
    align-items: start;
}

.risk-matrix-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background: #ffffff;
}

.risk-matrix-table th, .risk-matrix-table td {
    border: 1px solid #b5baa9;
    padding: 8px 5px;
    font-size: 11.5px;
}

.risk-matrix-table th {
    background: #58614e;
    color: #ffffff;
    font-family: "Times New Roman", serif;
}

.cell-crit-high { background: #f2dad7; color: #7d261c; }
.cell-crit-med { background: #f5ebd1; color: #735716; }
.cell-crit-low { background: #dfe8d5; color: #354726; }
.matrix-score { font-weight: bold; display: block; }
.matrix-badge {
    background: #4e5944;
    color: #ffffff;
    font-size: 10px;
    padding: 1px 5px;
}

/* Modales */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(38, 44, 33, 0.72);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-dialog {
    background: #f4f5f1;
    border: 4px solid #ffffff;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 700px;
}
.modal-header {
    background: #58614e;
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4e5944;
}
.modal-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 17px;
    text-transform: uppercase;
}
.modal-close {
    background: none;
    border: none;
    color: #e5d798;
    font-size: 18px;
    cursor: pointer;
}
.modal-body {
    padding: 18px 20px;
    max-height: 74vh;
    overflow-y: auto;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-group.full-width { grid-column: span 2; }
.modal-footer {
    padding: 12px 20px;
    background: #e6e8e1;
    border-top: 1px solid #c5c9be;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.flash-banner {
    padding: 12px 16px;
    margin-bottom: 18px;
    border: 1px solid #a3b88c;
    background: #dfe8d5;
    color: #354726;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flash-banner.error {
    background: #f2dad7;
    border-color: #cfa09b;
    color: #7d261c;
}

/* ------------------------------ FOOTER & FOOTNOTE (IDENTIQUE AU TEMPLATE) ------------------------------ */
#footer {
    background-color: #d9d9d9;
    border-top: 1px solid #bbbbbb;
}

#footer > .clearfix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 28px 0;
    gap: 0;
}

#footer .section {
    padding: 0 24px;
    border-left: 1px dotted #999999;
}

#footer .section:first-child {
    border-left: none;
    padding-left: 0;
}

#footer .section h4 {
    color: #58614e;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 10px;
    text-transform: uppercase;
}

#footer .section p {
    color: #626262;
    font-size: 12px;
    line-height: 20px;
    margin: 0 0 6px;
}

#footer .section.contact p span {
    font-weight: bold;
    color: #4e5944;
    text-transform: uppercase;
}

#footer a.subscribe {
    background-color: #58614e;
    background-image: linear-gradient(180deg, #68735d 0%, #4e5944 100%);
    border: 1px solid #3f4837;
    color: #ffffff;
    display: inline-block;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 12px;
    font-weight: bold;
    line-height: 24px;
    padding: 2px 14px;
    text-decoration: none;
    text-transform: uppercase;
    margin-top: 6px;
}

#footer a.subscribe:hover {
    background-color: #4e5944;
    color: #fff8c7;
}

#footnote {
    background-color: #4e5944;
    border-top: 1px solid #ffffff;
    padding: 14px 0;
}

#footnote .clearfix {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#footnote p {
    color: #b8c6ac;
    font-size: 11.5px;
    margin: 0;
}

#footnote .connect {
    display: flex;
    gap: 8px;
}

#footnote .connect a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #3b4433;
    border: 1px solid #728063;
    color: #e5d798;
    text-decoration: none;
    font-family: "Times New Roman", serif;
    font-size: 11px;
    font-weight: bold;
}

#footnote .connect a:hover {
    background-color: #e5d798;
    color: #3b4433;
}

.text-success { color: #355e1b; }
.text-danger { color: #8c271b; }
.text-muted { color: #757575; }

@media (max-width: 1024px) {
    #adbox .clearfix, .template-two-cols {
        flex-direction: column;
    }
    #adbox img, .sidebar {
        width: 100%;
        max-width: 100%;
        border: none;
    }
    .featured ul, .kpi-grid, .grid-2-cols, .projects-cards-grid, .copil-sections-grid, .raid-layout, #footer > .clearfix {
        grid-template-columns: 1fr;
    }
}
