/* IEDF - charte graphique commune
   Couleurs du logo : vert #497868 (principal), bordeaux #9e4352 (accent / alerte).
   Charge en dernier dans chaque en-tete, apres les CSS du theme. */
:root { --iedf-vert: #497868; --iedf-vert-fonce: #3a6053; --iedf-bordeaux: #9e4352; --iedf-bordeaux-fonce: #823642; --blue: #497868; --primary: #497868; --danger: #9e4352; --red: #9e4352; }

/* === Theme Qovex (espaces enseignant, etudiant, scolarite, messagerie...) === */
a { color: #497868; }
a:hover { color: #2f5044; }
.invalid-feedback { color: #9e4352; }
.invalid-tooltip { background-color: rgba(158, 67, 82, 0.9); }
.was-validated .form-control:invalid, .form-control.is-invalid { border-color: #9e4352; }
.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { border-color: #9e4352; box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.25); }
.was-validated .custom-select:invalid, .custom-select.is-invalid { border-color: #9e4352; }
.was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus { border-color: #9e4352; box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.25); }
.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { color: #9e4352; }
.was-validated .custom-control-input:invalid ~ .custom-control-label, .custom-control-input.is-invalid ~ .custom-control-label { color: #9e4352; }
.was-validated .custom-control-input:invalid ~ .custom-control-label::before, .custom-control-input.is-invalid ~ .custom-control-label::before { border-color: #9e4352; }
.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, .custom-control-input.is-invalid:focus ~ .custom-control-label::before { box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.25); }
.was-validated .custom-control-input:invalid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-invalid:focus:not(:checked) ~ .custom-control-label::before { border-color: #9e4352; }
.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label { border-color: #9e4352; }
.was-validated .custom-file-input:invalid:focus ~ .custom-file-label, .custom-file-input.is-invalid:focus ~ .custom-file-label { border-color: #9e4352; box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.25); }
.btn:focus, .btn.focus { box-shadow: 0 0 0 0.15rem rgba(73, 120, 104, 0.25); }
.btn-primary { background-color: #497868; border-color: #497868; }
.btn-primary:hover { background-color: #3d6557; border-color: #3a6053; }
.btn-primary:focus, .btn-primary.focus { background-color: #3d6557; border-color: #3a6053; box-shadow: 0 0 0 0.15rem rgba(100, 140, 127, 0.5); }
.btn-primary.disabled, .btn-primary:disabled { background-color: #497868; border-color: #497868; }
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle { background-color: #3a6053; border-color: #365a4e; }
.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { box-shadow: 0 0 0 0.15rem rgba(100, 140, 127, 0.5); }
.btn-danger { background-color: #9e4352; border-color: #9e4352; }
.btn-danger:hover { background-color: #8a3a47; border-color: #823642; }
.btn-danger:focus, .btn-danger.focus { background-color: #8a3a47; border-color: #823642; }
.btn-danger.disabled, .btn-danger:disabled { background-color: #9e4352; border-color: #9e4352; }
.btn-danger:not(:disabled):not(.disabled):active, .btn-danger:not(:disabled):not(.disabled).active, .show > .btn-danger.dropdown-toggle { background-color: #823642; border-color: #7a333e; }
.btn-outline-primary { color: #497868; border-color: #497868; }
.btn-outline-primary:hover { background-color: #497868; border-color: #497868; }
.btn-outline-primary:focus, .btn-outline-primary.focus { box-shadow: 0 0 0 0.15rem rgba(73, 120, 104, 0.5); }
.btn-outline-primary.disabled, .btn-outline-primary:disabled { color: #497868; }
.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, .show > .btn-outline-primary.dropdown-toggle { background-color: #497868; border-color: #497868; }
.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus { box-shadow: 0 0 0 0.15rem rgba(73, 120, 104, 0.5); }
.btn-outline-danger { color: #9e4352; border-color: #9e4352; }
.btn-outline-danger:hover { background-color: #9e4352; border-color: #9e4352; }
.btn-outline-danger:focus, .btn-outline-danger.focus { box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.5); }
.btn-outline-danger.disabled, .btn-outline-danger:disabled { color: #9e4352; }
.btn-outline-danger:not(:disabled):not(.disabled):active, .btn-outline-danger:not(:disabled):not(.disabled).active, .show > .btn-outline-danger.dropdown-toggle { background-color: #9e4352; border-color: #9e4352; }
.btn-outline-danger:not(:disabled):not(.disabled):active:focus, .btn-outline-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-danger.dropdown-toggle:focus { box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.5); }
.btn-link { color: #497868; }
.btn-link:hover { color: #2f5044; }
.custom-control-input:checked ~ .custom-control-label::before { border-color: #497868; background-color: #497868; }
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { border-color: #497868; background-color: #497868; }
.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-switch .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-select:focus { box-shadow: 0 0 0 0.15rem rgba(73, 120, 104, 0.25); }
.custom-range::-webkit-slider-thumb { background-color: #497868; }
.custom-range::-moz-range-thumb { background-color: #497868; }
.custom-range::-ms-thumb { background-color: #497868; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background-color: #497868; }
.page-link:hover { color: #2f5044; }
.page-link:focus { box-shadow: 0 0 0 0.15rem rgba(73, 120, 104, 0.25); }
.page-item.active .page-link { background-color: #497868; border-color: #497868; }
.badge-primary { background-color: #497868; }
a.badge-primary:hover, a.badge-primary:focus { background-color: #3a6053; }
a.badge-primary:focus, a.badge-primary.focus { box-shadow: 0 0 0 0.15rem rgba(73, 120, 104, 0.5); }
.badge-danger { background-color: #9e4352; }
a.badge-danger:hover, a.badge-danger:focus { background-color: #823642; }
a.badge-danger:focus, a.badge-danger.focus { box-shadow: 0 0 0 0.15rem rgba(158, 67, 82, 0.5); }
.progress-bar { background-color: #497868; }
.list-group-item.active { background-color: #497868; border-color: #497868; }
.bg-primary { background-color: #497868 !important; }
a.bg-primary:hover, a.bg-primary:focus, button.bg-primary:hover, button.bg-primary:focus { background-color: #3a6053 !important; }
.bg-danger { background-color: #9e4352 !important; }
a.bg-danger:hover, a.bg-danger:focus, button.bg-danger:hover, button.bg-danger:focus { background-color: #823642 !important; }
.border-primary { border-color: #497868 !important; }
.border-danger { border-color: #9e4352 !important; }
.text-danger { color: #9e4352 !important; }
.bg-soft-danger { background-color: rgba(158, 67, 82, 0.25) !important; }
.badge-soft-primary { color: #497868; background-color: rgba(73, 120, 104, 0.18); }
.badge-soft-primary[href]:hover, .badge-soft-primary[href]:focus { color: #497868; background-color: rgba(73, 120, 104, 0.4); }
.badge-soft-danger { color: #9e4352; background-color: rgba(158, 67, 82, 0.18); }
.badge-soft-danger[href]:hover, .badge-soft-danger[href]:focus { color: #9e4352; background-color: rgba(158, 67, 82, 0.4); }
.nav-tabs-custom .nav-item .nav-link::after { background: #497868; }
.nav-tabs-custom .nav-item .nav-link.active { color: #497868; }
body[data-topbar=dark] #page-topbar, body[data-topbar=colored] #page-topbar { background-color: #497868; }
#sidebar-menu ul li a:hover { color: #497868; }
#sidebar-menu ul li a:hover i { color: #497868; }
.mm-active { color: #497868 !important; }
.mm-active .active { color: #497868 !important; }
.mm-active .active i { color: #497868 !important; }
.mm-active > i { color: #497868 !important; }
.vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a:hover, .vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a:active, .vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a:focus { color: #497868; }
.vertical-collpsed .vertical-menu #sidebar-menu > ul > li:hover > a { color: #497868; }
.vertical-collpsed .vertical-menu #sidebar-menu > ul > li:hover > a i { color: #497868; }
.vertical-collpsed .vertical-menu #sidebar-menu > ul > li:hover > ul a:hover { color: #497868; }
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu ul li.mm-active .active { color: #497868 !important; }
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu ul li.mm-active .active i { color: #497868 !important; }
body[data-sidebar=colored] .vertical-menu { background-color: #497868; }
body[data-sidebar=colored] .navbar-brand-box { background-color: #497868; }
body[data-sidebar=colored].vertical-collpsed .vertical-menu #sidebar-menu ul li.mm-active .active { color: #497868 !important; }
.topnav .navbar-nav .nav-link:focus, .topnav .navbar-nav .nav-link:hover { color: #497868; }
.topnav .navbar-nav .dropdown-item.active, .topnav .navbar-nav .dropdown-item:hover { color: #497868; }
.topnav .navbar-nav .nav-item .nav-link.active { color: #497868; }
.topnav .navbar-nav .dropdown.active > a { color: #497868; }
@media (max-width: 991.98px) { .topnav .dropdown .dropdown-item.active, .topnav .dropdown .dropdown-item:active { color: #497868; } }
@media (min-width: 992px) { body[data-layout=horizontal][data-topbar=light] .topnav { background-color: #497868; } }
body[data-layout=horizontal][data-topbar=colored] #page-topbar, body[data-layout=horizontal][data-topbar=dark] #page-topbar { background-color: #497868; }
body[data-layout=horizontal][data-topbar=dark] #page-topbar { background-color: #497868; }
@media (min-width: 992px) { body[data-layout=detached] .vertical-menu .user-img img { border: 2px dashed #497868; } }
.waves-effect.waves-primary .waves-ripple { background-color: rgba(73, 120, 104, 0.4); }
.waves-effect.waves-danger .waves-ripple { background-color: rgba(158, 67, 82, 0.4); }
.avatar-title { background-color: #497868; }
.chase-dot:before { background-color: #497868; }
.review-carousel .carousel-control-icon { color: #497868; background-color: rgba(73, 120, 104, 0.25); }
.icon-demo-content .col-lg-4:hover i { color: #497868; }
.fc-state-down, .fc-state-active, .fc-state-disabled { background-color: #497868; }
.fc-event, .fc-event-dot { background-color: #497868; }
#session-timeout-dialog .countdown-holder { color: #9e4352; }
#session-timeout-dialog .btn-default { color: #9e4352; }
.irs--round .irs-bar, .irs--round .irs-to, .irs--round .irs-from, .irs--round .irs-single { background: #497868 !important; }
.irs--round .irs-to:before, .irs--round .irs-from:before, .irs--round .irs-single:before { border-top-color: #497868; }
.irs--round .irs-handle { border: 2px solid #497868; }
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { background: #497868; }
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step, .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { background: rgba(73, 120, 104, 0.3); }
.error { color: #9e4352; }
.parsley-error { border-color: #9e4352; }
.parsley-errors-list > li { color: #9e4352; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #497868; }
.select2-container--default .select2-results__option[aria-selected=true]:hover { background-color: #497868; }
input[switch]:checked + label { background-color: #497868; }
input[switch]:checked + label { background-color: #497868; }
input[switch=bool] + label { background-color: #9e4352; }
input[switch=primary]:checked + label { background-color: #497868; }
input[switch=danger]:checked + label { background-color: #9e4352; }
.datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td .active.disabled, .datepicker table tr td.active.disabled:hover, .datepicker table tr td.today, .datepicker table tr td.today:hover, .datepicker table tr td.today.disabled, .datepicker table tr td.today.disabled:hover, .datepicker table tr td.selected, .datepicker table tr td.selected:hover, .datepicker table tr td.selected.disabled, .datepicker table tr td.selected.disabled:hover { background-color: #497868 !important; }
.wizard > .steps .current a, .wizard > .steps .current a:active, .wizard > .steps .current a:hover { background-color: #497868; }
.wizard > .steps .disabled a, .wizard > .steps .disabled a:active, .wizard > .steps .disabled a:hover, .wizard > .steps .done a, .wizard > .steps .done a:active, .wizard > .steps .done a:hover { background-color: #c9dcd5; color: #497868; }
.wizard > .steps .disabled a .number, .wizard > .steps .disabled a:active .number, .wizard > .steps .disabled a:hover .number, .wizard > .steps .done a .number, .wizard > .steps .done a:active .number, .wizard > .steps .done a:hover .number { border-color: #497868; }
.wizard > .steps .number { background-color: rgba(73, 120, 104, 0.25); }
.wizard > .actions a, .wizard > .actions a:active, .wizard > .actions a:hover { background-color: #497868; }
.wizard > .actions .disabled a, .wizard > .actions .disabled a:active, .wizard > .actions .disabled a:hover { background-color: #497868; }
.table-rep-plugin .btn-group .btn-default.btn-primary { background-color: #497868; border-color: #497868; box-shadow: 0 0 0 2px rgba(73, 120, 104, 0.5); }
.table-rep-plugin .checkbox-row input[type=checkbox]:checked + label::before { background-color: #497868; border-color: #497868; }
.table-rep-plugin .fixed-solution .sticky-table-header { background-color: #497868; }
@media (max-width: 991.98px) { .fixed-solution .sticky-table-header { background-color: #497868; } }
.table-editable tbody td.focus { box-shadow: inset 0 0 1px 1px #497868 !important; }
.gmaps-overlay { background: #497868; }
.gmaps-overlay_arrow.above { border-top: 16px solid #497868; }
.gmaps-overlay_arrow.below { border-bottom: 16px solid #497868; }
.mail-list a.active { color: #9e4352; }
.message-list li.active, .message-list li.active:hover { box-shadow: inset 3px 0 0 #497868; }

/* === Theme Bracket (administration, bibliotheque, emploi, demandes) === */
a { color: #497868; }
a:hover { color: #2f5044; }
.invalid-feedback { color: #9e4352; }
.invalid-tooltip { background-color: rgba(158, 67, 82, 0.9); }
.was-validated .form-control:invalid, .was-validated .dataTables_filter input:invalid, .dataTables_filter .was-validated input:invalid, .form-control.is-invalid, .dataTables_filter input.is-invalid, .dataTables_filter input.parsley-error, input.form-control.parsley-error, textarea.form-control.parsley-error, .was-validated .custom-select:invalid, .custom-select.is-invalid, input.custom-select.parsley-error, textarea.custom-select.parsley-error { border-color: #9e4352; }
.was-validated .form-control:invalid:focus, .was-validated .dataTables_filter input:invalid:focus, .dataTables_filter .was-validated input:invalid:focus, .form-control.is-invalid:focus, .dataTables_filter input.is-invalid:focus, .dataTables_filter input.parsley-error:focus, input.form-control.parsley-error:focus, textarea.form-control.parsley-error:focus, .was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus, input.custom-select.parsley-error:focus, textarea.custom-select.parsley-error:focus { border-color: #9e4352; box-shadow: 0 0 0 0.2rem rgba(158, 67, 82, 0.25); }
.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label, input.form-check-input.parsley-error ~ .form-check-label, textarea.form-check-input.parsley-error ~ .form-check-label { color: #9e4352; }
.was-validated .custom-control-input:invalid ~ .custom-control-label, .custom-control-input.is-invalid ~ .custom-control-label, input.custom-control-input.parsley-error ~ .custom-control-label, textarea.custom-control-input.parsley-error ~ .custom-control-label { color: #9e4352; }
.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, .custom-control-input.is-invalid:focus ~ .custom-control-label::before, input.custom-control-input.parsley-error:focus ~ .custom-control-label::before, textarea.custom-control-input.parsley-error:focus ~ .custom-control-label::before { box-shadow: 0 0 0 1px #E9ECEF, 0 0 0 0.2rem rgba(158, 67, 82, 0.25); }
.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label, input.custom-file-input.parsley-error ~ .custom-file-label, textarea.custom-file-input.parsley-error ~ .custom-file-label { border-color: #9e4352; }
.was-validated .custom-file-input:invalid:focus ~ .custom-file-label, .custom-file-input.is-invalid:focus ~ .custom-file-label, input.custom-file-input.parsley-error:focus ~ .custom-file-label, textarea.custom-file-input.parsley-error:focus ~ .custom-file-label { box-shadow: 0 0 0 0.2rem rgba(158, 67, 82, 0.25); }
.btn:focus, .sp-container button:focus, .btn.focus, .sp-container button.focus { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.btn-primary { background-color: #497868; border-color: #497868; }
.btn-primary:hover { background-color: #3d6557; border-color: #3a6053; }
.btn-primary:focus, .btn-primary.focus { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.5); }
.btn-primary.disabled, .btn-primary:disabled { background-color: #497868; border-color: #497868; }
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle { background-color: #3a6053; border-color: #365a4e; }
.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.5); }
.btn-danger { background-color: #9e4352; border-color: #9e4352; }
.btn-danger:hover { background-color: #8a3a47; border-color: #823642; }
.btn-danger:focus, .btn-danger.focus { box-shadow: 0 0 0 0.2rem rgba(158, 67, 82, 0.5); }
.btn-danger.disabled, .btn-danger:disabled { background-color: #9e4352; border-color: #9e4352; }
.btn-danger:not(:disabled):not(.disabled):active, .btn-danger:not(:disabled):not(.disabled).active, .show > .btn-danger.dropdown-toggle { background-color: #823642; border-color: #7a333e; }
.btn-danger:not(:disabled):not(.disabled):active:focus, .btn-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-danger.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(158, 67, 82, 0.5); }
.btn-outline-primary { color: #497868; border-color: #497868; }
.btn-outline-primary:hover { background-color: #497868; border-color: #497868; }
.btn-outline-primary:focus, .btn-outline-primary.focus { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.5); }
.btn-outline-primary.disabled, .btn-outline-primary:disabled { color: #497868; }
.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, .show > .btn-outline-primary.dropdown-toggle { background-color: #497868; border-color: #497868; }
.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.5); }
.btn-outline-danger { color: #9e4352; border-color: #9e4352; }
.btn-outline-danger:hover { background-color: #9e4352; border-color: #9e4352; }
.btn-outline-danger:focus, .btn-outline-danger.focus { box-shadow: 0 0 0 0.2rem rgba(158, 67, 82, 0.5); }
.btn-outline-danger.disabled, .btn-outline-danger:disabled { color: #9e4352; }
.btn-outline-danger:not(:disabled):not(.disabled):active, .btn-outline-danger:not(:disabled):not(.disabled).active, .show > .btn-outline-danger.dropdown-toggle { background-color: #9e4352; border-color: #9e4352; }
.btn-outline-danger:not(:disabled):not(.disabled):active:focus, .btn-outline-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-danger.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(158, 67, 82, 0.5); }
.btn-link { color: #497868; }
.btn-link:hover { color: #2f5044; }
.dropdown-item.active, .dropdown-item:active { background-color: #497868; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: #497868; }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 1px #E9ECEF, 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before { background-color: #497868; }
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { background-color: #497868; }
.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-radio .custom-control-input:checked ~ .custom-control-label::before { background-color: #497868; }
.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: rgba(73, 120, 104, 0.5); }
.custom-file-input:focus ~ .custom-file-label { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.custom-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px #E9ECEF, 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.custom-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #E9ECEF, 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.custom-range:focus::-ms-thumb { box-shadow: 0 0 0 1px #E9ECEF, 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.custom-range::-webkit-slider-thumb { background-color: #497868; }
.custom-range::-moz-range-thumb { background-color: #497868; }
.custom-range::-ms-thumb { background-color: #497868; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background-color: #497868; }
.page-link { color: #497868; }
.page-link:hover { color: #2f5044; }
.page-link:focus { box-shadow: 0 0 0 0.2rem rgba(73, 120, 104, 0.25); }
.page-item.active .page-link { background-color: #497868; border-color: #497868; }
.badge-primary { background-color: #497868; }
.badge-primary[href]:hover, .badge-primary[href]:focus { background-color: #3a6053; }
.badge-danger { background-color: #9e4352; }
.badge-danger[href]:hover, .badge-danger[href]:focus { background-color: #823642; }
.progress-bar { background-color: #497868; }
.list-group-item.active { background-color: #497868; border-color: #497868; }
.bg-primary { background-color: #497868 !important; }
a.bg-primary:hover, a.bg-primary:focus, button.bg-primary:hover, button.bg-primary:focus { background-color: #3a6053 !important; }
.bg-danger { background-color: #9e4352 !important; }
a.bg-danger:hover, a.bg-danger:focus, button.bg-danger:hover, button.bg-danger:focus { background-color: #823642 !important; }
.border-primary { border-color: #497868 !important; }
.border-danger { border-color: #9e4352 !important; }
.text-primary { color: #497868 !important; }
a.text-primary:hover, a.text-primary:focus { color: #3a6053 !important; }
.text-danger { color: #9e4352 !important; }
a.text-danger:hover, a.text-danger:focus { color: #823642 !important; }
.alert-danger { border-color: #9e4352; }
.alert-solid.alert-danger { background-color: #9e4352; }
.accordion-primary .card-header a { background-color: #497868; }
.accordion-primary .card-header a.collapsed { color: #497868; }
.accordion-danger .card-header a { background-color: #9e4352; }
.accordion-danger .card-header a.collapsed { color: #9e4352; }
.ckbox span:after { background-color: #497868; }
.ckbox-danger span::after { background-color: #9e4352; }
.rdiobox input[type='radio']:checked + span:before { background-color: #497868; }
.rdiobox-danger input[type='radio']:checked + span:before { background-color: #9e4352; }
.custom-file-label-primary::after { background-color: #497868; }
.fc-focus-primary:focus, .fc-focus-primary:active { border-color: #497868; }
.fc-focus-danger:focus, .fc-focus-danger:active { border-color: #9e4352; }
.inputfile + label.if-outline-primary { border: 2px solid #497868; color: #497868; }
.inputfile + label.if-outline-danger { border: 2px solid #9e4352; color: #9e4352; }
.inputfile + .if-style-1.if-primary { color: #497868; }
.inputfile + .if-style-1.if-primary .icon-wrapper { background-color: #497868; }
.inputfile + .if-style-1.if-danger { color: #9e4352; }
.inputfile + .if-style-1.if-danger .icon-wrapper { background-color: #9e4352; }
.nav.active-primary .nav-link.active { color: #497868; }
.nav.active-danger .nav-link.active { color: #9e4352; }
.nav-outline.active-primary .nav-link.active, .nav-outline.active-primary .nav-link.active:hover, .nav-outline.active-primary .nav-link.active:focus { color: #497868; }
.nav-outline.active-primary .nav-link.active::before, .nav-outline.active-primary .nav-link.active:hover::before, .nav-outline.active-primary .nav-link.active:focus::before { border-color: #497868; }
.nav-outline.active-danger .nav-link.active, .nav-outline.active-danger .nav-link.active:hover, .nav-outline.active-danger .nav-link.active:focus { color: #9e4352; }
.nav-outline.active-danger .nav-link.active::before, .nav-outline.active-danger .nav-link.active:hover::before, .nav-outline.active-danger .nav-link.active:focus::before { border-color: #9e4352; }
.nav-effect-6 .nav-link:hover span::before, .nav-effect-6 .nav-link:focus span::before { background-color: #497868; }
.nav-effect-6 .nav-link.active span::before, .nav-effect-6 .nav-link.active:hover span::before, .nav-effect-6 .nav-link.active:focus span::before { background-color: #497868; }
.nav-effect-7 .nav-link::before, .nav-effect-7 .nav-link::after { background-color: #9e4352; }
.nav-effect-7 .nav-link:hover, .nav-effect-7 .nav-link:focus { color: #9e4352; }
.pagination-primary .active .page-link, .pagination-primary .active .page-link:hover, .pagination-primary .active .page-link:focus { background-color: #497868; }
.pagination-primary.pagination-dark .active .page-link { background-color: #497868; }
.pagination-danger .active .page-link, .pagination-danger .active .page-link:hover, .pagination-danger .active .page-link:focus { background-color: #9e4352; }
.pagination-danger.pagination-dark .active .page-link { background-color: #9e4352; }
.popover-head-primary .popover-header { background-color: #497868; }
.popover-head-primary.bs-popover-bottom .arrow::after, .popover-head-primary.bs-popover-auto[x-placement^="bottom"] .arrow::after, .popover-head-primary.bs-popover-auto[x-placement^="bottom"] .arrow::after { border-bottom-color: #497868; }
.popover-head-danger .popover-header { background-color: #9e4352; }
.popover-head-danger.bs-popover-bottom .arrow::after, .popover-head-danger.bs-popover-auto[x-placement^="bottom"] .arrow::after, .popover-head-danger.bs-popover-auto[x-placement^="bottom"] .arrow::after { border-bottom-color: #9e4352; }
.popover-primary { background-color: #497868; }
.popover-primary.bs-popover-top .arrow::after, .popover-primary.bs-popover-auto[x-placement^="top"] .arrow::after, .popover-primary.bs-popover-auto[x-placement^="top"] .arrow::after { border-top-color: #497868; }
.popover-primary.bs-popover-bottom .arrow::after, .popover-primary.bs-popover-auto[x-placement^="bottom"] .arrow::after, .popover-primary.bs-popover-auto[x-placement^="bottom"] .arrow::after { border-bottom-color: #497868; }
.popover-primary.bs-popover-left .arrow::after, .popover-primary.bs-popover-auto[x-placement^="left"] .arrow::after, .popover-primary.bs-popover-auto[x-placement^="left"] .arrow::after { border-left-color: #497868; }
.popover-primary.bs-popover-right .arrow::after, .popover-primary.bs-popover-auto[x-placement^="right"] .arrow::after, .popover-primary.bs-popover-auto[x-placement^="right"] .arrow::after { border-right-color: #497868; }
.popover-danger { background-color: #9e4352; }
.popover-danger.bs-popover-top .arrow::after, .popover-danger.bs-popover-auto[x-placement^="top"] .arrow::after, .popover-danger.bs-popover-auto[x-placement^="top"] .arrow::after { border-top-color: #9e4352; }
.popover-danger.bs-popover-bottom .arrow::after, .popover-danger.bs-popover-auto[x-placement^="bottom"] .arrow::after, .popover-danger.bs-popover-auto[x-placement^="bottom"] .arrow::after { border-bottom-color: #9e4352; }
.popover-danger.bs-popover-left .arrow::after, .popover-danger.bs-popover-auto[x-placement^="left"] .arrow::after, .popover-danger.bs-popover-auto[x-placement^="left"] .arrow::after { border-left-color: #9e4352; }
.popover-danger.bs-popover-right .arrow::after, .popover-danger.bs-popover-auto[x-placement^="right"] .arrow::after, .popover-danger.bs-popover-auto[x-placement^="right"] .arrow::after { border-right-color: #9e4352; }
.tooltip-primary .tooltip-inner { background-color: #497868; }
.tooltip-primary.bs-tooltip-top .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="top"] .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="top"] .arrow::before { border-top-color: #497868; }
.tooltip-primary.bs-tooltip-bottom .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="bottom"] .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="bottom"] .arrow::before { border-bottom-color: #497868; }
.tooltip-primary.bs-tooltip-left .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="left"] .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="left"] .arrow::before { border-left-color: #497868; }
.tooltip-primary.bs-tooltip-right .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="right"] .arrow::before, .tooltip-primary.bs-tooltip-auto[x-placement^="right"] .arrow::before { border-right-color: #497868; }
.tooltip-danger .tooltip-inner { background-color: #9e4352; }
.tooltip-danger.bs-tooltip-top .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="top"] .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="top"] .arrow::before { border-top-color: #9e4352; }
.tooltip-danger.bs-tooltip-bottom .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="bottom"] .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="bottom"] .arrow::before { border-bottom-color: #9e4352; }
.tooltip-danger.bs-tooltip-left .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="left"] .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="left"] .arrow::before { border-left-color: #9e4352; }
.tooltip-danger.bs-tooltip-right .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="right"] .arrow::before, .tooltip-danger.bs-tooltip-auto[x-placement^="right"] .arrow::before { border-right-color: #9e4352; }
.table .thead-primary > tr > th, .table .thead-primary > tr > td { background-color: #497868; }
.table .thead-danger > tr > th, .table .thead-danger > tr > td { background-color: #9e4352; }
.table-primary > thead > tr > th, .table-primary > thead > tr > td { background-color: #497868; }
.table-danger > thead > tr > th, .table-danger > thead > tr > td { background-color: #9e4352; }
.irs-primary .irs-bar, .irs-primary .irs-bar-edge, .irs-primary .irs-slider::before { background-color: #497868; }
.irs-primary .irs-from, .irs-primary .irs-to, .irs-primary .irs-single { background-color: #497868; }
.irs-primary .irs-from::after, .irs-primary .irs-to::after, .irs-primary .irs-single::after { border-top-color: #497868; }
.irs-danger .irs-bar, .irs-danger .irs-bar-edge, .irs-danger .irs-slider::before { background-color: #9e4352; }
.irs-danger .irs-from, .irs-danger .irs-to, .irs-danger .irs-single { background-color: #9e4352; }
.irs-danger .irs-from::after, .irs-danger .irs-to::after, .irs-danger .irs-single::after { border-top-color: #9e4352; }
.irs-modern.irs-primary .irs-slider { border-color: #497868; }
.irs-modern.irs-primary .irs-slider::before { border-color: #497868; }
.irs-modern.irs-danger .irs-slider { border-color: #9e4352; }
.irs-modern.irs-danger .irs-slider::before { border-color: #9e4352; }
.irs-outline.irs-primary .irs-line, .irs-outline.irs-primary .irs-slider { border-color: #497868; }
.irs-outline.irs-danger .irs-line, .irs-outline.irs-danger .irs-slider { border-color: #9e4352; }
.wizard > .content > .body input.parsley-error { border-color: #9e4352; }
.fc-datepicker-primary .ui-datepicker { background-color: #497868; }
.fc-datepicker-danger .ui-datepicker { background-color: #9e4352; }
.parsley-checkbox.parsley-error { border: 1px solid #9e4352; }
.parsley-errors-list { color: #9e4352; }
.parsley-style-1 .parsley-input.parsley-error .form-control, .parsley-style-1 .parsley-input.parsley-error .dataTables_filter input, .dataTables_filter .parsley-style-1 .parsley-input.parsley-error input { border-color: #9e4352; }
.parsley-style-1 .parsley-checkbox.parsley-error { border: 1px solid #9e4352; }
.parsley-style-1 .parsley-errors-list.filled { background-color: #9e4352; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: #497868; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #497868; }
.has-danger .select2-container--default .select2-selection--single, .parsley-select.parsley-error .select2-container--default .select2-selection--single { border-color: #9e4352; }
.select2-selection.select2-outline-primary { border-color: #497868; }
.select2-selection.select2-outline-primary .select2-selection__rendered { color: #497868; }
.select2-selection.select2-outline-primary .select2-selection__arrow b { border-top-color: #497868; }
.select2-selection.select2-outline-danger { border-color: #9e4352; }
.select2-selection.select2-outline-danger .select2-selection__rendered { color: #9e4352; }
.select2-selection.select2-outline-danger .select2-selection__arrow b { border-top-color: #9e4352; }
.select2-selection.select2-primary { background-color: #497868; }
.select2-selection.select2-danger { background-color: #9e4352; }
.select2-container--default.select2-container--open .select2-outline-primary .select2-selection__arrow b { border-bottom-color: #497868; }
.select2-container--default.select2-container--open .select2-outline-danger .select2-selection__arrow b { border-bottom-color: #9e4352; }
.hover-danger .select2-results__option--highlighted[aria-selected] { background-color: #9e4352; }
.select2-drop-primary { background-color: #497868; }
.select2-drop-danger { background-color: #9e4352; }
.br-toggle-primary.on { background-color: #497868; }
.br-toggle-danger.on { background-color: #9e4352; }
.br-chatlist .msg-count { background-color: #9e4352; }
.bd-primary { border-color: #497868; }
.bd-danger { border-color: #9e4352; }
a.hover-primary:hover, a.hover-primary:focus { color: #497868; }
.tx-primary { color: #497868; }
.tx-danger { color: #9e4352; }
/* Menu actif Bracket (degrade turquoise -> vert IEDF) */
.br-menu-link.active, .br-menu-link.active:hover, .br-menu-link.active:focus { background-image: linear-gradient(to right, #497868 0%, #3a6053 100%) !important; color: #fff !important; }
/* Couleurs decoratives isolees remplacees dans les vues */
.iedf-label { color: #9e4352 !important; }

/* ===== En-tete, bandeau et menu (mise en page "detached" utilisee par tous les espaces) ===== */
body[data-topbar=colored] #page-topbar { background: #497868 !important; box-shadow: 0 2px 8px rgba(31, 45, 39, .18); }
body[data-layout=detached] #layout-wrapper::before { background: linear-gradient(120deg, #3f6a5b 0%, #2f5044 100%) !important; height: 150px; box-shadow: none; }
.bg-login-overlay { background: linear-gradient(to right, #2f5044, #497868) !important; }
.fc-unthemed td.fc-today { background: #eaf2ef !important; }
body[data-layout=detached] .page-title-box .page-title { color: #fff; letter-spacing: .02em; }
#page-topbar .app-search .form-control { background: rgba(255, 255, 255, .14) !important; color: #fff !important; border: 0; }
#page-topbar .app-search .form-control::placeholder { color: rgba(255, 255, 255, .75); }
#page-topbar .app-search span, #page-topbar .header-item, #page-topbar .header-item i { color: #fff !important; }
#page-topbar .navbar-brand-box .logo img { background: #fff; border-radius: 8px; padding: 3px; }
.header-profile-user { background: #fff; padding: 2px; object-fit: cover; }
.user-wid .user-img img { object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px #497868; }

/* Menu lateral : element actif lisible (fond vert pale, texte vert fonce) */
#sidebar-menu ul li.mm-active > a, #sidebar-menu ul li a.active, #sidebar-menu ul li a.mm-active {
    background: #eaf2ef !important; color: #2f5044 !important; border-radius: 8px; font-weight: 600;
}
#sidebar-menu ul li.mm-active > a i, #sidebar-menu ul li a.active i { color: #497868 !important; }
#sidebar-menu ul li a:hover { color: #497868 !important; }
.vertical-menu { border-radius: 12px; box-shadow: 0 4px 18px rgba(31, 45, 39, .08); }

/* Cartes et tableaux */
.card { border-radius: 12px; border: 1px solid #e7ecea; box-shadow: 0 2px 8px rgba(31, 45, 39, .04); }
.table thead th, table.dataTable thead th { background: #f1f6f4; color: #2f5044; border-bottom: 2px solid #d5e2dd; }

/* Pied de page */
.iedf-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 30px 0 0; padding: 16px 24px; border-top: 3px solid #497868; background: #fff; color: #5f6d67; font-size: 13px; border-radius: 12px 12px 0 0; }
.iedf-footer-r { color: #9e4352; font-weight: 600; }

/* ===== IEDF : graphique des etapes du memoire ===== */
.iedf-legend { display: flex; background: #fff; border-radius: 10px 10px 0 0; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 22px 12px 0; font-size: 14px; color: #4b5a54; }
.iedf-legend span { display: inline-flex; align-items: center; gap: 7px; }
.iedf-legend .lg { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.iedf-legend .lg-todo { background: #fff; border: 2px solid #c9d3cf; }
.iedf-legend .lg-wait { background: #fff; border: 3px solid #497868; }
.iedf-legend .lg-ok { background: #497868; }
.iedf-legend .lg-ko { background: #9e4352; }
td.iedf-stepper-cell { padding: 10px 8px 6px !important; }
.iedf-stepper { list-style: none; display: flex; justify-content: space-between; margin: 0; padding: 18px 0 8px; counter-reset: none; }
.iedf-step { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.iedf-step::before { content: ""; position: absolute; top: 24px; left: -50%; width: 100%; height: 4px; background: #e3e9e6; z-index: 0; }
.iedf-step:first-child::before { display: none; }
.iedf-step:has(> .list.success)::before, .iedf-step:has(> .list.danger)::before, .iedf-step:has(> .list.primary)::before { background: #497868; }
.iedf-stepper .list, .iedf-stepper .list.active {
    position: relative; z-index: 1; width: 52px; height: 52px; margin: 0 !important; padding: 0 !important;
    display: flex; align-items: center; justify-content: center; border-radius: 50% !important;
    font-size: 18px !important; font-weight: 700 !important; cursor: pointer; text-decoration: none !important;
    background: #fff !important; color: #8a9893 !important; border: 3px solid #c9d3cf; box-shadow: none !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
.iedf-stepper .list:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(47, 80, 68, .18) !important; }
.iedf-stepper .list.primary { border-color: #497868; color: #497868 !important; }
.iedf-stepper .list.success { background: #497868 !important; border-color: #497868; color: #fff !important; }
.iedf-stepper .list.danger { background: #9e4352 !important; border-color: #9e4352; color: #fff !important; }
.iedf-stepper .list.success::after { content: "\2713"; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #497868; font-size: 12px; line-height: 17px; border: 2px solid #497868; }
.iedf-stepper .list.danger::after { content: "!"; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #9e4352; font-size: 12px; line-height: 17px; border: 2px solid #9e4352; }
.iedf-stepper .list.active { box-shadow: 0 0 0 6px rgba(73, 120, 104, .22) !important; transform: scale(1.08); }
.iedf-stepper .list.danger.active { box-shadow: 0 0 0 6px rgba(158, 67, 82, .22) !important; }
.iedf-step-label { margin-top: 10px; font-size: 12.5px; line-height: 1.25; color: #5f6d67; font-weight: 500; padding: 0 4px; }
.iedf-step:has(> .list.active) .iedf-step-label { color: #1f2d27; font-weight: 700; }
@media (max-width: 900px) {
    .iedf-stepper { overflow-x: auto; justify-content: flex-start; padding-bottom: 12px; }
    .iedf-step { flex: 0 0 92px; }
    .iedf-stepper .list, .iedf-stepper .list.active { width: 42px; height: 42px; font-size: 15px !important; }
    .iedf-step::before { top: 19px; }
}

/* ---- Fiche etudiant + progression (suivi du memoire) ---- */
#EtudInfo2 { float: none !important; padding: 0; }
.iedf-infocard { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; background: #f4f8f6; border: 1px solid #e1ebe6; border-left: 4px solid #497868; border-radius: 12px; padding: 14px 20px; margin: 18px 0 8px; text-align: left; }
.iedf-info-promo { flex-basis: 100%; font-size: 1.05rem; font-weight: 600; color: #2f5044; }
.iedf-info-item { display: flex; flex-direction: column; }
.iedf-info-item span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #7d8d87; }
.iedf-info-item b { font-size: .98rem; color: #1f2d27; font-weight: 600; }
.iedf-progress { display: flex; align-items: center; gap: 14px; margin: 14px 0 4px; }
.iedf-progress-txt { font-size: .85rem; color: #5b6b65; white-space: nowrap; }
.iedf-progress-txt b { color: #2f5044; }
.iedf-progress-bar { flex: 1; height: 8px; background: #e5ece9; border-radius: 99px; overflow: hidden; }
.iedf-progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5f8a7b, #497868); border-radius: 99px; transition: width .4s ease; }
/* Themes vides : pas de puce orpheline */
.main-content li:empty, .br-mainpanel li:empty { display: none; }

/* ===================== IEDF : interface moderne et rapide ===================== */
/* Plus d'ecran blanc avec le rond qui tourne : la page s'affiche des qu'elle arrive */
#preloader, #status { display: none !important; }
/* Fine barre de chargement en haut, retiree des que la page est prete */
html:not(.iedf-ready) body::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 40%; z-index: 99999; background: linear-gradient(90deg, #9e4352, #497868); animation: iedf-load 1.1s ease-in-out 5, iedf-hide .3s linear 5.5s forwards; }
@keyframes iedf-load { 0% { left: -40%; } 100% { left: 100%; } } @keyframes iedf-hide { to { opacity: 0; visibility: hidden; } }

/* Police systeme : rapide (aucun telechargement) et moderne */
body, button, input, select, textarea, .btn, .form-control, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.br-mainpanel, .br-sideleft, .br-header, .navbar, .dropdown-menu, .table, .modal {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}
body { background: #f3f6f5 !important; color: #23302b; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, h6 { color: #1f2d27; font-weight: 600; letter-spacing: -.01em; }
a { transition: color .15s ease; }

/* Cartes */
.card, .br-section-wrapper, .card-body.bg-white { border-radius: 14px !important; border: 1px solid #e4ebe8 !important; box-shadow: 0 1px 2px rgba(31, 45, 39, .04), 0 6px 20px rgba(31, 45, 39, .05) !important; }
.card-header { background: #fff !important; border-bottom: 1px solid #edf1ef !important; font-weight: 600; border-radius: 14px 14px 0 0 !important; }
.card-title { font-weight: 600; color: #1f2d27; }

/* Boutons */
.btn { border-radius: 9px !important; font-weight: 500; letter-spacing: .01em; transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-success, .btn-info { box-shadow: 0 2px 6px rgba(73, 120, 104, .25); }
.btn-primary:hover, .btn-success:hover, .btn-info:hover { box-shadow: 0 4px 12px rgba(73, 120, 104, .32); }
.btn-danger { box-shadow: 0 2px 6px rgba(158, 67, 82, .22); }
.btn-sm { border-radius: 7px !important; }

/* Formulaires */
.form-control, .custom-select, select.form-control, .select2-container .select2-selection {
  border-radius: 9px !important; border: 1px solid #d6e0dc !important; transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .custom-select:focus { border-color: #497868 !important; box-shadow: 0 0 0 3px rgba(73, 120, 104, .15) !important; }
label { font-weight: 500; color: #3a4a44; }

/* Tableaux */
.table { color: #23302b; }
.table td, .table th { vertical-align: middle; border-color: #edf1ef !important; }
.table thead th, table.dataTable thead th { text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; font-weight: 600; }
.table-hover tbody tr:hover, table.dataTable tbody tr:hover { background: #f4f8f6 !important; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border-radius: 9px; border: 1px solid #d6e0dc; padding: 4px 10px; }
.page-item.active .page-link { background: #497868 !important; border-color: #497868 !important; }
.page-link { border-radius: 8px !important; margin: 0 2px; color: #497868; border-color: #e1e8e5; }

/* Badges, alertes, fenetres */
.badge { border-radius: 99px; padding: .35em .7em; font-weight: 600; }
.alert { border-radius: 12px; border: 0; }
.modal-content { border-radius: 16px !important; border: 0 !important; box-shadow: 0 20px 50px rgba(31, 45, 39, .25) !important; }
.modal-header { border-bottom: 1px solid #edf1ef !important; }
.modal-footer { border-top: 1px solid #edf1ef !important; }
.dropdown-menu { border-radius: 12px !important; border: 1px solid #e4ebe8 !important; box-shadow: 0 10px 30px rgba(31, 45, 39, .12) !important; }

/* Barres de defilement discretes */
* { scrollbar-width: thin; scrollbar-color: #c5d3ce transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c5d3ce; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* Moins d'animations pour ceux qui le demandent */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Titres du bandeau toujours lisibles */
body[data-layout=detached] .page-title-box h4, body[data-layout=detached] .page-title-box h4 a, body[data-layout=detached] .page-title-box .breadcrumb-item, body[data-layout=detached] .page-title-box .breadcrumb-item a { color: #fff !important; }
/* Barre d'outils des tableaux (Copier, Excel, CSV, Imprimer) */
.dt-buttons .btn, .dt-buttons .dt-button, .dt-buttons .btn-secondary { background: #fff !important; color: #2f5044 !important; border: 1px solid #d6e0dc !important; box-shadow: none !important; margin-right: 6px; border-radius: 8px !important; padding: 5px 14px; }
.dt-buttons .btn:hover, .dt-buttons .dt-button:hover { background: #eaf2ef !important; border-color: #497868 !important; }
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: #5b6b65; white-space: nowrap; }
.dataTables_wrapper .dataTables_length select { width: auto !important; display: inline-block; }
.dataTables_wrapper .dataTables_info { color: #6b7a74; font-size: .85rem; }

/* ===================== IEDF : affichage sur téléphone ===================== */
@media (max-width: 767.98px) {
    /* Rien ne dépasse de l'écran */
    .page-content img, .page-content video, .page-content iframe, .page-content input, .page-content select, .page-content textarea { max-width: 100% !important; }
    .page-content { overflow-wrap: break-word; }
    .page-content .card-body { padding: 14px !important; }
    /* Titre de page : sur une ou deux lignes, dans le bandeau */
    .page-title-box { height: auto !important; min-height: 0 !important; padding-top: 4px !important; padding-bottom: 6px !important; flex-wrap: wrap; }
    body[data-layout=detached] #layout-wrapper::before { height: 180px !important; }
    .page-title-box h4, .page-title-box .page-title { font-size: 15px !important; line-height: 1.35 !important; white-space: normal !important; }
    /* Tableau de mise en page des étapes : une colonne */
    table:has(td.iedf-stepper-cell), table:has(td.iedf-stepper-cell) > tbody, table:has(td.iedf-stepper-cell) > tbody > tr, table:has(td.iedf-stepper-cell) > tbody > tr > td { display: block; width: 100% !important; }
    td.iedf-stepper-cell { padding: 6px 0 !important; }
    .iedf-stepper { width: 100%; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .iedf-step { flex: 0 0 82px; scroll-snap-align: center; }
    .iedf-step-label { font-size: 11.5px; overflow-wrap: normal; word-break: normal; hyphens: auto; }
    .iedf-step { flex-basis: 92px !important; }
    .iedf-progress { flex-wrap: wrap; gap: 6px 12px; }
    .iedf-progress-bar { flex-basis: 100%; }
    .iedf-legend { gap: 6px 14px !important; flex-wrap: wrap; justify-content: flex-start !important; font-size: 13px; }
    /* Contenu des étapes */
    .page-content h1 { font-size: 22px !important; } .page-content h2 { font-size: 19px !important; } .page-content h3 { font-size: 17px !important; }
    .page-content h4, .page-content .fs-title { font-size: 16px !important; }
    .page-content [style*="text-align:right"], .page-content [style*="text-align: right"] { text-align: left !important; float: none !important; }
    .page-content ul, .page-content ol:not(.iedf-stepper) { padding-left: 18px; text-align: left !important; }
    .page-content li { text-align: left !important; }
    .page-content .alert { padding: 12px 14px; text-align: left; }
    .page-content .btn { white-space: normal; margin-bottom: 6px; }
    .page-content .table-responsive, .page-content .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .page-content table:not(:has(td.iedf-stepper-cell)) { max-width: 100%; }
    /* Tableaux de données : défilement horizontal au lieu de déborder */
    .page-content .result5 table, .page-content .card-body > table, .page-content .dataTables_wrapper table { display: block; overflow-x: auto; }
    .iedf-infocard { padding: 12px 14px; gap: 10px 18px; }
    /* Tableau de bord : cartes de même largeur */
    .page-content .row > [class*="col-"] > .card { width: 100% !important; }
    .iedf-footer { font-size: 13px; }
}

/* ===================== IEDF : contenu des étapes (suivi du mémoire) ===================== */
.iedf-zone { text-align: left; }
.iedf-zone > br, .iedf-zone .alert > br, .iedf-zone #formm > br, .iedf-zone .alert > p > br:only-child { display: none; }
.iedf-zone .fs-title { text-align: left !important; font-size: 17px !important; font-weight: 700; color: #2f5044; margin: 6px 0 16px !important; padding-bottom: 10px; border-bottom: 1px solid #e4ebe8; }
.iedf-zone .alert { background: #fff !important; color: #23302b !important; border: 1px solid #e4ebe8 !important; border-left: 4px solid #8fa79e !important; border-radius: 12px !important; padding: 16px 20px !important; margin: 0 0 14px !important; text-align: left !important; box-shadow: 0 1px 2px rgba(31, 45, 39, .04); }
.iedf-zone .alert-success { border-left-color: #497868 !important; }
.iedf-zone .alert-primary, .iedf-zone .alert-info { border-left-color: #5b7fa6 !important; }
.iedf-zone .alert-danger { border-left-color: #9e4352 !important; background: #fdf6f7 !important; }
.iedf-zone .alert-warning { border-left-color: #c99a3a !important; background: #fffaf0 !important; }
.iedf-zone .alert-light { border-left-color: #c9d3cf !important; background: #fafcfb !important; }
.iedf-zone .alert center { text-align: left; }
.iedf-zone .alert h5, .iedf-zone .alert h4 { font-size: 15px !important; font-weight: 700; color: #1f2d27; margin: 0 0 8px !important; text-align: left !important; }
.iedf-zone .alert h5 + p, .iedf-zone .alert p { margin: 0 0 8px; text-align: left !important; float: none !important; }
.iedf-zone .alert .text-primary { color: #2f5044 !important; }
.iedf-zone .alert ul { padding-left: 18px; margin: 6px 0 8px; }
.iedf-zone .alert li { text-align: left !important; margin-bottom: 4px; }
.iedf-zone .iedf-date { display: inline-flex !important; align-items: center; gap: 6px; margin: 2px 14px 0 0 !important; font-size: 12.5px; color: #6b7a74 !important; }
.iedf-zone .iedf-date::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9d3cf; }
.iedf-zone .iedf-date.ok::before { background: #497868; } .iedf-zone .iedf-date.ko::before { background: #9e4352; }
.iedf-zone .iedf-vide { font-size: 13px; color: #8a9893; font-style: italic; }
.iedf-zone .alert .btn-sm { margin: 2px 0 6px; }
/* Messages / demandes d'éclaircissements */
.iedf-zone h2.iedf-msg-titre { font-size: 17px !important; font-weight: 700; color: #2f5044; text-align: left; margin: 26px 0 12px !important; padding-top: 18px; border-top: 1px solid #e4ebe8; }
.iedf-zone #formm { text-align: left !important; background: #f7faf9; border: 1px solid #e4ebe8; border-radius: 12px; padding: 16px 18px 18px; }
.iedf-zone #formm .form-group { padding: 0 !important; margin-bottom: 12px; text-align: left !important; }
.iedf-zone #formm label { display: block; text-align: left !important; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.iedf-zone input[type=file] { font-size: 13px; color: #5f6d67; max-width: 100%; }
.iedf-zone input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 1px solid #497868; border-radius: 8px; background: #fff; color: #497868; font-weight: 600; cursor: pointer; }
.iedf-zone input[type=file]::file-selector-button:hover { background: #eef5f2; }
.iedf-zone #formm button[type=submit] { min-width: 140px; }
.iedf-zone .iedf-cache { display: none !important; }
